Skip to content

draw.io is a JavaScript, client-side editor for general diagramming.

27.0.5 release

David Bensonbbc2e88b222c
diff --git a/ChangeLog b/ChangeLog
index 342c91900..4d906a354 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+13-MAY-2025: 27.0.5
+
+- Skips service worker install on first load
+
+12-MAY-2025: 27.0.4
+
+- Fixes image export background [jgraph/drawio-desktop#2091]
+- Adds warning for plantuml deprecation
+
+09-MAY-2025: 27.0.3
+
+- Moves bootstrap and main code to external JS files
+
08-MAY-2025: 27.0.2
- Changes cache url for app.diagrams.net
diff --git a/VERSION b/VERSION
index 31c488636..6f350a792 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-27.0.2
\ No newline at end of file
+27.0.5
\ No newline at end of file
diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html
index dcb642872..fabef1177 100644
--- a/src/main/webapp/index.html
+++ b/src/main/webapp/index.html
@@ -22,344 +22,7 @@
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
<link rel="stylesheet" media="(forced-colors: active)" href="styles/high-contrast.css" id="high-contrast-stylesheet">
- <script id="geBootstrap" type="text/javascript">
- /**
- * URL Parameters and protocol description are here:
- *
- * https://www.drawio.com/doc/faq/supported-url-parameters
- *
- * Parameters for developers:
- *
- * - dev=1: For developers only
- * - test=1: For developers only
- * - export=URL for export: For developers only
- * - ignoremime=1: For developers only (see DriveClient.js). Use Cmd-S to override mime.
- * - createindex=1: For developers only (see etc/build/README)
- * - filesupport=0: For developers only (see Editor.js in core)
- * - savesidebar=1: For developers only (see Sidebar.js)
- * - pages=1: For developers only (see Pages.js)
- * - lic=email: For developers only (see LicenseServlet.java)
- * --
- * - networkshapes=1: For testing network shapes (temporary)
- */
- var urlParams = (function()
- {
- var result = new Object();
- var params = window.location.search.slice(1).split('&');
-
- for (var i = 0; i < params.length; i++)
- {
- var idx = params[i].indexOf('=');
-
- if (idx > 0)
- {
- result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
- }
- }
-
- return result;
- })();
-
- // Forces CDN caches by passing URL parameters via URL hash
- if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
- {
- try
- {
- urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));
-
- if (urlParams.hash != null)
- {
- window.location.hash = urlParams.hash;
- }
- }
- catch (e)
- {
- // ignore
- }
- }
-
- // Global variable for desktop
- var mxIsElectron = navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf(' electron/') > -1 &&
- navigator.userAgent.indexOf(' draw.io/') > -1;
-
- // Redirects page if required
- if (urlParams['dev'] != '1')
- {
- (function()
- {
- var proto = window.location.protocol;
-
- if (!mxIsElectron)
- {
- var host = window.location.host;
-
- // Redirects apex, drive and rt to www
- if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io')
- {
- host = 'www.draw.io';
- }
-
- var href = proto + '//' + host + window.location.href.substring(
- window.location.protocol.length +
- window.location.host.length + 2);
-
- // Redirects if href changes
- if (href != window.location.href)
- {
- window.location.href = href;
- }
- }
- })();
- }
-
- /**
- * Adds meta tag to the page.
- */
- function mxmeta(name, content, httpEquiv)
- {
- try
- {
- var s = document.createElement('meta');
-
- if (name != null)
- {
- s.setAttribute('name', name);
- }
-
- s.setAttribute('content', content);
-
- if (httpEquiv != null)
- {
- s.setAttribute('http-equiv', httpEquiv);
- }
-
- var t = document.getElementsByTagName('meta')[0];
- t.parentNode.insertBefore(s, t);
- }
- catch (e)
- {
- // ignore
- }
- };
-
- /**
- * Synchronously adds scripts to the page.
- */
- function mxscript(src, onLoad, id, dataAppKey, noWrite, onError)
- {
- var defer = onLoad == null && !noWrite;
-
- if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
- onLoad != null || noWrite)
- {
- var s = document.createElement('script');
- s.setAttribute('type', 'text/javascript');
- s.setAttribute('defer', 'true');
- s.setAttribute('src', src);
-
- if (id != null)
- {
- s.setAttribute('id', id);
- }
-
- if (dataAppKey != null)
- {
- s.setAttribute('data-app-key', dataAppKey);
- }
-
- if (onLoad != null)
- {
- var r = false;
-
- s.onload = s.onreadystatechange = function()
- {
- if (!r && (!this.readyState || this.readyState == 'complete'))
- {
- r = true;
- onLoad();
- }
- };
- }
-
- if (onError != null)
- {
- s.onerror = function(e)
- {
- onError('Failed to load ' + src, e);
- };
- }
-
- var t = document.getElementsByTagName('script')[0];
-
- if (t != null)
- {
- t.parentNode.insertBefore(s, t);
- }
- }
- else
- {
- document.write('<script src="' + src + '"' + ((id != null) ? ' id="' + id +'" ' : '') +
- ((dataAppKey != null) ? ' data-app-key="' + dataAppKey +'" ' : '') + '></scr' + 'ipt>');
- }
- };
-
- /**
- * Asynchronously adds scripts to the page.
- */
- function mxinclude(src)
- {
- var g = document.createElement('script');
- g.type = 'text/javascript';
- g.async = true;
- g.src = src;
-
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(g, s);
- };
-
- /**
- * Adds meta tags with application name (depends on offline URL parameter)
- */
- (function()
- {
- var name = 'diagrams.net';
- mxmeta('apple-mobile-web-app-title', name);
- mxmeta('application-name', name);
-
- if (mxIsElectron)
- {
- mxmeta(null, 'default-src \'self\'; script-src \'self\' \'sha256-6g514VrT/cZFZltSaKxIVNFF46+MFaTSDTPB8WfYK+c=\'; connect-src \'self\' https://*.draw.io https://*.diagrams.net https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; frame-src \'none\'; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com; base-uri \'none\';child-src \'self\';object-src \'none\';', 'Content-Security-Policy');
- }
- })();
-
- // Checks for local storage
- var isLocalStorage = false;
-
- try
- {
- isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined';
- }
- catch (e)
- {
- // ignored
- }
-
- var mxScriptsLoaded = false, mxWinLoaded = false;
-
- function checkAllLoaded()
- {
- if (mxScriptsLoaded && mxWinLoaded)
- {
- App.main();
- }
- };
-
- var t0 = new Date();
-
- // Changes paths for local development environment
- if (urlParams['dev'] == '1')
- {
- // Used to request grapheditor/mxgraph sources in dev mode
- var mxDevUrl = '';
-
- // Used to request draw.io sources in dev mode
- var drawDevUrl = '';
- var geBasePath = 'js/grapheditor';
- var mxBasePath = 'mxgraph/src';
-
- if (document.location.protocol == 'file:')
- {
- // Forces includes for dev environment in node.js
- mxForceIncludes = true;
- }
-
- mxForceIncludes = false;
-
- mxscript(drawDevUrl + 'js/PreConfig.js');
- mxscript(drawDevUrl + 'js/diagramly/Init.js');
- mxscript(geBasePath + '/Init.js');
- mxscript(mxBasePath + '/mxClient.js');
-
- // Adds all JS code that depends on mxClient. This indirection via Devel.js is
- // required in some browsers to make sure mxClient.js (and the files that it
- // loads asynchronously) are available when the code loaded in Devel.js runs.
- mxscript(drawDevUrl + 'js/diagramly/Devel.js');
-
- // Electron
- if (mxIsElectron)
- {
- mxscript('js/diagramly/DesktopLibrary.js');
- mxscript('js/diagramly/ElectronApp.js');
- }
-
- mxscript(drawDevUrl + 'js/PostConfig.js');
- }
- else
- {
- (function()
- {
- var hostName = window.location.hostname;
-
- // Supported domains are *.draw.io and the packaged version in Quip
- var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
- (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net');
-
- function loadAppJS()
- {
- mxscript('js/app.min.js', function()
- {
- mxScriptsLoaded = true;
- checkAllLoaded();
-
- // Electron
- if (mxIsElectron)
- {
- mxscript('js/diagramly/DesktopLibrary.js', function()
- {
- mxscript('js/diagramly/ElectronApp.js', function()
- {
- mxscript('js/extensions.min.js', function()
- {
- mxscript('js/stencils.min.js', function()
- {
- mxscript('js/shapes-14-6-5.min.js', function()
- {
- mxscript('js/PostConfig.js');
- });
- });
- });
- });
- });
- }
- else if (!supportedDomain || navigator.onLine)
- {
- mxscript('js/PostConfig.js');
- }
- });
- };
-
- if (!supportedDomain || mxIsElectron || navigator.onLine)
- {
- mxscript('js/PreConfig.js', loadAppJS);
- }
- else
- {
- loadAppJS();
- }
- })();
- }
-
- // Adds basic error handling
- window.onerror = function()
- {
- var status = document.getElementById('geStatus');
-
- if (status != null)
- {
- status.innerHTML = 'Page could not be loaded. Please try refreshing.';
- }
- };
- </script>
+ <script src="js/bootstrap.js"></script>
<style type="text/css">
.geBlock {
z-index:-3;
@@ -390,22 +53,6 @@
</p>
</div>
</div>
-<script id="geMain" type="text/javascript">
-/**
- * Main
- */
-if (urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function")
-{
- window.addEventListener('load', function()
- {
- mxWinLoaded = true;
- checkAllLoaded();
- });
-}
-else
-{
- App.main();
-}
-</script>
+<script src="js/main.js"></script>
</body>
</html>
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 886610def..3520d44d3 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -63,7 +63,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.5",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -201,17 +201,17 @@ function(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_D
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,"gesturechange",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,"gestureend",function(g){mxEvent.consume(g)})}else{var d=
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
-a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},
-isMouseEvent:function(a){return!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in
-a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||
-null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",
-CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",
-BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",
-CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",
-EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
-mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};
-mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
+a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.type&&0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.type&&0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return!mxClient.IS_ANDROID&&
+mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.type&&0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
+mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
+(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},
+LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",
+FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",
+BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",
+REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",
+UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;
+mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&this.acceptResponse&&(this.acceptResponse=!1,a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),null!=b&&(this.request.onerror=
mxUtils.bind(this,function(e){this.acceptResponse&&(this.acceptResponse=!1,b(this,e))})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
@@ -2034,10 +2034,10 @@ PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=documen
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var q=document.createElement("span");q.style.width="100px";mxUtils.write(q,
mxResources.get("landscape"));m.appendChild(q);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
"right";k.appendChild(w);var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<C.length;D++){var E=document.createElement("option");E.setAttribute("value",C[D].unit);mxUtils.write(E,C[D].label);z.appendChild(E)}z.value=Editor.pageSizeUnit;k.appendChild(z);
-m.style.display="none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(D=0;D<I.length;D++)C=I[D],G[C.key]=C,E=document.createElement("option"),E.setAttribute("value",C.key),mxUtils.write(E,C.title),h.appendChild(E);var J=function(){h.value="custom";for(var K=0;K<I.length;K++){var U=I[K];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
-e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(h.value=U.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(h.value=U.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
-h.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};J();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,U){K=G[h.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),w.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display=
-"none",m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(w.value);if(isNaN(K)||0>=K)w.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){g.checked=!0;T(K);mxEvent.consume(K)});
+m.style.display="none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(D=0;D<I.length;D++)C=I[D],G[C.key]=C,E=document.createElement("option"),E.setAttribute("value",C.key),mxUtils.write(E,C.title),h.appendChild(E);var J=function(){h.value="custom";for(var K=0;K<I.length;K++){var V=I[K];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
+h.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};J();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,V){K=G[h.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),w.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display=
+"none",m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(w.value);if(isNaN(K)||0>=K)w.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));V||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){g.checked=!0;T(K);mxEvent.consume(K)});
mxEvent.addListener(q,"click",function(K){d.checked=!0;T(K);mxEvent.consume(K)});mxEvent.addListener(u,"blur",T);mxEvent.addListener(u,"click",T);mxEvent.addListener(w,"blur",T);mxEvent.addListener(w,"click",T);mxEvent.addListener(d,"change",T);mxEvent.addListener(g,"change",T);mxEvent.addListener(h,"change",function(K){T(K,"custom"==h.value);mxEvent.consume(K)});mxEvent.addListener(z,"change",function(K){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);w.value=Editor.toUnit(Editor.fromUnit(w.value,
Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;T(K,!0);mxEvent.consume(K)});T(null,!0);return{set:function(K){e=K;J(null,null,!0)},get:function(){return e},widthInput:u,heightInput:w}};
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)",
@@ -2063,40 +2063,39 @@ this.scale-z+m,D)+I*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.sca
m){for(var q=this.graph.gridSize*this.scale*(null!=m?m:1);q<this.minGridSize;)q*=2;m=this.gridSteps*q;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*q;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);q="color-scheme: light dark;";mxClient.IS_SF&&(q="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+q+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var q=this.view.canvas;null!=q.ownerSVGElement&&(q=q.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";q.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,q){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();
-m=C.width;q=C.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(q/D.height)-1:0,G=h?Math.ceil(m/D.width)-1:0,I=C.x+m,J=C.y+q;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?E:G,U=0;U<=K;U++){var V=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(U+1)*D.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*D.height))]:[new mxPoint(Math.round(C.x+(U+1)*D.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*D.width),Math.round(J))];null!=T[U]?(T[U].points=V,T[U].redraw()):(V=new mxPolyline(V,this.pageBreakColor),V.dialect=this.dialect,V.isDashed=this.pageBreakDashed,V.pointerEvents=!1,V.init(this.view.backgroundPane),V.redraw(),T[U]=V)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});h(this.horizontalPageBreaks);
+m=C.width;q=C.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(q/D.height)-1:0,G=h?Math.ceil(m/D.width)-1:0,I=C.x+m,J=C.y+q;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?E:G,V=0;V<=K;V++){var W=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
+Math.round(C.y+(V+1)*D.height)),new mxPoint(Math.round(I),Math.round(C.y+(V+1)*D.height))]:[new mxPoint(Math.round(C.x+(V+1)*D.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(V+1)*D.width),Math.round(J))];null!=T[V]?(T[V].points=W,T[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),T[V]=W)}for(V=K;V<T.length;V++)null!=T[V]&&T[V].destroy();T.splice(K,T.length-K)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,q){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,q=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,q)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,q+h.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=h+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(h,m,q,k,u,w){var z=g.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(h,m,q){var k=this.graph.model.getParent(h);if(m){var u=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(h)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(h))}else if(u=d.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(q.getEvent())||
-this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(q.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),q=m.getParent(h),k=this.graph.view.getState(q),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(q)||m.isEdge(q));){var w=this.graph.isCellSelected(q);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=q;q=m.getParent(q)}return h}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,g=this.editor.graph;g.lightbox=e;var d=g.getGraphBounds;g.getGraphBounds=function(){var O=d.apply(this,arguments),X=this.backgroundImage;if(null!=X&&null!=X.width&&null!=X.height){var ja=this.view.translate,ka=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((ja.x+X.x)*ka,(ja.y+X.y)*ka,X.width*ka,X.height*ka))}return O};g.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(O,X){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=
-function(){return!1};g.panningHandler.isForcePanningEvent=function(O){for(var X=O.getSource();null!=X&&X!=g.container;){if("foreignObject"===X.nodeName||"text"===X.nodeName)return!1;X=X.parentNode}return!mxEvent.isPopupTrigger(O.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,q=!1;this.setDefaultStyle=function(O){try{g.getModel().isEdge(O)?
-q=g.pasteEdgeStyle=!1:m=!1;var X=g.getCellStyle(O,!1),ja=[],ka=[],ta;for(ta in X)ja.push(X[ta]),ka.push(ta);g.getModel().isEdge(O)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[O],"force",!0));g.getModel().isEdge(O)?q=g.pasteEdgeStyle=!0:m=!0}catch(M){this.handleError(M)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=q=
-g.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(O,X){g.pasteCellStyles(g.includeDescendants(X.getProperty("cells")))});g.addListener("textInserted",function(O,X){g.pasteCellStyles(X.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(O){null==O&&(O=window.event);return g.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var O=
-null;if(/iP(hone|od|ad)/.test(navigator.platform)){var X=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{O=[parseInt(X[1],10),parseInt(X[2],10),parseInt(X[3]||0,10)]}catch(ja){}}return O}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect",
-"none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(O){if(null!=O){var X=mxEvent.getSource(O);if("A"==X.nodeName)for(;null!=X;){if("geHint"==X.className)return!0;X=X.parentNode}}return k(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=
-!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(O){var X=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-
-X.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-X.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,X){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){16==O.which?this.shiftDown=!0:32!=O.which||g.isEditing()?mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,
-!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(O)!=g.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(O){return z.apply(this,arguments)||
-f.isSpaceDown()||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(O){return C.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var D=
-g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var O=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,X=this.toolbar.container.firstChild;null!=X;){var ja=X.getAttribute("data-min-width");null!=ja&&parseInt(ja)>O?X.style.display="none":X.style.display="";X=X.nextSibling}}),G=!1,I=null,J=null,T=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=
-g.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,X=[];null!=O;){var ja=O.nextSibling;O.parentNode.removeChild(O);X.push(O);O=ja}O=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var ka=0;ka<T.length;ka++)this.toolbar.container.appendChild(T[ka]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=J}G=g.cellEditor.isContentEditing();I=O;J=ja;T=X;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);
-this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",E);E();var U=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){U.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var O=!1,X=function(){O||(O=!0,window.setTimeout(function(){var ja=g.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),
-f.toolbar.setFontSize(parseInt(ja.fontSize))));O=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",X);mxEvent.addListener(g.cellEditor.textarea,"touchend",X);mxEvent.addListener(g.cellEditor.textarea,"mouseup",X);mxEvent.addListener(g.cellEditor.textarea,"keyup",X);X()}};var V=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(O,X){try{V.apply(this,arguments),K()}catch(ja){f.handleError(ja)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===
-window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(O){}var Q=g.fireMouseEvent;g.fireMouseEvent=function(O,X,ja){try{O==mxEvent.MOUSE_DOWN&&this.container.focus(),Q.apply(this,arguments)}catch(ka){f.handleError(ka)}};var N=g.foldCells;g.foldCells=function(O,X,ja,ka,ta){try{N.apply(this,arguments)}catch(M){f.handleError(M)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,X,ja){this.menus.createPopupMenu(O,X,ja)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(O,X){var ja=[X.getProperty("cell")];X.getProperty("terminalInserted")&&(ja.push(X.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(ja[ja.length-1]))},0));g.pasteCellStyles(ja)});this.addListener("styleChanged",
-mxUtils.bind(this,function(O,X){O=X.getProperty("force");(this.updateDefaultStyle||O)&&g.copyCellStyles(X.getProperty("cells"),X.getProperty("keys"),X.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,q);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&
-"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?
-this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),
-null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var O=
-g.currentVertexStyle.fontFamily||"Helvetica",X=String(g.currentVertexStyle.fontSize||"12"),ja=g.getView().getState(g.getSelectionCell());null!=ja&&(O=ja.style[mxConstants.STYLE_FONTFAMILY]||O,X=ja.style[mxConstants.STYLE_FONTSIZE]||X,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(X)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(O,X){O=X.getProperty("cells");
-X=X.getProperty("parent");null!=X&&g.getModel().isLayer(X)&&!g.isCellVisible(X)&&null!=O&&0<O.length&&g.getModel().setVisible(X,!0)});Graph.selectParentLayer&&g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var O=g.getLayerForCells(g.getSelectionCells());null!=O&&g.setDefaultParent(O)}});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
-this.gestureHandler);var W=null;this.resizeHandler=mxUtils.bind(this,function(){null!=W&&window.clearTimeout(W);W=window.setTimeout(mxUtils.bind(this,function(){W=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=
-mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));
-this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;
+this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(q.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),q=m.getParent(h),k=this.graph.view.getState(q),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(q)||m.isEdge(q));){var w=this.graph.isCellSelected(q);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=q;q=m.getParent(q)}return h}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,g=this.editor.graph;g.lightbox=e;var d=g.getGraphBounds;g.getGraphBounds=function(){var N=d.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ja=this.view.translate,la=this.view.scale;N=mxRectangle.fromRectangle(N);N.add(new mxRectangle((ja.x+Y.x)*la,(ja.y+Y.y)*la,Y.width*la,Y.height*la))}return N};g.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(N,Y){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=
+function(){return!1};g.panningHandler.isForcePanningEvent=function(N){for(var Y=N.getSource();null!=Y&&Y!=g.container;){if("foreignObject"===Y.nodeName||"text"===Y.nodeName)return!1;Y=Y.parentNode}return!mxEvent.isPopupTrigger(N.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,q=!1;this.setDefaultStyle=function(N){try{g.getModel().isEdge(N)?
+q=g.pasteEdgeStyle=!1:m=!1;var Y=g.getCellStyle(N,!1),ja=[],la=[],S;for(S in Y)ja.push(Y[S]),la.push(S);g.getModel().isEdge(N)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ja,"cells",[N],"force",!0));g.getModel().isEdge(N)?q=g.pasteEdgeStyle=!0:m=!0}catch(U){this.handleError(U)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=q=g.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(N,Y){g.pasteCellStyles(g.includeDescendants(Y.getProperty("cells")))});g.addListener("textInserted",function(N,Y){g.pasteCellStyles(Y.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(N){null==N&&(N=window.event);return g.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var N=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var Y=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{N=[parseInt(Y[1],10),parseInt(Y[2],10),parseInt(Y[3]||0,10)]}catch(ja){}}return N}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(N){if(null!=N){var Y=mxEvent.getSource(N);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return k(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&
+(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(N){var Y=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(N)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(N)-Y.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(N,Y){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(N){16==N.which?this.shiftDown=!0:32!=N.which||g.isEditing()?mxEvent.isConsumed(N)||27!=N.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
+mxEvent.getSource(N)!=g.container||mxEvent.consume(N))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(N){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(N){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(N.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(N.getEvent()))&&
+(!mxEvent.isControlDown(N.getEvent())&&mxEvent.isRightMouseButton(N.getEvent())||mxEvent.isMiddleMouseButton(N.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(N){return C.apply(this,arguments)||13==N.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N)||mxClient.IS_SF&&mxEvent.isShiftDown(N))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
+function(){if(null!=this.toolbar)for(var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,Y=this.toolbar.container.firstChild;null!=Y;){var ja=Y.getAttribute("data-min-width");null!=ja&&parseInt(ja)>N?Y.style.display="none":Y.style.display="";Y=Y.nextSibling}}),G=!1,I=null,J=null,T=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var N=this.toolbar.container.firstChild,Y=[];null!=N;){var ja=N.nextSibling;N.parentNode.removeChild(N);
+Y.push(N);N=ja}N=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var la=0;la<T.length;la++)this.toolbar.container.appendChild(T[la]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=J}G=g.cellEditor.isContentEditing();I=N;J=ja;T=Y;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,
+"resize",E);E();var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var N=!1,Y=function(){N||(N=!0,window.setTimeout(function(){var ja=g.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),f.toolbar.setFontSize(parseInt(ja.fontSize))));N=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",Y);mxEvent.addListener(g.cellEditor.textarea,
+"touchend",Y);mxEvent.addListener(g.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(g.cellEditor.textarea,"keyup",Y);Y()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(N,Y){try{W.apply(this,arguments),K()}catch(ja){f.handleError(ja)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(N){}var O=g.fireMouseEvent;g.fireMouseEvent=function(N,Y,ja){try{N==mxEvent.MOUSE_DOWN&&
+this.container.focus(),O.apply(this,arguments)}catch(la){f.handleError(la)}};var M=g.foldCells;g.foldCells=function(N,Y,ja,la,S){try{M.apply(this,arguments)}catch(U){f.handleError(U)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,Y,ja){this.menus.createPopupMenu(N,Y,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
+function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(N,Y){var ja=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(ja.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(ja[ja.length-1]))},0));g.pasteCellStyles(ja)});this.addListener("styleChanged",mxUtils.bind(this,function(N,Y){N=Y.getProperty("force");(this.updateDefaultStyle||N)&&g.copyCellStyles(Y.getProperty("cells"),Y.getProperty("keys"),
+Y.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,q);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||
+"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,
+Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):
+"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var N=g.currentVertexStyle.fontFamily||"Helvetica",Y=String(g.currentVertexStyle.fontSize||"12"),ja=g.getView().getState(g.getSelectionCell());
+null!=ja&&(N=ja.style[mxConstants.STYLE_FONTFAMILY]||N,Y=ja.style[mxConstants.STYLE_FONTSIZE]||Y,10<N.length&&(N=N.substring(0,8)+"..."));this.toolbar.setFontName(N);this.toolbar.setFontSize(Y)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(N,Y){N=Y.getProperty("cells");Y=Y.getProperty("parent");null!=Y&&g.getModel().isLayer(Y)&&!g.isCellVisible(Y)&&null!=N&&0<N.length&&g.getModel().setVisible(Y,!0)});Graph.selectParentLayer&&
+g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var N=g.getLayerForCells(g.getSelectionCells());null!=N&&g.setDefaultParent(N)}});this.gestureHandler=mxUtils.bind(this,function(N){null!=this.currentMenu&&mxEvent.getSource(N)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var X=null;this.resizeHandler=mxUtils.bind(this,function(){null!=X&&window.clearTimeout(X);X=window.setTimeout(mxUtils.bind(this,
+function(){X=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
+mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(a,b,e){function f(m,q){var k=d;d+=q;return m.substring(k,d)}function g(m){m=f(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);do{e=g(a);var h=f(a,4);if(null!=b&&b(d-8,h,e))break;value=f(a,e);f(a,4);if("IEND"==h)break}while(e)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
@@ -2150,43 +2149,43 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
0),z=0;z<k.length;z++){u.add(w,k[z]);var C=d.view.getState(h[z]);if(null!=C){var D=d.getCellGeometry(k[z]);null!=D&&D.relative&&!u.isEdge(h[z])&&null==q[mxObjectIdentity.get(u.getParent(h[z]))]&&(D.offset=null,D.relative=!1,D.x=C.x/C.view.scale-C.view.translate.x,D.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,q),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var Y=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Y.x*P.width),this.scale*(this.translate.y+Y.y*P.height),this.scale*Y.width*P.width,
-this.scale*Y.height*P.height)};a.getPreferredPageSize=function(Y,P,ba){Y=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,Y.width*P.width,Y.height*P.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(Y,P,ba,la){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;la=null!=la?la:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ma=mxUtils.hasScrollbars(a.container),ya=a.view.translate,za=a.view.scale,
-Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Pa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;Y=Y?Math.max(.3,Math.min(P||1,Ha/Ka.width)):za;P=(Ha-Y*Ka.width)/2/Y;var qa=0==this.lightboxVerticalDivider?0:(Ia-Y*Ka.height)/this.lightboxVerticalDivider/Y;ma&&(P=Math.max(P,0),qa=Math.max(qa,
-0));if(ma||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(Y,Math.floor(P-Ka.x),Math.floor(qa-Ka.y)),a.container.scrollTop=ya*Y/za,a.container.scrollLeft=Pa*Y/za;else if(0!=ba||0!=la)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ba/za),Math.floor(Ja.y+la/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Y){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Y){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ba=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ba.x*R.width),this.scale*(this.translate.y+ba.y*R.height),this.scale*ba.width*
+R.width,this.scale*ba.height*R.height)};a.getPreferredPageSize=function(ba,R,ca){ba=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,ba.width*R.width,ba.height*R.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(ba,R,ca,ma){if(null!=a.container&&!a.isViewer()){ca=null!=ca?ca:0;ma=null!=ma?ma:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),ya=a.view.translate,
+za=a.view.scale,Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Pa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;ba=ba?Math.max(.3,Math.min(R||1,Ha/Ka.width)):za;R=(Ha-ba*Ka.width)/2/ba;var ra=0==this.lightboxVerticalDivider?0:(Ia-ba*Ka.height)/this.lightboxVerticalDivider/ba;na&&(R=Math.max(R,
+0),ra=Math.max(ra,0));if(na||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(ba,Math.floor(R-Ka.x),Math.floor(ra-Ka.y)),a.container.scrollTop=ya*ba/za,a.container.scrollLeft=Pa*ba/za;else if(0!=ca||0!=ma)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ca/za),Math.floor(Ja.y+ma/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ba){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ba){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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=a.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 d=mxUtils.bind(this,function(){var Y=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Y?parseInt(Y["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(Y,P,ba){h++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Y);null!=ba&&la.setAttribute("title",ba);Y=document.createElement("img");Y.setAttribute("border","0");Y.setAttribute("src",P);Y.style.width="36px";Y.style.filter="invert(100%)";la.appendChild(Y);this.chromelessToolbar.appendChild(la);return la});if(null!=g.backBtn){var m=Graph.sanitizeLink(g.backBtn.url);null!=m&&d(mxUtils.bind(this,function(Y){window.location.href=
-m;mxEvent.consume(Y)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var q=d(mxUtils.bind(this,function(Y){this.actions.get("previousPage").funct();mxEvent.consume(Y)}),Editor.chevronLeftImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(Y){this.actions.get("nextPage").funct();mxEvent.consume(Y)}),Editor.chevronRightImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var Y=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,Y+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());q.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(Y-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(Y+1,this.pages.length)].getName())}});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display=
-"",k.style.display="inline-block"):(u.style.display="none",q.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(Y){var P=new mxPopupMenu(C.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var ba=mxUtils.getOffset(k);P.popup(ba.x,ba.y+k.offsetHeight,null,Y);mxEvent.addListener(P.div,
-"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(Y){this.actions.get("zoomOut").funct();mxEvent.consume(Y)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(Y){this.actions.get("zoomIn").funct();mxEvent.consume(Y)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(Y){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Y)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,G=mxUtils.bind(this,function(Y){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
-600)}),Y||200)}),I=mxUtils.bind(this,function(Y){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Y||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=d(mxUtils.bind(this,function(Y){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=J.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=
-P.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));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Y)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){J.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(Y){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Y)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=g.refreshBtn){var U=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(Y){null!=
-U?window.location.href=U:window.location.reload();mxEvent.consume(Y)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(Y){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(Y)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
-document.body))&&d(mxUtils.bind(this,function(Y){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(Y))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(Y){mxEvent.isTouchEvent(Y)||
-(mxEvent.isShiftDown(Y)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Y){mxEvent.consume(Y)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Y){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Y)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Y){mxEvent.isShiftDown(Y)?G():I(100);mxEvent.consume(Y)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(Y){mxEvent.isTouchEvent(Y)||I(30)}));var V=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Y,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(Y,P){},mouseUp:function(Y,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<V&&Math.abs(this.scrollTop-a.container.scrollTop)<V&&
-Math.abs(this.startX-P.getGraphX())<V&&Math.abs(this.startY-P.getGraphY())<V&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate,N=new mxPoint,W=!1,O=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&O!=e.currentPage){O=e.currentPage;W=!0;var Y=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
-Y&&(Y=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));Y=a.getPageLayout(Y,N,1);var P=a.getDefaultTranslate(Y);this.x0=Y.x;this.y0=Y.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();Y=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=Y||this.translate.y!=P)this.invalidate(),this.translate.x=Y,this.translate.y=P}Q.apply(this,arguments)};
-if(!a.isViewer()){var X=a.sizeDidChange;a.sizeDidChange=function(){var Y=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),la=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=la||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);this.autoTranslate=!1;Y||(this.container.scrollLeft+=Math.round((ba.x-la)*this.view.scale),
-this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}X.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=a.view.getBackgroundPane(),ka=a.view.getDrawPane();a.cumulativeZoomFactor=1;var ta=null,M=null,aa=null,ea=null,da=null,sa=function(Y){null!=ta&&window.clearTimeout(ta);0<=Y&&window.setTimeout(function(){if(!a.isMouseDown||ea)ta=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
-null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),ka.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(ka.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ka.style.transform="";ja.style.transform=""},0)):(ka.style.transform="",ja.style.transform=""),a.view.getDecoratorPane().style.opacity=
-"",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),la=a.view.scale,Ja=0,ma=0;null!=M&&(Ja=a.container.offsetWidth/2-M.x+ba.x,ma=a.container.offsetHeight/2-M.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=la&&(null!=aa&&(Ja+=P.x-aa.x,ma+=P.y-aa.y),null!=b&&e.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==Ja&&0==ma||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ma*(a.cumulativeZoomFactor-1)));null!=da&&ka.setAttribute("filter",da);a.cumulativeZoomFactor=1;da=ea=M=aa=ta=null}),null!=Y?Y:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(Y,P,ba,la){la=null!=la?la:this.zoomFactor;(P=P||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));Y?.15>=this.view.scale*
-this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,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/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=
-Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==da&&""!=ka.getAttribute("filter")&&(da=ka.getAttribute("filter"),ka.removeAttribute("filter"));aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);Y=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);la=P||null==M?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==
-M?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;ka.style.transformOrigin=la+"px "+Ja+"px";ka.style.transform="scale("+Y+")";ja.style.transformOrigin=la+"px "+Ja+"px";ja.style.transform="scale("+Y+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(la=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(la.style,"transform-origin",(P||null==M?a.container.clientWidth/2+a.container.scrollLeft-la.offsetLeft+"px":M.x+a.container.scrollLeft-
-la.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==M?a.container.clientHeight/2+a.container.scrollTop-la.offsetTop+"px":M.y+a.container.scrollTop-la.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(la.style,"transform","scale("+Y+")")):a.view.validateBackgroundStyles(Y,la,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",Y))}sa(a.isFastZoomEnabled()?
-ba:0)};mxEvent.addGestureListeners(a.container,function(Y){null!=ta&&window.clearTimeout(ta)},null,function(Y){1!=a.cumulativeZoomFactor&&sa(0)});mxEvent.addListener(a.container,"scroll",function(Y){null==ta||a.isMouseDown||1==a.cumulativeZoomFactor||sa(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Y,P,ba,la,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(Y))ba=a.view.getTranslate(),la=40/a.view.scale,
-mxEvent.isShiftDown(Y)?a.view.setTranslate(ba.x+(P?-la:la),ba.y):a.view.setTranslate(ba.x,ba.y+(P?la:-la));else if(ba||a.isZoomWheelEvent(Y))for(var ma=mxEvent.getSource(Y);null!=ma;){if(ma==a.container)return a.tooltipHandler.hideTooltip(),M=null!=la&&null!=Ja?new mxPoint(la,Ja):new mxPoint(mxEvent.getClientX(Y),mxEvent.getClientY(Y)),ea=ba,ba=a.zoomFactor,la=null,Y.ctrlKey&&null!=Y.deltaY&&40>Math.abs(Y.deltaY)&&Math.round(Y.deltaY)!=Y.deltaY?ba=1+Math.abs(Y.deltaY)/20*(ba-1):null!=Y.movementY&&
-"pointermove"==Y.type&&(ba=1+Math.max(1,Math.abs(Y.movementY))/20*(ba-1),la=-1),a.lazyZoom(P,null,la,ba),mxEvent.consume(Y),!1;ma=ma.parentNode}}),a.container);a.panningHandler.zoomGraph=function(Y){a.cumulativeZoomFactor=Y.scale;a.lazyZoom(0<Y.scale,!0);mxEvent.consume(Y)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var ba=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ba?parseInt(ba["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(ba,R,ca){h++;
+var ma=document.createElement("span");ma.style.paddingLeft="8px";ma.style.paddingRight="8px";ma.style.cursor="pointer";mxEvent.addListener(ma,"click",ba);null!=ca&&ma.setAttribute("title",ca);ba=document.createElement("img");ba.setAttribute("border","0");ba.setAttribute("src",R);ba.style.width="36px";ba.style.filter="invert(100%)";ma.appendChild(ba);this.chromelessToolbar.appendChild(ma);return ma});if(null!=g.backBtn){var m=Graph.sanitizeLink(g.backBtn.url);null!=m&&d(mxUtils.bind(this,function(ba){window.location.href=
+m;mxEvent.consume(ba)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var q=d(mxUtils.bind(this,function(ba){this.actions.get("previousPage").funct();mxEvent.consume(ba)}),Editor.chevronLeftImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(ba){this.actions.get("nextPage").funct();mxEvent.consume(ba)}),Editor.chevronRightImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var ba=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,ba+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+
+": "+this.currentPage.getName());q.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ba-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ba+1,this.pages.length)].getName())}});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display=
+"",k.style.display="inline-block"):(u.style.display="none",q.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ba){var R=new mxPopupMenu(C.funct);R.smartSeparators=!0;R.showDisabled=!0;R.autoExpand=!0;R.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(R,arguments);R.destroy()});var ca=mxUtils.getOffset(k);R.popup(ca.x,ca.y+k.offsetHeight,null,ba);mxEvent.addListener(R.div,
+"mouseleave",mxUtils.bind(this,function(){R.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ba){this.actions.get("zoomOut").funct();mxEvent.consume(ba)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ba){this.actions.get("zoomIn").funct();mxEvent.consume(ba)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ba){a.isLightboxView()?
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ba)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,G=mxUtils.bind(this,function(ba){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
+600)}),ba||200)}),I=mxUtils.bind(this,function(ba){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ba||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=d(mxUtils.bind(this,function(ba){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var R=J.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=
+R.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));R=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ba)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){J.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ba){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ba)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=g.refreshBtn){var V=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(ba){null!=
+V?window.location.href=V:window.location.reload();mxEvent.consume(ba)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(ba){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(ba)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
+document.body))&&d(mxUtils.bind(this,function(ba){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(ba))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||
+(mxEvent.isShiftDown(ba)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ba){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ba)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ba){mxEvent.isShiftDown(ba)?G():I(100);mxEvent.consume(ba)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||I(30)}));var W=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(ba,R){},mouseUp:function(ba,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<W&&Math.abs(this.scrollTop-a.container.scrollTop)<
+W&&Math.abs(this.startX-R.getGraphX())<W&&Math.abs(this.startY-R.getGraphY())<W&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var O=a.view.validate,M=new mxPoint,X=!1,N=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&N!=e.currentPage){N=e.currentPage;X=!0;var ba=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
+ba&&(ba=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));ba=a.getPageLayout(ba,M,1);var R=a.getDefaultTranslate(ba);this.x0=ba.x;this.y0=ba.y;if(R.x!=this.translate.x||R.y!=this.translate.y)this.invalidate(),this.translate.x=R.x,this.translate.y=R.y}R=a.getPagePadding();var ca=a.getPageSize();ba=R.x-(this.x0||0)*ca.width;R=R.y-(this.y0||0)*ca.height;if(this.translate.x!=ba||this.translate.y!=R)this.invalidate(),this.translate.x=ba,this.translate.y=R}O.apply(this,arguments)};
+if(!a.isViewer()){var Y=a.sizeDidChange;a.sizeDidChange=function(){var ba=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var R=this.getPageLayout(),ca=this.getDefaultTranslate(R),ma=this.view.translate.x,Ja=this.view.translate.y;if(ca.x!=ma||ca.y!=Ja){this.view.x0=R.x;this.view.y0=R.y;this.autoTranslate=!0;this.view.setTranslate(ca.x,ca.y);this.autoTranslate=!1;ba||(this.container.scrollLeft+=Math.round((ca.x-ma)*this.view.scale),
+this.container.scrollTop+=Math.round((ca.y-Ja)*this.view.scale));return}}Y.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var S=null,U=null,aa=null,fa=null,ka=null,ta=function(ba){null!=S&&window.clearTimeout(S);0<=ba&&window.setTimeout(function(){if(!a.isMouseDown||fa)S=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
+null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";ja.style.transform=""},0)):(la.style.transform="",ja.style.transform=""),a.view.getDecoratorPane().style.opacity=
+"",a.view.getOverlayPane().style.opacity="");var R=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ca=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=U&&(Ja=a.container.offsetWidth/2-U.x+ca.x,na=a.container.offsetHeight/2-U.y+ca.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=aa&&(Ja+=R.x-aa.x,na+=R.y-aa.y),null!=b&&e.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ka&&la.setAttribute("filter",ka);a.cumulativeZoomFactor=1;ka=fa=U=aa=S=null}),null!=ba?ba:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(ba,R,ca,ma){ma=null!=ma?ma:this.zoomFactor;(R=R||!a.scrollbars)&&(U=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));ba?.15>=this.view.scale*
+this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=
+Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==ka&&""!=la.getAttribute("filter")&&(ka=la.getAttribute("filter"),la.removeAttribute("filter"));aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);ba=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=R||null==U?a.container.scrollLeft+a.container.clientWidth/2:U.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=R||null==
+U?a.container.scrollTop+a.container.clientHeight/2:U.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+ba+")";ja.style.transformOrigin=ma+"px "+Ja+"px";ja.style.transform="scale("+ba+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(R||null==U?a.container.clientWidth/2+a.container.scrollLeft-ma.offsetLeft+"px":U.x+a.container.scrollLeft-
+ma.offsetLeft-a.container.offsetLeft+"px")+" "+(R||null==U?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":U.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+ba+")")):a.view.validateBackgroundStyles(ba,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",ba))}ta(a.isFastZoomEnabled()?
+ca:0)};mxEvent.addGestureListeners(a.container,function(ba){null!=S&&window.clearTimeout(S)},null,function(ba){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(ba){null==S||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ba,R,ca,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ca&&a.isScrollWheelEvent(ba))ca=a.view.getTranslate(),ma=40/a.view.scale,
+mxEvent.isShiftDown(ba)?a.view.setTranslate(ca.x+(R?-ma:ma),ca.y):a.view.setTranslate(ca.x,ca.y+(R?ma:-ma));else if(ca||a.isZoomWheelEvent(ba))for(var na=mxEvent.getSource(ba);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),U=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),fa=ca,ca=a.zoomFactor,ma=null,ba.ctrlKey&&null!=ba.deltaY&&40>Math.abs(ba.deltaY)&&Math.round(ba.deltaY)!=ba.deltaY?ca=1+Math.abs(ba.deltaY)/20*(ca-1):null!=ba.movementY&&
+"pointermove"==ba.type&&(ca=1+Math.max(1,Math.abs(ba.movementY))/20*(ca-1),ma=-1),a.lazyZoom(R,null,ma,ca),mxEvent.consume(ba),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(ba){a.cumulativeZoomFactor=ba.scale;a.lazyZoom(0<ba.scale,!0);mxEvent.consume(ba)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;if(null!=this.format){var b=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+b+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=a?240:0;this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),
1E3*b)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};
@@ -2333,8 +2332,8 @@ Sidebar.prototype.addSearchPalette=function(a){function b(){h.setAttribute("src"
document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");g.appendChild(d);var h=document.createElement("img");h.setAttribute("src",Editor.magnifyImage);h.setAttribute("title",mxResources.get("search"));h.className="geAdaptiveAsset";h.style.background="url('"+this.editorUi.editor.transparentImage+"')";g.appendChild(h);f.appendChild(g);var m=document.createElement("div");m.style.display="none";m.style.paddingTop="8px";m.style.alignItems=
"center";m.style.justifyContent="center";var q=mxUtils.button(mxResources.get("moreResults"),function(){G()});q.setAttribute("title",mxResources.get("moreResults"));q.className="geBtn gePrimaryBtn";q.style.borderRadius="16px";q.style.padding="8px 12px";m.appendChild(q);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},D=12,E=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var I=f.firstChild;null!=I;){var J=I.nextSibling;I!=g&&I!=m&&I.parentNode.removeChild(I);I=J}});mxEvent.addListener(h,
"click",function(){h.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(E(),k=d.value,C={},w=!1,z=0),!u&&!w)){q.setAttribute("disabled","true");m.style.display="flex";q.style.cursor="wait";q.innerHTML="";mxUtils.write(q,mxResources.get("loading")+"...");u=!0;var I={};this.currentSearch=I;try{this.searchEntries(k,
-D,z,mxUtils.bind(this,function(J,T,K,U){if(this.currentSearch==I){J=null!=J?J:[];u=!1;z++;this.insertSearchHint(f,k,D,z,J,T,K,U);0==J.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<J.length;T++)mxUtils.bind(this,function(V){try{var Q=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Q.style.opacity=this.closedLibraryOpacity);null==C[Q.innerHTML]?(C[Q.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],f.appendChild(Q)):
-null!=V.parentLibraries&&(C[Q.innerHTML]=C[Q.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Q,null,null,mxUtils.bind(this,function(N){var W=C[Q.innerHTML];mxEvent.isPopupTrigger(N)&&this.showPopupMenuForEntry(Q,W,N)}));mxEvent.disableContextMenu(Q)}catch(N){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(N.stack)):console.error(N))}})(J[T]);K?(q.removeAttribute("disabled"),q.innerHTML="",mxUtils.write(q,mxResources.get("moreResults"))):
+D,z,mxUtils.bind(this,function(J,T,K,V){if(this.currentSearch==I){J=null!=J?J:[];u=!1;z++;this.insertSearchHint(f,k,D,z,J,T,K,V);0==J.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<J.length;T++)mxUtils.bind(this,function(W){try{var O=W();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(W,!1)&&(O.style.opacity=this.closedLibraryOpacity);null==C[O.innerHTML]?(C[O.innerHTML]=null!=W.parentLibraries?W.parentLibraries.slice():[],f.appendChild(O)):
+null!=W.parentLibraries&&(C[O.innerHTML]=C[O.innerHTML].concat(W.parentLibraries));mxEvent.addGestureListeners(O,null,null,mxUtils.bind(this,function(M){var X=C[O.innerHTML];mxEvent.isPopupTrigger(M)&&this.showPopupMenuForEntry(O,X,M)}));mxEvent.disableContextMenu(O)}catch(M){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(M.stack)):console.error(M))}})(J[T]);K?(q.removeAttribute("disabled"),q.innerHTML="",mxUtils.write(q,mxResources.get("moreResults"))):
(q.innerHTML=mxResources.get("reset"),m.style.display="none",w=!0);q.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){q.style.cursor=""}),this.searchClosedLibraries)}catch(J){this.editorUi.handleError(J)}}}else E(),k=d.value="",C={},m.style.display="none",w=!1,d.focus()});this.searchShapes=function(I){d.value=I;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(I){13==I.keyCode?(G(),mxEvent.consume(I)):27==I.keyCode&&b()}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
function(){""==d.value?(h.setAttribute("src",Editor.magnifyImage),h.setAttribute("title",mxResources.get("search"))):(h.setAttribute("src",Editor.crossImage),h.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,m.style.display="none"):d.value!=k?(m.style.display="none",w=!1):u||(m.style.display=w?"none":"flex")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,"mousedown",function(I){I.stopPropagation&&I.stopPropagation();
I.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2452,43 +2451,43 @@ null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.bac
null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,G,z,C),this.createDragPreview(g,d),a,G,z),this.addClickHandler(D,f,a,q)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(I){mxEvent.isMouseEvent(I)&&this.showTooltip(D,a,G.width,G.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,q,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==q||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(q,a,m);var z=null;null==q||w||(q=null);if(!h.isCellLocked(q||
h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(q,a,m)){var C=h.view.scale,D=h.view.translate,E=(k+D.x)*C,G=(u+D.y)*C,I=h.cloneCells(a);h.splitEdge(q,I,null,k-f.width/2,u-f.height/2,E,G);z=I}else if(0<a.length&&(z=h.importCells(a,k,u,q),h.model.isVertex(d)&&1==z.length&&h.model.isVertex(z[0]))){var J=h.insertEdge(h.model.getParent(d),null,"",d,z[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[J]);z.push(J);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(J,d)}if(null!=h.layoutManager){var T=h.layoutManager.getLayout(q);if(null!=T){C=h.view.scale;D=h.view.translate;E=(k+D.x)*C;G=(u+D.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],E,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)h.model.isVertex(z[K])&&h.isAutoSizeCell(z[K])&&h.updateCellSize(z[K])}catch(U){this.editorUi.handleError(U)}finally{h.model.endUpdate()}null!=z&&0<z.length&&(h.scrollCellToVisible(z[0]),
+h.insertEdgeBeforeCell(J,d)}if(null!=h.layoutManager){var T=h.layoutManager.getLayout(q);if(null!=T){C=h.view.scale;D=h.view.translate;E=(k+D.x)*C;G=(u+D.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],E,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)h.model.isVertex(z[K])&&h.isAutoSizeCell(z[K])&&h.updateCellSize(z[K])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=z&&0<z.length&&(h.scrollCellToVisible(z[0]),
h.setSelectionCells(z));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){h.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,q=m.model.isEdge(a)||null!=d?d:h;q=this.getDropAndConnectGeometry(a,b[q],e,b);var k=[];if(null!=q){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(C);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=E=0;if(null!=k){var I=k.origin;E=I.x;
-G=I.y}var J=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),T=m.getCellAt((q.x+E+m.view.translate.x)*m.view.scale,(q.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(W,O,X){return!m.isContainer(W.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,J=!0,m.model.isEdge(a)||(q.x-=I.x-E,q.y-=I.y-G));else if(!D||m.isTableRow(a)||m.isTableCell(a))q.x+=E,q.y+=G;E=z.x;G=z.y;m.model.isEdge(b[f])&&(G=E=0);k=b=m.importCells(b,q.x-(J?E:0),q.y-(J?
-G:0),J?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),U=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var V=m.getCellGeometry(b[e]),Q=null!=V?V.getTerminalPoint(!0):null;null!=Q&&Q.x==U.x&&Q.y==U.y&&m.model.setTerminal(b[e],a,
-!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(q.getTerminalPoint(!1),!1);else if(J&&m.model.isVertex(C)){var N=m.view.getState(C);I=N.cell!=m.view.currentRoot?N.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),E=q.x-Math.round(z.x),G=q.y-Math.round(z.y),q.x=Math.round(z.x),q.y=Math.round(z.y),m.model.setGeometry(b[f],q),m.cellsMoved(b,E,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(W){this.editorUi.handleError(W)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
+G=I.y}var J=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),T=m.getCellAt((q.x+E+m.view.translate.x)*m.view.scale,(q.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(X,N,Y){return!m.isContainer(X.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,J=!0,m.model.isEdge(a)||(q.x-=I.x-E,q.y-=I.y-G));else if(!D||m.isTableRow(a)||m.isTableCell(a))q.x+=E,q.y+=G;E=z.x;G=z.y;m.model.isEdge(b[f])&&(G=E=0);k=b=m.importCells(b,q.x-(J?E:0),q.y-(J?
+G:0),J?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),V=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),O=null!=W?W.getTerminalPoint(!0):null;null!=O&&O.x==V.x&&O.y==V.y&&m.model.setTerminal(b[e],a,
+!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(q.getTerminalPoint(!1),!1);else if(J&&m.model.isVertex(C)){var M=m.view.getState(C);I=M.cell!=m.view.currentRoot?M.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),E=q.x-Math.round(z.x),G=q.y-Math.round(z.y),q.x=Math.round(z.x),q.y=Math.round(z.y),m.model.setGeometry(b[f],q),m.cellsMoved(b,E,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(X){this.editorUi.handleError(X)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),q=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=q&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(q=m.absolutePoints,b=q[0],g=q[q.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(q.relative&&(q=q.clone(),
q.x=(m.x-d.translate.x)/d.scale,q.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=q.getCenterX(),f.y=q.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=q.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=q.x+q.width,f.setTerminalPoint(new mxPoint(f.x+
f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=q.y+q.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=q.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!h&&45<f.width&&45<f.height&&45<q.width&&45<q.height&&(f.width*=q.height/f.height,f.height=q.height),f.x=q.x+q.width/2-f.width/2,f.y=q.y+q.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-q.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+q.width/2+
f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+q.height/2+f.height/2+d:e==mxConstants.DIRECTION_WEST&&(f.x=f.x-q.width/2-f.width/2-d),g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(q=g.getCellGeometry(b.getTerminal(!1)),null!=q&&(e==mxConstants.DIRECTION_NORTH?(f.x-=q.getCenterX(),f.y-=q.getCenterY()+q.height/2):e==mxConstants.DIRECTION_EAST?(f.x-=q.getCenterX()-q.width/2,f.y-=q.getCenterY()):e==mxConstants.DIRECTION_SOUTH?(f.x-=q.getCenterX(),f.y-=q.getCenterY()-q.height/
2):e==mxConstants.DIRECTION_WEST&&(f.x-=q.getCenterX()+q.width/2,f.y-=q.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
-Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(ma,ya){var za=mxUtils.createImage(ma.src);za.style.width=ma.width+"px";za.style.height=ma.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,ma==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(ma,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,ma,ya)?(mxUtils.setOpacity(Ka,100),M=Ka):mxUtils.setOpacity(Ka,Ka==O?30:20));return za}var q=this.editorUi,k=
-q.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,D=0;D<f.length&&C;D++)d+=k.model.getDescendants(f[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,ya,za,Ka,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
-K&&M==O){var Ia=ma.isCellSelected(K.cell)?ma.getSelectionCells():[K.cell];ma.updateShapes(ma.model.isEdge(K.cell)?f[0]:f[w],Ia,!0);ma.setSelectionCells(Ia)}else null!=f&&null!=M&&null!=J&&M!=O?(Ia=ma.model.isEdge(J.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(J.cell,f,ta,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
-G.createPreviewElement=mxUtils.bind(this,function(ma){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";ma=ma.view.scale;ya.style.width=ma*Math.max(1,g.width)+"px";ya.style.height=ma*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(za,ma*Math.max(1,g.width),ma*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,
-0,ma);return ya}));var I=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var J=null,T=null,K=null,U=!1,V=h(this.triangleUp,mxResources.get("connect")),Q=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),W=h(this.triangleLeft,mxResources.get("connect")),O=h(this.refreshTarget,mxResources.get("replace")),X=null,ja=h(this.roundDrop),
-ka=h(this.roundDrop),ta=mxConstants.DIRECTION_NORTH,M=null,aa=G.createPreviewElement;G.createPreviewElement=function(ma){var ya=aa.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var ea=G.dragEnter;G.dragEnter=function(ma,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("none");ea.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("");da.apply(this,
-arguments)};G.dragOver=function(ma,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=M&&this.currentGuide.hide();if(null!=this.previewElement){q.hideShapePicker();var za=ma.view;if(null!=K&&M==O)this.previewElement.style.display="none";else if(null!=J&&null!=M){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=ma.model.isEdge(J.cell)||null!=w?w:u,Pa=z.getDropAndConnectGeometry(J.cell,f[Ka],ta,f),Ia=ma.model.isEdge(J.cell)?
-null:ma.getCellGeometry(J.cell),Ha=ma.getCellGeometry(f[Ka]),qa=ma.model.getParent(J.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&ma.model.isVertex(qa)&&qa!=za.currentRoot&&(Va=za.getState(qa),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;ma.model.isEdge(f[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Pa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Pa.y-Ha)*za.scale+Va+"px";1==f.length&&(this.previewElement.style.width=Pa.width*za.scale+"px",this.previewElement.style.height=
-Pa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&ma.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
-g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var sa=(new Date).getTime(),Y=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(ma,ya,za,Ka){var Pa=mxEvent.isAltDown(Ka)||
-null==f?null:ma.getCellAt(ya,za,null,null,null,function(Va,Wa,cb){return ma.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ia=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Pa=Ia)}ma.isCellLocked(Pa)&&(Pa=null);var Ha=ma.view.getState(Pa);Ia=M=null;P!=Ha?(sa=(new Date).getTime(),Y=0,P=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ha&&(this.updateThread=window.setTimeout(function(){null==M&&(P=Ha,G.getDropTarget(ma,ya,za,Ka))},this.dropTargetDelay+10))):Y=(new Date).getTime()-sa;if(E&&2500>Y&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,
-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<Y||ma.model.isEdge(Ha.cell))&&Y>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(ma.model.isVertex(Ha.cell)&&null!=w||ma.model.isEdge(Ha.cell)&&ma.model.isEdge(f[0]))){if(ma.isCellEditable(Ha.cell)){K=Ha;var qa=ma.model.isEdge(Ha.cell)?ma.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);O.style.left=Math.floor(qa.x)+"px";O.style.top=Math.floor(qa.y)+"px";null==X&&(ma.container.appendChild(O),X=O.parentNode);m(ya,za,qa,O)}}else null==K||!mxUtils.contains(K,ya,za)||1500<Y&&!mxEvent.isShiftDown(Ka)?(K=null,null!=X&&(O.parentNode.removeChild(O),X=null)):null!=K&&null!=X&&(qa=ma.model.isEdge(K.cell)?ma.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,qa,O));if(U&&null!=J&&!mxEvent.isAltDown(Ka)&&null==M){Ia=mxRectangle.fromRectangle(J);if(ma.model.isEdge(J.cell)){var Da=J.absolutePoints;null!=ja.parentNode&&(qa=Da[0],Ia.add(m(ya,za,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ja)));null!=ka.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),ka)))}else qa=mxRectangle.fromRectangle(J),null!=J.shape&&null!=J.shape.boundingBox&&(qa=mxRectangle.fromRectangle(J.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(J.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&
-"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),V)),Ia.add(m(ya,za,new mxRectangle(qa.x+qa.width,J.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Q)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,
-this.triangleDown.height),N)),Ia.add(m(ya,za,new mxRectangle(qa.x-this.triangleLeft.width,J.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),W));null!=Ia&&Ia.grow(10)}ta=mxConstants.DIRECTION_NORTH;M==Q?ta=mxConstants.DIRECTION_EAST:M==N||M==ka?ta=mxConstants.DIRECTION_SOUTH:M==W&&(ta=mxConstants.DIRECTION_WEST);null!=K&&M==O&&(Ha=K);qa=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Pa)&&null!=w||ma.model.isVertex(Pa)&&ma.isCellConnectable(Pa));if(null!=
-J&&5E3<=Y||J!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<Y&&null==M&&qa))if(U=!1,J=5E3>Y&&Y>this.dropTargetDelay||ma.model.isEdge(Pa)?Ha:null,null!=J&&qa){Ia=[ja,ka,V,Q,N,W];for(qa=0;qa<Ia.length;qa++)null!=Ia[qa].parentNode&&Ia[qa].parentNode.removeChild(Ia[qa]);ma.model.isEdge(Pa)?(Da=Ha.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ja.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",ja.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ka.style.left=Math.floor(Da.x-this.roundDrop.width/
-2)+"px",ka.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Pa,!0)&&ma.container.appendChild(ja),null==ma.model.getTerminal(Pa,!1)&&ma.container.appendChild(ka))):(qa=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ha.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=
-Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),V.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",V.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",Q.style.left=Math.floor(qa.x+qa.width)+"px",Q.style.top=Math.floor(Ha.getCenterY()-
-this.triangleRight.height/2)+"px",N.style.left=V.style.left,N.style.top=Math.floor(qa.y+qa.height)+"px",W.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",W.style.top=Q.style.top,"eastwest"!=Ha.style.portConstraint&&(ma.container.appendChild(V),ma.container.appendChild(N)),ma.container.appendChild(Q),ma.container.appendChild(W));null!=Ha&&(T=ma.selectionCellsHandler.getHandler(Ha.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));U=!0}else for(Ia=[ja,ka,V,Q,N,W],qa=0;qa<Ia.length;qa++)null!=
-Ia[qa].parentNode&&Ia[qa].parentNode.removeChild(Ia[qa]);U||null==T||T.setHandlesVisible(!0);Pa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&M==O?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Pa||null==M&&ma.isSplitTarget(Pa,f,Ka)||(Pa=ma.getDropTarget(f,Ka,Pa,!0));return Pa});var la=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;la.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var ma=[ja,ka,O,V,Q,N,W],
-ya=0;ya<ma.length;ya++)null!=ma[ya].parentNode&&ma[ya].parentNode.removeChild(ma[ya]);null!=J&&null!=T&&T.reset();M=X=K=J=T=z.activeDragSource=null};return G};
+Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(na,ya){var za=mxUtils.createImage(na.src);za.style.width=na.width+"px";za.style.height=na.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,na==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(na,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,na,ya)?(mxUtils.setOpacity(Ka,100),U=Ka):mxUtils.setOpacity(Ka,Ka==N?30:20));return za}var q=this.editorUi,k=
+q.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,D=0;D<f.length&&C;D++)d+=k.model.getDescendants(f[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,ya,za,Ka,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+K&&U==N){var Ia=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?f[0]:f[w],Ia,!0);na.setSelectionCells(Ia)}else null!=f&&null!=U&&null!=J&&U!=N?(Ia=na.model.isEdge(J.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(J.cell,f,S,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
+G.createPreviewElement=mxUtils.bind(this,function(na){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";na=na.view.scale;ya.style.width=na*Math.max(1,g.width)+"px";ya.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(za,na*Math.max(1,g.width),na*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,
+0,na);return ya}));var I=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var J=null,T=null,K=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),O=h(this.triangleRight,mxResources.get("connect")),M=h(this.triangleDown,mxResources.get("connect")),X=h(this.triangleLeft,mxResources.get("connect")),N=h(this.refreshTarget,mxResources.get("replace")),Y=null,ja=h(this.roundDrop),
+la=h(this.roundDrop),S=mxConstants.DIRECTION_NORTH,U=null,aa=G.createPreviewElement;G.createPreviewElement=function(na){var ya=aa.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var fa=G.dragEnter;G.dragEnter=function(na,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("none");fa.apply(this,arguments)};var ka=G.dragExit;G.dragExit=function(na,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("");ka.apply(this,
+arguments)};G.dragOver=function(na,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=U&&this.currentGuide.hide();if(null!=this.previewElement){q.hideShapePicker();var za=na.view;if(null!=K&&U==N)this.previewElement.style.display="none";else if(null!=J&&null!=U){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=na.model.isEdge(J.cell)||null!=w?w:u,Pa=z.getDropAndConnectGeometry(J.cell,f[Ka],S,f),Ia=na.model.isEdge(J.cell)?
+null:na.getCellGeometry(J.cell),Ha=na.getCellGeometry(f[Ka]),ra=na.model.getParent(J.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&na.model.isVertex(ra)&&ra!=za.currentRoot&&(Va=za.getState(ra),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;na.model.isEdge(f[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Pa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Pa.y-Ha)*za.scale+Va+"px";1==f.length&&(this.previewElement.style.width=Pa.width*za.scale+"px",this.previewElement.style.height=
+Pa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
+g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ba=0,R=null,ca=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(na,ya,za,Ka){var Pa=mxEvent.isAltDown(Ka)||
+null==f?null:na.getCellAt(ya,za,null,null,null,function(Va,Wa,cb){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ia=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Pa=Ia)}na.isCellLocked(Pa)&&(Pa=null);var Ha=na.view.getState(Pa);Ia=U=null;R!=Ha?(ta=(new Date).getTime(),ba=0,R=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=Ha&&(this.updateThread=window.setTimeout(function(){null==U&&(R=Ha,G.getDropTarget(na,ya,za,Ka))},this.dropTargetDelay+10))):ba=(new Date).getTime()-ta;if(E&&2500>ba&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,
+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)||1500<ba||na.model.isEdge(Ha.cell))&&ba>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(na.model.isVertex(Ha.cell)&&null!=w||na.model.isEdge(Ha.cell)&&na.model.isEdge(f[0]))){if(na.isCellEditable(Ha.cell)){K=Ha;var ra=na.model.isEdge(Ha.cell)?na.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height);N.style.left=Math.floor(ra.x)+"px";N.style.top=Math.floor(ra.y)+"px";null==Y&&(na.container.appendChild(N),Y=N.parentNode);m(ya,za,ra,N)}}else null==K||!mxUtils.contains(K,ya,za)||1500<ba&&!mxEvent.isShiftDown(Ka)?(K=null,null!=Y&&(N.parentNode.removeChild(N),Y=null)):null!=K&&null!=Y&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,ra,N));if(V&&null!=J&&!mxEvent.isAltDown(Ka)&&null==U){Ia=mxRectangle.fromRectangle(J);if(na.model.isEdge(J.cell)){var Da=J.absolutePoints;null!=ja.parentNode&&(ra=Da[0],Ia.add(m(ya,za,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ja)));null!=la.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),la)))}else ra=mxRectangle.fromRectangle(J),null!=J.shape&&null!=J.shape.boundingBox&&(ra=mxRectangle.fromRectangle(J.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(J.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&
+"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),W)),Ia.add(m(ya,za,new mxRectangle(ra.x+ra.width,J.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),O)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,
+this.triangleDown.height),M)),Ia.add(m(ya,za,new mxRectangle(ra.x-this.triangleLeft.width,J.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),X));null!=Ia&&Ia.grow(10)}S=mxConstants.DIRECTION_NORTH;U==O?S=mxConstants.DIRECTION_EAST:U==M||U==la?S=mxConstants.DIRECTION_SOUTH:U==X&&(S=mxConstants.DIRECTION_WEST);null!=K&&U==N&&(Ha=K);ra=(null==w||na.isCellConnectable(f[w]))&&(na.model.isEdge(Pa)&&null!=w||na.model.isVertex(Pa)&&na.isCellConnectable(Pa));if(null!=
+J&&5E3<=ba||J!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<ba&&null==U&&ra))if(V=!1,J=5E3>ba&&ba>this.dropTargetDelay||na.model.isEdge(Pa)?Ha:null,null!=J&&ra){Ia=[ja,la,W,O,M,X];for(ra=0;ra<Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);na.model.isEdge(Pa)?(Da=Ha.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ja.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ja.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x-
+this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Pa,!0)&&na.container.appendChild(ja),null==na.model.getTerminal(Pa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ha.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(ra.x-=Da.horizontalOffset/
+2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),W.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",W.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",O.style.left=Math.floor(ra.x+ra.width)+"px",O.style.top=Math.floor(Ha.getCenterY()-
+this.triangleRight.height/2)+"px",M.style.left=W.style.left,M.style.top=Math.floor(ra.y+ra.height)+"px",X.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",X.style.top=O.style.top,"eastwest"!=Ha.style.portConstraint&&(na.container.appendChild(W),na.container.appendChild(M)),na.container.appendChild(O),na.container.appendChild(X));null!=Ha&&(T=na.selectionCellsHandler.getHandler(Ha.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));V=!0}else for(Ia=[ja,la,W,O,M,X],ra=0;ra<Ia.length;ra++)null!=
+Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);V||null==T||T.setHandlesVisible(!0);Pa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&U==N?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Pa||null==U&&na.isSplitTarget(Pa,f,Ka)||(Pa=na.getDropTarget(f,Ka,Pa,!0));return Pa});var ma=G.startDrag;G.startDrag=function(na){z.activeDragSource=this;ma.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var na=[ja,la,N,W,O,M,X],
+ya=0;ya<na.length;ya++)null!=na[ya].parentNode&&na[ya].parentNode.removeChild(na[ya]);null!=J&&null!=T&&T.reset();U=Y=K=J=T=z.activeDragSource=null};return G};
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)f.model.isVertex(a[g])&&(b=g);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,q=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,z=null;b.getGraphForEvent=function(C){return k?g.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(C){(k=null!=u&&(Math.abs(u.x-
@@ -2518,39 +2517,38 @@ mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphVie
mxShape.prototype.getConstraints=function(a,b,e){return null};mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,g,d){return"default"==g&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();
(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,g,d,h,m,q){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geButton")}return k}})();
-Graph=function(a,b,e,f,g,d){mxGraph.call(this,a,b,e,f);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var h=null,m=null,q=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var ea=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=ea&&(w=this.isCellSelected(ea.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent()))){var da=
-this.selectionCellsHandler.getHandler(ea.cell);if(null==da||null==da.getHandleForEvent(M)){var sa=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),Y=mxEvent.isTouchEvent(M.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=Y+2;sa.grow(Y);if(this.isTableCell(ea.cell)&&this.isCellMovable(ea.cell)&&!this.isCellSelected(ea.cell)&&!(mxUtils.contains(ea,M.getGraphX()-da,M.getGraphY()-da)&&mxUtils.contains(ea,M.getGraphX()-da,M.getGraphY()+da)&&mxUtils.contains(ea,
-M.getGraphX()+da,M.getGraphY()+da)&&mxUtils.contains(ea,M.getGraphX()+da,M.getGraphY()-da))){var P=this.model.getParent(ea.cell);da=this.model.getParent(P);if(!this.isCellSelected(da)){Y*=aa;var ba=2*Y;if(this.model.getChildAt(da,0)!=P&&mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y-Y,ea.width,ba))||this.model.getChildAt(P,0)!=ea.cell&&mxUtils.intersects(sa,new mxRectangle(ea.x-Y,ea.y,ba,ea.height))||mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y+ea.height-Y,ea.width,ba))||mxUtils.intersects(sa,
-new mxRectangle(ea.x+ea.width-Y,ea.y,ba,ea.height)))P=this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,M.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(Y=da.getHandleForEvent(M),null!=Y&&(da.start(M.getGraphX(),M.getGraphY(),Y),da.blockDelayedSelection=!P,M.consume()))}}for(;!M.isConsumed()&&null!=ea&&(this.isTableCell(ea.cell)||this.isTableRow(ea.cell)||this.isTable(ea.cell));)this.isSwimlane(ea.cell)&&this.isCellMovable(ea.cell)&&(da=this.getActualStartSize(ea.cell),
-(0<da.x||0<da.width)&&mxUtils.intersects(sa,new mxRectangle(ea.x+(da.x-da.width-1)*aa+(0==da.x?ea.width:0),ea.y,1,ea.height))||(0<da.y||0<da.height)&&mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y+(da.y-da.height-1)*aa+(0==da.y?ea.height:0),ea.width,1)))&&(this.selectCellForEvent(ea.cell,M.getEvent()),da=this.selectionCellsHandler.getHandler(ea.cell),null!=da&&null!=da.customHandles&&(Y=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(M.getGraphX(),M.getGraphY(),Y),M.consume())),ea=this.view.getState(this.model.getParent(ea.cell))}}}}));
-this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var ea=M.getState();mxEvent.isAltDown(M.getEvent())||mxEvent.isControlDown(aa)||mxEvent.isShiftDown(aa)||w||null==ea||!this.model.isEdge(ea.cell)||(h=new mxPoint(M.getGraphX(),M.getGraphY()),u=this.isCellSelected(ea.cell),q=ea,m=M,null!=ea.text&&null!=ea.text.boundingBox&&mxUtils.contains(ea.text.boundingBox,M.getGraphX(),M.getGraphY())?
-k=mxEvent.LABEL_HANDLE:(aa=this.selectionCellsHandler.getHandler(ea.cell),null!=aa&&null!=aa.bends&&0<aa.bends.length&&(k=aa.getHandleForEvent(M))))}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var ea in M)if(null!=M[ea].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var da=this.tolerance;if(null!=h&&null!=q&&null!=m){if(ea=q,null!=k||Math.abs(h.x-
-aa.getGraphX())>da||Math.abs(h.y-aa.getGraphY())>da){var sa=null;mxEvent.isShiftDown(aa.getEvent())||(sa=this.selectionCellsHandler.getHandler(ea.cell));if(null!=sa&&null!=sa.bends&&0<sa.bends.length){sa.redrawHandles();var Y=null!=k?k:sa.getHandleForEvent(m),P=this.view.getEdgeStyle(ea),ba=P==mxEdgeStyle.EntityRelation;da=ea.absolutePoints;u||(Y=k);Y!=mxEvent.LABEL_HANDLE&&null!=da&&(Y=k,null==Y&&(M=new mxRectangle(h.x,h.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,da[0].x,
-da[0].y)?Y=0:mxUtils.contains(M,da[da.length-1].x,da[da.length-1].y)?Y=sa.bends.length-1:null!=da&&(null==P&&null==Y||P==mxEdgeStyle.SegmentConnector||P==mxEdgeStyle.OrthConnector)&&(null!=P&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?Y=2:(Y=mxUtils.findNearestSegment(ea,h.x,h.y),Y=null==P?mxEvent.VIRTUAL_HANDLE-Y:Y+1))),null==Y&&(Y=mxEvent.VIRTUAL_HANDLE));M=Y==mxEvent.LABEL_HANDLE||
-0==Y||Y==sa.bends.length-1;if(!ba&&(null!=ea.visibleSourceState||null!=ea.visibleTargetState)||M)sa.start(aa.getGraphX(),aa.getGraphX(),Y),aa.consume(),this.graphHandler.reset()}null!=sa&&(this.selectionCellsHandler.isHandlerActive(sa)?this.isCellSelected(ea.cell)||(this.selectionCellsHandler.handlers.put(ea.cell,sa),this.selectCellForEvent(ea.cell,aa.getEvent())):this.isCellSelected(ea.cell)||sa.destroy());u=!1;h=m=q=k=null}}else if(ea=aa.getState(),null!=ea&&this.isCellEditable(ea.cell)){M=this.model.getParent(ea.cell);
-sa=null;if(this.model.isEdge(ea.cell)&&!this.isCellSelected(ea.cell)&&!mxEvent.isAltDown(aa.getEvent())&&!mxEvent.isShiftDown(aa.getEvent())&&!this.isAncestorSelected(ea.cell)&&(this.isSwimlane(M)||this.model.isLayer(M)||this.getCurrentRoot()==M)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),da=ea.absolutePoints,null!=da)null!=ea.text&&null!=ea.text.boundingBox&&mxUtils.contains(ea.text.boundingBox,aa.getGraphX(),aa.getGraphY())?sa="move":
-mxUtils.contains(M,da[0].x,da[0].y)||mxUtils.contains(M,da[da.length-1].x,da[da.length-1].y)?sa="pointer":(P=this.view.getEdgeStyle(ea),P==mxEdgeStyle.EntityRelation||null==ea.visibleSourceState&&null==ea.visibleTargetState||(sa="crosshair",P!=mxEdgeStyle.SegmentConnector&&P!=mxEdgeStyle.OrthConnector))||(aa=mxUtils.findNearestSegment(ea,aa.getGraphX(),aa.getGraphY()),aa<da.length-1&&0<=aa&&(sa=0==Math.round(da[aa].x-da[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){da=
-mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(),aa.getGraphY());M.grow(da);if(this.isTableCell(ea.cell)&&this.isCellMovable(ea.cell)&&(aa=this.model.getParent(ea.cell),da=this.model.getParent(aa),!this.isCellSelected(da)))if(mxUtils.intersects(M,new mxRectangle(ea.x,ea.y-2,ea.width,4))&&this.model.getChildAt(da,0)!=aa||mxUtils.intersects(M,new mxRectangle(ea.x,ea.y+ea.height-2,ea.width,4)))sa="row-resize";else if(mxUtils.intersects(M,new mxRectangle(ea.x-2,ea.y,4,ea.height))&&
-this.model.getChildAt(aa,0)!=ea.cell||mxUtils.intersects(M,new mxRectangle(ea.x+ea.width-2,ea.y,4,ea.height)))sa="col-resize";for(aa=ea;null==sa&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&this.isCellMovable(aa.cell)&&(da=this.getActualStartSize(aa.cell),Y=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(da.x-da.width-1)*Y+(0==da.x?aa.width*Y:0),aa.y,1,aa.height))?sa="col-resize":(0<da.y||0<da.height)&&
-mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(da.y-da.height-1)*Y+(0==da.y?aa.height:0),aa.width,1))&&(sa="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=sa&&ea.setCursor(sa)}}}),mouseUp:mxUtils.bind(this,function(M,aa){k=h=m=q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&("0"==mxUtils.getValue(M.style,
-"html","0")?aa=mxUtils.htmlEntities(aa,!1):(M.lastLabelValue!=aa&&(M.lastLabelValue=aa,M.lastSanitizedLabelValue=Graph.sanitizeHtml(aa),z.innerHTML=M.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==M.view.graph.getAdaptiveColors())&&(M.lastSanitizedLabelValue=z.innerHTML)),aa=M.lastSanitizedLabelValue));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(M,aa){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=C.apply(this,arguments);if(this.graph.pageVisible){var aa=
-[],ea=this.graph.pageFormat,da=this.graph.pageScale,sa=ea.width*da;ea=ea.height*da;da=this.graph.view.translate;for(var Y=this.graph.view.scale,P=this.graph.getPageLayout(),ba=0;ba<P.width;ba++)aa.push(new mxRectangle(((P.x+ba)*sa+da.x)*Y,(P.y*ea+da.y)*Y,sa*Y,ea*Y));for(ba=1;ba<P.height;ba++)aa.push(new mxRectangle((P.x*sa+da.x)*Y,((P.y+ba)*ea+da.y)*Y,sa*Y,ea*Y));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,
-aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=D.apply(this,arguments),ea=new mxDictionary,da=[],sa=0;sa<aa.length;sa++){var Y=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[sa])&&
-this.graph.isCellSelected(aa[sa])?this.graph.model.getParent(aa[sa]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[sa])&&this.graph.isCellSelected(aa[sa])?aa[sa]:this.graph.getCompositeParent(aa[sa]);null==Y||ea.get(Y)||(ea.put(Y,!0),da.push(Y))}return da};var E=this.graphHandler.start;this.graphHandler.start=function(M,aa,ea,da){var sa=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?sa=!0:M=this.graph.model.getParent(M));sa||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||
-(M=this.graph.getCompositeParent(M));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(M,aa,ea,da,sa,Y){var P=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[P]);return P};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),
-J=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;T.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),J=0):J=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&K.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(M){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var V=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(M){return V.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Q=null;this.panningHandler.addListener(mxEvent.PAN_START,
-mxUtils.bind(this,function(){this.isEnabled()&&(Q=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=Q)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(this.getLayerForCell(M.sourceState.cell));
-if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var ea=aa?M.sourceState.cell:M.getCell();if(null!=ea){var da=this.getClickableLinkForCell(ea);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ea):this.openLink(da):aa&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=
-0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var O=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";
-if(this.isCellLocked(M))return"default"}return O.apply(this,arguments)};this.selectRegion=function(M,aa){var ea=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,ea,null,!0);if(this.isToggleEvent(aa))for(ea=0;ea<M.length;ea++)this.selectCellForEvent(M[ea],aa);else this.selectCellsForEvent(M,aa);return M};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,ea){return this.graph.isCellSelected(M)?!1:X.apply(this,
-arguments)};var ja=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ja.apply(this,arguments);null!=M.state&&this.isCellLocked(this.getLayerForCell(M.getCell()))&&(null==this.getLinkForCell(M.getCell())?M.state=this.view.getState(this.getCellAt(M.getGraphX(),M.getGraphY(),null,null,null,mxUtils.bind(this,function(aa,ea,da){return M.state==aa||this.isCellLocked(this.getLayerForCell(aa.cell))&&null==this.getLinkForCell(aa.cell)}))):M.state=null);return M};var ka=this.isCellSelectable;this.isCellSelectable=
-function(M){return ka.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(M))};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};var ta=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),ta=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));
-this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var ea=aa.getProperty("cell");null==ea?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),G.start(M.x,M.y)):null!=ta?this.addSelectionCells(ta):1<this.getSelectionCount()&&this.isCellSelected(ea)&&this.removeSelectionCell(ea);ta=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};
-this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var ea=M.view.graph;return aa&&(ea.isCellSelected(M.cell)||ea.isTableRow(M.cell)&&ea.selectionCellsHandler.isHandled(ea.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&
-this.initTouch()}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=function(a,b,e,f,g,d){mxGraph.call(this,a,b,e,f);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(S){S=this.getCurrentCellStyle(S);
+return null!=S?"1"==S.html||"wrap"==S[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var h=null,m=null,q=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,U){if("mouseDown"==U.getProperty("eventName")&&this.isEnabled()){S=U.getProperty("event");var aa=S.getState();U=this.view.scale;if(!mxEvent.isAltDown(S.getEvent())&&null!=aa&&(w=this.isCellSelected(aa.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(S.getEvent()))){var fa=this.selectionCellsHandler.getHandler(aa.cell);
+if(null==fa||null==fa.getHandleForEvent(S)){var ka=new mxRectangle(S.getGraphX()-1,S.getGraphY()-1),ta=mxEvent.isTouchEvent(S.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;fa=ta+2;ka.grow(ta);if(this.isTableCell(aa.cell)&&this.isCellMovable(aa.cell)&&!this.isCellSelected(aa.cell)&&!(mxUtils.contains(aa,S.getGraphX()-fa,S.getGraphY()-fa)&&mxUtils.contains(aa,S.getGraphX()-fa,S.getGraphY()+fa)&&mxUtils.contains(aa,S.getGraphX()+fa,S.getGraphY()+fa)&&mxUtils.contains(aa,
+S.getGraphX()+fa,S.getGraphY()-fa))){var ba=this.model.getParent(aa.cell);fa=this.model.getParent(ba);if(!this.isCellSelected(fa)){ta*=U;var R=2*ta;if(this.model.getChildAt(fa,0)!=ba&&mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y-ta,aa.width,R))||this.model.getChildAt(ba,0)!=aa.cell&&mxUtils.intersects(ka,new mxRectangle(aa.x-ta,aa.y,R,aa.height))||mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y+aa.height-ta,aa.width,R))||mxUtils.intersects(ka,new mxRectangle(aa.x+aa.width-ta,aa.y,R,aa.height)))ba=
+this.selectionCellsHandler.isHandled(fa),this.selectCellForEvent(fa,S.getEvent()),fa=this.selectionCellsHandler.getHandler(fa),null!=fa&&(ta=fa.getHandleForEvent(S),null!=ta&&(fa.start(S.getGraphX(),S.getGraphY(),ta),fa.blockDelayedSelection=!ba,S.consume()))}}for(;!S.isConsumed()&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&this.isCellMovable(aa.cell)&&(fa=this.getActualStartSize(aa.cell),(0<fa.x||0<fa.width)&&mxUtils.intersects(ka,
+new mxRectangle(aa.x+(fa.x-fa.width-1)*U+(0==fa.x?aa.width:0),aa.y,1,aa.height))||(0<fa.y||0<fa.height)&&mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y+(fa.y-fa.height-1)*U+(0==fa.y?aa.height:0),aa.width,1)))&&(this.selectCellForEvent(aa.cell,S.getEvent()),fa=this.selectionCellsHandler.getHandler(aa.cell),null!=fa&&null!=fa.customHandles&&(ta=mxEvent.CUSTOM_HANDLE-fa.customHandles.length+1,fa.start(S.getGraphX(),S.getGraphY(),ta),S.consume())),aa=this.view.getState(this.model.getParent(aa.cell))}}}}));
+this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(S,U){if("mouseDown"==U.getProperty("eventName")&&this.isEnabled()){S=U.getProperty("event");var aa=S.getState();mxEvent.isAltDown(S.getEvent())||mxEvent.isControlDown(U)||mxEvent.isShiftDown(U)||w||null==aa||!this.model.isEdge(aa.cell)||(h=new mxPoint(S.getGraphX(),S.getGraphY()),u=this.isCellSelected(aa.cell),q=aa,m=S,null!=aa.text&&null!=aa.text.boundingBox&&mxUtils.contains(aa.text.boundingBox,S.getGraphX(),S.getGraphY())?
+k=mxEvent.LABEL_HANDLE:(U=this.selectionCellsHandler.getHandler(aa.cell),null!=U&&null!=U.bends&&0<U.bends.length&&(k=U.getHandleForEvent(S))))}}));this.addMouseListener({mouseDown:function(S,U){},mouseMove:mxUtils.bind(this,function(S,U){S=this.selectionCellsHandler.handlers.map;for(var aa in S)if(null!=S[aa].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(U.getEvent())){var fa=this.tolerance;if(null!=h&&null!=q&&null!=m){if(aa=q,null!=k||Math.abs(h.x-U.getGraphX())>
+fa||Math.abs(h.y-U.getGraphY())>fa){var ka=null;mxEvent.isShiftDown(U.getEvent())||(ka=this.selectionCellsHandler.getHandler(aa.cell));if(null!=ka&&null!=ka.bends&&0<ka.bends.length){ka.redrawHandles();var ta=null!=k?k:ka.getHandleForEvent(m),ba=this.view.getEdgeStyle(aa),R=ba==mxEdgeStyle.EntityRelation;fa=aa.absolutePoints;u||(ta=k);ta!=mxEvent.LABEL_HANDLE&&null!=fa&&(ta=k,null==ta&&(S=new mxRectangle(h.x,h.y),S.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(S,fa[0].x,fa[0].y)?
+ta=0:mxUtils.contains(S,fa[fa.length-1].x,fa[fa.length-1].y)?ta=ka.bends.length-1:null!=fa&&(null==ba&&null==ta||ba==mxEdgeStyle.SegmentConnector||ba==mxEdgeStyle.OrthConnector)&&(null!=ba&&(2==fa.length||3==fa.length&&(0==Math.round(fa[0].x-fa[1].x)&&0==Math.round(fa[1].x-fa[2].x)||0==Math.round(fa[0].y-fa[1].y)&&0==Math.round(fa[1].y-fa[2].y)))?ta=2:(ta=mxUtils.findNearestSegment(aa,h.x,h.y),ta=null==ba?mxEvent.VIRTUAL_HANDLE-ta:ta+1))),null==ta&&(ta=mxEvent.VIRTUAL_HANDLE));S=ta==mxEvent.LABEL_HANDLE||
+0==ta||ta==ka.bends.length-1;if(!R&&(null!=aa.visibleSourceState||null!=aa.visibleTargetState)||S)ka.start(U.getGraphX(),U.getGraphX(),ta),U.consume(),this.graphHandler.reset()}null!=ka&&(this.selectionCellsHandler.isHandlerActive(ka)?this.isCellSelected(aa.cell)||(this.selectionCellsHandler.handlers.put(aa.cell,ka),this.selectCellForEvent(aa.cell,U.getEvent())):this.isCellSelected(aa.cell)||ka.destroy());u=!1;h=m=q=k=null}}else if(aa=U.getState(),null!=aa&&this.isCellEditable(aa.cell)){S=this.model.getParent(aa.cell);
+ka=null;if(this.model.isEdge(aa.cell)&&!this.isCellSelected(aa.cell)&&!mxEvent.isAltDown(U.getEvent())&&!mxEvent.isShiftDown(U.getEvent())&&!this.isAncestorSelected(aa.cell)&&(this.isSwimlane(S)||this.model.isLayer(S)||this.getCurrentRoot()==S)){if(S=new mxRectangle(U.getGraphX(),U.getGraphY()),S.grow(mxEdgeHandler.prototype.handleImage.width/2),fa=aa.absolutePoints,null!=fa)null!=aa.text&&null!=aa.text.boundingBox&&mxUtils.contains(aa.text.boundingBox,U.getGraphX(),U.getGraphY())?ka="move":mxUtils.contains(S,
+fa[0].x,fa[0].y)||mxUtils.contains(S,fa[fa.length-1].x,fa[fa.length-1].y)?ka="pointer":(ba=this.view.getEdgeStyle(aa),ba==mxEdgeStyle.EntityRelation||null==aa.visibleSourceState&&null==aa.visibleTargetState||(ka="crosshair",ba!=mxEdgeStyle.SegmentConnector&&ba!=mxEdgeStyle.OrthConnector))||(U=mxUtils.findNearestSegment(aa,U.getGraphX(),U.getGraphY()),U<fa.length-1&&0<=U&&(ka=0==Math.round(fa[U].x-fa[U+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(U.getEvent())){fa=mxShape.prototype.svgStrokeTolerance/
+2;S=new mxRectangle(U.getGraphX(),U.getGraphY());S.grow(fa);if(this.isTableCell(aa.cell)&&this.isCellMovable(aa.cell)&&(U=this.model.getParent(aa.cell),fa=this.model.getParent(U),!this.isCellSelected(fa)))if(mxUtils.intersects(S,new mxRectangle(aa.x,aa.y-2,aa.width,4))&&this.model.getChildAt(fa,0)!=U||mxUtils.intersects(S,new mxRectangle(aa.x,aa.y+aa.height-2,aa.width,4)))ka="row-resize";else if(mxUtils.intersects(S,new mxRectangle(aa.x-2,aa.y,4,aa.height))&&this.model.getChildAt(U,0)!=aa.cell||mxUtils.intersects(S,
+new mxRectangle(aa.x+aa.width-2,aa.y,4,aa.height)))ka="col-resize";for(U=aa;null==ka&&null!=U&&(this.isTableCell(U.cell)||this.isTableRow(U.cell)||this.isTable(U.cell));)this.isSwimlane(U.cell)&&this.isCellMovable(U.cell)&&(fa=this.getActualStartSize(U.cell),ta=this.view.scale,(0<fa.x||0<fa.width)&&mxUtils.intersects(S,new mxRectangle(U.x+(fa.x-fa.width-1)*ta+(0==fa.x?U.width*ta:0),U.y,1,U.height))?ka="col-resize":(0<fa.y||0<fa.height)&&mxUtils.intersects(S,new mxRectangle(U.x,U.y+(fa.y-fa.height-
+1)*ta+(0==fa.y?U.height:0),U.width,1))&&(ka="row-resize")),U=this.view.getState(this.model.getParent(U.cell))}null!=ka&&aa.setCursor(ka)}}}),mouseUp:mxUtils.bind(this,function(S,U){k=h=m=q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(S){var U=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);S.view.graph.isHtmlLabel(S.cell)&&("0"==mxUtils.getValue(S.style,"html","0")?U=mxUtils.htmlEntities(U,!1):(S.lastLabelValue!=
+U&&(S.lastLabelValue=U,S.lastSanitizedLabelValue=Graph.sanitizeHtml(U),z.innerHTML=S.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==S.view.graph.getAdaptiveColors())&&(S.lastSanitizedLabelValue=z.innerHTML)),U=S.lastSanitizedLabelValue));return U};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(S,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var S=C.apply(this,arguments);if(this.graph.pageVisible){var U=[],aa=this.graph.pageFormat,fa=this.graph.pageScale,ka=aa.width*fa;aa=aa.height*
+fa;fa=this.graph.view.translate;for(var ta=this.graph.view.scale,ba=this.graph.getPageLayout(),R=0;R<ba.width;R++)U.push(new mxRectangle(((ba.x+R)*ka+fa.x)*ta,(ba.y*aa+fa.y)*ta,ka*ta,aa*ta));for(R=1;R<ba.height;R++)U.push(new mxRectangle((ba.x*ka+fa.x)*ta,((ba.y+R)*aa+fa.y)*ta,ka*ta,aa*ta));S=U.concat(S)}return S};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(S,U){return null==S.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(S){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(S){for(var U=D.apply(this,arguments),aa=new mxDictionary,fa=[],ka=0;ka<U.length;ka++){var ta=this.graph.isTableCell(S)&&this.graph.isTableCell(U[ka])&&this.graph.isCellSelected(U[ka])?this.graph.model.getParent(U[ka]):this.graph.isTableRow(S)&&this.graph.isTableRow(U[ka])&&
+this.graph.isCellSelected(U[ka])?U[ka]:this.graph.getCompositeParent(U[ka]);null==ta||aa.get(ta)||(aa.put(ta,!0),fa.push(ta))}return fa};var E=this.graphHandler.start;this.graphHandler.start=function(S,U,aa,fa){var ka=!1;this.graph.isTableCell(S)&&(this.graph.isCellSelected(S)?ka=!0:S=this.graph.model.getParent(S));ka||this.graph.isTableRow(S)&&this.graph.isCellSelected(S)||(S=this.graph.getCompositeParent(S));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(S,U){U=this.graph.getCompositeParent(U);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(S,U,aa,fa,ka,ta){var ba=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=fa&&this.graph.applyNewEdgeStyle(fa,[ba]);return ba};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),J=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var S=this.currentState;T.apply(this,arguments);S!=this.currentState?
+(I=(new Date).getTime(),J=0):J=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(S){return mxEvent.isShiftDown(S.getEvent())&&mxEvent.isAltDown(S.getEvent())?!1:null!=this.currentState&&S.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(S){return V.apply(this,
+arguments)||mxEvent.isShiftDown(S)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=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=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(S){return mxEvent.isMouseEvent(S.getEvent())};var O=this.click;this.click=
+function(S){var U=null==S.state&&null!=S.sourceState&&this.isCellLocked(this.getLayerForCell(S.sourceState.cell));if(this.isEnabled()&&!U||S.isConsumed())return O.apply(this,arguments);var aa=U?S.sourceState.cell:S.getCell();if(null!=aa){var fa=this.getClickableLinkForCell(aa);null!=fa?this.isCustomLink(fa)?this.customLinkClicked(fa,aa):this.openLink(fa):U&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(S){return S.sourceState};var M=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){M.apply(this,arguments);if(null!=this.div)for(var S=this.div.getElementsByTagName("a"),U=0;U<S.length;U++)null!=S[U].getAttribute("href")&&null==S[U].getAttribute("target")&&S[U].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(S){return S.sourceState};this.getCursorForMouseEvent=function(S){var U=null==S.state&&null!=S.sourceState&&this.isCellLocked(S.sourceState.cell);return this.getCursorForCell(U?S.sourceState.cell:S.getCell())};var X=this.getCursorForCell;
+this.getCursorForCell=function(S){if(!this.isEnabled()||this.isCellLocked(S)){if(null!=this.getClickableLinkForCell(S))return"pointer";if(this.isCellLocked(S))return"default"}return X.apply(this,arguments)};this.selectRegion=function(S,U){var aa=mxEvent.isAltDown(U)?S:null;S=this.getCells(S.x,S.y,S.width,S.height,null,null,aa,null,!0);if(this.isToggleEvent(U))for(aa=0;aa<S.length;aa++)this.selectCellForEvent(S[aa],U);else this.selectCellsForEvent(S,U);return S};var N=this.graphHandler.shouldRemoveCellsFromParent;
+this.graphHandler.shouldRemoveCellsFromParent=function(S,U,aa){return this.graph.isCellSelected(S)?!1:N.apply(this,arguments)};var Y=this.updateMouseEvent;this.updateMouseEvent=function(S){S=Y.apply(this,arguments);null!=S.state&&this.isCellLocked(this.getLayerForCell(S.getCell()))&&(null==this.getLinkForCell(S.getCell())?S.state=this.view.getState(this.getCellAt(S.getGraphX(),S.getGraphY(),null,null,null,mxUtils.bind(this,function(U,aa,fa){return S.state==U||this.isCellLocked(this.getLayerForCell(U.cell))&&
+null==this.getLinkForCell(U.cell)}))):S.state=null);return S};var ja=this.isCellSelectable;this.isCellSelectable=function(S){return ja.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(S))};this.isCellLocked=function(S){for(;null!=S;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(S),"locked","0"))return!0;S=this.model.getParent(S)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,U){"mouseDown"==U.getProperty("eventName")&&(S=U.getProperty("event").getState(),
+la=null==S||this.isSelectionEmpty()||this.isCellSelected(S.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(S,U){if(!mxEvent.isMultiTouchEvent(U)){S=U.getProperty("event");var aa=U.getProperty("cell");null==aa?(S=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),G.start(S.x,S.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(aa)&&this.removeSelectionCell(aa);la=null;U.consume()}}));
+this.connectionHandler.selectCells=function(S,U){this.graph.setSelectionCell(U||S)};this.connectionHandler.constraintHandler.isStateIgnored=function(S,U){var aa=S.view.graph;return U&&(aa.isCellSelected(S.cell)||aa.isTableRow(S.cell)&&aa.selectionCellsHandler.isHandled(aa.model.getParent(S.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var S=this.connectionHandler.constraintHandler;null!=S.currentFocus&&S.isStateIgnored(S.currentFocus,!0)&&(S.currentFocus=null,
+S.constraints=null,S.destroyIcons());S.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved linecap linejoin".split(" ");Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
@@ -2577,14 +2575,14 @@ Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof p
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var D=w.referenceCell||w,E=f.model.getCell(D.sourceCellId),G=f.getEdges(E,null,!0,!0,!1,!0),I=[],J=0;J<G.length;J++)null!=G[J].getTerminal(!0)&&null!=G[J].getTerminal(!1)&&f.isCellVisible(G[J])&&
!f.isEdgeIgnored(G[J])&&f.isCellVisible(G[J].getTerminal(!0))&&f.isCellVisible(G[J].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[J]))&&I.push(G[J]);I=G=I;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var T=w.startIndex||0;I=G.slice(Math.max(0,T),Math.min(G.length,T+pageSize))}I=f.getOpposites(I,E).concat(I);var K=u.cloneCells(I);for(J=0;J<I.length;J++)if(K[J].sourceCellId=I[J].id,u.model.isEdge(K[J]))for(K[J].geometry.x=0,K[J].geometry.y=0,K[J].geometry.points=null,K[J].setStyle(K[J].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[J].setTerminal(D,null==K[J].getTerminal(!0)),E=0;E<K[J].getChildCount();E++){var U=K[J].getChildAt(E);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var V=u.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");V.referenceCell=D;V.startIndex=Math.max(0,(w.startIndex||0)-pageSize);K.splice(0,0,V)}if(G.length>(w.startIndex||0)+pageSize){var Q=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Q.referenceCell=
-D;Q.startIndex=(w.startIndex||0)+pageSize;K.splice(0,0,Q)}for(var N in u.getModel().cells){var W=u.getModel().getCell(N);W!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,W)&&u.getModel().isVertex(W)&&u.removeCells([W])}u.addCells(K);var O=u.getModel().getGeometry(u.rootCell);null!=O&&(O=O.clone(),O.x=z-O.width/2,O.y=C-O.height/3,u.getModel().setGeometry(u.rootCell,O));w=[];for(N in u.getModel().cells)W=u.getModel().getCell(N),W!=u.rootCell&&u.getModel().isVertex(W)&&u.getModel().getParent(W)==u.getDefaultParent()&&
-(w.push(W),O=u.getModel().getGeometry(W),null!=O&&(O.x=z-O.width/2,O.y=C-O.height/2));var X=w.length,ja=2*Math.PI/X,ka=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<X;z++)O=u.getModel().getGeometry(w[z]),null!=O&&(O=O.clone(),O.x+=ka*Math.sin(z*ja),O.y+=ka*Math.cos(z*ja),u.getModel().setGeometry(w[z],O))}finally{u.getModel().endUpdate()}}}var h=document.createElement("div");h.style.position="absolute";h.style.display="block";h.style.background=
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[J].setTerminal(D,null==K[J].getTerminal(!0)),E=0;E<K[J].getChildCount();E++){var V=K[J].getChildAt(E);null!=V.geometry&&V.geometry.relative&&(V.setStyle(V.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),V.geometry.offset=new mxPoint(0,0),V.geometry.y=0,V.geometry.x=.5>V.geometry.x?-.8:.5<V.geometry.x?.8:0)}if(0<w.startIndex){var W=u.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");W.referenceCell=D;W.startIndex=Math.max(0,(w.startIndex||0)-pageSize);K.splice(0,0,W)}if(G.length>(w.startIndex||0)+pageSize){var O=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=
+D;O.startIndex=(w.startIndex||0)+pageSize;K.splice(0,0,O)}for(var M in u.getModel().cells){var X=u.getModel().getCell(M);X!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,X)&&u.getModel().isVertex(X)&&u.removeCells([X])}u.addCells(K);var N=u.getModel().getGeometry(u.rootCell);null!=N&&(N=N.clone(),N.x=z-N.width/2,N.y=C-N.height/3,u.getModel().setGeometry(u.rootCell,N));w=[];for(M in u.getModel().cells)X=u.getModel().getCell(M),X!=u.rootCell&&u.getModel().isVertex(X)&&u.getModel().getParent(X)==u.getDefaultParent()&&
+(w.push(X),N=u.getModel().getGeometry(X),null!=N&&(N.x=z-N.width/2,N.y=C-N.height/2));var Y=w.length,ja=2*Math.PI/Y,la=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Y;z++)N=u.getModel().getGeometry(w[z]),null!=N&&(N=N.clone(),N.x+=la*Math.sin(z*ja),N.y+=la*Math.cos(z*ja),u.getModel().setGeometry(w[z],N))}finally{u.getModel().endUpdate()}}}var h=document.createElement("div");h.style.position="absolute";h.style.display="block";h.style.background=
Editor.isDarkMode()?Editor.darkColor:"#ffffff";h.style.width="100%";h.style.height="100%";h.style.left="0px";h.style.top="0px";h.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";h.appendChild(m);var q=document.createElement("div");q.style.position="absolute";q.style.cursor="pointer";q.style.right="38px";q.style.top="14px";q.style.textAlign="right";q.style.verticalAlign=
"top";mxUtils.write(q,mxResources.get("close"));h.appendChild(q);document.body.appendChild(h);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(I){return this.model.isVertex(I)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(g)};mxEvent.addListener(m,"click",z);mxEvent.addListener(q,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(I){var J=I.getCell(),T=null!=J?null!=J.referenceCell?J.referenceCell:J:null;null!=J&&w.rootCell!=J&&0<w.getEdges(T).length?d(w,J):C.apply(this,arguments)};z=w.container.scrollWidth/2;var D=w.container.scrollHeight/3;w.model.beginUpdate();var E=w.importCells([g])[0];E.sourceCellId=g.id;E.geometry.x=z-E.geometry.width/2;
-E.geometry.y=D-E.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(I,J){G||(I=J.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,I,function(){var T=new mxParallelEdgeLayout(w);T.spacing=60;var K=T.layout;T.layout=function(U){T.spacing=Math.min(60,Math.max(30,60-5*U.length));K.apply(this,arguments)};T.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
+E.geometry.y=D-E.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(I,J){G||(I=J.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,I,function(){var T=new mxParallelEdgeLayout(w);T.spacing=60;var K=T.layout;T.layout=function(V){T.spacing=Math.min(60,Math.max(30,60-5*V.length));K.apply(this,arguments)};T.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,E)}else mxUtils.error("Browser is not supported!",200,!1)})(h)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};
@@ -2613,8 +2611,8 @@ h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&q?m[u]=w:m[u]
(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var q=this.model.getChildAt(h,m);if(this.isCellEditable(q)){h=q;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,q,k){null!=h&&(k||(q=null!=q?q:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(q,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,q,
k,u,w,z){var C=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(C=this.getModel().isVertex(h[E])||C,!(D=this.getModel().isEdge(h[E])||D)||!C);E++);else D=C=!0;C=C&&!w;D=D&&!z;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=q[E]&&"none"!=q[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(C||h)&&(null==q[E]?delete k[m[E]]:k[m[E]]=q[E]),D||h)null==q[E]?delete u[m[E]]:u[m[E]]=q[E]};Graph.prototype.includeDescendants=function(h){for(var m=
[],q=0;q<h.length;q++)m=m.concat(this.model.getDescendants(h[q]));return m};Graph.prototype.pasteCellStyles=function(h,m,q,k,u){m=null!=m?m:this.currentVertexStyle;q=null!=q?q:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var z=h[w],C=this.model.getStyle(z),D=!1;null!=z.style&&(pairs=z.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var G=null!=C?C.split(";"):
-[],I=0;I<G.length;I++){var J=G[I],T=J.indexOf("=");if(0<=T){var K=J.substring(0,T),U=mxUtils.indexOf(E,K);0<=U&&E.splice(U,1);for(D=0;D<Graph.cellStyleGroups.length;D++){var V=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(V,K))for(var Q=0;Q<V.length;Q++){var N=mxUtils.indexOf(E,V[Q]);0<=N&&E.splice(N,1)}}}}var W=this.model.isEdge(z);D=W?q:m;for(I=0;I<E.length;I++){K=E[I];var O=D[K];null!=O&&("edgeStyle"!=K||u)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,K,O),"fontFamily"==
-K&&null==D.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),W&&"rounded"==K&&"1"==O&&null==D.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var q=0;q<m.length;q++)if(this.model.isVertex(m[q])||this.model.isEdge(m[q])){var k=this.getCellStyle(m[q],!1),u=k[mxConstants.STYLE_PERIMETER],
+[],I=0;I<G.length;I++){var J=G[I],T=J.indexOf("=");if(0<=T){var K=J.substring(0,T),V=mxUtils.indexOf(E,K);0<=V&&E.splice(V,1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,K))for(var O=0;O<W.length;O++){var M=mxUtils.indexOf(E,W[O]);0<=M&&E.splice(M,1)}}}}var X=this.model.isEdge(z);D=X?q:m;for(I=0;I<E.length;I++){K=E[I];var N=D[K];null!=N&&("edgeStyle"!=K||u)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,K,N),"fontFamily"==
+K&&null==D.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),X&&"rounded"==K&&"1"==N&&null==D.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var q=0;q<m.length;q++)if(this.model.isVertex(m[q])||this.model.isEdge(m[q])){var k=this.getCellStyle(m[q],!1),u=k[mxConstants.STYLE_PERIMETER],
w=!1;for(C in h){var z=h[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[q]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[q]])}}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(h,m,q,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,q,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==q&&(q=this.getCurrentRoot(),null==q&&(q=this.getModel().getRoot()));if(null!=q)for(var z=this.model.getChildCount(q)-1;0<=
z;z--){var C=this.model.getChildAt(q,z),D=this.getScaledCellAt(h,m,C,k,u,w);if(null!=D)return D;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(D=this.view.getState(C),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,
@@ -2677,10 +2675,10 @@ Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&n
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var q=this.isCloneConnectSource(a),k=q?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==C||d[E]==this.model.getParent(a)))C=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var G=this.view.getState(d[E]);null==w||null==G||mxUtils.intersects(w,G)||(D=d[E])}}var I=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;I&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var J=[],T=D;D=C;g=mxUtils.bind(this,function(K){if(null==h||null!=K||null==D&&q){this.model.beginUpdate();try{if(null==T&&I){var U=this.getAbsoluteParent(null!=K?K:a);U=q?a:this.getCompositeParent(U);T=null!=K?K:this.duplicateCells([U],
-!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var V=this.getCellGeometry(T);null!=V&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=V.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=V.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-V.width/2:u.x+V.width/2),V.x=u.x-V.width/2,V.y=u.y-V.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),D=null):I&&!q&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var Q=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&I||null==D&&q?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=Q&&(J.push(Q),this.applyNewEdgeStyle(a,[Q],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(Q,a));if(null==D&&null!=T&&null!=a.parent&&q&&b==mxConstants.DIRECTION_WEST){var N=a.parent.getIndex(a);this.model.add(a.parent,T,N)}null==D&&null!=T&&J.push(T);null==T&&null!=Q&&Q.geometry.setTerminalPoint(u,!1);null!=Q&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Q]))}finally{this.model.endUpdate()}}if(null!=m)m(J);else return J});if(null==h||null!=T||!I||null==D&&q)return g(T);h(k+u.x*e,z+u.y*e,g)};
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;I&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var J=[],T=D;D=C;g=mxUtils.bind(this,function(K){if(null==h||null!=K||null==D&&q){this.model.beginUpdate();try{if(null==T&&I){var V=this.getAbsoluteParent(null!=K?K:a);V=q?a:this.getCompositeParent(V);T=null!=K?K:this.duplicateCells([V],
+!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(T);null!=W&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),D=null):I&&!q&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var O=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&I||null==D&&q?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=O&&(J.push(O),this.applyNewEdgeStyle(a,[O],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(O,a));if(null==D&&null!=T&&null!=a.parent&&q&&b==mxConstants.DIRECTION_WEST){var M=a.parent.getIndex(a);this.model.add(a.parent,T,M)}null==D&&null!=T&&J.push(T);null==T&&null!=O&&O.geometry.setTerminalPoint(u,!1);null!=O&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[O]))}finally{this.model.endUpdate()}}if(null!=m)m(J);else return J});if(null==h||null!=T||!I||null==D&&q)return g(T);h(k+u.x*e,z+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2772,13 +2770,13 @@ e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.m
arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return g.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);
-this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ka,ta,M){var aa=new mxPoint(ta,M);aa.type=ka;D.push(aa);aa=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==aa||aa.type!=ka||aa.x!=ta||aa.y!=M},G=.5*
-this.scale;C=!1;D=[];for(var I=0;I<z.length-1;I++){for(var J=z[I+1],T=z[I],K=[],U=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,U.x,U.y,J.x,J.y)<1*this.scale*this.scale;)J=U,I++,U=z[I+2];C=E(0,T.x,T.y)||C;for(var V=0;V<this.validEdges.length;V++){var Q=this.validEdges[V],N=Q.absolutePoints;if(null!=N&&mxUtils.intersects(w,Q)&&"1"!=Q.style.noJump){var W=null;for(Q=0;Q<N.length-1;Q++){var O=N[Q+1],X=N[Q];for(U=N[Q+2];Q<N.length-2&&mxUtils.ptSegDistSq(X.x,X.y,U.x,U.y,O.x,O.y)<1*this.scale*this.scale;)O=
-U,Q++,U=N[Q+2];var ja=mxUtils.intersection(T.x,T.y,J.x,J.y,X.x,X.y,O.x,O.y);if(null!=ja&&(Math.abs(ja.x-T.x)>G||Math.abs(ja.y-T.y)>G)&&(Math.abs(ja.x-J.x)>G||Math.abs(ja.y-J.y)>G)&&(null==W||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,W.x,W.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,X.x,X.y)>G)&&(null==U||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,U.x,U.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,O.x,O.y)>G)){U=ja.x-T.x;W=ja.y-T.y;ja={distSq:U*U+W*W,x:ja.x,y:ja.y};for(U=0;U<K.length;U++)if(K[U].distSq>ja.distSq){K.splice(U,
-0,ja);ja=null;break}null==ja||0!=K.length&&K[K.length-1].x===ja.x&&K[K.length-1].y===ja.y||K.push(ja)}W=X}}}for(Q=0;Q<K.length;Q++)C=E(1,K[Q].x,K[Q].y)||C}ja=z[z.length-1];C=E(0,ja.x,ja.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)h.apply(this,
-arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,J=null,T=null,K=[],U=null;w.begin();for(var V=0;V<this.state.routedPoints.length;V++){var Q=this.state.routedPoints[V],N=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==V?N=z[0]:V==this.state.routedPoints.length-1&&(N=z[z.length-1]);var W=!1;if(null!=
-J&&1==Q.type){var O=this.state.routedPoints[V+1];Q=O.x/this.scale-N.x;O=O.y/this.scale-N.y;Q=Q*Q+O*O;null==U&&(U=new mxPoint(N.x-J.x,N.y-J.y),T=Math.sqrt(U.x*U.x+U.y*U.y),0<T?(U.x=U.x*E/T,U.y=U.y*E/T):U=null);Q>E*E&&0<T&&(Q=J.x-N.x,O=J.y-N.y,Q=Q*Q+O*O,Q>E*E&&(W=new mxPoint(N.x-U.x,N.y-U.y),Q=new mxPoint(N.x+U.x,N.y+U.y),K.push(W),this.addPoints(w,K,C,D,!1,null,I),K=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,I=!1,"sharp"==G?(w.lineTo(W.x-U.y*K,W.y+U.x*K),w.lineTo(Q.x-U.y*K,Q.y+
-U.x*K),w.lineTo(Q.x,Q.y)):"line"==G?(w.moveTo(W.x+U.y*K,W.y-U.x*K),w.lineTo(W.x-U.y*K,W.y+U.x*K),w.moveTo(Q.x-U.y*K,Q.y+U.x*K),w.lineTo(Q.x+U.y*K,Q.y-U.x*K),w.moveTo(Q.x,Q.y)):"arc"==G?(K*=1.3,w.curveTo(W.x-U.y*K,W.y+U.x*K,Q.x-U.y*K,Q.y+U.x*K,Q.x,Q.y)):(w.moveTo(Q.x,Q.y),I=!0),K=[Q],W=!0))}else U=null;W||(K.push(N),J=N)}this.addPoints(w,K,C,D,!1,null,I);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,D){return null!=z&&"centerPerimeter"==
+this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(la,S,U){var aa=new mxPoint(S,U);aa.type=la;D.push(aa);aa=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==aa||aa.type!=la||aa.x!=S||aa.y!=U},G=.5*this.scale;
+C=!1;D=[];for(var I=0;I<z.length-1;I++){for(var J=z[I+1],T=z[I],K=[],V=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,V.x,V.y,J.x,J.y)<1*this.scale*this.scale;)J=V,I++,V=z[I+2];C=E(0,T.x,T.y)||C;for(var W=0;W<this.validEdges.length;W++){var O=this.validEdges[W],M=O.absolutePoints;if(null!=M&&mxUtils.intersects(w,O)&&"1"!=O.style.noJump){var X=null;for(O=0;O<M.length-1;O++){var N=M[O+1],Y=M[O];for(V=M[O+2];O<M.length-2&&mxUtils.ptSegDistSq(Y.x,Y.y,V.x,V.y,N.x,N.y)<1*this.scale*this.scale;)N=V,O++,
+V=M[O+2];var ja=mxUtils.intersection(T.x,T.y,J.x,J.y,Y.x,Y.y,N.x,N.y);if(null!=ja&&(Math.abs(ja.x-T.x)>G||Math.abs(ja.y-T.y)>G)&&(Math.abs(ja.x-J.x)>G||Math.abs(ja.y-J.y)>G)&&(null==X||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,X.x,X.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,Y.x,Y.y)>G)&&(null==V||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,V.x,V.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,N.x,N.y)>G)){V=ja.x-T.x;X=ja.y-T.y;ja={distSq:V*V+X*X,x:ja.x,y:ja.y};for(V=0;V<K.length;V++)if(K[V].distSq>ja.distSq){K.splice(V,
+0,ja);ja=null;break}null==ja||0!=K.length&&K[K.length-1].x===ja.x&&K[K.length-1].y===ja.y||K.push(ja)}X=Y}}}for(O=0;O<K.length;O++)C=E(1,K[O].x,K[O].y)||C}ja=z[z.length-1];C=E(0,ja.x,ja.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)h.apply(this,
+arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,J=null,T=null,K=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var O=this.state.routedPoints[W],M=new mxPoint(O.x/this.scale,O.y/this.scale);0==W?M=z[0]:W==this.state.routedPoints.length-1&&(M=z[z.length-1]);var X=!1;if(null!=
+J&&1==O.type){var N=this.state.routedPoints[W+1];O=N.x/this.scale-M.x;N=N.y/this.scale-M.y;O=O*O+N*N;null==V&&(V=new mxPoint(M.x-J.x,M.y-J.y),T=Math.sqrt(V.x*V.x+V.y*V.y),0<T?(V.x=V.x*E/T,V.y=V.y*E/T):V=null);O>E*E&&0<T&&(O=J.x-M.x,N=J.y-M.y,O=O*O+N*N,O>E*E&&(X=new mxPoint(M.x-V.x,M.y-V.y),O=new mxPoint(M.x+V.x,M.y+V.y),K.push(X),this.addPoints(w,K,C,D,!1,null,I),K=0>Math.round(V.x)||0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,I=!1,"sharp"==G?(w.lineTo(X.x-V.y*K,X.y+V.x*K),w.lineTo(O.x-V.y*K,O.y+
+V.x*K),w.lineTo(O.x,O.y)):"line"==G?(w.moveTo(X.x+V.y*K,X.y-V.x*K),w.lineTo(X.x-V.y*K,X.y+V.x*K),w.moveTo(O.x-V.y*K,O.y+V.x*K),w.lineTo(O.x+V.y*K,O.y-V.x*K),w.moveTo(O.x,O.y)):"arc"==G?(K*=1.3,w.curveTo(X.x-V.y*K,X.y+V.x*K,O.x-V.y*K,O.y+V.x*K,O.x,O.y)):(w.moveTo(O.x,O.y),I=!0),K=[O],X=!0))}else V=null;X||(K.push(M),J=M)}this.addPoints(w,K,C,D,!1,null,I);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,D){return null!=z&&"centerPerimeter"==
z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var q=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,D){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)q.apply(this,arguments);else{z=this.getTerminalPort(w,z,D);var E=this.getNextPoint(w,C,D),G=this.graph.isOrthogonal(w),I=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),J=new mxPoint(z.getCenterX(),
z.getCenterY());if(0!=I){var T=Math.cos(-I),K=Math.sin(-I);E=mxUtils.getRotatedPoint(E,T,K,J)}T=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);T+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(z,E,0==I&&G,T);0!=I&&(T=Math.cos(I),K=Math.sin(I),E=mxUtils.getRotatedPoint(E,T,K,J));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,
C,D,E){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);D=C=null;if(null!=w)for(var G=0;G<w.length;G++){var I=this.graph.getConnectionPoint(z,w[G]);if(null!=I){var J=(I.x-E.x)*(I.x-E.x)+(I.y-E.y)*(I.y-E.y);if(null==D||J<D)C=I,D=J}}null!=C&&(E=C)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(D=C.state.view.graph.replacePlaceholders(C.state.cell,
@@ -2801,145 +2799,145 @@ var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.cr
return p};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var p="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",A="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<A.length;B++)null!=
this.currentEdgeStyle[A[B]]&&(p+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?p+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(p+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?p+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(p+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(p+="elbow="+this.currentEdgeStyle.elbow+";");return p=null!=this.currentEdgeStyle.html?p+("html="+this.currentEdgeStyle.html+";"):p+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var p=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-p&&(new mxCodec(p.ownerDocument)).decode(p,this.getStylesheet())};Graph.prototype.createCellLookup=function(p,A){A=null!=A?A:{};for(var B=0;B<p.length;B++){var F=p[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),R=0;R<L;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(p,A,B){B=null!=B?B:{};for(var F in p){var L=A[F];null==B[L]&&(B[L]=p[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(p,A,
-B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(p.ownerDocument),R=new mxGraphModel;L.decode(p,R);p=[];L={};var Z={},ha=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ha){var fa=this.createCellLookup([R.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ha.length;R++)ia=this.model.getChildren(this.moveCells([ha[R]],A,B,!1,this.model.getRoot())[0]),null!=ia&&(p=p.concat(ia));else{var ia=R.getChildren(ha[0]);
-null!=ia&&(p=this.moveCells(ia,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=p&&(this.createCellMapping(L,fa,Z),this.updateCustomLinks(Z,p),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(p,!0);null!=va&&this.moveCells(p,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return p};Graph.prototype.encodeCells=function(p){for(var A={},B=this.cloneCells(p,null,A),F=new mxDictionary,L=0;L<p.length;L++)F.put(p[L],
-!0);var R=new mxCodec,Z=new mxGraphModel,ha=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ha,B[L]);var fa=this.view.getState(p[L]);if(null!=fa){var ia=this.getCellGeometry(B[L]);null!=ia&&ia.relative&&!this.model.isEdge(p[L])&&null==F.get(this.model.getParent(p[L]))&&(ia.offset=null,ia.relative=!1,ia.x=fa.x/fa.view.scale-fa.view.translate.x,ia.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(p)),B);return R.encode(Z)};Graph.prototype.isSwimlane=
+p&&(new mxCodec(p.ownerDocument)).decode(p,this.getStylesheet())};Graph.prototype.createCellLookup=function(p,A){A=null!=A?A:{};for(var B=0;B<p.length;B++){var F=p[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),P=0;P<L;P++)this.createCellLookup([this.model.getChildAt(F,P)],A)}return A};Graph.prototype.createCellMapping=function(p,A,B){B=null!=B?B:{};for(var F in p){var L=A[F];null==B[L]&&(B[L]=p[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(p,A,
+B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(p.ownerDocument),P=new mxGraphModel;L.decode(p,P);p=[];L={};var Z={},ha=P.getChildren(this.cloneCell(P.root,this.isCloneInvalidEdges(),L));if(null!=ha){var ea=this.createCellLookup([P.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(P=0;P<ha.length;P++)ia=this.model.getChildren(this.moveCells([ha[P]],A,B,!1,this.model.getRoot())[0]),null!=ia&&(p=p.concat(ia));else{var ia=P.getChildren(ha[0]);
+null!=ia&&(p=this.moveCells(ia,A,B,!1,this.getDefaultParent()),Z[P.getChildAt(P.root,0).getId()]=this.getDefaultParent().getId())}if(null!=p&&(this.createCellMapping(L,ea,Z),this.updateCustomLinks(Z,p),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(p,!0);null!=va&&this.moveCells(p,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return p};Graph.prototype.encodeCells=function(p){for(var A={},B=this.cloneCells(p,null,A),F=new mxDictionary,L=0;L<p.length;L++)F.put(p[L],
+!0);var P=new mxCodec,Z=new mxGraphModel,ha=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ha,B[L]);var ea=this.view.getState(p[L]);if(null!=ea){var ia=this.getCellGeometry(B[L]);null!=ia&&ia.relative&&!this.model.isEdge(p[L])&&null==F.get(this.model.getParent(p[L]))&&(ia.offset=null,ia.relative=!1,ia.x=ea.x/ea.view.scale-ea.view.translate.x,ia.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(p)),B);return P.encode(Z)};Graph.prototype.isSwimlane=
function(p,A){var B=null;null==p||this.model.isEdge(p)||this.model.getParent(p)==this.model.getRoot()||(B=this.getCurrentCellStyle(p,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(p){return null!=p&&m.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellEditable(this.model.getParent(p)):!0:!1};var q=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=
-function(p){return null!=p&&q.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellMovable(this.model.getParent(p)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(p){var A=this.model.getParent(p);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(p,A,B,F,L,R,Z,ha){null==ha&&(ha=this.model.getParent(p),
-this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[p,A,B,F,L,R,Z,ha]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ia=this.getCellGeometry(fa[A]);null!=ia&&ia.relative&&0<ia.x&&this.model.remove(fa[A])}var va=this.getChildCells(p,!0);for(A=0;A<va.length;A++)ia=this.getCellGeometry(va[A]),null!=ia&&ia.relative&&0>=ia.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[p]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[p]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(p,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,
-function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(R.push(ha),ha==F)L=R.length-1;else if(p&&null==F&&0<R.length||null!=L&&p&&R.length>L||!p&&0<L)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)Z(this.model.getChildAt(ha,fa))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(p?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(p,A){if(this.model.isVertex(p)&&this.model.isVertex(A)&&2==this.getMovableCells([p,
-A]).length){var B=this.getCellGeometry(p),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(p,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(p,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ha=[],fa=0;fa<p.length;fa++)this.isTable(p[fa])?
-ha=ha.concat(this.model.getChildCells(p[fa],!0).reverse()):ha.push(p[fa]);p=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<p.length;fa++)if(null!=L&&this.isTableRow(p[fa])){var ia=this.model.getParent(p[fa]),va=this.getCellGeometry(p[fa]);this.isTable(ia)&&ha.push(ia);if(null!=ia&&null!=va&&this.isTable(ia)&&this.isTable(L)&&(F||ia!=L)){if(!F){var Ma=this.getCellGeometry(ia);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ia,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),
-Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){p[fa]=F?this.cloneCell(p[fa]):p[fa];var Aa=this.model.getChildCells(p[fa],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Xa=this.cloneCell(Aa[Aa.length-1]);null!=Xa&&(Xa.value="",this.model.add(p[fa],Xa))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(p[fa],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
-this.getCellGeometry(Ga[ua]),La=this.getCellGeometry(Aa[ua]);null!=Qa&&null!=La&&(La=La.clone(),La.width=Qa.width,this.model.setGeometry(Aa[ua],La))}}}}var Ua=z.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!F&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&this.model.remove(ha[fa]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(p)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(p,
-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<p.length;F++)if(this.isTableCell(p[F])){var L=this.model.getParent(p[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(p,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(p[F],"")}else{if(this.isTableRow(p[F])&&(R=this.model.getParent(p[F]),0>mxUtils.indexOf(p,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ha=0,fa=0;fa<Z.length;fa++)0<=mxUtils.indexOf(p,
-Z[fa])&&ha++;ha==Z.length&&B.push(R)}B.push(p[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(p,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(p,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(p,A){this.doUpdateCustomLinksForCell(p,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(p,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
-function(p,A){};Graph.prototype.getAllConnectionConstraints=function(p,A){if(null!=p){A=mxUtils.getValue(p.style,"points",null);if(null!=A){p=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];p.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return p}if(null!=p.shape&&null!=p.shape.bounds){F=p.shape.direction;A=p.shape.bounds;var L=p.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||
+function(p){return null!=p&&q.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellMovable(this.model.getParent(p)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(p){var A=this.model.getParent(p);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(p,A,B,F,L,P,Z,ha){null==ha&&(ha=this.model.getParent(p),
+this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(P,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[p,A,B,F,L,P,Z,ha]);this.model.setValue(B,"");var ea=this.getChildCells(B,!0);for(A=0;A<ea.length;A++){var ia=this.getCellGeometry(ea[A]);null!=ia&&ia.relative&&0<ia.x&&this.model.remove(ea[A])}var va=this.getChildCells(p,!0);for(A=0;A<va.length;A++)ia=this.getCellGeometry(va[A]),null!=ia&&ia.relative&&0>=ia.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
+if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[p]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[p]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(p,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,P=[],Z=mxUtils.bind(this,
+function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(P.push(ha),ha==F)L=P.length-1;else if(p&&null==F&&0<P.length||null!=L&&p&&P.length>L||!p&&0<L)return;for(var ea=0;ea<this.model.getChildCount(ha);ea++)Z(this.model.getChildAt(ha,ea))});Z(this.model.root);0<P.length&&(L=null!=L?mxUtils.mod(L+(p?1:-1),P.length):0,this.setSelectionCell(P[L]))}};Graph.prototype.swapShapes=function(p,A){if(this.model.isVertex(p)&&this.model.isVertex(A)&&2==this.getMovableCells([p,
+A]).length){var B=this.getCellGeometry(p),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),P=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,P.x=B.getCenterX()-F.width/2,P.y=B.getCenterY()-F.height/2,this.model.setGeometry(p,L),this.model.setGeometry(A,P)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(p,A,B,F,L,P,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ha=[],ea=0;ea<p.length;ea++)this.isTable(p[ea])?
+ha=ha.concat(this.model.getChildCells(p[ea],!0).reverse()):ha.push(p[ea]);p=ha}this.model.beginUpdate();try{ha=[];for(ea=0;ea<p.length;ea++)if(null!=L&&this.isTableRow(p[ea])){var ia=this.model.getParent(p[ea]),va=this.getCellGeometry(p[ea]);this.isTable(ia)&&ha.push(ia);if(null!=ia&&null!=va&&this.isTable(ia)&&this.isTable(L)&&(F||ia!=L)){if(!F){var Ma=this.getCellGeometry(ia);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ia,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),
+Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){p[ea]=F?this.cloneCell(p[ea]):p[ea];var Aa=this.model.getChildCells(p[ea],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Xa=this.cloneCell(Aa[Aa.length-1]);null!=Xa&&(Xa.value="",this.model.add(p[ea],Xa))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(p[ea],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
+this.getCellGeometry(Ga[ua]),La=this.getCellGeometry(Aa[ua]);null!=Qa&&null!=La&&(La=La.clone(),La.width=Qa.width,this.model.setGeometry(Aa[ua],La))}}}}var Ua=z.apply(this,arguments);for(ea=0;ea<ha.length;ea++)!F&&this.model.contains(ha[ea])&&0==this.model.getChildCount(ha[ea])&&this.model.remove(ha[ea]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(p)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(p,
+A){var B=[];this.model.beginUpdate();try{for(var F=0;F<p.length;F++)if(this.isTableCell(p[F])){var L=this.model.getParent(p[F]),P=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(P)?0>mxUtils.indexOf(p,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(p[F],"")}else{if(this.isTableRow(p[F])&&(P=this.model.getParent(p[F]),0>mxUtils.indexOf(p,P)&&0>mxUtils.indexOf(B,P))){for(var Z=this.model.getChildCells(P,!0),ha=0,ea=0;ea<Z.length;ea++)0<=mxUtils.indexOf(p,
+Z[ea])&&ha++;ha==Z.length&&B.push(P)}B.push(p[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(p,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(p,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(p,A){this.doUpdateCustomLinksForCell(p,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(p,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
+function(p,A){};Graph.prototype.getAllConnectionConstraints=function(p,A){if(null!=p){A=mxUtils.getValue(p.style,"points",null);if(null!=A){p=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];p.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(P){}return p}if(null!=p.shape&&null!=p.shape.bounds){F=p.shape.direction;A=p.shape.bounds;var L=p.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||
F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=p.shape.getConstraints(p.style,B,A);if(null!=A)return A;if(null!=p.shape.stencil&&null!=p.shape.stencil.constraints)return p.shape.stencil.constraints;if(null!=p.shape.constraints)return p.shape.constraints}}return null};Graph.prototype.flipEdge=function(p){if(null!=p){var A=this.getCurrentCellStyle(p);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[p])}};Graph.prototype.isValidRoot=function(p){for(var A=this.model.getChildCount(p),B=0,F=0;F<A;F++){var L=this.model.getChildAt(p,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(p)};Graph.prototype.isValidDropTarget=function(p,A,B){for(var F=this.getCurrentCellStyle(p),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(p)&&(this.isTargetShape(p,
-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(p))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(p))&&!this.isTableRow(p)&&(!this.isTable(p)||R||L))};Graph.prototype.createGroupCell=function(){var p=mxGraph.prototype.createGroupCell.apply(this,arguments);p.setStyle("group");return p};Graph.prototype.isExtendParentsOnAdd=function(p){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
+this.setCellStyles(mxConstants.STYLE_ELBOW,A,[p])}};Graph.prototype.isValidRoot=function(p){for(var A=this.model.getChildCount(p),B=0,F=0;F<A;F++){var L=this.model.getChildAt(p,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(p)};Graph.prototype.isValidDropTarget=function(p,A,B){for(var F=this.getCurrentCellStyle(p),L=!0,P=!0,Z=0;Z<A.length&&P;Z++)L=L&&this.isTable(A[Z]),P=P&&this.isTableRow(A[Z]);return!this.isCellLocked(p)&&(this.isTargetShape(p,
+A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(p))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(p))&&!this.isTableRow(p)&&(!this.isTable(p)||P||L))};Graph.prototype.createGroupCell=function(){var p=mxGraph.prototype.createGroupCell.apply(this,arguments);p.setStyle("group");return p};Graph.prototype.isExtendParentsOnAdd=function(p){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
p&&null!=this.layoutManager){var B=this.model.getParent(p);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(p,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(p,A){var B=this.getModel(),F=[];B.beginUpdate();
-try{for(var L=0;L<p.length;L++){var R=p[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ha=B.getTerminal(R,!1);B.setTerminal(R,ha,!0);B.setTerminal(R,Z,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ia=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ia,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(Z),Aa=this.view.getState(ha);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
-Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(R,Z,!0,wa);this.setConnectionConstraint(R,ha,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=
-fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Xa=fa.width;fa.width=fa.height;fa.height=Xa;B.setGeometry(R,fa)}var Qa=this.view.getState(R);if(null!=Qa){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
-La[mxUtils.mod(mxUtils.indexOf(La,Ua)+(A?-1:1),La.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(p){if(null!=p&&null!=p.fgNode)for(p=p.fgNode.firstChild;null!=p;){if("text"==p.nodeName&&"1"==p.getAttribute("placeholders"))return!0;p=p.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(p){if(p instanceof mxGeometryChange&&(this.isTableCell(p.cell)||this.isTableRow(p.cell))&&(null==p.previous&&null!=
+try{for(var L=0;L<p.length;L++){var P=p[L];if(B.isEdge(P)){var Z=B.getTerminal(P,!0),ha=B.getTerminal(P,!1);B.setTerminal(P,ha,!0);B.setTerminal(P,Z,!1);var ea=B.getGeometry(P);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ia=ea.getTerminalPoint(!0),va=ea.getTerminalPoint(!1);ea.setTerminalPoint(ia,!1);ea.setTerminalPoint(va,!0);B.setGeometry(P,ea);var Ma=this.view.getState(P),Na=this.view.getState(Z),Aa=this.view.getState(ha);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
+Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(P,Z,!0,wa);this.setConnectionConstraint(P,ha,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[P]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[P])}F.push(P)}}else if(B.isVertex(P)&&(ea=this.getCellGeometry(P),null!=
+ea)){if(!(this.isTable(P)||this.isTableRow(P)||this.isTableCell(P)||this.isSwimlane(P))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Xa=ea.width;ea.width=ea.height;ea.height=Xa;B.setGeometry(P,ea)}var Qa=this.view.getState(P);if(null!=Qa){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
+La[mxUtils.mod(mxUtils.indexOf(La,Ua)+(A?-1:1),La.length)],[P])}F.push(P)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(p){if(null!=p&&null!=p.fgNode)for(p=p.fgNode.firstChild;null!=p;){if("text"==p.nodeName&&"1"==p.getAttribute("placeholders"))return!0;p=p.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(p){if(p instanceof mxGeometryChange&&(this.isTableCell(p.cell)||this.isTableRow(p.cell))&&(null==p.previous&&null!=
p.geometry||null!=p.previous&&!p.previous.equals(p.geometry))){var A=p.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);p instanceof mxValueChange&&null!=p.cell&&null!=p.cell.value&&"object"==typeof p.cell.value&&this.invalidateDescendantsWithPlaceholders(p.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(p){p=
this.model.getDescendants(p);if(0<p.length)for(var A=0;A<p.length;A++){var B=this.view.getState(p[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(p[A]):this.isReplacePlaceholders(p[A])&&this.view.invalidate(p[A],!1,!1)}};Graph.prototype.replaceElement=function(p,A){A=p.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(p.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=
-p.innerHTML;p.parentNode.replaceChild(A,p)};Graph.prototype.processElements=function(p,A){if(null!=p){p=p.getElementsByTagName("*");for(var B=0;B<p.length;B++)null!=p[B]&&A(p[B])}};Graph.prototype.updateLabelElements=function(p,A,B){p=null!=p?p:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<p.length;L++){var R=this.getCurrentCellStyle(p[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(p[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=
-B?B:"*"),ha=0;ha<Z.length;ha++)A(Z[ha]);F.innerHTML!=R&&this.cellLabelChanged(p[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(p,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=p.value&&"object"==typeof p.value){if(this.isReplacePlaceholders(p)&&null!=p.getAttribute("placeholder"))for(var F=p.getAttribute("placeholder"),L=p;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=
-p.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(p){if(null!=p){for(var A=new mxDictionary,B=0;B<p.length;B++)A.put(p[B],!0);var F=[];for(B=0;B<p.length;B++){var L=this.model.getParent(p[B]);null==L||A.get(L)||(A.put(L,!0),
-F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&p.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(p){for(var A=[],B=0;B<p.length;B++)this.isCellDeletable(p[B])&&this.isTransparentState(this.view.getState(p[B]))&&
+p.innerHTML;p.parentNode.replaceChild(A,p)};Graph.prototype.processElements=function(p,A){if(null!=p){p=p.getElementsByTagName("*");for(var B=0;B<p.length;B++)null!=p[B]&&A(p[B])}};Graph.prototype.updateLabelElements=function(p,A,B){p=null!=p?p:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<p.length;L++){var P=this.getCurrentCellStyle(p[L]);if(null!=P&&"1"==P.html&&(P=this.convertValueToString(p[L]),null!=P&&0<P.length)){F.innerHTML=Graph.sanitizeHtml(P);for(var Z=F.getElementsByTagName(null!=
+B?B:"*"),ha=0;ha<Z.length;ha++)A(Z[ha]);F.innerHTML!=P&&this.cellLabelChanged(p[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(p,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=p.value&&"object"==typeof p.value){if(this.isReplacePlaceholders(p)&&null!=p.getAttribute("placeholder"))for(var F=p.getAttribute("placeholder"),L=p;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var P=
+p.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&P.hasAttribute("label_"+Graph.diagramLanguage)?P.setAttribute("label_"+Graph.diagramLanguage,A):P.setAttribute("label",A);A=P}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(p){if(null!=p){for(var A=new mxDictionary,B=0;B<p.length;B++)A.put(p[B],!0);var F=[];for(B=0;B<p.length;B++){var L=this.model.getParent(p[B]);null==L||A.get(L)||(A.put(L,!0),
+F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var P=!0,Z=0;Z<this.model.getChildCount(L.cell)&&P;Z++)A.get(this.model.getChildAt(L.cell,Z))||(P=!1);P&&p.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(p){for(var A=[],B=0;B<p.length;B++)this.isCellDeletable(p[B])&&this.isTransparentState(this.view.getState(p[B]))&&
A.push(p[B]);p=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(p,A){this.setAttributeForCell(p,"link",A)};Graph.prototype.setTooltipForCell=function(p,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(p.value)&&p.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(p,B,A)};Graph.prototype.getAttributeForCell=function(p,A,B){p=null!=p.value&&
"object"===typeof p.value?p.value.getAttribute(A):null;return null!=p?p:B};Graph.prototype.setAttributeForCell=function(p,A,B){if(null!=p.value&&"object"==typeof p.value)var F=p.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",p.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(p,F)};Graph.prototype.isTargetShape=function(p,A,B){p=mxUtils.getValue(this.getCurrentCellStyle(p),mxConstants.STYLE_SHAPE,"");for(B=0;B<
-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,p))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(p,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<p.length;L++){var R=this.model.getParent(p[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(p,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<p.length&&Z;L++)Z=Z&&this.isTableRow(p[L]);Z&&(this.isTableCell(R)&&(R=
-this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(p){mxGraph.prototype.click.call(this,p);this.firstClickState=p.getState();this.firstClickSource=p.getSource()};Graph.prototype.dblClick=function(p,A){this.isEnabled()&&(A=this.insertTextForEvent(p,A),mxGraph.prototype.dblClick.call(this,p,A))};Graph.prototype.insertTextForEvent=function(p,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));
+A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,p))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(p,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<p.length;L++){var P=this.model.getParent(p[L]);if(this.model.isEdge(P)&&0>mxUtils.indexOf(p,P))return null}P=E.apply(this,arguments);var Z=!0;for(L=0;L<p.length&&Z;L++)Z=Z&&this.isTableRow(p[L]);Z&&(this.isTableCell(P)&&(P=
+this.model.getParent(P)),this.isTableRow(P)&&(P=this.model.getParent(P)),this.isTable(P)||(P=null));return P};Graph.prototype.click=function(p){mxGraph.prototype.click.call(this,p);this.firstClickState=p.getState();this.firstClickSource=p.getSource()};Graph.prototype.dblClick=function(p,A){this.isEnabled()&&(A=this.insertTextForEvent(p,A),mxGraph.prototype.dblClick.call(this,p,A))};Graph.prototype.insertTextForEvent=function(p,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));
if(null!=p&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(p);this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(p)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||
(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var p=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+p),this.snap(B+p))};Graph.prototype.getFreeInsertPoint=
function(){var p=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/p.scale-p.translate.x+(0==A.width?2*this.gridSize:0))));p=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/p.scale-p.translate.y+2*this.gridSize)));return new mxPoint(F,p)};Graph.prototype.getCenterInsertPoint=function(p){p=null!=p?p: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-p.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-p.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-p.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-p.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(p,A){p=null!=p?p:"";null!=
A&&(0<p.length&&";"!=p.charAt(p.length-1)&&(p+=";"),p+="fontSize="+A+";");return p};Graph.prototype.addText=function(p,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,p,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);
-F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((p-L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(p/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(p,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ia=0;ia<fa.length;ia++){var va=this.getAbsoluteUrl(fa[ia].getAttribute("href"));null!=va&&(fa[ia].setAttribute("rel",this.linkRelation),
-fa[ia].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ia],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=p&&""!=p&&p!=mxConstants.NONE?new mxCellHighlight(Z,p,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ia=fa.sourceState;if(null==ia||null==Z.getLinkForCell(ia.cell))fa=Z.getCellAt(fa.getGraphX(),
-fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ia=null==ia||Z.model.isAncestor(fa,ia.cell)?Z.view.getState(fa):null;ia!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ia,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&
-(Z.container.style.cursor="move");this.updateCurrentState(ia)},mouseMove:function(fa,ia){if(Z.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ia.getGraphX()),ia=Math.abs(this.startY-ia.getGraphY()),(fa>R||ia>R)&&this.clear());else{for(fa=ia.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ia,!0,this.currentState),(null==this.currentState||ia.getState()!=
-this.currentState&&null!=ia.sourceState||!Z.intersects(this.currentState,ia.getGraphX(),ia.getGraphY()))&&this.updateCurrentState(ia))}},mouseUp:function(fa,ia){var va=ia.getSource();for(fa=ia.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ia.sourceState||!ia.isSource(ia.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&
-!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,fa),ia.consume())):null!=B&&!ia.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<
-R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ia.getGraphX())<R&&Math.abs(this.startY-ia.getGraphY())<R&&B(ia.getEvent()));this.clear()},activate:function(fa){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(fa.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(fa){};Z.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(p,A){p=null!=p?p:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<p.length;B++)this.isTableCell(p[B])&&(p[B]=this.model.getParent(p[B]));p=this.model.getTopmostCells(p);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();
-try{var Z={},ha=this.createCellLookup(p),fa=this.cloneCells(p,!1,Z,!0);for(B=0;B<p.length;B++){var ia=F.getParent(p[B]);if(null!=ia){var va=this.moveCells([fa[B]],L,L,!1)[0];R.push(va);if(A)F.add(ia,fa[B]);else{var Ma=ia.getIndex(p[B]);F.add(ia,fa[B],Ma+1)}if(this.isTable(ia)){var Na=this.getCellGeometry(fa[B]),Aa=this.getCellGeometry(ia);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ia,Aa))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(Z,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(p,A,B){if(null!=p&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,p);p=this.cellEditor.textarea.getElementsByTagName("img");if(p.length==L.length+1)for(R=p.length-1;0<=R;R--)if(0==R||p[R]!=L[R-1]){p[R].setAttribute("width",A);p[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(p){if(null!=
+F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var P=this.view.scale;F.geometry.offset=new mxPoint(Math.round((p-L.x)/P),Math.round((A-L.y)/P))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(p/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(p,A,B){var F=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ia=0;ia<ea.length;ia++){var va=this.getAbsoluteUrl(ea[ia].getAttribute("href"));null!=va&&(ea[ia].setAttribute("rel",this.linkRelation),
+ea[ia].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(ea[ia],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,P=this.getTolerance(),Z=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=p&&""!=p&&p!=mxConstants.NONE?new mxCellHighlight(Z,p,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ia=ea.sourceState;if(null==ia||null==Z.getLinkForCell(ia.cell))ea=Z.getCellAt(ea.getGraphX(),
+ea.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ia=null==ia||Z.model.isAncestor(ea,ia.cell)?Z.view.getState(ea):null;ia!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ia,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&
+(Z.container.style.cursor="move");this.updateCurrentState(ia)},mouseMove:function(ea,ia){if(Z.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ia.getGraphX()),ia=Math.abs(this.startY-ia.getGraphY()),(ea>P||ia>P)&&this.clear());else{for(ea=ia.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ia,!0,this.currentState),(null==this.currentState||ia.getState()!=
+this.currentState&&null!=ia.sourceState||!Z.intersects(this.currentState,ia.getGraphX(),ia.getGraphY()))&&this.updateCurrentState(ia))}},mouseUp:function(ea,ia){var va=ia.getSource();for(ea=ia.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<P&&Math.abs(this.scrollTop-Z.container.scrollTop)<P&&(null==ia.sourceState||!ia.isSource(ia.sourceState.control))&&((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&
+!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(ea,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,ea),ia.consume())):null!=B&&!ia.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<
+P&&Math.abs(this.scrollTop-Z.container.scrollTop)<P&&Math.abs(this.startX-ia.getGraphX())<P&&Math.abs(this.startY-ia.getGraphY())<P&&B(ia.getEvent()));this.clear()},activate:function(ea){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(ea.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(ea){};Z.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(ea){ha.clear()})};Graph.prototype.duplicateCells=function(p,A){p=null!=p?p:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<p.length;B++)this.isTableCell(p[B])&&(p[B]=this.model.getParent(p[B]));p=this.model.getTopmostCells(p);var F=this.getModel(),L=this.gridSize,P=[];F.beginUpdate();
+try{var Z={},ha=this.createCellLookup(p),ea=this.cloneCells(p,!1,Z,!0);for(B=0;B<p.length;B++){var ia=F.getParent(p[B]);if(null!=ia){var va=this.moveCells([ea[B]],L,L,!1)[0];P.push(va);if(A)F.add(ia,ea[B]);else{var Ma=ia.getIndex(p[B]);F.add(ia,ea[B],Ma+1)}if(this.isTable(ia)){var Na=this.getCellGeometry(ea[B]),Aa=this.getCellGeometry(ia);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ia,Aa))}}else P.push(ea[B])}this.updateCustomLinks(this.createCellMapping(Z,ha),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",ea))}finally{F.endUpdate()}return P};Graph.prototype.insertImage=function(p,A,B){if(null!=p&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],P=0;P<F.length;P++)L.push(F[P]);document.execCommand("insertimage",!1,p);p=this.cellEditor.textarea.getElementsByTagName("img");if(p.length==L.length+1)for(P=p.length-1;0<=P;P--)if(0==P||p[P]!=L[P-1]){p[P].setAttribute("width",A);p[P].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(p){if(null!=
this.cellEditor.textarea)if(0==p.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(p));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);
B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(p))};Graph.prototype.isCellResizable=function(p){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(p);return!this.isTableCell(p)&&!this.isTableRow(p)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(p,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=
-null,R=null,Z=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var fa=this.view.getState(A[ha]);if(null!=fa){var ia=p?fa.getCenterX():fa.getCenterY();L=null!=L?Math.max(L,ia):ia;R=null!=R?Math.min(R,ia):ia;B&&(Z+=p?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ga,wa){return p?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=p?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ia=this.view.scale;R=R/ia-(p?fa.x:fa.y);L=L/ia-(p?fa.x:fa.y);this.getModel().beginUpdate();
-try{var va=(L-R-Z)/(F.length-1),Ma=R+(B?p?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),Aa=this.getCellGeometry(F[ha].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),p?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,Aa));B&&(Ma+=p?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(p){return mxClient.IS_MAC&&
-mxEvent.isMetaDown(p)||mxEvent.isControlDown(p)};Graph.prototype.createSvgImageExport=function(p){p=new mxImageExport;p.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=p.visitStatesRecursive;
-p.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};p.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});p.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
-return p};Graph.prototype.parseBackgroundImage=function(p){var A=null;null!=p&&0<p.length&&(p=JSON.parse(p),A=new mxImage(p.src,p.width,p.height));return A};Graph.prototype.getBackgroundImageObject=function(p){return p};Graph.prototype.getSvg=function(p,A,B,F,L,R,Z,ha,fa,ia,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Xa=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),
-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ia=null!=ia?ia:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),La=this.backgroundImage,Ua=this.view.translate,Ya=this.view.scale;"diagram"==Na&&null!=La&&null!=La.width&&null!=La.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+La.x)*Ya,(Ua.y+La.y)*Ya,La.width*Ya,La.height*
+null,P=null,Z=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var ea=this.view.getState(A[ha]);if(null!=ea){var ia=p?ea.getCenterX():ea.getCenterY();L=null!=L?Math.max(L,ia):ia;P=null!=P?Math.min(P,ia):ia;B&&(Z+=p?ea.width:ea.height);F.push(ea)}}if(2<F.length){F.sort(function(Ga,wa){return p?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=p?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);ea=this.view.translate;ia=this.view.scale;P=P/ia-(p?ea.x:ea.y);L=L/ia-(p?ea.x:ea.y);this.getModel().beginUpdate();
+try{var va=(L-P-Z)/(F.length-1),Ma=P+(B?p?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),Aa=this.getCellGeometry(F[ha].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),p?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,Aa));B&&(Ma+=p?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(p){return mxClient.IS_MAC&&
+mxEvent.isMetaDown(p)||mxEvent.isControlDown(p)};Graph.prototype.createSvgImageExport=function(p){p=new mxImageExport;p.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var P=B.value.attributes[L];F.setAttribute("data-cell-"+P.name,P.value)}else if("object"===typeof B.value)for(P in B.value)F.setAttribute("data-cell-"+P,B.value[P]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=p.visitStatesRecursive;
+p.visitStatesRecursive=function(B,F,L){if(null!=B){var P=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);P.appendChild(F.root);A.apply(this,arguments);F.root=P}};p.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});p.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
+return p};Graph.prototype.parseBackgroundImage=function(p){var A=null;null!=p&&0<p.length&&(p=JSON.parse(p),A=new mxImage(p.src,p.width,p.height));return A};Graph.prototype.getBackgroundImageObject=function(p){return p};Graph.prototype.getSvg=function(p,A,B,F,L,P,Z,ha,ea,ia,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Xa=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),
+this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;P=null!=P?P:!0;Z=null!=Z?Z:!0;ia=null!=ia?ia:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():P&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),La=this.backgroundImage,Ua=this.view.translate,Ya=this.view.scale;"diagram"==Na&&null!=La&&null!=La.width&&null!=La.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+La.x)*Ya,(Ua.y+La.y)*Ya,La.width*Ya,La.height*
Ya)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Ya;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ia&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ia&&0==B?5:0);ia=L?-.5:0;var vb=mxUtils.getLightDarkColor(p),jb=Graph.createSvgNode(ia,ia,mb,ub,vb),nb=jb.ownerDocument;if(null!=p){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=L?-.5:0;bb.textOffset=L?-.5:0;bb.imageOffset=L?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Ya),Math.floor(B/A-Qa.y/Ya));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
-Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),H=[],y=0,ca=0;(0==x||y<x)&&ca<Za.length;){var S=Za.charCodeAt(ca);if(10==S||13==S){if(0<y)break}else H.push(Za.charAt(ca)),255>S&&y++;ca++}H.length<Za.length&&1<Za.length-H.length&&(Za=mxUtils.trim(H.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=La&&null!=La.width&&null!=La.height&&(p=Ya/A,ia=new mxRectangle((La.x+
+Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),H=[],y=0,da=0;(0==x||y<x)&&da<Za.length;){var Q=Za.charCodeAt(da);if(10==Q||13==Q){if(0<y)break}else H.push(Za.charAt(da)),255>Q&&y++;da++}H.length<Za.length&&1<Za.length-H.length&&(Za=mxUtils.trim(H.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=La&&null!=La.width&&null!=La.height&&(p=Ya/A,ia=new mxRectangle((La.x+
Ua.x)*p,(La.y+Ua.y)*p,La.width*p,La.height*p),mxUtils.intersects(Qa,ia)&&bb.image(La.x+Ua.x,La.y+Ua.y,La.width,La.height,La.src,!0));bb.scale(F);bb.textEnabled=Z;ha=null!=ha?ha:this.createSvgImageExport();var tb=ha.getLinkForCellState;ha.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};ha.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=ha.drawCellState,
-lb=null,ib=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
-$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Xa&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,ib())};if(R&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
-sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,fa,!0);return jb}finally{this.enableFlowAnimation=Xa,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(p,A){if("0"!=urlParams["svg-warning"]&&
+lb=null,ib=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(P&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
+$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Xa&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,ib())};if(P&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
+sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,ea,!0);return jb}finally{this.enableFlowAnimation=Xa,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(p,A){if("0"!=urlParams["svg-warning"]&&
0<A.getElementsByTagName("foreignObject").length){var B=p.createElement("switch"),F=p.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var L=p.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));p=p.createElement("text");p.setAttribute("text-anchor","middle");p.setAttribute("font-size","10px");p.setAttribute("x","50%");p.setAttribute("y","100%");mxUtils.write(p,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(p);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(p,A){p=p.getElementsByTagName("a");for(var B=0;B<p.length;B++){var F=p[B].getAttribute("href");null==F&&(F=p[B].getAttribute("xlink:href"));
null!=F&&(p[B].style.pointerEvents="none",p[B].setAttribute("href",""));A&&A(p[B])}};Graph.prototype.updateSvgLinks=function(p,A,B){p=p.getElementsByTagName("a");for(var F=0;F<p.length;F++)if(null==p[F].getAttribute("target")){var L=p[F].getAttribute("href");null==L&&(L=p[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?p[F].setAttribute("target",A):B&&this.isCustomLink(L)&&p[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(p){p=new mxSvgCanvas2D(p);
p.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;p.adaptiveColors=this.getAdaptiveColors();p.pointerEvents=!0;return p};Graph.prototype.getSelectedElement=function(){var p=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(p=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(p=document.selection.createRange().parentElement());return p};Graph.prototype.getSelectedEditingElement=function(){var p=null;if(null!=this.cellEditor.textarea)for(p=this.getSelectedElement();null!=
p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.parentNode;return p};Graph.prototype.getParentByName=function(p,A,B){for(;null!=p&&p.nodeName!=A;){if(p==B)return null;p=p.parentNode}return p};Graph.prototype.getParentByNames=function(p,A,B){for(;null!=p&&!(0<=mxUtils.indexOf(A,p.nodeName));){if(p==B)return null;p=p.parentNode}return p};Graph.prototype.selectNode=function(p){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(p);
-A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(p=A.createRange(),p.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",p),B.select())};Graph.prototype.flipEdgePoints=function(p,A,B){var F=this.getCellGeometry(p);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));
-this.model.setGeometry(p,F)}};Graph.prototype.flipChildren=function(p,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(p),L=0;L<F;L++){var R=this.model.getChildAt(p,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(p,A){this.model.beginUpdate();try{p=this.model.getTopmostCells(p);
-for(var B=[],F=0;F<p.length;F++)if(this.model.isEdge(p[F])){var L=this.view.getState(p[F]);null!=L&&this.flipEdgePoints(p[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(p[F]);null!=R&&this.flipChildren(p[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(p[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
-function(p,A){var B=null;if(null!=p&&0<p.length){this.model.beginUpdate();try{for(var F=0;F<p.length;F++){var L=this.model.getParent(p[F]);if(this.isTable(L)){var R=this.getCellGeometry(p[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ha=this.selectParentAfterDelete?this.model.getParents(p):null;this.removeCells(p,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
-this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=0;if(this.isTableCell(p)){var R=B.getParent(p);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),p)}else this.isTableRow(p)?F=B.getParent(p):p=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(p,!0).length-1);var Z=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(p=0;p<Z.length;p++){var fa=B.getChildCells(Z[p],!0)[L],ia=B.cloneCell(fa,!1);
+A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(p=A.createRange(),p.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",p),B.select())};Graph.prototype.flipEdgePoints=function(p,A,B){var F=this.getCellGeometry(p);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(P){null!=P&&(A?P.x=B+(B-P.x):P.y=B+(B-P.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));
+this.model.setGeometry(p,F)}};Graph.prototype.flipChildren=function(p,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(p),L=0;L<F;L++){var P=this.model.getChildAt(p,L);if(this.model.isEdge(P))this.flipEdgePoints(P,A,B);else{var Z=this.getCellGeometry(P);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(P,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(p,A){this.model.beginUpdate();try{p=this.model.getTopmostCells(p);
+for(var B=[],F=0;F<p.length;F++)if(this.model.isEdge(p[F])){var L=this.view.getState(p[F]);null!=L&&this.flipEdgePoints(p[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var P=this.getCellGeometry(p[F]);null!=P&&this.flipChildren(p[F],A,A?P.getCenterX()-P.x:P.getCenterY()-P.y);B.push(p[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
+function(p,A){var B=null;if(null!=p&&0<p.length){this.model.beginUpdate();try{for(var F=0;F<p.length;F++){var L=this.model.getParent(p[F]);if(this.isTable(L)){var P=this.getCellGeometry(p[F]),Z=this.getCellGeometry(L);null!=P&&null!=Z&&(Z=Z.clone(),Z.height-=P.height,this.model.setGeometry(L,Z))}}var ha=this.selectParentAfterDelete?this.model.getParents(p):null;this.removeCells(p,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
+this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=0;if(this.isTableCell(p)){var P=B.getParent(p);F=B.getParent(P);L=mxUtils.indexOf(B.getChildCells(P,!0),p)}else this.isTableRow(p)?F=B.getParent(p):p=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(p,!0).length-1);var Z=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(p=0;p<Z.length;p++){var ea=B.getChildCells(Z[p],!0)[L],ia=B.cloneCell(ea,!1);
null==ia&&(ia=this.createVertex());var va=this.getCellGeometry(ia);ia.value=null;ia.style=mxUtils.setStyle(mxUtils.setStyle(ia.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ha=va.width;var Ma=this.getCellGeometry(Z[p]);null!=Ma&&(va.height=Ma.height)}B.add(Z[p],ia,L+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ha,B.setGeometry(F,Na))}finally{B.endUpdate()}};
Graph.prototype.deleteLane=function(p){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(p).childLayout?p:A.getParent(p);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==p&&(p=F[F.length-1]),A.remove(p))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(p).childLayout){F=p;var L=B.getChildCells(F,!0);p=L[A?0:L.length-1]}else F=B.getParent(p);
-var R=F.getIndex(p);p=B.cloneCell(p,!1);p.value=null;B.add(F,p,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=p;if(this.isTableCell(p))L=B.getParent(p),F=B.getParent(L);else if(this.isTableRow(p))F=B.getParent(p);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ha=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var fa=this.getCellGeometry(L);if(null!=fa){for(R=0;R<Z.length;R++){p=B.cloneCell(Z[R],
-!1);p.value=null;p.style=mxUtils.setStyle(mxUtils.setStyle(p.style,"rowspan",null),"colspan",null);var ia=this.getCellGeometry(p);null!=ia&&(null!=ia.alternateBounds&&(ia.width=ia.alternateBounds.width,ia.height=ia.alternateBounds.height,ia.alternateBounds=null),ia.height=fa.height);L.insert(p)}B.add(F,L,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(p){var A=this.getModel();
-A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(F=A.getParent(p));this.isTableRow(F)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(p)&&(Z=mxUtils.indexOf(R,p));for(F=p=0;F<L.length;F++){var ha=A.getChildCells(L[F],!0)[Z];A.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(p=Math.max(p,fa.width))}var ia=this.getCellGeometry(B);null!=
-ia&&(ia=ia.clone(),ia.width-=p,A.setGeometry(B,ia))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(p){var A=this.getModel();A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(p=F=A.getParent(p));this.isTableRow(p)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);p=0;var R=this.getCellGeometry(F);null!=R&&(p=R.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=p,A.setGeometry(B,
-Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(p,A){for(var B=p.tBodies[0],F=B.rows[0].cells,L=p=0;L<F.length;L++){var R=F[L].getAttribute("colspan");p+=null!=R?parseInt(R):1}A=B.insertRow(A);for(L=0;L<p;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(p,A){p.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(p,A){var B=p.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);
+var P=F.getIndex(p);p=B.cloneCell(p,!1);p.value=null;B.add(F,p,P+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=p;if(this.isTableCell(p))L=B.getParent(p),F=B.getParent(L);else if(this.isTableRow(p))F=B.getParent(p);else{var P=B.getChildCells(F,!0);L=P[A?0:P.length-1]}var Z=B.getChildCells(L,!0),ha=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var ea=this.getCellGeometry(L);if(null!=ea){for(P=0;P<Z.length;P++){p=B.cloneCell(Z[P],
+!1);p.value=null;p.style=mxUtils.setStyle(mxUtils.setStyle(p.style,"rowspan",null),"colspan",null);var ia=this.getCellGeometry(p);null!=ia&&(null!=ia.alternateBounds&&(ia.width=ia.alternateBounds.width,ia.height=ia.alternateBounds.height,ia.alternateBounds=null),ia.height=ea.height);L.insert(p)}B.add(F,L,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=ea.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(p){var A=this.getModel();
+A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(F=A.getParent(p));this.isTableRow(F)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var P=A.getChildCells(F,!0);if(1>=P.length)A.remove(B);else{var Z=P.length-1;this.isTableCell(p)&&(Z=mxUtils.indexOf(P,p));for(F=p=0;F<L.length;F++){var ha=A.getChildCells(L[F],!0)[Z];A.remove(ha);var ea=this.getCellGeometry(ha);null!=ea&&(p=Math.max(p,ea.width))}var ia=this.getCellGeometry(B);null!=
+ia&&(ia=ia.clone(),ia.width-=p,A.setGeometry(B,ia))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(p){var A=this.getModel();A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(p=F=A.getParent(p));this.isTableRow(p)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);p=0;var P=this.getCellGeometry(F);null!=P&&(p=P.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=p,A.setGeometry(B,
+Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(p,A){for(var B=p.tBodies[0],F=B.rows[0].cells,L=p=0;L<F.length;L++){var P=F[L].getAttribute("colspan");p+=null!=P?parseInt(P):1}A=B.insertRow(A);for(L=0;L<p;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(p,A){p.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(p,A){var B=p.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);
mxUtils.br(L)}p=p.tBodies[0];for(B=0;B<p.rows.length;B++)F=p.rows[B].insertCell(A),mxUtils.br(F);return p.rows[0].cells[0<=A?A:p.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(p,A){if(0<=A){p=p.tBodies[0].rows;for(var B=0;B<p.length;B++)p[B].cells.length>A&&p[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(p){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
-p;p=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=p.appendChild(F);A.insertNode(p)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(p)};Graph.prototype.createLinkForHint=function(p,A,B){function F(R,Z){R.length>Z&&(R=R.substring(0,Math.round(Z/2))+"..."+R.substring(R.length-Math.round(Z/4)));return R}p=null!=p?p:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(p)?this.getLinkTitle(p):p;var L=document.createElement("a");L.setAttribute("rel",
-this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(p));L.setAttribute("title",F(this.isCustomLink(p)?this.getLinkTitle(p):p,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(p)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(R){this.customLinkClicked(p,B);mxEvent.consume(R)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(R,Z){this.popupMenuHandler.hideMenu()});var p=this.updateMouseEvent;this.updateMouseEvent=function(R){R=p.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var Z=this.getCellAt(R.graphX,R.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,R.graphX,R.graphY)||(R.state=this.view.getState(Z),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(R,Z,ha){R==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=
-!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ia.x+1,Z.getY()+ia.y+1,fa,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[R,Z,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var p=this.graph.view.getState(this.editingCell);return null!=p&&1==p.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var p="";window.getSelection?p=window.getSelection():document.getSelection?p=document.getSelection():document.selection&&(p=document.selection.createRange().text);
+p;p=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=p.appendChild(F);A.insertNode(p)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(p)};Graph.prototype.createLinkForHint=function(p,A,B){function F(P,Z){P.length>Z&&(P=P.substring(0,Math.round(Z/2))+"..."+P.substring(P.length-Math.round(Z/4)));return P}p=null!=p?p:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(p)?this.getLinkTitle(p):p;var L=document.createElement("a");L.setAttribute("rel",
+this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(p));L.setAttribute("title",F(this.isCustomLink(p)?this.getLinkTitle(p):p,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(p)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(p,B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(P,Z){this.popupMenuHandler.hideMenu()});var p=this.updateMouseEvent;this.updateMouseEvent=function(P){P=p.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null==P.getState()){var Z=this.getCellAt(P.graphX,P.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,P.graphX,P.graphY)||(P.state=this.view.getState(Z),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,Z,ha){P==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(P,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=
+!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ia.x+1,Z.getY()+ia.y+1,ea,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[P,Z,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var p=this.graph.view.getState(this.editingCell);return null!=p&&1==p.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var p="";window.getSelection?p=window.getSelection():document.getSelection?p=document.getSelection():document.selection&&(p=document.selection.createRange().text);
return""!=p};mxCellEditor.prototype.insertTab=function(p){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);p=Graph.createTabNode(p);B.insertNode(p);B.setStartAfter(p);B.setEndAfter(p);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(p,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),
-L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(p)}F||document.execCommand("justify"+p.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var p=window.getSelection();if(p.getRangeAt&&p.rangeCount){for(var A=
+L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):P=!1});(P||F)&&this.graph.cellEditor.setAlign(p)}F||document.execCommand("justify"+p.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var p=window.getSelection();if(p.getRangeAt&&p.rangeCount){for(var A=
[],B=0,F=p.rangeCount;B<F;++B)A.push(p.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(p){try{if(p)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=p.length;A<B;++A)sel.addRange(p[A])}else document.selection&&p.select&&p.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(p){null!=p.text&&(p.text.replaceLinefeeds="0"!=mxUtils.getValue(p.style,"nl2Br","1"));G.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(p,A){this.isKeepFocusEvent(p)||!mxEvent.isAltDown(p.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(p){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(p,A){p=this.graph.getStartEditingCell(p,A);J.apply(this,arguments);var B=this.graph.view.getState(p);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(p)};mxCellEditor.prototype.toggleViewMode=function(){var p=this.graph.view.getState(this.editingCell);
-if(null!=p){var A=null!=p&&"0"!=mxUtils.getValue(p.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(p.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-A=mxUtils.getValue(p.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");
-(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
+if(null!=p){var A=null!=p&&"0"!=mxUtils.getValue(p.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(p.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+A=mxUtils.getValue(p.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");
+(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(fa)+"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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
+Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(ea)+"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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
B;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(p,A){if(null!=this.textarea)if(p=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=p){var B=p.view.scale;this.bounds=mxRectangle.fromRectangle(p);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=p.text?p.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
mxUtils.getValue(p.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);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("+B+","+B+")")}else this.textarea.style.height=
"",this.textarea.style.overflow="",T.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(p,A){if("0"==mxUtils.getValue(p.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(p.cell,A);"1"==mxUtils.getValue(p.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
function(p,A){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(p.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(p){if("0"==mxUtils.getValue(p.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);
var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(p.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(p){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};
-mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(p){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(p,A){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==A&&this.graph.isCellDeletable(p.cell)&&0==this.graph.model.getChildCount(p.cell)&&this.graph.isTransparentState(p)&&this.graph.removeCells([p.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(p){p=
+mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(p){}};var V=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(p,A){this.graph.getModel().beginUpdate();try{V.apply(this,arguments),""==A&&this.graph.isCellDeletable(p.cell)&&0==this.graph.model.getChildCount(p.cell)&&this.graph.isTransparentState(p)&&this.graph.removeCells([p.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(p){p=
mxUtils.getValue(p.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);p==mxConstants.NONE&&(p=null);return p};mxCellEditor.prototype.getBorderColor=function(p){p=mxUtils.getValue(p.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);p==mxConstants.NONE&&(p=null);return p};mxCellEditor.prototype.getMinimumSize=function(p){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==p.text?30:p.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=
function(p,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(p){return p?b(p,this.unit):p};mxGraphHandler.prototype.updateHint=function(p){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;p=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+
-this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(p,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var V=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
-function(p,A){V.apply(this,arguments);var B=this.graph.getCellStyle(p);if(null==B.childLayout){var F=this.graph.model.getParent(p),L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var Z=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+Z.y+Z.height+2*R:L.width=A.width+Z.x+Z.width+2*R;
-this.graph.model.setGeometry(F,L)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function p(ha){B.get(ha)||(B.put(ha,!0),L.push(ha))}for(var A=Q.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],R=0;R<A.length;R++){var Z=A[R];this.graph.isTableCell(Z)?p(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&p(F.getParent(Z));p(Z)}return L};var N=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
-function(p){return N.apply(this,arguments)&&!mxEvent.isControlDown(p.getEvent())&&!mxEvent.isShiftDown(p.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var O=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
-function(p){var A=O.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var X=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(p){var A=X.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var p=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(p,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var W=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
+function(p,A){W.apply(this,arguments);var B=this.graph.getCellStyle(p);if(null==B.childLayout){var F=this.graph.model.getParent(p),L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var Z=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+Z.y+Z.height+2*P:L.width=A.width+Z.x+Z.width+2*P;
+this.graph.model.setGeometry(F,L)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function p(ha){B.get(ha)||(B.put(ha,!0),L.push(ha))}for(var A=O.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],P=0;P<A.length;P++){var Z=A[P];this.graph.isTableCell(Z)?p(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&p(F.getParent(Z));p(Z)}return L};var M=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
+function(p){return M.apply(this,arguments)&&!mxEvent.isControlDown(p.getEvent())&&!mxEvent.isShiftDown(p.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var N=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
+function(p){var A=N.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Y=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(p){var A=Y.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var p=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
p.x/2,this.bounds.y+this.rotationHandleVSpacing-p.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(p,A){return this.graph.isRecursiveVertexResize(p)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(p,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 ka=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
-var ta=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(p){return p.tableHandle||ta.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var p=0;this.graph.isTableRow(this.state.cell)?p=1:this.graph.isTableCell(this.state.cell)&&(p=2);return p};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
-function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,ea=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var p=ea.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Xa=[],Qa=0;Qa<Ga.length;Qa++){var La=Ga[Qa];Xa.push(null==La?null:new mxPoint((fa+La.x+wa)*R,(ia+La.y+
-ua)*R))}return Xa},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ha=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ia=this.state.origin.y+F.view.translate.y;null==p&&(p=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
+!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 la=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
+var S=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(p){return p.tableHandle||S.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var p=0;this.graph.isTableRow(this.state.cell)?p=1:this.graph.isTableCell(this.state.cell)&&(p=2);return p};var U=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
+function(){return U.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,fa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var p=fa.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Xa=[],Qa=0;Qa<Ga.length;Qa++){var La=Ga[Qa];Xa.push(null==La?null:new mxPoint((ea+La.x+wa)*P,(ia+La.y+
+ua)*P))}return Xa},B=this,F=this.graph,L=F.model,P=F.view.scale,Z=this.state,ha=this.selectionBorder,ea=this.state.origin.x+F.view.translate.x,ia=this.state.origin.y+F.view.translate.y;null==p&&(p=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Xa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Aa[Ga]?new aa(Aa[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Aa[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Ua.x*R);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var La=!1;ua.setPosition=function(Ua,Ya,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Ya.y-Ua.y-Ua.height);
+0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Aa[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*P;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Ua.x*P);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Ua.width+Ua.x+P)}this.shape.redraw()}};var La=!1;ua.setPosition=function(Ua,Ya,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Ya.y-Ua.y-Ua.height);
La=mxEvent.isShiftDown(mb.getEvent());null!=Xa&&La&&(Qa=Math.min(Qa,Xa.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!La);else if(!B.blockDelayedSelection){var Ya=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Ya,Ua)}Qa=0};ua.reset=function(){Qa=0}}p.push(ua)})(L);for(L=0;L<Ma.length;L++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Xa=null!=ua.alternateBounds?
-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*R,wa.y=Z.y+ua.y*R,wa.width=Xa.width*R,wa.height=Xa.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new aa(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
-null,ua);wa.tableHandle=!0;var La=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Na[Ga],La,0),this.shape.updateBoundsFromLine();else{var Ya=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Xa.width+La)*R;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Ya.y*R);this.shape.bounds.height=
-Z.height-(Ga==Ma.length-1?0:(Ya.height+Ya.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Ya,mb,ub){La=Math.max(Graph.minTableColumnWidth-Xa.width,mb.x-Ya.x-Xa.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(La=Math.min(La,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Ya){if(0!=La)F.setTableColumnWidth(this.state.cell,La,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Ya.getGraphX(),Ya.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(mb,Ya)}La=
-0};wa.positionChanged=function(){};wa.reset=function(){La=0};p.push(wa)})(L)}}return null!=p?p.reverse():null};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(p){da.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=p?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
+ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*P,wa.y=Z.y+ua.y*P,wa.width=Xa.width*P,wa.height=Xa.height*P,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new aa(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
+null,ua);wa.tableHandle=!0;var La=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Na[Ga],La,0),this.shape.updateBoundsFromLine();else{var Ya=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Xa.width+La)*P;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Ya.y*P);this.shape.bounds.height=
+Z.height-(Ga==Ma.length-1?0:(Ya.height+Ya.y)*P)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Ya,mb,ub){La=Math.max(Graph.minTableColumnWidth-Xa.width,mb.x-Ya.x-Xa.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(La=Math.min(La,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Ya){if(0!=La)F.setTableColumnWidth(this.state.cell,La,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Ya.getGraphX(),Ya.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(mb,Ya)}La=
+0};wa.positionChanged=function(){};wa.reset=function(){La=0};p.push(wa)})(L)}}return null!=p?p.reverse():null};var ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(p){ka.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=p?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
p?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var p=this.isMoveHandlesVisible();p&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():p||null==this.moveHandles||this.destroyMoveHandles();if(p&&null==this.moveHandles){for(p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].parentNode.removeChild(this.moveHandles[p]);
-this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var p=this.graph,A=p.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&p.isCellMovable(L.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=L;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
-R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.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),L.cell,Z),mxEvent.consume(Z))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].destroy();
-this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var p=0;p<this.cornerHandles.length;p++)null!=this.cornerHandles[p]&&null!=this.cornerHandles[p].node&&null!=this.cornerHandles[p].node.parentNode&&this.cornerHandles[p].node.parentNode.removeChild(this.cornerHandles[p].node);this.cornerHandles=null}};var sa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){sa.apply(this,arguments);this.destroyMoveHandles();
+this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var p=this.graph,A=p.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&p.isCellMovable(L.cell)){var P=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);P=new mxImageShape(P,this.rowHandleImage.src);P.rowState=L;P.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;P.init(this.graph.getView().getOverlayPane());
+P.node.style.cursor="move";mxEvent.addGestureListeners(P.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.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),L.cell,Z),mxEvent.consume(Z))}));B.push(P)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].destroy();
+this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var p=0;p<this.cornerHandles.length;p++)null!=this.cornerHandles[p]&&null!=this.cornerHandles[p].node&&null!=this.cornerHandles[p].node.parentNode&&this.cornerHandles[p].node.parentNode.removeChild(this.cornerHandles[p].node);this.cornerHandles=null}};var ta=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ta.apply(this,arguments);this.destroyMoveHandles();
this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var p=0;4>p;p++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());
-this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();p=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var Y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var p=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
-this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var L=this.customHandles[F].shape.bounds,R=L.getCenterX(),Z=L.getCenterY();if(Math.abs(this.state.x-R)<L.width/2||Math.abs(this.state.y-Z)<L.height/2||Math.abs(this.state.x+this.state.width-R)<L.width/2||Math.abs(this.state.y+this.state.height-Z)<L.height/2){B=
-!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),p.x=this.sizers[0].bounds.width+A,p.y=this.sizers[0].bounds.height+A):p=Y.apply(this,arguments);return p};mxVertexHandler.prototype.updateHint=function(p){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{p=this.state.view.scale;
+this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();p=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var p=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
+this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var L=this.customHandles[F].shape.bounds,P=L.getCenterX(),Z=L.getCenterY();if(Math.abs(this.state.x-P)<L.width/2||Math.abs(this.state.y-Z)<L.height/2||Math.abs(this.state.x+this.state.width-P)<L.width/2||Math.abs(this.state.y+this.state.height-Z)<L.height/2){B=
+!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),p.x=this.sizers[0].bounds.width+A,p.y=this.sizers[0].bounds.height+A):p=ba.apply(this,arguments);return p};mxVertexHandler.prototype.updateHint=function(p){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{p=this.state.view.scale;
var A=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/p),A)+" x "+b(this.roundLength(this.bounds.height/p),A)}p=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==p&&(p=this.bounds);this.hint.style.left=p.x+Math.round((p.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=p.y+p.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 P=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){P.apply(this,arguments);var p=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(p,A){ba.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 la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(p,A){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(p,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
-L=this.graph.view.scale,R=this.roundLength(A.x/L-F.x);F=this.roundLength(A.y/L-F.y);var Z=this.graph.view.unit;this.hint.innerHTML=b(R,Z)+", "+b(F,Z);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(Z==mxConstants.POINTS?Math.round(B.length/L):b(B.length/L,Z))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
+function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var R=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){R.apply(this,arguments);var p=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ca=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(p,A){ca.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 ma=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(p,A){ma.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(p,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
+L=this.graph.view.scale,P=this.roundLength(A.x/L-F.x);F=this.roundLength(A.y/L-F.y);var Z=this.graph.view.unit;this.hint.innerHTML=b(P,Z)+", "+b(F,Z);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(Z==mxConstants.POINTS?Math.round(B.length/L):b(B.length/L,Z))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
this.hint.innerHTML="["+Math.round(100*B.x)+"%, "+Math.round(100*B.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(p.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(p.getGraphY(),A.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"/>');
@@ -2953,26 +2951,26 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
function(p){return!mxEvent.isShiftDown(p.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(p){return!mxEvent.isShiftDown(p.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(p){return mxEvent.isMouseEvent(p.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(p){var A=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==p.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(p){var A=p.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==p.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};
mxRubberband.prototype.isSpaceEvent=function(p){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(p.getEvent())||mxEvent.isMetaDown(p.getEvent()))&&mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(p,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=
-null!=this.div&&"none"!=this.div.style.display,F=null,L=null,R=p=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,p=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(p=this.graph.snap(p),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(p)<this.graph.tolerance&&(p=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
-try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ha=this.graph.view.getState(Z[B]),fa=this.graph.getCellGeometry(Z[B]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(p,R),this.graph.model.setGeometry(Z[B],fa))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(p,A){if(!A.isConsumed()&&
-null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);p=mxUtils.getOffset(this.graph.container);B.x-=p.x;B.y-=p.y;p=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-p,L=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(L)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(p,B),this.isSpaceEvent(A)?(p=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
+null!=this.div&&"none"!=this.div.style.display,F=null,L=null,P=p=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,p=(this.currentX-F)/this.graph.view.scale,P=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(p=this.graph.snap(p),P=this.graph.snap(P),this.graph.isGridEnabled()||(Math.abs(p)<this.graph.tolerance&&(p=0),Math.abs(P)<this.graph.tolerance&&(P=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
+try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ha=this.graph.view.getState(Z[B]),ea=this.graph.getCellGeometry(Z[B]);null!=ha&&null!=ea&&(ea=ea.clone(),ea.translate(p,P),this.graph.model.setGeometry(Z[B],ea))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(p,A){if(!A.isConsumed()&&
+null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);p=mxUtils.getOffset(this.graph.container);B.x-=p.x;B.y-=p.y;p=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-p,L=this.first.y-B,P=this.graph.tolerance;if(null!=this.div||Math.abs(F)>P||Math.abs(L)>P)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(p,B),this.isSpaceEvent(A)?(p=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
F)*F,this.height=this.graph.snap(this.height/F)*F,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=p-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+
"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor=
-"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Ja.apply(this,arguments)};var ma=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(p,
-A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(ma=(new Date).getTime(),ya=0):ya=(new Date).getTime()-ma;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(p){return mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())?!1:null!=this.currentTerminalState&&p.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Ja.apply(this,arguments)};var na=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(p,
+A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),ya=0):ya=(new Date).getTime()-na;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(p){return mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())?!1:null!=this.currentTerminalState&&p.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(p,A,B){A=null!=p&&0==p;var F=this.state.getVisibleTerminalState(A);p=null!=p&&null!=this.state.absolutePoints&&(0==p||p>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==p)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=p?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),p):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
null!=p&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Pa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(p,A,B,F){F=A==mxEvent.ROTATION_HANDLE?
HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Pa.apply(this,arguments)};var Ia=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(p){if(null!=p&&1==p.length){var A=this.graph.getModel(),B=A.getParent(p[0]),F=this.graph.getCellGeometry(p[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(p[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ia.apply(this,
-arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var p=Ha.apply(this,arguments),A=[],B=0;B<p.length;B++)"1"!=mxUtils.getValue(p[B].style,"part","0")&&A.push(p[B]);return A};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(p){var A=this.graph.getModel(),B=A.getParent(p.cell),F=this.graph.getCellGeometry(p.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>p.width&&2>p.height&&null!=
-p.text&&null!=p.text.boundingBox?(A=p.text.unrotatedBoundingBox||p.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(p,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||
+arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var p=Ha.apply(this,arguments),A=[],B=0;B<p.length;B++)"1"!=mxUtils.getValue(p[B].style,"part","0")&&A.push(p[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(p){var A=this.graph.getModel(),B=A.getParent(p.cell),F=this.graph.getCellGeometry(p.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>p.width&&2>p.height&&null!=
+p.text&&null!=p.text.boundingBox?(A=p.text.unrotatedBoundingBox||p.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(p,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var p=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&p==mxConstants.NONE&&A==mxConstants.NONE?(p=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
p,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Va=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(p,A){Va.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 Wa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(p,A){Wa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(p,A){try{if(null==p&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=p||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=p){var L=document.createElement("div");
-L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(p,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);L.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,
-"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ha,fa){var ia=document.createElement("div");ia.style.display="flex";ia.style.alignItems="center";ia.style.marginTop=null!=p||0<fa?"6px":"0px";ia.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ia.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=
-document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[fa];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
+L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(p,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var P=B.cloneNode(!0);L.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,
+"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ha,ea){var ia=document.createElement("div");ia.style.display="flex";ia.style.alignItems="center";ia.style.marginTop=null!=p||0<ea?"6px":"0px";ia.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ia.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=
+document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[ea];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ia.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ia)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var p=cb.apply(this,
arguments);p.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return p};var fb=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){fb.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var p=0;p<this.moveHandles.length;p++)null!=
this.moveHandles[p]&&(this.moveHandles[p].bounds.x=Math.round(this.moveHandles[p].rowState.x+this.moveHandles[p].rowState.width-this.moveHandles[p].bounds.width/2),this.moveHandles[p].bounds.y=Math.round(this.moveHandles[p].rowState.y+(this.moveHandles[p].rowState.height-this.moveHandles[p].bounds.height)/2),this.moveHandles[p].redraw());if(null!=this.cornerHandles){p=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+p;A[0].bounds.y=
@@ -3010,7 +3008,7 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,q=mxUtils.bind(this,function(D,E,G,I){var J=mxUtils.bind(this,function(K,U){h!=D&&(U||(d?this.labelIndex=G:b.isSelectionEmpty()?this.diagramIndex=G:this.currentIndex=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,q=mxUtils.bind(this,function(D,E,G,I){var J=mxUtils.bind(this,function(K,V){h!=D&&(V||(d?this.labelIndex=G:b.isSelectionEmpty()?this.diagramIndex=G:this.currentIndex=
G),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",J);var T=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(I&&null==h||G==T)&&J(null,I&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);q(f,g,k++);var z=e.cloneNode(!1);z.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,z));this.container.appendChild(z);q(w,z,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),z=e.cloneNode(!1),z.style.display="none",this.panels.push(new TextFormatPanel(this,a,z)),this.container.appendChild(z),q(f,z,k++,!0);else{w=f.cloneNode(!1);var C=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),z=e.cloneNode(!1),z.style.display=
@@ -3029,13 +3027,13 @@ BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.create
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,z)),q=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var z=mxEvent.getSource(w);if(z==d||z==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,q){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=q?u.getCommonStyle(q):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(z){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var C=null!=q?q:k.getSelectionState().cells;z=z?f:g;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,q,k){function u(Q,N){"default"!=Q||N||(Q=m);"default"!=Q&&q&&(Q=mxUtils.getLightDarkColor(Q),Q=k()?Q.dark:Q.light);return Q}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||C.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);C.appendChild(E);var G=
-b(),I=!1,J=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(J=document.createElement("img"),J.src=Editor.colorDropperImage,J.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(J,"click",function(Q){K.value=u(G);K.click();mxEvent.consume(Q)}));var U=null,V=function(Q,N){I||
-(I=!0,null!=d&&d(Q),N||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(Q)),G=b(),Q=mxUtils.getLightDarkColor("default"!=G?G:m),N=document.createElement("div"),N.style.width="21px",N.style.height="12px",N.style.margin="2px 18px 2px 3px",N.style.borderWidth="1px",N.style.borderStyle="solid",N.style.backgroundColor=Q.cssText,T.innerText="",T.appendChild(N),!q&&mxUtils.isLightDarkColor(G)&&Q.light!=Q.dark?N.style.background="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+
-" 50.3%)":q&&w&&(N.style.backgroundColor=k()?Q.dark:Q.light),null!=J?(N.style.width="21px",N.style.margin="2px 18px 2px 3px",N.appendChild(J)):(N.style.width="36px",N.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(Q="#"==G.charAt(0)?G.substring(1).toUpperCase():G,Q=ColorDialog.prototype.colorNames[Q],null!=Q?T.setAttribute("title",Q):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||
-z.isSpecialColor(G)?(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1):(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0),T.style.display=D.checked||h?"":"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var Q=K.value;if(!q){var N=mxUtils.getLightDarkColor(G);k()?N.dark=Q:N.light=Q;Q="light-dark("+N.light+", "+N.dark+")"}V(Q)});T=mxUtils.button("",mxUtils.bind(this,function(Q){var N=m;q&&k()&&mxUtils.isLightDarkColor(N)&&(N=mxUtils.getLightDarkColor(m).dark);
-this.editorUi.pickColor(u(G,!0),function(W){V(W)},"default"==f?"default":null,N,q);mxEvent.consume(Q)}));T.className="geColorBtn";T.style.display=D.checked||h?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);h||(mxEvent.addListener(C,"click",function(Q){Q=mxEvent.getSource(Q);if(Q==D||"INPUT"!=Q.nodeName)Q!=D&&(D.checked=!D.checked),D.checked||null==G||G==mxConstants.NONE||
-f==mxConstants.NONE||(f=u(G)),V(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));V(G,!0);null!=g&&g.install(function(){V(G,!0)},this.listeners.push(g));return C};
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,q,k){function u(O,M){"default"!=O||M||(O=m);"default"!=O&&q&&(O=mxUtils.getLightDarkColor(O),O=k()?O.dark:O.light);return O}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||C.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);C.appendChild(E);var G=
+b(),I=!1,J=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(J=document.createElement("img"),J.src=Editor.colorDropperImage,J.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(J,"click",function(O){K.value=u(G);K.click();mxEvent.consume(O)}));var V=null,W=function(O,M){I||
+(I=!0,null!=d&&d(O),M||(null!=V&&(z.cellEditor.restoreSelection(V),V=null),e(O)),G=b(),O=mxUtils.getLightDarkColor("default"!=G?G:m),M=document.createElement("div"),M.style.width="21px",M.style.height="12px",M.style.margin="2px 18px 2px 3px",M.style.borderWidth="1px",M.style.borderStyle="solid",M.style.backgroundColor=O.cssText,T.innerText="",T.appendChild(M),!q&&mxUtils.isLightDarkColor(G)&&O.light!=O.dark?M.style.background="linear-gradient(to right bottom, "+O.cssText+" 50%, "+mxUtils.invertLightDarkColor(O).cssText+
+" 50.3%)":q&&w&&(M.style.backgroundColor=k()?O.dark:O.light),null!=J?(M.style.width="21px",M.style.margin="2px 18px 2px 3px",M.appendChild(J)):(M.style.width="36px",M.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(O="#"==G.charAt(0)?G.substring(1).toUpperCase():G,O=ColorDialog.prototype.colorNames[O],null!=O?T.setAttribute("title",O):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||
+z.isSpecialColor(G)?(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1):(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0),T.style.display=D.checked||h?"":"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var O=K.value;if(!q){var M=mxUtils.getLightDarkColor(G);k()?M.dark=O:M.light=O;O="light-dark("+M.light+", "+M.dark+")"}W(O)});T=mxUtils.button("",mxUtils.bind(this,function(O){var M=m;q&&k()&&mxUtils.isLightDarkColor(M)&&(M=mxUtils.getLightDarkColor(m).dark);
+this.editorUi.pickColor(u(G,!0),function(X){W(X)},"default"==f?"default":null,M,q);mxEvent.consume(O)}));T.className="geColorBtn";T.style.display=D.checked||h?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);h||(mxEvent.addListener(C,"click",function(O){O=mxEvent.getSource(O);if(O==D||"INPUT"!=O.nodeName)O!=D&&(D.checked=!D.checked),D.checked||null==G||G==mxConstants.NONE||
+f==mxConstants.NONE||(f=u(G)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(O){document.activeElement==z.cellEditor.textarea&&(V=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(O){document.activeElement==z.cellEditor.textarea&&(V=z.cellEditor.saveSelection())})));W(G,!0);null!=g&&g.install(function(){W(G,!0)},this.listeners.push(g));return C};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d){var h=this.editorUi,m=h.editor.graph;return this.createColorOption(a,function(){var q=m.getCellStyle(m.getSelectionCell(),!1);return null!=q?q[b]:null},function(q){m.getModel().beginUpdate();try{var k=h.getSelectionState().cells;m.setCellStyles(b,q,k);null!=g&&g(q);h.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[q],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(q){this.listener=
function(){var k=m.getCellStyle(m.getSelectionCell(),!1);null!=k&&q(k[b],!0)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}},f,null,d)};BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
BaseFormatPanel.prototype.addUnitInput=function(a,b,e,f,g,d,h,m,q){b=document.createElement("input");b.style.position="absolute";b.style.left=216-e-f+"px";b.style.width=f+"px";a.appendChild(b);f=this.createStepper(b,g,d,m,null,q);f.style.left=216-e+"px";a.appendChild(f);return b};
@@ -3074,78 +3072,78 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var q=this.addUnitInput(h,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,
null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(q.style.visibility="hidden",q.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var z=w.getElementsByTagName("input")[0];
-this.addKeyHandler(q,V);this.addKeyHandler(k,V);var C=this.addGeometryHandler(q,function(W,O,X){O=Math.max(1,b.fromUnit(O));if(f.isTableCell(X))return f.setTableColumnWidth(X,O-W.width,!0),!0;0<W.width&&(z.checked&&(W.height=Math.round(W.height*O*100/W.width)/100),W.width=O)});var D=this.addGeometryHandler(k,function(W,O,X){O=Math.max(1,b.fromUnit(O));f.isTableCell(X)&&(X=g.getParent(X));if(f.isTableRow(X))return f.setTableRowHeight(X,O-W.height),!0;0<W.height&&(z.checked&&(W.width=Math.round(W.width*
-O*100/W.height)/100),W.height=O)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(E,this.getUnit(),16,
-52,function(){N.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var J=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);J=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/
-10},function(W){W=parseFloat(W);if(!isNaN(W)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(W)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var U=null;T=this.addUnitInput(E,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(T,function(W,O){W.y=b.fromUnit(O)})}else T=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(W){W=parseFloat(W);if(!isNaN(W)){g.beginUpdate();try{K=
-K.clone(),K.y=parseFloat(W)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var V=mxUtils.bind(this,function(W,O,X){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(X||document.activeElement!=q)q.value=this.inUnit(d.width)+
-" "+this.getUnit();if(X||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){W=f.getCellGeometry(d.vertices[0]);E.style.display="";if(X||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(X||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=W&&W.relative&&(null==J||!X&&document.activeElement==J||(J.value=Math.round(1E3*W.x)/10+" %"),null==T||
-!X&&document.activeElement==T||(g.isEdge(g.getParent(d.vertices[0]))?T.value=this.inUnit(W.y)+" "+this.getUnit():T.value=Math.round(1E3*W.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(V)}});g.addListener(mxEvent.CHANGE,V);this.addKeyHandler(G,V);this.addKeyHandler(I,V);V();var Q=this.addGeometryHandler(G,function(W,O){O=b.fromUnit(O);W.relative?(W.offset=null!=W.offset?W.offset:new mxPoint,W.offset.x=O):W.x=O});var N=this.addGeometryHandler(I,
-function(W,O){O=b.fromUnit(O);W.relative?(W.offset=null!=W.offset?W.offset:new mxPoint,W.offset.y=O):W.y=O});d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(W){g.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),
+this.addKeyHandler(q,W);this.addKeyHandler(k,W);var C=this.addGeometryHandler(q,function(X,N,Y){N=Math.max(1,b.fromUnit(N));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,N-X.width,!0),!0;0<X.width&&(z.checked&&(X.height=Math.round(X.height*N*100/X.width)/100),X.width=N)});var D=this.addGeometryHandler(k,function(X,N,Y){N=Math.max(1,b.fromUnit(N));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,N-X.height),!0;0<X.height&&(z.checked&&(X.width=Math.round(X.width*
+N*100/X.height)/100),X.height=N)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(E,this.getUnit(),16,
+52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var J=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);J=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/
+10},function(X){X=parseFloat(X);if(!isNaN(X)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(X)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;T=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(T,function(X,N){X.y=b.fromUnit(N)})}else T=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(X){X=parseFloat(X);if(!isNaN(X)){g.beginUpdate();try{K=
+K.clone(),K.y=parseFloat(X)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(X,N,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=q)q.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){X=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=X&&X.relative&&(null==J||!Y&&document.activeElement==J||(J.value=Math.round(1E3*X.x)/10+" %"),null==T||
+!Y&&document.activeElement==T||(g.isEdge(g.getParent(d.vertices[0]))?T.value=this.inUnit(X.y)+" "+this.getUnit():T.value=Math.round(1E3*X.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(G,W);this.addKeyHandler(I,W);W();var O=this.addGeometryHandler(G,function(X,N){N=b.fromUnit(N);X.relative?(X.offset=null!=X.offset?X.offset:new mxPoint,X.offset.x=N):X.x=N});var M=this.addGeometryHandler(I,
+function(X,N){N=b.fromUnit(N);X.relative?(X.offset=null!=X.offset?X.offset:new mxPoint,X.offset.y=N):X.y=N});d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(X){g.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),
m.style.width="134px",m.style.left="89px",m.style.position="absolute",mxUtils.br(E),mxUtils.br(E),E.appendChild(m))),a.appendChild(E))};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var q=parseFloat(a.value);if(isNaN(q))a.value=d+" "+h.getUnit();else if(q!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,q,k[u]))){var z=g.view.getState(k[u]);null!=z&&g.isRecursiveVertexResize(z)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
q;a.value=q+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var q=f.getSelectionState().cells,k=0;k<q.length;k++)if(g.getModel().isEdge(q[k])){var u=g.getCellGeometry(q[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(q[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){q.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var q=mxUtils.bind(this,function(K){var U=parseInt(m.value);
-U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var V=e.getSelectionState().cells;f.setCellStyles("width",U,V);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",V))}m.value=U+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",q);mxEvent.addListener(m,"change",q);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){q.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var q=mxUtils.bind(this,function(K){var V=parseInt(m.value);
+V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",q);mxEvent.addListener(m,"change",q);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){I.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
this.addKeyHandler(u,E);this.addKeyHandler(w,E);var z=this.createPanel();z.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));z.appendChild(h);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){J.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(z,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(K,U,V){g=e.getSelectionState();K=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",V||document.activeElement!=m)V=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=V+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(K)?(V=f.model.getGeometry(K),null!=V&&null!=V.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(V.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(V.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=V&&null!=V.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(V.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(V.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
-"none")});var G=this.addEdgeGeometryHandler(u,function(K,U){null!=K.sourcePoint&&(K.sourcePoint.x=b.fromUnit(U))});var I=this.addEdgeGeometryHandler(w,function(K,U){null!=K.sourcePoint&&(K.sourcePoint.y=b.fromUnit(U))});var J=this.addEdgeGeometryHandler(C,function(K,U){null!=K.targetPoint&&(K.targetPoint.x=b.fromUnit(U))});var T=this.addEdgeGeometryHandler(D,function(K,U){null!=K.targetPoint&&(K.targetPoint.y=b.fromUnit(U))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
+null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(K,V,W){g=e.getSelectionState();K=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(K)?(W=f.model.getGeometry(K),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
+"none")});var G=this.addEdgeGeometryHandler(u,function(K,V){null!=K.sourcePoint&&(K.sourcePoint.x=b.fromUnit(V))});var I=this.addEdgeGeometryHandler(w,function(K,V){null!=K.sourcePoint&&(K.sourcePoint.y=b.fromUnit(V))});var J=this.addEdgeGeometryHandler(C,function(K,V){null!=K.targetPoint&&(K.targetPoint.x=b.fromUnit(V))});var T=this.addEdgeGeometryHandler(D,function(K,V){null!=K.targetPoint&&(K.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(p){p=null!=p?p.fontSize:null;return null!=p&&"px"==p.substring(p.length-2)?parseFloat(p):mxConstants.DEFAULT_FONTSIZE}function e(p,A){if(null!=p&&""!=p.textContent){p.style.lineHeight="";var B=mxUtils.getCurrentStyle(p);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?p.style.lineHeight=A+"%":""==p.getAttribute("style")&&p.removeAttribute("style")}}function f(p,A){A?p.classList.add("geActiveItem"):p.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var q=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,q);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(q)}a.appendChild(m);q=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,m);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+
" ("+g.actions.get("underline").shortcut+")");var z=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var C=m.cloneNode(!1),D=function(p){return function(){return p()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(p){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT])),C),G=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(p){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),C),I=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?
-function(p){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);d.cellEditor.isContentEditing()&&(U=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k));var J=g.addButton(Editor.alignTopImage,mxResources.get("top"),
-D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),T=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),C),K=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);a.appendChild(C);var U,V,Q,N;if(d.cellEditor.isContentEditing()){J.style.display=
-"none";T.style.display="none";K.style.display="none";z.style.display="none";var W=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==W.style.opacity&&document.execCommand("justifyfull",!1,null)},C);W.style.marginRight="9px";var O=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);O.style.marginLeft="10px";var X=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+
-Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);O.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",
+function(p){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k));var J=g.addButton(Editor.alignTopImage,mxResources.get("top"),
+D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),T=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),C),K=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);a.appendChild(C);var V,W,O,M;if(d.cellEditor.isContentEditing()){J.style.display=
+"none";T.style.display="none";K.style.display="none";z.style.display="none";var X=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==X.style.opacity&&document.execCommand("justifyfull",!1,null)},C);X.style.marginRight="9px";var N=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);N.style.marginLeft="10px";var Y=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+
+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);N.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];C[C.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",I.style.marginRight="12px";C=m.cloneNode(!1);mxUtils.write(C,
-mxResources.get("position"));var ja=document.createElement("select");ja.style.left="114px";ja.style.width="98px";var ka="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),ta={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],
+mxResources.get("position"));var ja=document.createElement("select");ja.style.left="114px";ja.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),S={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],
left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ka.length;D++){var M=document.createElement("option");M.setAttribute("value",ka[D]);mxUtils.write(M,mxResources.get(ka[D]));ja.appendChild(M)}C.appendChild(ja);ka=C.cloneNode(!1);mxUtils.write(ka,mxResources.get("writingDirection"));var aa=ja.cloneNode(!1);M=["automatic","leftToRight","rightToLeft"];h.html&&(M.push("vertical-leftToRight"),M.push("vertical-rightToLeft"));
-var ea={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<M.length;D++){var da=document.createElement("option");da.setAttribute("value",M[D]);"vertical-"==M[D].substring(0,9)?mxUtils.write(da,mxResources.get("vertical")+" ("+mxResources.get(M[D].substring(9))+")"):mxUtils.write(da,mxResources.get(M[D]));aa.appendChild(da)}ka.appendChild(aa);
-d.isEditing()||(a.appendChild(C),mxEvent.addListener(ja,"change",function(p){d.getModel().beginUpdate();try{var A=ta[ja.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(p)}),a.appendChild(ka),mxEvent.addListener(aa,"change",function(p){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
-ea[aa.value],h.cells);mxEvent.consume(p)}));var sa=document.createElement("input");sa.style.position="absolute";sa.style.left="146px";sa.style.width="52px";k.appendChild(sa);C=this.installInputHandler(sa,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(p){if(null!=d.getSelectedEditingElement()){sa.value=p+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==
-A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);p!=b(F)?A[B].style.fontSize=p+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(sa,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=sa.style.display;C.style.left="198px";k.appendChild(C);var Y=null,P=d.shapeBackgroundColor,ba=null,la=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+
-", "+mxUtils.hex2rgb(k.dark)+")",ma=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==Ja?"default":P},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,p,!1),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){Y=p},destroy:function(){Y=
-null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(p){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);ma.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():
-d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return la},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,p,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ba=p},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=
-k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(p){ma.style.display=p==mxConstants.NONE?"none":"";ya.style.display=ma.style.display},function(p){p==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,p,h.cells);d.updateLabelElements(h.cells,
-function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";q.appendChild(k);q.appendChild(ma);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(q.appendChild(ya),q.appendChild(k));a.appendChild(q);q=this.createPanel();
+mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var U=document.createElement("option");U.setAttribute("value",la[D]);mxUtils.write(U,mxResources.get(la[D]));ja.appendChild(U)}C.appendChild(ja);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var aa=ja.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),U.push("vertical-rightToLeft"));
+var fa={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ka=document.createElement("option");ka.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ka,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ka,mxResources.get(U[D]));aa.appendChild(ka)}la.appendChild(aa);
+d.isEditing()||(a.appendChild(C),mxEvent.addListener(ja,"change",function(p){d.getModel().beginUpdate();try{var A=S[ja.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(p)}),a.appendChild(la),mxEvent.addListener(aa,"change",function(p){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
+fa[aa.value],h.cells);mxEvent.consume(p)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);C=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(p){if(null!=d.getSelectedEditingElement()){ta.value=p+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==
+A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);p!=b(F)?A[B].style.fontSize=p+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ta,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=ta.style.display;C.style.left="198px";k.appendChild(C);var ba=null,R=d.shapeBackgroundColor,ca=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+
+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return R==d.shapeBackgroundColor||R==Ja?"default":R},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,p,!1),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ba=p},destroy:function(){ba=
+null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(p){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():
+d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,p,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ca=p},destroy:function(){ca=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=
+k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(p){na.style.display=p==mxConstants.NONE?"none":"";ya.style.display=na.style.display},function(p){p==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,p,h.cells);d.updateLabelElements(h.cells,
+function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";q.appendChild(k);q.appendChild(na);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(q.appendChild(ya),q.appendChild(k));a.appendChild(q);q=this.createPanel();
q.style.paddingTop="2px";q.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(p){var A=d.view.getState(p);return null==A||d.getModel().isEdge(p)||d.isAutoSizeState(A)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&q.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));k.style.fontWeight=
"bold";q.appendChild(k);k=this.createPanel();k.style.height="86px";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var za=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,
this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},
-this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var qa=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(p){var A=""==p.value?120:parseInt(p.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=qa&&(d.cellEditor.restoreSelection(qa),qa=null);
+this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(p){var A=""==p.value?120:parseInt(p.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ra&&(d.cellEditor.restoreSelection(ra),ra=null);
var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var L=F.getRangeAt(0);B=document.createElement("div");B.appendChild(L.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();L=new Range;L.selectNodeContents(B);F.addRange(L)}}if(null!=B)for(B!=d.cellEditor.textarea&&e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),L=0;L<B.length;L++)F.containsNode(B[L],
-!0)&&e(B[L],A)}p.value=A+" %"},function(p){Da=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(qa=d.cellEditor.saveSelection())}));mxEvent.addListener(p,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(qa=d.cellEditor.saveSelection())});p.value="120 %"}));q=m.cloneNode(!1);g.toolbar.addItems(["link","image"],q,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),
-function(){document.execCommand("inserthorizontalrule",!1)},q),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(p){g.menus.addInsertTableItem(p,null,null,!1)})),null,Editor.tableImage,q)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(q);a.appendChild(k);k=m.cloneNode(!1);C=[g.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=V&&d.insertColumn(V,null!=Q?Q.cellIndex:0)}catch(p){g.handleError(p)}}),
-k),g.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=V&&d.insertColumn(V,null!=Q?Q.cellIndex+1:-1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=V&&null!=Q&&d.deleteColumn(V,Q.cellIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.insertRow(V,
-N.sectionRowIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.insertRow(V,N.sectionRowIndex+1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.deleteRow(V,N.sectionRowIndex)}catch(p){g.handleError(p)}}),k)];C[2].style.marginRight="10px";q=this.createPanel();q.appendChild(this.createTitle(mxResources.get("table")));
-q.appendChild(k);m=m.cloneNode(!1);C=[g.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(p){if(null!=V){var A=V.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==Q||null!=p&&mxEvent.isShiftDown(p)?V:Q;d.processElements(F,function(L){L.style.border=
-null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(p){if(null!=V){var A=V.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+
-("0"+Number(R).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==Q||null!=p&&mxEvent.isShiftDown(p)?V:Q;d.processElements(F,function(L){L.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=V){var p=V.getAttribute("cellPadding")||0;p=new FilenameDialog(g,p,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?V.setAttribute("cellPadding",A):
-V.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(p.container,300,80,!0,!0);p.init()}},m),g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=V&&V.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=V&&V.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=V&&V.setAttribute("align","right")},m)];C[2].style.marginRight="10px";q.appendChild(m);
+!0)&&e(B[L],A)}p.value=A+" %"},function(p){Da=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())}));mxEvent.addListener(p,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())});p.value="120 %"}));q=m.cloneNode(!1);g.toolbar.addItems(["link","image"],q,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),
+function(){document.execCommand("inserthorizontalrule",!1)},q),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(p){g.menus.addInsertTableItem(p,null,null,!1)})),null,Editor.tableImage,q)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(q);a.appendChild(k);k=m.cloneNode(!1);C=[g.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=W&&d.insertColumn(W,null!=O?O.cellIndex:0)}catch(p){g.handleError(p)}}),
+k),g.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=W&&d.insertColumn(W,null!=O?O.cellIndex+1:-1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=W&&null!=O&&d.deleteColumn(W,O.cellIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.insertRow(W,
+M.sectionRowIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.insertRow(W,M.sectionRowIndex+1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.deleteRow(W,M.sectionRowIndex)}catch(p){g.handleError(p)}}),k)];C[2].style.marginRight="10px";q=this.createPanel();q.appendChild(this.createTitle(mxResources.get("table")));
+q.appendChild(k);m=m.cloneNode(!1);C=[g.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(p){if(null!=W){var A=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,P){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+("0"+Number(P).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==O||null!=p&&mxEvent.isShiftDown(p)?W:O;d.processElements(F,function(L){L.style.border=
+null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(p){if(null!=W){var A=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,P){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+
+("0"+Number(P).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==O||null!=p&&mxEvent.isShiftDown(p)?W:O;d.processElements(F,function(L){L.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var p=W.getAttribute("cellPadding")||0;p=new FilenameDialog(g,p,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?W.setAttribute("cellPadding",A):
+W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(p.container,300,80,!0,!0);p.init()}},m),g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];C[2].style.marginRight="10px";q.appendChild(m);
a.appendChild(q);var Va=q}else a.appendChild(q),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(p){mxEvent.addListener(w[p],"click",function(){f(w[p],""==w[p].style.backgroundImage)})})(D);var Wa=mxUtils.bind(this,function(p,A,B){h=g.getSelectionState();p=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(p&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(p&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);
-f(w[2],(p&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(z,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=sa)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),sa.value=isNaN(p)?"":p+" "+Editor.fontSizeUnit;p=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,
+f(w[2],(p&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(z,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ta)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(p)?"":p+" "+Editor.fontSizeUnit;p=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,
p==mxConstants.ALIGN_LEFT);f(G,p==mxConstants.ALIGN_CENTER);f(I,p==mxConstants.ALIGN_RIGHT);p=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(J,p==mxConstants.ALIGN_TOP);f(T,p==mxConstants.ALIGN_MIDDLE);f(K,p==mxConstants.ALIGN_BOTTOM);p=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ja.value=p==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?
"topLeft":p==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":p==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":p==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":p==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":p==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":p==mxConstants.ALIGN_LEFT?"left":p==mxConstants.ALIGN_RIGHT?"right":"center";p=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
p==mxConstants.TEXT_DIRECTION_RTL?aa.value="rightToLeft":p==mxConstants.TEXT_DIRECTION_LTR?aa.value="leftToRight":p!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?p==mxConstants.TEXT_DIRECTION_VERTICAL_LR?aa.value="vertical-leftToRight":p==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(aa.value="vertical-rightToLeft"):aa.value="automatic";if(B||document.activeElement!=Ka)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ka.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=
za)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),za.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Ha)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ha.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Ia)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ia.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Pa)p=parseFloat(mxUtils.getValue(h.style,
mxConstants.STYLE_SPACING_LEFT,0)),Pa.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit()});var cb=this.installInputHandler(Ka,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fb=this.installInputHandler(za,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_BOTTOM,
-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Pa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(sa,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Pa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var hb=
+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Pa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Pa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var hb=
null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var p=d.getSelectedEditingElement();if(null!=p&&null!=d.cellEditor.textarea){var A=function(Aa,Ga){if(null!=Aa&&null!=Ga){if(Aa==Ga)return!0;if(Aa.length>Ga.length+1)return Aa.substring(Aa.length-Ga.length-1,Aa.length)=="-"+Ga}return!1},B=function(Aa){if(null!=d.getParentByName(p,Aa,d.cellEditor.textarea))return!0;for(var Ga=p;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==Aa)return!0;
-return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(p),R=p==d.cellEditor.textarea||""==p.style.lineHeight?null:p.style.lineHeight,Z=p==d.cellEditor.textarea||""==p.style.fontSize?null:b(L);if(window.getSelection)for(var ha=p.getElementsByTagName("*"),fa=window.getSelection(),ia=0;ia<ha.length&&(!fa.containsNode(ha[ia],!0)||null==ha[ia].style||(null==Z&&""!=ha[ia].style.fontSize&&
-(Z=parseFloat(ha[ia].style.fontSize)),null==R&&""!=ha[ia].style.lineHeight&&(R=ha[ia].style.lineHeight),null==Z||null==R));ia++);null==Z&&(Z=b(L));if(null==R)for(ha=p;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=L){f(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==L.fontStyle||B("I")||B("EM"));f(w[2],"underline"==L.textDecorationLine||B("U"));f(U,"line-through"==
-L.textDecorationLine||B("STRIKE"));f(X,B("SUP"));f(O,B("SUB"));var va=F(p);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Xa=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Xa[Aa]=Qa;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");
-B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=hb?hb.parentNode.replaceChild(B,hb):a.appendChild(B);hb=B}d.cellEditor.isTableSelected()?(f(W,A(L.textAlign,"justify")),f(E,A(L.textAlign,"left")),f(G,A(L.textAlign,"center")),f(I,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?
-(f(W,A(L.textAlign,"justify")),f(E,!1),f(G,!1),f(I,!1)):(f(W,!1),f(E,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));V=d.getParentByName(p,"TABLE",d.cellEditor.textarea);N=null==V?null:d.getParentByName(p,"TR",V);Q=null==V?null:d.getParentByNames(p,["TD","TH"],V);Va.style.display=null!=V?"":"none";document.activeElement!=sa&&(sa.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?Da.value=R.replace("%"," %"):(A=parseFloat(R),
-isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ba&&(la=d.getTextColor(p,!0),ba(la,!0));null!=Y&&(P=d.getTextColor(p,!1),Y(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}eb=!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,
-"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
+return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(p),P=p==d.cellEditor.textarea||""==p.style.lineHeight?null:p.style.lineHeight,Z=p==d.cellEditor.textarea||""==p.style.fontSize?null:b(L);if(window.getSelection)for(var ha=p.getElementsByTagName("*"),ea=window.getSelection(),ia=0;ia<ha.length&&(!ea.containsNode(ha[ia],!0)||null==ha[ia].style||(null==Z&&""!=ha[ia].style.fontSize&&
+(Z=parseFloat(ha[ia].style.fontSize)),null==P&&""!=ha[ia].style.lineHeight&&(P=ha[ia].style.lineHeight),null==Z||null==P));ia++);null==Z&&(Z=b(L));if(null==P)for(ha=p;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){P=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=L){f(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==L.fontStyle||B("I")||B("EM"));f(w[2],"underline"==L.textDecorationLine||B("U"));f(V,"line-through"==
+L.textDecorationLine||B("STRIKE"));f(Y,B("SUP"));f(N,B("SUB"));var va=F(p);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Xa=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Xa[Aa]=Qa;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");
+B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=hb?hb.parentNode.replaceChild(B,hb):a.appendChild(B);hb=B}d.cellEditor.isTableSelected()?(f(X,A(L.textAlign,"justify")),f(E,A(L.textAlign,"left")),f(G,A(L.textAlign,"center")),f(I,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?
+(f(X,A(L.textAlign,"justify")),f(E,!1),f(G,!1),f(I,!1)):(f(X,!1),f(E,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(p,"TABLE",d.cellEditor.textarea);M=null==W?null:d.getParentByName(p,"TR",W);O=null==W?null:d.getParentByNames(p,["TD","TH"],W);Va.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof P&&0<P.indexOf("%")?Da.value=P.replace("%"," %"):(A=parseFloat(P),
+isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ca&&(ma=d.getTextColor(p,!0),ca(ma,!0));null!=ba&&(R=d.getTextColor(p,!1),ba(R,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}eb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
+StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
@@ -3167,66 +3165,66 @@ g.fill?"":"none";E=mxUtils.getValue(g.style,q,null);if(g.fill&&null!=E&&E!=mxCon
"cells",g.cells));mxEvent.consume(E)});mxEvent.addListener(h,"change",function(E){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(E)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue));k=mxUtils.bind(this,function(E,G){if(null!=E){E=E.split(",");for(var I=0;I<E.length;I++){var J=
E[I].replace(/([a-z])([A-Z])/g,"$1 $2");a.appendChild(this.createCellColorOption(J.charAt(0).toUpperCase()+J.substring(1),E[I],"default",null,null,G))}}});k(g.style.fillColorStyles,f.shapeBackgroundColor);k(g.style.strokeColorStyles,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi.getSelectionState(),b=[];if(null!=a.customProperties)for(var e in a.customProperties){var f=a.customProperties[e];null!=f&&"color"==f.type&&f.primary&&b.push({title:f.dispName,defaultValue:null==f.defVal?"#000000":f.defVal,key:f.name})}a.swimlane&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return b};
-StyleFormatPanel.prototype.addStroke=function(a){function b(P){var ba=f.fromUnit(parseFloat(J.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));J.value=f.inUnit(ba)+" "+f.getUnit();mxEvent.consume(P)}function e(P){var ba=f.fromUnit(parseFloat(T.value));ba=Math.min(999,
-Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));T.value=f.inUnit(ba)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var q=document.createElement("select");
-q.style.position="absolute";q.style.left="72px";q.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));q.appendChild(w)}mxEvent.addListener(q,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],la=["0","0"];"rounded"==q.value?la=["1","0"]:"curved"==q.value&&(la=["0","1"]);for(var Ja=0;Ja<ba.length;Ja++)d.setCellStyles(ba[Ja],
-la[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",la,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(q,"click",function(P){mxEvent.consume(P)});var z="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(z,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(z,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(q);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,la,Ja,ma){P=this.editorUi.menus.styleChange(P,"",Ja,ma,"",null);Ja=document.createElement("div");ma=la.split(" ");2==ma.length?(la=parseInt(ma[0])+parseInt(ma[1]),
-ma=parseInt(ma[0])/la*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+ma+"%, transparent 0%)",Ja.style.backgroundSize=la+"px 1px"):Ja.style.borderBottomStyle=la;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(Ja);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",
-mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),I=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,
-mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))})),"",null,G);
-w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
+StyleFormatPanel.prototype.addStroke=function(a){function b(R){var ca=f.fromUnit(parseFloat(J.value));ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",h.cells)));J.value=f.inUnit(ca)+" "+f.getUnit();mxEvent.consume(R)}function e(R){var ca=f.fromUnit(parseFloat(T.value));ca=Math.min(999,
+Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",h.cells)));T.value=f.inUnit(ca)+" "+f.getUnit();mxEvent.consume(R)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var q=document.createElement("select");
+q.style.position="absolute";q.style.left="72px";q.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));q.appendChild(w)}mxEvent.addListener(q,"change",function(R){d.getModel().beginUpdate();try{var ca=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==q.value?ma=["1","0"]:"curved"==q.value&&(ma=["0","1"]);for(var Ja=0;Ja<ca.length;Ja++)d.setCellStyles(ca[Ja],
+ma[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(R)});mxEvent.addListener(q,"click",function(R){mxEvent.consume(R)});var z="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(R){d.setCellStyles(z,R,h.cells);if(null==R||
+R==mxConstants.NONE){R=[];for(var ca=0;ca<h.cells.length;ca++)(d.isTableCell(h.cells[ca])||d.isTableRow(h.cells[ca]))&&R.push(h.cells[ca]);0<R.length&&d.setCellStyles(z,"inherit",R)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(q);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(R,ca,ma,Ja,na){R=this.editorUi.menus.styleChange(R,"",Ja,na,"",null);Ja=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),
+na=parseInt(na[0])/ma*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",Ja.style.backgroundSize=ma+"px 1px"):Ja.style.borderBottomStyle=ma;R.firstChild.firstChild.className="geStyleMenuItem";R.firstChild.firstChild.style.width=ca+"px";R.firstChild.firstChild.appendChild(Ja);return R}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){D(R,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",
+mxResources.get("solid"));D(R,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(R,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(R,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(R,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(R,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(R,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),I=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,
+mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))})),"",null,G);
+w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){D(R,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(R,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(R,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(R,40,"12 12",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(R,40,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(R,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(R,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
" (3)")})),"",null,G);k=C.cloneNode(!1);var J=document.createElement("input");J.style.position="absolute";J.style.width="52px";J.style.left="148px";J.setAttribute("title",mxResources.get("linewidth"));C.appendChild(J);var T=J.cloneNode(!0);T.style.width="56px";T.style.left="144px";G.appendChild(T);var K=this.createStepper(J,b,this.getUnitStep(),null,null,this.isFloatUnit());K.style.display=J.style.display;C.appendChild(K);K=this.createStepper(T,e,this.getUnitStep(),null,null,this.isFloatUnit());K.style.display=
-T.style.display;G.appendChild(K);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(T,"blur",e);mxEvent.addListener(T,"change",e);var U=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",
-mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
-["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),"connector"==h.style.shape&&Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],null,null,!0,Format.curvedImage.src)).setAttribute("title",mxResources.get("curved")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],null,null,!0,Format.entityImage.src)).setAttribute("title",mxResources.get("entityRelation")))})),"",null,k),V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,
-function(P){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,
-0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,
-0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",
-0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],
-null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],
-null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src)).setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,
-function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k),Q=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==
-h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,
-1],null,null,!1,Format.diamondThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
-!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k);I.style.width="67px";I.style.marginRight="2px";w.style.width=
-"67px";w.style.marginRight="2px";U.style.width="67px";U.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";Q.style.width="67px";Q.style.marginRight="2px";this.addArrow(I).appendChild(document.createElement("div"));this.addArrow(U).appendChild(document.createElement("div"));this.addArrow(V);this.addArrow(Q);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var N=document.createElement("div");N.className="gePatternPreview";N.style.width="100px";N.style.borderBottomStyle=
-"solid";E.appendChild(N);var W=document.createElement("div");W.className="gePatternPreview";W.style.width="36px";W.style.borderBottomStyle="solid";w.appendChild(W);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,
-mxResources.get("lineend"));u.appendChild(w);var O=this.addUnitInput(u,this.getUnit(),82,52,function(){sa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),X=this.addUnitInput(u,this.getUnit(),16,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var ja=this.addUnitInput(u,this.getUnit(),
-82,52,function(){ea.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ka=this.addUnitInput(u,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),82,62);this.addLabel(u,mxResources.get("size"),16,62);mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var ta=this.addUnitInput(m,
-this.getUnit(),16,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var M=mxUtils.bind(this,function(P,ba,la){function Ja(ma,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,ma,ya);return za}h=g.getSelectionState();if(la||document.activeElement!=J)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,
-1)),J.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=T)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),T.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();q.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?q.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(q.value="rounded");N.style.borderBottom=
-"1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ba=String(P).split(" "),2<=ba.length?(P=parseInt(ba[0])+parseInt(ba[1]),ba=parseInt(ba[0])/P*100,N.style.borderBottom="1px solid transparent",N.style.backgroundImage="linear-gradient(to right, black "+ba+"%, transparent 0%)",N.style.backgroundPosition="bottom left",N.style.backgroundSize=P+"px 1px",N.style.backgroundRepeat="repeat-x"):N.style.borderBottom=
-"1px dashed black");W.style.backgroundImage=N.style.backgroundImage;W.style.backgroundPosition=N.style.backgroundPosition;W.style.backgroundSize=N.style.backgroundSize;W.style.backgroundRepeat=N.style.backgroundRepeat;W.style.borderBottom=N.style.borderBottom;P=U.getElementsByTagName("div")[1];null!=P&&(ba=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ba=null),"orthogonalEdgeStyle"==ba&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,
-null)?P.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ba||"none"==ba||null==ba?P.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ba?P.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalElbowImage.src+")":P.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ba?"vertical"==
-mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":P.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":P.style.backgroundImage="url("+Format.orthogonalImage.src+")");P=I.getElementsByTagName("div")[1];null!=P&&(P.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+
-")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),V,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),Q,"end");mxUtils.setOpacity(U,
-"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&(mxUtils.setOpacity(V,30),mxUtils.setOpacity(Q,30));if(la||document.activeElement!=ka)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ka.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ja)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ja.value=
-isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=X)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ja)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ta)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,
-0)),ta.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var aa=this.installInputHandler(ka,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ea=this.installInputHandler(ja,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(X,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var sa=this.installInputHandler(O,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Y=this.installInputHandler(ta,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,M);this.addKeyHandler(ka,M);this.addKeyHandler(ja,M);this.addKeyHandler(X,M);this.addKeyHandler(O,M);this.addKeyHandler(ta,M);d.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){d.getModel().removeListener(M)}});M();return a};
+T.style.display;G.appendChild(K);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(T,"blur",e);mxEvent.addListener(T,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",
+mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
+["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),"connector"==h.style.shape&&Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],null,null,!0,Format.curvedImage.src)).setAttribute("title",mxResources.get("curved")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],null,null,!0,Format.entityImage.src)).setAttribute("title",mxResources.get("entityRelation")))})),"",null,k),W=g.toolbar.addMenu(new Menu(mxUtils.bind(this,
+function(R){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,
+0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,
+0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",
+0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],
+null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],
+null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src)).setAttribute("title",mxResources.get("block")),R.div.style.width="40px",window.setTimeout(mxUtils.bind(this,
+function(){null!=R.div&&mxUtils.fit(R.div)}),0)})),"",null,k),O=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==
+h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,
+1],null,null,!1,Format.diamondThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
+!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),R.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=R.div&&mxUtils.fit(R.div)}),0)})),"",null,k);I.style.width="67px";I.style.marginRight="2px";w.style.width=
+"67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";O.style.width="67px";O.style.marginRight="2px";this.addArrow(I).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));this.addArrow(W);this.addArrow(O);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var M=document.createElement("div");M.className="gePatternPreview";M.style.width="100px";M.style.borderBottomStyle=
+"solid";E.appendChild(M);var X=document.createElement("div");X.className="gePatternPreview";X.style.width="36px";X.style.borderBottomStyle="solid";w.appendChild(X);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,
+mxResources.get("lineend"));u.appendChild(w);var N=this.addUnitInput(u,this.getUnit(),82,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Y=this.addUnitInput(u,this.getUnit(),16,52,function(){ka.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var ja=this.addUnitInput(u,this.getUnit(),
+82,52,function(){fa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),la=this.addUnitInput(u,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),82,62);this.addLabel(u,mxResources.get("size"),16,62);mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var S=this.addUnitInput(m,
+this.getUnit(),16,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,function(R,ca,ma){function Ja(na,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,na,ya);return za}h=g.getSelectionState();if(ma||document.activeElement!=J)R=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,
+1)),J.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=T)R=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),T.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();q.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?q.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(q.value="rounded");M.style.borderBottom=
+"1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(R=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ca=String(R).split(" "),2<=ca.length?(R=parseInt(ca[0])+parseInt(ca[1]),ca=parseInt(ca[0])/R*100,M.style.borderBottom="1px solid transparent",M.style.backgroundImage="linear-gradient(to right, black "+ca+"%, transparent 0%)",M.style.backgroundPosition="bottom left",M.style.backgroundSize=R+"px 1px",M.style.backgroundRepeat="repeat-x"):M.style.borderBottom=
+"1px dashed black");X.style.backgroundImage=M.style.backgroundImage;X.style.backgroundPosition=M.style.backgroundPosition;X.style.backgroundSize=M.style.backgroundSize;X.style.backgroundRepeat=M.style.backgroundRepeat;X.style.borderBottom=M.style.borderBottom;R=V.getElementsByTagName("div")[1];null!=R&&(ca=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ca=null),"orthogonalEdgeStyle"==ca&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,
+null)?R.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ca||"none"==ca||null==ca?R.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ca?R.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ca?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?R.style.backgroundImage="url("+Format.verticalElbowImage.src+")":R.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ca?"vertical"==
+mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?R.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":R.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":R.style.backgroundImage="url("+Format.orthogonalImage.src+")");R=I.getElementsByTagName("div")[1];null!=R&&(R.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+
+")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),W,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),O,"end");mxUtils.setOpacity(V,
+"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&(mxUtils.setOpacity(W,30),mxUtils.setOpacity(O,30));if(ma||document.activeElement!=la)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),la.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=ja)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ja.value=
+isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=Y)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),Y.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=ja)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),N.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=S)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,
+0)),S.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit()});var aa=this.installInputHandler(la,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fa=this.installInputHandler(ja,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ka=this.installInputHandler(Y,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(N,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,U);this.addKeyHandler(la,U);this.addKeyHandler(ja,U);this.addKeyHandler(Y,U);this.addKeyHandler(N,U);this.addKeyHandler(S,U);d.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){d.getModel().removeListener(U)}});U();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.height="22px";if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.display="flex";a.style.alignItems="center";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="72px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");
d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];for(var h=0;h<g.length;h++){var m=document.createElement("option");m.setAttribute("value",g[h]);mxUtils.write(m,mxResources.get(g[h]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var q=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(q,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=q)w=parseInt(mxUtils.getValue(f.style,
@@ -3245,19 +3243,19 @@ w.style.width="82px";k=document.createElement("option");k.setAttribute("title",m
k.setAttribute("title",mxResources.get("simple"));mxUtils.write(k,mxUtils.htmlEntities(k.getAttribute("title")));k.setAttribute("value","simple");w.appendChild(k);k=document.createElement("option");k.setAttribute("title",mxResources.get("none"));mxUtils.write(k,mxUtils.htmlEntities(k.getAttribute("title")));k.setAttribute("value","none");w.appendChild(k);w.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(w,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;
C.ignoreImage=!0;C.adaptiveColors=w.value;e.model.execute(C)});q.appendChild(w);if(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),q.appendChild(k);h.appendChild(m);h.appendChild(q);d.appendChild(h);k=this.getGlobalStyleButtons();for(u=0;u<k.length;u+=2){m=m.cloneNode(!1);q=q.cloneNode(!1);h=h.cloneNode(!1);var z=k[u];z.style.width="100%";m.appendChild(z);h.appendChild(m);z=k[u+1];null!=z&&(z.style.width="100%",
q.appendChild(z));h.appendChild(q);d.appendChild(h)}g.appendChild(d);f.appendChild(g);a.appendChild(f);e.isEnabled()&&null!=Editor.styles&&this.addGraphStyles(a)}return a};
-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),g=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(U,V){var Q=e.getVerticesAndEdges();f.beginUpdate();try{for(var N=0;N<Q.length;N++){var W=e.getCellStyle(Q[N]);q||null==W.labelBackgroundColor?q&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[Q[N]]):e.updateCellStyles({labelBackgroundColor:null!=
-V?V.background:null},[Q[N]]);for(var O=f.isEdge(Q[N]),X=f.getStyle(Q[N]),ja=O?e.currentEdgeStyle:e.currentVertexStyle,ka=0;ka<U.length;ka++)if(null!=W[U[ka]]&&W[U[ka]]!=mxConstants.NONE||U[ka]!=mxConstants.STYLE_FILLCOLOR&&U[ka]!=mxConstants.STYLE_STROKECOLOR)X=q&&O&&U[ka]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(X,U[ka],"default"):mxUtils.setStyle(X,U[ka],ja[U[ka]]);f.setStyle(Q[N],X)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(U,V,Q){if(null!=U)for(var N=0;N<V.length;N++)if(null!=
-U[V[N]]&&U[V[N]]!=mxConstants.NONE||V[N]!=mxConstants.STYLE_FILLCOLOR&&V[N]!=mxConstants.STYLE_STROKECOLOR)U[V[N]]=Q[V[N]]}),q=!0,k=mxUtils.bind(this,function(U,V,Q,N,W){if(null!=U){null!=Q&&(q||null==V.labelBackgroundColor?q&&(V.labelBackgroundColor=mxConstants.NONE):(N=null!=N?N.background:null,W=null!=W?W:e,null==N&&(N=W.background),null==N&&(N=W.defaultPageBackgroundColor),V.labelBackgroundColor=N));for(var O in U)if(null==Q||null!=V[O]&&V[O]!=mxConstants.NONE||O!=mxConstants.STYLE_FILLCOLOR&&
-O!=mxConstants.STYLE_STROKECOLOR)q&&f.isEdge(Q)&&O==mxConstants.STYLE_FONTCOLOR?V[O]="default":V[O]=U[O]}}),u=mxUtils.bind(this,function(U,V,Q,N,W){var O=document.createElement("div");O.style.position="relative";O.style.pointerEvents="none";O.style.width="60px";O.style.height="60px";W.appendChild(O);var X=new Graph(O,null,null,e.getStylesheet());X.shapeForegroundColor="light-dark(#000000, #c0c0c0)";X.shapeBackgroundColor="light-dark(var(--panel-color), var(--dark-panel-color))";X.resetViewOnRootChange=
-!1;X.foldingEnabled=!1;X.gridEnabled=!1;X.autoScroll=!1;X.setTooltips(!1);X.setConnectable(!1);X.setPanning(!1);X.setEnabled(!1);X.getCellStyle=function(ta,M){M=null!=M?M:!0;var aa=mxUtils.clone(e.getCellStyle.apply(this,arguments)),ea=e.stylesheet.getDefaultVertexStyle(),da=V;f.isEdge(ta)&&(ea=e.stylesheet.getDefaultEdgeStyle(),da=Q);m(aa,d,ea);k(U,aa,ta,N,X);k(da,aa,ta,N,X);M&&(aa=e.postProcessCellStyle(ta,aa));return aa};X.model.beginUpdate();try{var ja=X.insertVertex(X.getDefaultParent(),null,
-"Shape",2,2,56,30,"strokeWidth=2;"),ka=X.insertEdge(X.getDefaultParent(),null,"Connector",ja,ja,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");ka.geometry.points=[new mxPoint(28,46)];ka.geometry.offset=new mxPoint(0,8)}finally{X.model.endUpdate()}W=X.view.getDrawPane().ownerSVGElement;null!=W&&(O=W.cloneNode(!0),O.style.position="absolute",O.style.clipPath="rect(0 52% 100% 0)",W.style.clipPath="rect(0 100% 100% 51%)",W.style.colorScheme="light",
-W.parentNode.appendChild(O))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(U,V,Q,N,W){var O=this.format.cachedStyleEntries[W];null==O&&(O=document.createElement("div"),O.className="geGraphStylePreview",q||null==N||null==N.background||(O.style.backgroundColor=N.background),u(U,V,Q,N,O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){e.currentVertexStyle=
-mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(U,e.currentVertexStyle);k(U,e.currentEdgeStyle);k(V,e.currentVertexStyle);k(Q,e.currentEdgeStyle);f.beginUpdate();try{var ja=d.slice(),ka;for(ka in U)ja.push(ka);h(ja,N);if(!q){var ta=new ChangePageSetup(b,null!=N?N.background:null);ta.ignoreImage=!0;f.execute(ta);f.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(O,mxUtils.bind(this,
-function(X){O.style.opacity=.6}),null,mxUtils.bind(this,function(X){O.style.opacity=""})),mxEvent.addListener(O,"mouseenter",mxUtils.bind(this,function(X){var ja=e.getCellStyle;X=e.background;var ka=e.view.gridColor;q||(e.background=null!=N?N.background:null,e.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);e.getCellStyle=function(ta,M){M=null!=M?M:!0;var aa=mxUtils.clone(ja.apply(this,arguments)),ea=e.stylesheet.getDefaultVertexStyle(),da=V;f.isEdge(ta)&&(ea=e.stylesheet.getDefaultEdgeStyle(),
-da=Q);m(aa,d,ea);k(U,aa,ta,N);k(da,aa,ta,N);M&&(aa=this.postProcessCellStyle(ta,aa));return aa};e.refresh();e.getCellStyle=ja;e.background=X;e.view.gridColor=ka})),mxEvent.addListener(O,"mouseleave",mxUtils.bind(this,function(X){e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[W]=O));w.appendChild(O)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<
-D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");for(var U=10*this.format.currentStylePage;U<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);U++){var V=Editor.styles[U];z(V.commonStyle,V.vertexStyle,V.edgeStyle,V.graph,U)}}),G=mxUtils.bind(this,function(U){0<=U&&U<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=U,E())});if(1<C){var I=document.createElement("div");I.className="geSwitcher";I.style.width=
-"200px";for(var J=0;J<C;J++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(U,V){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(U)}))})(J,T);I.appendChild(T);D.push(T)}a.appendChild(I);E();if(15>C&&0<D.length){J=document.createElement("div");J.className="geButton";J.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=J.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";I.insertBefore(J,D[0]);I.appendChild(K);
-mxEvent.addListener(J,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),g=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(V,W){var O=e.getVerticesAndEdges();f.beginUpdate();try{for(var M=0;M<O.length;M++){var X=e.getCellStyle(O[M]);q||null==X.labelBackgroundColor?q&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[O[M]]):e.updateCellStyles({labelBackgroundColor:null!=
+W?W.background:null},[O[M]]);for(var N=f.isEdge(O[M]),Y=f.getStyle(O[M]),ja=N?e.currentEdgeStyle:e.currentVertexStyle,la=0;la<V.length;la++)if(null!=X[V[la]]&&X[V[la]]!=mxConstants.NONE||V[la]!=mxConstants.STYLE_FILLCOLOR&&V[la]!=mxConstants.STYLE_STROKECOLOR)Y=q&&N&&V[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(Y,V[la],"default"):mxUtils.setStyle(Y,V[la],ja[V[la]]);f.setStyle(O[M],Y)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(V,W,O){if(null!=V)for(var M=0;M<W.length;M++)if(null!=
+V[W[M]]&&V[W[M]]!=mxConstants.NONE||W[M]!=mxConstants.STYLE_FILLCOLOR&&W[M]!=mxConstants.STYLE_STROKECOLOR)V[W[M]]=O[W[M]]}),q=!0,k=mxUtils.bind(this,function(V,W,O,M,X){if(null!=V){null!=O&&(q||null==W.labelBackgroundColor?q&&(W.labelBackgroundColor=mxConstants.NONE):(M=null!=M?M.background:null,X=null!=X?X:e,null==M&&(M=X.background),null==M&&(M=X.defaultPageBackgroundColor),W.labelBackgroundColor=M));for(var N in V)if(null==O||null!=W[N]&&W[N]!=mxConstants.NONE||N!=mxConstants.STYLE_FILLCOLOR&&
+N!=mxConstants.STYLE_STROKECOLOR)q&&f.isEdge(O)&&N==mxConstants.STYLE_FONTCOLOR?W[N]="default":W[N]=V[N]}}),u=mxUtils.bind(this,function(V,W,O,M,X){var N=document.createElement("div");N.style.position="relative";N.style.pointerEvents="none";N.style.width="60px";N.style.height="60px";X.appendChild(N);var Y=new Graph(N,null,null,e.getStylesheet());Y.shapeForegroundColor="light-dark(#000000, #c0c0c0)";Y.shapeBackgroundColor="light-dark(var(--panel-color), var(--dark-panel-color))";Y.resetViewOnRootChange=
+!1;Y.foldingEnabled=!1;Y.gridEnabled=!1;Y.autoScroll=!1;Y.setTooltips(!1);Y.setConnectable(!1);Y.setPanning(!1);Y.setEnabled(!1);Y.getCellStyle=function(S,U){U=null!=U?U:!0;var aa=mxUtils.clone(e.getCellStyle.apply(this,arguments)),fa=e.stylesheet.getDefaultVertexStyle(),ka=W;f.isEdge(S)&&(fa=e.stylesheet.getDefaultEdgeStyle(),ka=O);m(aa,d,fa);k(V,aa,S,M,Y);k(ka,aa,S,M,Y);U&&(aa=e.postProcessCellStyle(S,aa));return aa};Y.model.beginUpdate();try{var ja=Y.insertVertex(Y.getDefaultParent(),null,"Shape",
+2,2,56,30,"strokeWidth=2;"),la=Y.insertEdge(Y.getDefaultParent(),null,"Connector",ja,ja,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{Y.model.endUpdate()}X=Y.view.getDrawPane().ownerSVGElement;null!=X&&(N=X.cloneNode(!0),N.style.position="absolute",N.style.clipPath="rect(0 52% 100% 0)",X.style.clipPath="rect(0 100% 100% 51%)",X.style.colorScheme="light",X.parentNode.appendChild(N))}),
+w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(V,W,O,M,X){var N=this.format.cachedStyleEntries[X];null==N&&(N=document.createElement("div"),N.className="geGraphStylePreview",q||null==M||null==M.background||(N.style.backgroundColor=M.background),u(V,W,O,M,N),mxEvent.addListener(N,"click",mxUtils.bind(this,function(Y){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);
+e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(O,e.currentEdgeStyle);f.beginUpdate();try{var ja=d.slice(),la;for(la in V)ja.push(la);h(ja,M);if(!q){var S=new ChangePageSetup(b,null!=M?M.background:null);S.ignoreImage=!0;f.execute(S);f.execute(new ChangeGridColor(b,null!=M&&null!=M.gridColor?M.gridColor:g))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(N,mxUtils.bind(this,function(Y){N.style.opacity=.6}),null,
+mxUtils.bind(this,function(Y){N.style.opacity=""})),mxEvent.addListener(N,"mouseenter",mxUtils.bind(this,function(Y){var ja=e.getCellStyle;Y=e.background;var la=e.view.gridColor;q||(e.background=null!=M?M.background:null,e.view.gridColor=null!=M&&null!=M.gridColor?M.gridColor:g);e.getCellStyle=function(S,U){U=null!=U?U:!0;var aa=mxUtils.clone(ja.apply(this,arguments)),fa=e.stylesheet.getDefaultVertexStyle(),ka=W;f.isEdge(S)&&(fa=e.stylesheet.getDefaultEdgeStyle(),ka=O);m(aa,d,fa);k(V,aa,S,M);k(ka,
+aa,S,M);U&&(aa=this.postProcessCellStyle(S,aa));return aa};e.refresh();e.getCellStyle=ja;e.background=Y;e.view.gridColor=la})),mxEvent.addListener(N,"mouseleave",mxUtils.bind(this,function(Y){e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[X]=N));w.appendChild(N)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background=
+"#84d7ff");for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];z(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),G=mxUtils.bind(this,function(V){0<=V&&V<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<C){var I=document.createElement("div");I.className="geSwitcher";I.style.width="200px";for(var J=0;J<C;J++){var T=document.createElement("div");
+T.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(V)}))})(J,T);I.appendChild(T);D.push(T)}a.appendChild(I);E();if(15>C&&0<D.length){J=document.createElement("div");J.className="geButton";J.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=J.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";I.insertBefore(J,D[0]);I.appendChild(K);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-
+1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3275,13 +3273,13 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var g=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});e.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){e.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function q(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function J(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function V(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(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,N.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,N.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,N.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,N.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function ta(){mxRectangleShape.call(this)}function M(){mxRectangleShape.call(this)}function aa(){mxCylinder.call(this)}function ea(){mxShape.call(this)}function da(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
-function Y(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function la(){mxShape.call(this)}function Ja(){mxShape.call(this)}function ma(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function J(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxActor.call(this)}function M(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,M.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,M.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,M.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,M.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+M.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,M.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Y(){mxActor.call(this)}function ja(){mxActor.call(this)}function la(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function aa(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function ka(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
+function ba(){mxShape.call(this)}function R(){mxShape.call(this)}function ca(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ja(){mxShape.call(this)}function na(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
this.spacing=0}function Va(){mxArrowConnector.call(this);this.spacing=0}function Wa(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function hb(){mxActor.call(this)}function eb(){mxActor.call(this)}function p(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxEllipse.call(this)}
-function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Xa(c,l,t,n,r,v,x,H,y,ca){x+=y;var S=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(S.x-r-x,S.y-v-x,2*x,2*x);ca?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
+function P(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Xa(c,l,t,n,r,v,x,H,y,da){x+=y;var Q=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(Q.x-r-x,Q.y-v-x,2*x,2*x);da?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
!1,x=this.isHorizontal(),H=this.getTitleSize();0==H||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&H<r||!x&&H<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var H=v;v=x;x=H}c.rotate(-this.getShapeRotation(),
@@ -3315,59 +3313,59 @@ mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
l*this.scale))}return null};E.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 t=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),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,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};u.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(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=
-20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,
-t,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(V,mxActor);V.prototype.size=.5;V.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};
-mxCellRenderer.registerShape("curlyBracket",V);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);N.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};N.prototype.close=function(){null!=this.firstX&&
-null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};N.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};N.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};N.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=
-x};N.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var ca=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,
-y*v+this.lastX-ca*r,t*v+this.lastY-ca*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l};N.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Ya.apply(this,
-arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new N(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?
-null:this.createComicCanvas(c)};var ub=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"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=N)vb.apply(this,arguments);
+"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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
+20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,
+t,!0)};mxCellRenderer.registerShape("trapezoid",V);mxUtils.extend(W,mxActor);W.prototype.size=.5;W.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};
+mxCellRenderer.registerShape("curlyBracket",W);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);M.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};M.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)};M.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};M.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};M.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=
+x};M.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(Q){return"number"===typeof Q?Q?0>Q?-1:1:Q===Q?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var da=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,
+y*v+this.lastX-da*r,t*v+this.lastY-da*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l};M.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Ya.apply(this,
+arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new M(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?
+null:this.createComicCanvas(c)};var ub=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"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=M)vb.apply(this,arguments);
else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=
-function(){return!1};W.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,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
-100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};W.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();
-c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(O,mxRectangleShape);O.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};O.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",O);mxUtils.extend(X,mxHexagon);
-X.prototype.size=30;X.prototype.position=.5;X.prototype.position2=.5;X.prototype.base=20;X.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),H=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,r-t),new mxPoint(Math.min(n,v+H),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",X);mxUtils.extend(ja,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=
+function(){return!1};X.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,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};X.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();
+c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(N,mxRectangleShape);N.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};N.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",N);mxUtils.extend(Y,mxHexagon);
+Y.prototype.size=30;Y.prototype.position=.5;Y.prototype.position2=.5;Y.prototype.base=20;Y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),H=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,r-t),new mxPoint(Math.min(n,v+H),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Y);mxUtils.extend(ja,
mxActor);ja.prototype.size=.2;ja.prototype.fixedSize=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,t,n,r){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))));t=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,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(ka,mxHexagon);ka.prototype.size=.25;ka.prototype.fixedSize=20;ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(c,l,t,n,r){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))));t=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*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",ka);mxUtils.extend(ta,mxRectangleShape);ta.prototype.isHtmlAllowed=function(){return!1};ta.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+
-n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",ta);var jb=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,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(M,mxRectangleShape);M.prototype.isHtmlAllowed=function(){return!1};M.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};M.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var H=this.style["symbol"+v+"Align"],
-y=this.style["symbol"+v+"VerticalAlign"],ca=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var na=t;Oa=H==mxConstants.ALIGN_CENTER?Oa+(n-ca)/2:H==mxConstants.ALIGN_RIGHT?Oa+(n-ca-Fa):Oa+Fa;na=y==mxConstants.ALIGN_MIDDLE?na+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?na+(r-S-Ra):na+
-Ra;c.save();H=new x;H.style=this.style;x.prototype.paintVertexShape.call(H,c,Oa,na,ca,S);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",M);mxUtils.extend(aa,mxCylinder);aa.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",aa);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=
-function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ea);mxUtils.extend(da,mxShape);da.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};da.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);
-c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",da);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",sa);mxUtils.extend(Y,mxShape);Y.prototype.paintVertexShape=
-function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",Y);mxUtils.extend(P,mxShape);P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};P.prototype.paintForeground=
-function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=40;ba.prototype.isHtmlAllowed=function(){return!1};ba.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)};ba.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ba&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ba.prototype.paintForeground=
-function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(la,mxShape);la.prototype.width=60;la.prototype.height=30;la.prototype.corner=10;la.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&
-0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};la.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))};la.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",
+l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){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))));t=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*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",la);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,
+t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",S);var jb=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,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(U,mxRectangleShape);U.prototype.isHtmlAllowed=function(){return!1};U.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};U.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var H=this.style["symbol"+v+"Align"],
+y=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],Q=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var oa=t;Oa=H==mxConstants.ALIGN_CENTER?Oa+(n-da)/2:H==mxConstants.ALIGN_RIGHT?Oa+(n-da-Fa):Oa+Fa;oa=y==mxConstants.ALIGN_MIDDLE?oa+(r-Q)/2:y==mxConstants.ALIGN_BOTTOM?oa+(r-Q-Ra):oa+
+Ra;c.save();H=new x;H.style=this.style;x.prototype.paintVertexShape.call(H,c,Oa,oa,da,Q);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",U);mxUtils.extend(aa,mxCylinder);aa.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",aa);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=
+function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);
+c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(ba,mxShape);ba.prototype.paintVertexShape=
+function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ba);mxUtils.extend(R,mxShape);R.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};R.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};R.prototype.paintForeground=
+function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",R);mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=40;ca.prototype.isHtmlAllowed=function(){return!1};ca.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)};ca.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ca&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ca.prototype.paintForeground=
+function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ca);mxUtils.extend(ma,mxShape);ma.prototype.width=60;ma.prototype.height=30;ma.prototype.corner=10;ma.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&
+0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};ma.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))};ma.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",
this.width)))),H=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;
-c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,H-1.5*v));c.lineTo(l+Math.max(0,x-v),t+H);c.lineTo(l,t+H);c.close();c.fillAndStroke();this.configurePointerEvents(c);c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",la);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
-function(c,l,t,n){n=ba.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;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,H-1.5*v));c.lineTo(l+Math.max(0,x-v),t+H);c.lineTo(l,t+H);c.close();c.fillAndStroke();this.configurePointerEvents(c);c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",ma);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
+function(c,l,t,n){n=ca.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;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,t,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 t.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,t.y)));t.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,t,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",X.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=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?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+
-y,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,H)]);ca=c.getCenterX();c=c.getCenterY();c=new mxPoint(ca,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,
-"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_WEST?
-(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+ca),new mxPoint(x+r,H+ca),new mxPoint(x,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca-r),new mxPoint(x,
-H+ca),new mxPoint(x,H)]);ca=c.getCenterX();c=c.getCenterY();c=new mxPoint(ca,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ja.prototype.fixedSize:ja.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height,S=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?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,c),new mxPoint(x,H)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+
-y-r,c),new mxPoint(x+y,H+ca),new mxPoint(x+r,H+ca),new mxPoint(x,c),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(S,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca),new mxPoint(S,H+ca-r),new mxPoint(x,H+ca),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(S,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+ca-r),new mxPoint(S,H+ca),new mxPoint(x,
-H+ca-r),new mxPoint(x,H)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(H,S,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ka.prototype.fixedSize:ka.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height,S=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?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(S,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca-r),new mxPoint(S,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H+r),new mxPoint(S,H)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+ca),new mxPoint(x+
-r,H+ca),new mxPoint(x,c),new mxPoint(x+r,H)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(H,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};
-mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};
-mxCellRenderer.registerShape("requires",ma);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();
+c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,t,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",Y.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=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?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+
+y,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+da),new mxPoint(x,H+da),new mxPoint(x+r,H)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,
+"fixedSize","0"),v=r?V.prototype.fixedSize:V.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,H+da),new mxPoint(x,H+da),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_WEST?
+(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+da),new mxPoint(x+r,H+da),new mxPoint(x,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da-r),new mxPoint(x,
+H+da),new mxPoint(x,H)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ja.prototype.fixedSize:ja.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height,Q=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?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+da),new mxPoint(x,H+da),new mxPoint(x+r,c),new mxPoint(x,H)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+
+y-r,c),new mxPoint(x+y,H+da),new mxPoint(x+r,H+da),new mxPoint(x,c),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(Q,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da),new mxPoint(Q,H+da-r),new mxPoint(x,H+da),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(Q,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+da-r),new mxPoint(Q,H+da),new mxPoint(x,
+H+da-r),new mxPoint(x,H)]);Q=new mxPoint(Q,c);n&&(t.x<x||t.x>x+y?Q.y=t.y:Q.x=t.x);return mxUtils.getPerimeterPoint(H,Q,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?la.prototype.fixedSize:la.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height,Q=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?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(Q,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da-r),new mxPoint(Q,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H+r),new mxPoint(Q,H)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+da),new mxPoint(x+
+r,H+da),new mxPoint(x,c),new mxPoint(x+r,H)]);Q=new mxPoint(Q,c);n&&(t.x<x||t.x>x+y?Q.y=t.y:Q.x=t.x);return mxUtils.getPerimeterPoint(H,Q,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};
+mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};
+mxCellRenderer.registerShape("requires",na);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();
c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",za);mxUtils.extend(Ka,mxCylinder);Ka.prototype.jettyWidth=20;Ka.prototype.jettyHeight=10;Ka.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=Math.min(l,r-l),y=Math.min(H+2*l,r-l);v?(c.moveTo(t,H),
c.lineTo(x,H),c.lineTo(x,H+l),c.lineTo(t,H+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+l),c.lineTo(0,H+l),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ka);mxUtils.extend(Pa,mxCylinder);Pa.prototype.jettyWidth=32;Pa.prototype.jettyHeight=12;Pa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,
"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x,H+l),c.lineTo(t,H+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+l),c.lineTo(0,H+l),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",
Pa);mxUtils.extend(Ia,mxRectangleShape);Ia.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ia);mxUtils.extend(Ha,mxDoubleEllipse);Ha.prototype.outerStroke=
-!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(qa,Ha);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(ra,Ha);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Da.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Da);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",
this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.size=30;Wa.prototype.isRoundable=function(){return!0};Wa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,
[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",Wa);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
@@ -3381,12 +3379,12 @@ v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab)
"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,r/2,n,r);c.lineTo(l,r);c.quadTo(l-2*l,r/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",eb);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.close();c.end()};mxCellRenderer.registerShape("or",p);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,
l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",A);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n/2,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,
-r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
-c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();
-c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();
-c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,H=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,H);c.lineTo(l+v+x,H-x/2);c.moveTo(l+v,H);c.lineTo(l+v+x,H+x/2);c.moveTo(l+v,H);c.lineTo(l+n-v,H);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,H);c.lineTo(l+n-x-v,H-x/2);c.moveTo(l+n-v,H);c.lineTo(l+
+r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",P);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();
+c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();
+c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ea);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,H=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,H);c.lineTo(l+v+x,H-x/2);c.moveTo(l+v,H);c.lineTo(l+v+x,H+x/2);c.moveTo(l+v,H);c.lineTo(l+n-v,H);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,H);c.lineTo(l+n-x-v,H-x/2);c.moveTo(l+n-v,H);c.lineTo(l+
n-x-v,H+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ia);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),
-ca="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||H||ca||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||H?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||ca?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};
+da="1"==mxUtils.getValue(this.style,"right","1"),Q="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||H||da||Q||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||H?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||da?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||Q?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};
mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,
0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.2;Aa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,
r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",Aa);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};
@@ -3395,89 +3393,89 @@ type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"dou
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"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=
-function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ca=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),na=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),ra=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),pa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),oa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:
+function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),da=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),Q=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,Q)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:
mxUtils.getValue(this.style,"topLeftStyle","default"),Ba=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ca=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Bb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Cb=
v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Ab=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Db=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Fa);Ra&&""!=Ra&&
-c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);H||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));H||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(na||ra||pa||oa)&&"frame"!=ca&&(c.begin(),na?v.moveNW(c,l,t,n,r,x,xa,y,oa):c.moveTo(0,0),na&&v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),ra&&v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),pa&&v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),oa&&v.paintSW(c,
-l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=H=Eb,"none"==zb&&(H=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,H,Fa),c.begin(),na?v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa):c.moveTo(S,0),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),oa&&pa&&v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),pa&&ra&&v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),ra&&na&&v.paintNEInner(c,
-l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),na&&oa&&v.paintNWInner(c,l,t,n,r,x,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,na,ra,pa,oa),c.stroke()));na||ra||pa||!oa?na||ra||!pa||oa?!na&&!ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,
-l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na||!ra||pa||oa?!na&&ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,
-l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke(),c.begin(),
-v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na&&ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,
-r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na&&ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,
-l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,
-l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na||ra||pa||oa?na&&!ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,
-y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke()):
-na&&!ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),
-v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na&&!ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&
-(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,
-l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na&&ra&&!pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,
-x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):na&&ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,
-l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,
-n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke()):na&&ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,
-Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,
-Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):na&&ra&&pa&&oa&&("frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,
-y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,
-Ea,y,S,pa,oa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),
-v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke())):"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,
-l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveSE(c,
-l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,
-l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,na,ra,pa,oa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==
+c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);H||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));H||(Q=Math.min(Oa*Math.min(n,r)/100));Q=Math.min(Q,.5*Math.min(n,r)-y);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,xa,y,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),pa&&v.paintSW(c,
+l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=H=Eb,"none"==zb&&(H=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,H,Fa),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa):c.moveTo(Q,0),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),sa&&oa&&v.paintNEInner(c,
+l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,xa,y,Q),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,
+l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,
+l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke(),c.begin(),
+v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,
+r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,
+l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,
+l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,
+y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke()):
+oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),
+v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&
+(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,
+l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,
+x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,
+l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,
+n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,
+Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,
+Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,
+y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,
+Ea,y,Q,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),
+v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,
+l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,
+l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,
+l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,oa,sa,qa,pa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==
v||!y?c.moveTo(n,0):c.moveTo(n-H,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-H)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,r):c.moveTo(H,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,H,0)}else("snip"==
x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-H,0)};wa.prototype.paintNE=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,n,H)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==
x&&"fold"==v)&&c.lineTo(n,H);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-H)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,
H,0,0,l,n-H,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-H,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,r):c.lineTo(H,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,0,r-H)}else("snip"==x||"default"==
-x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-H);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||
-S?!ca&&S?c.lineTo(0,y):ca&&!S?c.lineTo(y,0):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-H-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-H-y,y);else if("snip"==x||"default"==x&&"snip"==
-v)c.lineTo(n-H-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,H+y),c.lineTo(n-H-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(n-y,0):ca&&!S?c.lineTo(n,y):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):c.lineTo(n-y,H+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(y,
-r):ca&&!S?c.lineTo(0,r-y):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):c.lineTo(y,r-H-y):c.lineTo(y,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-y,r-H-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-y,r-H-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-
-y,r-H-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,r-H-y),c.lineTo(n-y,r-H-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(n,r-y):ca&&!S?c.lineTo(n-y,r):"square"==x||"default"==x&&"square"==v||!ca?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-H-.5*y,r-y):c.lineTo(n-H-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,H,y,ca){if(!ca)c.lineTo(y,r);else if("square"==
-x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,H+y,r-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(H+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,r-H-y),c.lineTo(y+H,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==
-x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-H-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-H-y):
-c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-H-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==
-v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-H-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v||ca?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,H+y):c.moveTo(n,
-y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v||ca?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,H+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.moveTo(y,0):ca&&!S?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==
-x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(y,0):ca&&!S?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==
-x||"default"==x&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,H,y,ca,S,Fa,Ra,Oa,na){if("fold"==v||"fold"==x||"fold"==H||"fold"==y||"fold"==ca)("fold"==x||"default"==x&&"fold"==v)&&Fa&&na&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==H||"default"==H&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==ca||"default"==ca&&"fold"==
-v)&&Oa&&na&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),
+x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-H);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||
+Q?!da&&Q?c.lineTo(0,y):da&&!Q?c.lineTo(y,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-H-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-H-y,y);else if("snip"==x||"default"==x&&"snip"==
+v)c.lineTo(n-H-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,H+y),c.lineTo(n-H-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(n-y,0):da&&!Q?c.lineTo(n,y):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):c.lineTo(n-y,H+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(y,
+r):da&&!Q?c.lineTo(0,r-y):da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):c.lineTo(y,r-H-y):c.lineTo(y,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-y,r-H-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-y,r-H-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-
+y,r-H-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,r-H-y),c.lineTo(n-y,r-H-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(n,r-y):da&&!Q?c.lineTo(n-y,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-H-.5*y,r-y):c.lineTo(n-H-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,H,y,da){if(!da)c.lineTo(y,r);else if("square"==
+x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,H+y,r-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(H+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,r-H-y),c.lineTo(y+H,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==
+x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-H-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-H-y):
+c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-H-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==
+v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-H-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,H+y):c.moveTo(n,
+y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,H+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.moveTo(y,0):da&&!Q?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==
+x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(y,0):da&&!Q?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==
+x||"default"==x&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,H,y,da,Q,Fa,Ra,Oa,oa){if("fold"==v||"fold"==x||"fold"==H||"fold"==y||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Fa&&oa&&(c.moveTo(0,Q),c.lineTo(Q,Q),c.lineTo(Q,0)),("fold"==H||"default"==H&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-Q,0),c.lineTo(n-Q,Q),c.lineTo(n,Q)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-Q,r),c.lineTo(n-Q,r-Q),c.lineTo(n,r-Q)),("fold"==da||"default"==da&&"fold"==
+v)&&Oa&&oa&&(c.moveTo(0,r-Q),c.lineTo(Q,r-Q),c.lineTo(Q,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),
null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(r,v),ua.prototype.origPaintEdgeShape.apply(this,[c,l,t])))};mxCellRenderer.registerShape("filledEdge",ua);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",
-defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+S/2,Oa=n.y+Fa/2;n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-S/2-Fa/2,Oa-Fa/2+S/2);c.lineTo(Ra-S/2+Fa/2,Oa-Fa/2-S/2);c.lineTo(Ra+Fa/2-3*S/2,Oa-3*Fa/2-S/2);c.lineTo(Ra-
-Fa/2-3*S/2,Oa-3*Fa/2+S/2);c.close();ca?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.moveTo(n.x-S/2+Fa/2,n.y-Fa/2-S/2);c.lineTo(n.x-Fa/2-3*S/2,n.y-3*Fa/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Xa);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,H,y,ca){var S=n.clone(),Fa=Xa.apply(this,arguments),Ra=r*(x+2*
-y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+S);c.quadTo(n.x-Fa,n.y+S,n.x,n.y);c.quadTo(n.x+Fa,n.y-S,Ra.x+Fa,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",
-function(c,l,t,n,r,v,x,H,y,ca){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);H?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();ca?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,H,y,ca,S){v*=H+ca;x*=H+ca;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/
+defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-Q/2-Fa/2,n.y-Fa/2+Q/2);c.lineTo(n.x+Fa/2-3*Q/2,n.y-3*Fa/2-Q/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+Q/2,Oa=n.y+Fa/2;n.x-=Q;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-Q/2-Fa/2,Oa-Fa/2+Q/2);c.lineTo(Ra-Q/2+Fa/2,Oa-Fa/2-Q/2);c.lineTo(Ra+Fa/2-3*Q/2,Oa-3*Fa/2-Q/2);c.lineTo(Ra-
+Fa/2-3*Q/2,Oa-3*Fa/2+Q/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-Q/2-Fa/2,n.y-Fa/2+Q/2);c.lineTo(n.x+Fa/2-3*Q/2,n.y-3*Fa/2-Q/2);c.moveTo(n.x-Q/2+Fa/2,n.y-Fa/2-Q/2);c.lineTo(n.x-Fa/2-3*Q/2,n.y-3*Fa/2+Q/2);c.stroke()}});mxMarker.addMarker("circle",Xa);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,H,y,da){var Q=n.clone(),Fa=Xa.apply(this,arguments),Ra=r*(x+2*
+y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(Q.x-r*y,Q.y-v*y);c.lineTo(Q.x-2*Ra+r*y,Q.y-2*Oa+v*y);c.moveTo(Q.x-Ra-Oa+v*y,Q.y-Oa+Ra-r*y);c.lineTo(Q.x+Oa-Ra-v*y,Q.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=Q;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+Q);c.quadTo(n.x-Fa,n.y+Q,n.x,n.y);c.quadTo(n.x+Fa,n.y-Q,Ra.x+Fa,Ra.y-Q);c.stroke()}});mxMarker.addMarker("async",
+function(c,l,t,n,r,v,x,H,y,da){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var Q=n.clone();Q.x-=l;Q.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(Q.x,Q.y);H?c.lineTo(Q.x-r-v/2,Q.y-v+r/2):c.lineTo(Q.x+v/2-r,Q.y-v-r/2);c.lineTo(Q.x-r,Q.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,H,y,da,Q){v*=H+da;x*=H+da;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/
c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,x,H){H=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+r*n/4+v*H/2,x.y+v*n/4-r*H/2)},function(n,r,v,x,H,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var H=x.length-1;v=c.view.translate;
-var y=c.view.scale,ca=t?x[0]:x[H];x=t?x[1]:x[H-1];H=x.x-ca.x;var S=x.y-ca.y,Fa=Math.sqrt(H*H+S*S);ca=n.call(this,Fa,H/Fa,S/Fa,ca,x);return new mxPoint(ca.x/y-v.x,ca.y/y-v.y)}return null},function(v,x,H){var y=c.absolutePoints,ca=y.length-1;v=c.view.translate;var S=c.view.scale,Fa=t?y[0]:y[ca];y=t?y[1]:y[ca-1];ca=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(ca*ca+Ra*Ra);x.x=(x.x+v.x)*S;x.y=(x.y+v.y)*S;r.call(this,Oa,ca/Oa,Ra/Oa,Fa,y,x,H)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,
+var y=c.view.scale,da=t?x[0]:x[H];x=t?x[1]:x[H-1];H=x.x-da.x;var Q=x.y-da.y,Fa=Math.sqrt(H*H+Q*Q);da=n.call(this,Fa,H/Fa,Q/Fa,da,x);return new mxPoint(da.x/y-v.x,da.y/y-v.y)}return null},function(v,x,H){var y=c.absolutePoints,da=y.length-1;v=c.view.translate;var Q=c.view.scale,Fa=t?y[0]:y[da];y=t?y[1]:y[da-1];da=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(da*da+Ra*Ra);x.x=(x.x+v.x)*Q;x.y=(x.y+v.y)*Q;r.call(this,Oa,da/Oa,Ra/Oa,Fa,y,x,H)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,
function(n,r,v,x,H){H=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*H/2,x.y+v*n/4-r*H/2)},function(n,r,v,x,H,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-l})]}},bb=function(c){return function(l){return[Ta(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ab.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,
"arrowSize",ab.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=
Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=
-[Ta(v,["size"],function(H){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,ca*(y?1:H.width))),H.getCenterY())},function(H,y,ca){H=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-H.x:Math.max(0,Math.min(t,(y.x-H.x)/H.width));this.state.style.size=H},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},
+[Ta(v,["size"],function(H){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,da*(y?1:H.width))),H.getCenterY())},function(H,y,da){H=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-H.x:Math.max(0,Math.min(t,(y.x-H.x)/H.width));this.state.style.size=H},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},
yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,
mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return Ta(c,[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,
parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-
-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(ca){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);x&&x(ca)};H.getPosition=t;H.setPosition=n;H.ignoreGrid=null!=r?r:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=
+n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(da){for(var Q=0;Q<l.length;Q++)this.copyStyle(l[Q]);x&&x(da)};H.getPosition=t;H.setPosition=n;H.ignoreGrid=null!=r?r:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=
c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)-r*
-n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ca.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-
+n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(da.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,H){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(H+c.shape.strokewidth*
-c.view.scale)-r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-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(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;
-mxEvent.isAltDown(ca.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&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ca.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(n,r,v,x,H){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-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(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(ca.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]),
+c.view.scale)-r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-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(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;
+mxEvent.isAltDown(da.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&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(da.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(n,r,v,x,H){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-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(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(da.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 t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(Ta(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=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,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||
r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],H=0;H<v.length;H++)v[H]!=c.cell&&r.isSwimlane(v[H])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[H]))==n&&x.push(v[H]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(la.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",la.prototype.width))),n=Math.max(1.5*la.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",la.prototype.height)));
-return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(la.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*la.prototype.corner,Math.min(l.height,t.y-l.y)))},!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+
+parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(ma.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",ma.prototype.width))),n=Math.max(1.5*ma.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",ma.prototype.height)));
+return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(ma.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*ma.prototype.corner,Math.min(l.height,t.y-l.y)))},!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+
t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-
t)},function(l,t){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()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,
t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",
Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},dataStorage:function(c){return[Ta(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?eb.prototype.fixedSize:eb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:
-l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",X.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position)));mxUtils.getValue(this.state.style,
-"base",X.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",X.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",X.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},
-function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",X.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",X.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));
+l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Y.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position)));mxUtils.getValue(this.state.style,
+"base",Y.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",Y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",Y.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},
+function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Y.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",Y.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));
return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[Ta(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ka.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
"jettyHeight",Ka.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+
t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,
@@ -3486,20 +3484,20 @@ t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.wid
["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=
Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=
Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=
-Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:tb(ka.prototype.size,!0,.5,!0,
-ka.prototype.fixedSize),curlyBracket:tb(V.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=
+Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:tb(la.prototype.size,!0,.5,!0,
+la.prototype.fixedSize),curlyBracket:tb(W.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,V.prototype.size,V.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.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=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[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=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,
-H=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==H&&null!=l&&(H=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,ca=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=H){c=function(na,ra,pa){na-=Oa.x;var oa=ra-Oa.y;ra=(Fa*na-S*oa)/(y*Fa-ca*S);na=(ca*na-y*oa)/(ca*S-y*Fa);Ra?(pa&&(Oa=new mxPoint(Oa.x+y*ra,Oa.y+ca*ra),r.push(Oa)),Oa=new mxPoint(Oa.x+S*na,Oa.y+
-Fa*na)):(pa&&(Oa=new mxPoint(Oa.x+S*na,Oa.y+Fa*na),r.push(Oa)),Oa=new mxPoint(Oa.x+y*ra,Oa.y+ca*ra));r.push(Oa)};var Oa=H;null==n&&(n=new mxPoint(H.x+(x.x-H.x)/2,H.y+(x.y-H.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};
+H=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==H&&null!=l&&(H=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,da=$a.y,Q=kb.x,Fa=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=H){c=function(oa,sa,qa){oa-=Oa.x;var pa=sa-Oa.y;sa=(Fa*oa-Q*pa)/(y*Fa-da*Q);oa=(da*oa-y*pa)/(da*Q-y*Fa);Ra?(qa&&(Oa=new mxPoint(Oa.x+y*sa,Oa.y+da*sa),r.push(Oa)),Oa=new mxPoint(Oa.x+Q*oa,Oa.y+
+Fa*oa)):(qa&&(Oa=new mxPoint(Oa.x+Q*oa,Oa.y+Fa*oa),r.push(Oa)),Oa=new mxPoint(Oa.x+y*sa,Oa.y+da*sa));r.push(Oa)};var Oa=H;null==n&&(n=new mxPoint(H.x+(x.x-H.x)/2,H.y+(x.y-H.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};
h.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){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*t);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,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};X.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
+0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};Y.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
"position",this.position));var r=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*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-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,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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,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*(t+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};I.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,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*(t+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,
@@ -3511,12 +3509,12 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnect
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,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(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,r)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=
-mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;P.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=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,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+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,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,r,t));return c};Ka.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ka.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ka.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(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-
.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.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)];ea.prototype.constraints=
+new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.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)];Pa.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)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
@@ -3526,7 +3524,7 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,
-.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.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;gb.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,
Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),r=Math.max(0,Math.min(t,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*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,.75*l+.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),
@@ -3539,7 +3537,7 @@ parseFloat(mxUtils.getValue(this.style,"arrowWidth",ab.prototype.arrowWidth)))),
!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Aa.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ba.prototype.constraints=null;p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ca.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)];A.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,z,C){C.getModel().beginUpdate();try{var D=C.getCellGeometry(k);null!=D&&w&&z&&(w/=z,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,C.getModel().setGeometry(k,
@@ -3600,9 +3598,9 @@ k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w])
null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,
mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
-f.showImageDialog(k,w,function(D,E,G,I,J,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(D,E,G);else{var K=d.getSelectionCells();if(null!=D&&(0<D.length||0<K.length)){var U=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var V=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=V.x;K[0].geometry.y=
-V.y;null!=I&&e(K[0],I,J,T,d);U=K;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,K);var Q=d.getCurrentCellStyle(K[0]);"image"!=Q[mxConstants.STYLE_SHAPE]&&"label"!=Q[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=E&&null!=G)for(D=0;D<K.length;D++){var N=K[D];if("0"!=d.getCurrentCellStyle(N).expand){var W=
-d.getModel().getGeometry(N);null!=W&&(W=W.clone(),W.width=E,W.height=G,d.getModel().setGeometry(N,W))}null!=I&&e(N,I,J,T,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
+f.showImageDialog(k,w,function(D,E,G,I,J,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(D,E,G);else{var K=d.getSelectionCells();if(null!=D&&(0<D.length||0<K.length)){var V=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=W.x;K[0].geometry.y=
+W.y;null!=I&&e(K[0],I,J,T,d);V=K;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,K);var O=d.getCurrentCellStyle(K[0]);"image"!=O[mxConstants.STYLE_SHAPE]&&"label"!=O[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=E&&null!=G)for(D=0;D<K.length;D++){var M=K[D];if("0"!=d.getCurrentCellStyle(M).expand){var X=
+d.getModel().getGeometry(M);null!=X&&(X=X.clone(),X.width=E,X.height=G,d.getModel().setGeometry(M,X))}null!=I&&e(M,I,J,T,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,D,E){e(k,C,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);
m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
@@ -3724,47 +3722,47 @@ G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+
"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(D,E){E=null!=E?E:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",E=!0;var G=mxUtils.parseColor(D);
D=G.r/255;var I=G.g/255,J=G.b/255,T=Math.min(Math.min(D,I),J);G=Math.max(Math.max(D,I),J);var K=G-T;0===K?D=[null,0,G]:(D=D===T?3+(J-I)/K:I===T?5+(D-J)/K:1+(I-D)/K,D=[6===D?0:D,K/G,G]);null!=D[0]&&(g[0]=D[0]);0!=D[2]&&(g[1]=D[1]);g[2]=D[2];q(E)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
-var ColorDialog=function(a,b,e,f,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function q(){ja.src="none"==X.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==X.style.display?(X.style.display="flex",N.focus()):X.style.display="none";q()}function u(ba){""==ba.value&&null!=T&&U?ba.style.background=ba==N?T.dark:T.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background=
-"#"+ba.value;ba.style.color="transparent"==ba.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ba.style.background)?"#ffffff":"#000000"}function w(){u(V);u(N)}function z(ba){ba?h&&null!=T?(V.value=T.light.substring(1).toUpperCase(),ba=!1):(V.value="",N.value="",W.value="automatic",V.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),N.setAttribute("title",mxResources.get("useBlackAndWhite")),V.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==V.value&&
-null!=T&&(V.value=T.light.substring(1).toUpperCase()),V.removeAttribute("placeholder"),V.removeAttribute("title"),""==N.value&&null!=T&&(N.value=T.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);U=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var la=ba.value,Ja=la.toLowerCase();null==g||""!=la&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||
-null==T?(ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)||(ba.value=m(ba.value),ea.fromString("#"+ba.value)),z(!1),ba!=N||V.value==mxConstants.NONE&&N.value==mxConstants.NONE||(W.value="custom"),ba==V&&"automatic"==W.value&&(V.value==mxConstants.NONE?N.value=mxConstants.NONE:mxUtils.isVarColor(V.value)?N.value=V.value:N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ba.value)).substring(1).toUpperCase()),w()):M.click()}function D(){var ba=V.value,la=N.value;if(U&&null!=T||(/(^#?[a-zA-Z0-9]*$)/.test(ba)||
-mxUtils.isVarColor(ba))&&(/(^#?[a-zA-Z0-9]*$)/.test(la)||mxUtils.isVarColor(la))){if(U)ba="default";else if(""==ba&&(ba=mxConstants.NONE),""==la&&(la=mxConstants.NONE),ba==mxConstants.NONE||mxUtils.isVarColor(ba)||"#"==ba.charAt(0)||(ba="#"+m(ba)),la==mxConstants.NONE||mxUtils.isVarColor(la)||"#"==la.charAt(0)||(la="#"+m(la)),ba!=mxConstants.NONE&&la!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=W.value&&la!=mxConstants.NONE?ba==mxConstants.NONE?ColorDialog.addRecentColor(la.substring(1),
-12):ColorDialog.addRecentColor("light-dark("+ba+","+la+")",12):ba!=mxConstants.NONE&&ColorDialog.addRecentColor(ba.substring(1),12),"none"!=ba||"none"!=la)ba=ba==mxConstants.NONE?"transparent":ba,la=la==mxConstants.NONE?"transparent":la,h||"automatic"==W.value||(ba="light-dark("+ba+","+la+")");aa(ba);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||(da.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?da.select():document.execCommand("selectAll",
-!1,null))}function G(){da.value!=mxConstants.NONE&&""!=da.value&&ea.fromString("#"+da.value,!0)}function I(){var ba=Y(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ba.style.marginBottom="8px";return ba}function J(ba){13==ba.keyCode&&(C(mxEvent.getSource(ba)),D())}var T=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var U=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||
-mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var V=document.createElement("input");V.style.textOverflow="ellipsis";V.style.margin="0 0 0 4px";V.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Q=document.createElement("div");Q.style.display="flex";Q.style.alignItems="center";d.appendChild(Q);var N=document.createElement("input");N.style.textOverflow="ellipsis";N.style.margin="0 4px";N.style.maxWidth="60px";N.style.width="100%";var W=document.createElement("select");
-W.style.textOverflow="ellipsis";W.style.width="100%";var O=document.createElement("option");O.setAttribute("value","automatic");mxUtils.write(O,mxResources.get("automatic"));W.appendChild(O);O=document.createElement("option");O.setAttribute("value","custom");mxUtils.write(O,mxResources.get("userDefined"));W.appendChild(O);W.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var X=document.createElement("div");X.style.padding="0 6px 0 6px";O=document.createElement("img");O.setAttribute("title",
-mxResources.get("dark"));O.className="geAdaptiveAsset";O.src=Editor.thinDarkImage;O.style.width="20px";X.appendChild(O);mxEvent.addListener(O,"click",function(){N.focus()});X.appendChild(N);X.appendChild(W);X.style.display="flex";X.style.alignItems="center";O=document.createElement("div");O.style.display="flex";O.style.alignItems="center";O.style.userSelect="none";O.style.cursor="pointer";O.style.padding="2px 0 2px 0";var ja=document.createElement("img");ja.setAttribute("title",mxResources.get("dark"));
-ja.className="geAdaptiveAsset";ja.style.marginLeft="-2px";O.appendChild(ja);mxUtils.write(O,mxResources.get("advanced"));var ka=document.createElement("img");ka.setAttribute("title",mxResources.get("swap"));ka.className="geAdaptiveAsset";ka.style.marginLeft="4px";ka.style.width="16px";ka.style.height="16px";ka.style.cursor="pointer";ka.src=Editor.swapImage;mxEvent.addListener(ka,"click",function(ba){k(!0);W.value="custom";var la=V.value;V.value=N.value;N.value=la;w();mxEvent.consume(ba)});O.appendChild(ka);
-var ta=document.createElement("img");ta.setAttribute("title",mxResources.get("copy"));ta.className="geAdaptiveAsset";ta.style.marginLeft="4px";ta.style.width="16px";ta.style.height="16px";ta.style.cursor="pointer";ta.src=Editor.doubleArrowUpImage;mxEvent.addListener(ta,"click",function(ba){da==N?V.value=N.value:N.value=V.value;k(!0);W.value="custom";w();mxEvent.consume(ba)});O.appendChild(ta);q();mxEvent.addListener(O,"click",function(){k();q();ColorDialog.collapsed="none"==X.style.display});var M=
-mxUtils.button("",function(){z(!0);w();da.focus();""==da.value&&null!=T&&U&&ea.fromString(da==N?T.dark:T.light,!0)});mxEvent.addListener(W,"change",function(){"automatic"==W.value?(V.focus(),C(V)):(z(!1),mxUtils.isVarColor(N.value)||(N.value=U&&null!=T?T.dark.substring(1).toUpperCase():N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+V.value)).substring(1).toUpperCase()),N.focus(),E());w()});mxEvent.addListener(V,"change",function(){C(V)});mxEvent.addListener(N,"change",function(){C(N)});var aa=
-null!=e?e:this.createApplyFunction();this.init=function(){E()};var ea=new ColorPicker,da=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==W.value)&&!h?N:V;mxEvent.addListener(V,"focus",function(){da=V;G();ta.src=Editor.doubleArrowDownImage});mxEvent.addListener(N,"focus",function(){da=N;G();ta.src=Editor.doubleArrowUpImage});ea.addListener("change",function(ba,la){ba=la.getProperty("color").substring(1).toUpperCase();da.value.toUpperCase()!=ba&&(da.value=
-ba,C(da),window.setTimeout(function(){da.focus()},0))});e=document.createElement("div");e.appendChild(ea.div);var sa=document.createElement("div");sa.style.display="flex";sa.style.flexFlow="row wrap";sa.style.justifyContent="center";sa.style.paddingTop="10px";var Y=mxUtils.bind(this,function(ba,la,Ja,ma){la=null!=la?la:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";ya.style.marginLeft=
-"1px";var za=document.createElement("tbody");ya.appendChild(za);for(var Ka=ba.length/la,Pa=0;Pa<Ka;Pa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<la;Ha++)mxUtils.bind(this,function(qa){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==qa&&(qa=Ja);if(null!=qa){Da.style.borderWidth="1px";if(qa==mxConstants.NONE||null==qa)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(qa)){var Va=
-mxUtils.getLightDarkColor(qa);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+qa;Va=this.colorNames[String(qa).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=qa&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(qa==mxConstants.NONE){da==N&&N.value==mxConstants.NONE?V.value=mxConstants.NONE:da.value=mxConstants.NONE;if(da==V||da==N&&
-V.value==mxConstants.NONE)W.value="automatic";C(da);window.setTimeout(function(){da.focus()},0)}else if(mxUtils.isLightDarkColor(qa)){k(!0);W.value="custom";var Wa=mxUtils.getLightDarkColor(qa);V.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(V);C(N);da==V?ea.fromString(Wa.light):ea.fromString(Wa.dark)}else ea.fromString("#"+qa)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Pa*la+Ha]);za.appendChild(Ia)}ma&&(ba=document.createElement("td"),ba.setAttribute("title",
-mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ia.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(I(),ya)}));sa.appendChild(ya);
-return ya});h||(d.appendChild(O),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=W.value||(X.style.display="none",q()),O=document.createElement("img"),O.setAttribute("title",mxResources.get("light")),O.className="geAdaptiveAsset",O.src=Editor.thinLightImage,O.style.width="20px",Q.appendChild(O),mxEvent.addListener(O,"click",function(){V.focus()}));Q.appendChild(V);null!=T&&(M.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),M.style.cursor=
-"pointer",M.style.position="relative",M.style.marginLeft="4px",M.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=T.light:K.style.backgroundImage="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+" 50.3%)",M.appendChild(K),Q.appendChild(M),mxEvent.addListener(M,
-"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";Q.appendChild(P);K=mxUtils.button("",function(){document.activeElement==P?V.focus():(P.value="#"+V.value,P.click())});K.style.cursor="pointer";O=document.createElement("img");O.src=Editor.colorDropperImage;O.className="geAdaptiveAsset";O.style.position=
-"relative";O.style.verticalAlign="middle";O.style.marginTop="-2px";O.style.width="auto";O.style.height="14px";K.appendChild(O);Q.appendChild(K);e.appendChild(d);mxEvent.addListener(P,"change",function(){ea.fromString(P.value)});h||e.appendChild(X);I();d=Y(this.presetColors);d.style.marginBottom="8px";d=Y(this.defaultColors);d.style.marginBottom="16px";e.appendChild(sa);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Q.className="geBtn";a.editor.cancelFirst&&d.appendChild(Q);K=mxUtils.button(mxResources.get("apply"),D);K.className="geBtn gePrimaryBtn";d.appendChild(K);a.editor.cancelFirst||d.appendChild(Q);null!=b&&("default"==b?M.click():(Q=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Q.light?V.value=mxConstants.NONE:
-mxUtils.isVarColor(Q.light)?V.value=Q.light:(mxUtils.isRgbColor(Q.light)?Q.light=mxUtils.rgba2hex(Q.light):mxUtils.isHexColor(Q.light)||(Q.light="#"+m(Q.light)),V.value=Q.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Q.dark?N.value=mxConstants.NONE:mxUtils.isVarColor(Q.dark)?N.value=Q.dark:(mxUtils.isRgbColor(Q.dark)?Q.dark=mxUtils.rgba2hex(Q.dark):mxUtils.isHexColor(Q.dark)||(Q.dark="#"+m(Q.dark)),N.value=Q.dark.substring(1).toUpperCase()),G(),w()));h||!ColorDialog.collapsed||
-"automatic"!=W.value||Editor.isDarkMode()||(X.style.display="none",q());e.appendChild(d);this.picker=ea;this.colorInput=V;mxEvent.addListener(V,"keypress",J);mxEvent.addListener(N,"keypress",J);mxEvent.addListener(e,"keydown",function(ba){27==ba.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ba))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
-ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+var ColorDialog=function(a,b,e,f,g,d,h){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function q(){ja.src="none"==Y.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){ca||"none"==Y.style.display?(Y.style.display="flex",M.focus()):Y.style.display="none";q()}function u(ca){""==ca.value&&null!=T&&V?ca.style.background=ca==M?T.dark:T.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background=
+"#"+ca.value;ca.style.color="transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(W);u(M)}function z(ca){ca?h&&null!=T?(W.value=T.light.substring(1).toUpperCase(),ca=!1):(W.value="",M.value="",X.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),M.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==W.value&&
+null!=T&&(W.value=T.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==M.value&&null!=T&&(M.value=T.dark.substring(1).toUpperCase()),M.removeAttribute("placeholder"),M.removeAttribute("title"),ca=!1);V=ca}function C(ca){"#"==ca.value.charAt(0)&&(ca.value=ca.value.substring(1));var ma=ca.value,Ja=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||
+null==T?(ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)||(ca.value=m(ca.value),fa.fromString("#"+ca.value)),z(!1),ca!=M||W.value==mxConstants.NONE&&M.value==mxConstants.NONE||(X.value="custom"),ca==W&&"automatic"==X.value&&(W.value==mxConstants.NONE?M.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?M.value=W.value:M.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):U.click()}function D(){var ca=W.value,ma=M.value;if(V&&null!=T||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||
+mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)ca="default";else if(""==ca&&(ca=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),ca!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=X.value&&ma!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),
+12):ColorDialog.addRecentColor("light-dark("+ca+","+ma+")",12):ca!=mxConstants.NONE&&ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=ma)ca=ca==mxConstants.NONE?"transparent":ca,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==X.value||(ca="light-dark("+ca+","+ma+")");aa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||(ka.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ka.select():document.execCommand("selectAll",
+!1,null))}function G(){ka.value!=mxConstants.NONE&&""!=ka.value&&fa.fromString("#"+ka.value,!0)}function I(){var ca=ba(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function J(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),D())}var T=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||
+mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var O=document.createElement("div");O.style.display="flex";O.style.alignItems="center";d.appendChild(O);var M=document.createElement("input");M.style.textOverflow="ellipsis";M.style.margin="0 4px";M.style.maxWidth="60px";M.style.width="100%";var X=document.createElement("select");
+X.style.textOverflow="ellipsis";X.style.width="100%";var N=document.createElement("option");N.setAttribute("value","automatic");mxUtils.write(N,mxResources.get("automatic"));X.appendChild(N);N=document.createElement("option");N.setAttribute("value","custom");mxUtils.write(N,mxResources.get("userDefined"));X.appendChild(N);X.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var Y=document.createElement("div");Y.style.padding="0 6px 0 6px";N=document.createElement("img");N.setAttribute("title",
+mxResources.get("dark"));N.className="geAdaptiveAsset";N.src=Editor.thinDarkImage;N.style.width="20px";Y.appendChild(N);mxEvent.addListener(N,"click",function(){M.focus()});Y.appendChild(M);Y.appendChild(X);Y.style.display="flex";Y.style.alignItems="center";N=document.createElement("div");N.style.display="flex";N.style.alignItems="center";N.style.userSelect="none";N.style.cursor="pointer";N.style.padding="2px 0 2px 0";var ja=document.createElement("img");ja.setAttribute("title",mxResources.get("dark"));
+ja.className="geAdaptiveAsset";ja.style.marginLeft="-2px";N.appendChild(ja);mxUtils.write(N,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ca){k(!0);X.value="custom";var ma=W.value;W.value=M.value;M.value=ma;w();mxEvent.consume(ca)});N.appendChild(la);
+var S=document.createElement("img");S.setAttribute("title",mxResources.get("copy"));S.className="geAdaptiveAsset";S.style.marginLeft="4px";S.style.width="16px";S.style.height="16px";S.style.cursor="pointer";S.src=Editor.doubleArrowUpImage;mxEvent.addListener(S,"click",function(ca){ka==M?W.value=M.value:M.value=W.value;k(!0);X.value="custom";w();mxEvent.consume(ca)});N.appendChild(S);q();mxEvent.addListener(N,"click",function(){k();q();ColorDialog.collapsed="none"==Y.style.display});var U=mxUtils.button("",
+function(){z(!0);w();ka.focus();""==ka.value&&null!=T&&V&&fa.fromString(ka==M?T.dark:T.light,!0)});mxEvent.addListener(X,"change",function(){"automatic"==X.value?(W.focus(),C(W)):(z(!1),mxUtils.isVarColor(M.value)||(M.value=V&&null!=T?T.dark.substring(1).toUpperCase():M.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+W.value)).substring(1).toUpperCase()),M.focus(),E());w()});mxEvent.addListener(W,"change",function(){C(W)});mxEvent.addListener(M,"change",function(){C(M)});var aa=null!=e?e:this.createApplyFunction();
+this.init=function(){E()};var fa=new ColorPicker,ka=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==X.value)&&!h?M:W;mxEvent.addListener(W,"focus",function(){ka=W;G();S.src=Editor.doubleArrowDownImage});mxEvent.addListener(M,"focus",function(){ka=M;G();S.src=Editor.doubleArrowUpImage});fa.addListener("change",function(ca,ma){ca=ma.getProperty("color").substring(1).toUpperCase();ka.value.toUpperCase()!=ca&&(ka.value=ca,C(ka),window.setTimeout(function(){ka.focus()},
+0))});e=document.createElement("div");e.appendChild(fa.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,ma,Ja,na){ma=null!=ma?ma:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";ya.style.marginLeft="1px";var za=document.createElement("tbody");
+ya.appendChild(za);for(var Ka=ca.length/ma,Pa=0;Pa<Ka;Pa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<ma;Ha++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ja);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);
+Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ka==M&&M.value==mxConstants.NONE?W.value=mxConstants.NONE:ka.value=mxConstants.NONE;if(ka==W||ka==M&&W.value==mxConstants.NONE)X.value=
+"automatic";C(ka);window.setTimeout(function(){ka.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);X.value="custom";var Wa=mxUtils.getLightDarkColor(ra);W.value=Wa.light.substring(1).toUpperCase();M.value=Wa.dark.substring(1).toUpperCase();C(W);C(M);ka==W?fa.fromString(Wa.light):fa.fromString(Wa.dark)}else fa.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ca[Pa*ma+Ha]);za.appendChild(Ia)}na&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),ca.className=
+"geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ia.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(I(),ya)}));ta.appendChild(ya);return ya});h||(d.appendChild(N),
+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=X.value||(Y.style.display="none",q()),N=document.createElement("img"),N.setAttribute("title",mxResources.get("light")),N.className="geAdaptiveAsset",N.src=Editor.thinLightImage,N.style.width="20px",O.appendChild(N),mxEvent.addListener(N,"click",function(){W.focus()}));O.appendChild(W);null!=T&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor="pointer",U.style.position="relative",
+U.style.marginLeft="4px",U.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=T.light:K.style.backgroundImage="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+" 50.3%)",U.appendChild(K),O.appendChild(U),mxEvent.addListener(U,"dblclick",D));var R=document.createElement("input");
+R.setAttribute("type","color");R.style.position="relative";R.style.visibility="hidden";R.style.top="10px";R.style.width="0px";R.style.height="0px";R.style.border="none";e.style.whiteSpace="nowrap";O.appendChild(R);K=mxUtils.button("",function(){document.activeElement==R?W.focus():(R.value="#"+W.value,R.click())});K.style.cursor="pointer";N=document.createElement("img");N.src=Editor.colorDropperImage;N.className="geAdaptiveAsset";N.style.position="relative";N.style.verticalAlign="middle";N.style.marginTop=
+"-2px";N.style.width="auto";N.style.height="14px";K.appendChild(N);O.appendChild(K);e.appendChild(d);mxEvent.addListener(R,"change",function(){fa.fromString(R.value)});h||e.appendChild(Y);I();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));
+O=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});O.className="geBtn";a.editor.cancelFirst&&d.appendChild(O);K=mxUtils.button(mxResources.get("apply"),D);K.className="geBtn gePrimaryBtn";d.appendChild(K);a.editor.cancelFirst||d.appendChild(O);null!=b&&("default"==b?U.click():(O=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==O.light?W.value=mxConstants.NONE:mxUtils.isVarColor(O.light)?W.value=O.light:(mxUtils.isRgbColor(O.light)?O.light=mxUtils.rgba2hex(O.light):
+mxUtils.isHexColor(O.light)||(O.light="#"+m(O.light)),W.value=O.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==O.dark?M.value=mxConstants.NONE:mxUtils.isVarColor(O.dark)?M.value=O.dark:(mxUtils.isRgbColor(O.dark)?O.dark=mxUtils.rgba2hex(O.dark):mxUtils.isHexColor(O.dark)||(O.dark="#"+m(O.dark)),M.value=O.dark.substring(1).toUpperCase()),G(),w()));h||!ColorDialog.collapsed||"automatic"!=X.value||Editor.isDarkMode()||(Y.style.display="none",q());e.appendChild(d);this.picker=fa;
+this.colorInput=W;mxEvent.addListener(W,"keypress",J);mxEvent.addListener(M,"keypress",J);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};
+ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href",
"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,m,q,k,u,w,z,C,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");
m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&m.appendChild(D);var I=document.createElement("textarea");u?I.setAttribute("wrap","off"):I.style.wordBreak="break-all";
I.setAttribute("spellcheck","false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};E.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
-C)for(b=0;b<C.length;b++)(function(T,K,U){T=mxUtils.button(T,function(V){K(V,I)});null!=U&&T.setAttribute("title",U);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=q&&q(G,I);if(null!=f){var J=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});J.setAttribute("title",
+C)for(b=0;b<C.length;b++)(function(T,K,V){T=mxUtils.button(T,function(W){K(W,I)});null!=V&&T.setAttribute("title",V);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=q&&q(G,I);if(null!=f){var J=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});J.setAttribute("title",
"Ctrl+Enter");J.className="geBtn gePrimaryBtn";G.appendChild(J);mxEvent.addListener(I,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&J.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
"off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var q=new FileReader;
q.onload=function(k){e.value=k.target.result};q.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",
null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),q=null;
if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){q=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),w=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,w);var z=w.getChildren(w.getChildAt(w.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){q=C}finally{a.editor.graph.model.endUpdate()}}null!=
q&&a.handleError(q)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var Q=u.value,N=Q.lastIndexOf(".");u.value=0<N?Q.substring(0,N+1)+w.value:Q+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?J.removeAttribute("disabled"):J.setAttribute("disabled",
+var ExportDialog=function(a){function b(){var O=u.value,M=O.lastIndexOf(".");u.value=0<M?O.substring(0,M+1)+w.value:O+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?J.removeAttribute("disabled"):J.setAttribute("disabled",
"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*D.value>MAX_AREA||0>=C.value?"red":"";D.style.backgroundColor=C.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var q=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
@@ -3773,56 +3771,56 @@ k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResourc
C.setAttribute("value",h);C.style.width="180px";k=document.createElement("td");k.appendChild(C);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
-"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var Q=parseInt(G.value);isNaN(Q)||0>=Q?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=Q))});k=document.createElement("td");k.appendChild(E);k.appendChild(G);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var J=document.createElement("input");
+"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var O=parseInt(G.value);isNaN(O)||0>=O?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=O))});k=document.createElement("td");k.appendChild(E);k.appendChild(G);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var J=document.createElement("input");
J.setAttribute("type","checkbox");J.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(J);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;k=document.createElement("td");k.appendChild(T);
g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);g.appendChild(k);q.appendChild(g);d.appendChild(q);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",
-function(){I=!0;var Q=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*Q).toFixed(2));0<h?(C.value=Math.floor(h*Q),D.value=Math.floor(m*Q)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(C,"change",function(){var Q=parseInt(C.value)/h;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),D.value=Math.floor(m*Q)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var Q=parseInt(D.value)/m;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),C.value=Math.floor(h*
-Q)):(z.value="100",C.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var Q=u.value,N=w.value,W=Math.max(0,parseFloat(z.value)||100)/100,O=Math.max(0,parseInt(K.value)),X=f.background,ja=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||
-"pdf"==N)&&J.checked)X=null;else if(null==X||X==mxConstants.NONE)X="#ffffff";ExportDialog.lastBorderValue=O;ExportDialog.exportFile(a,Q,N,X,W,O,ja,T.checked)}}));U.className="geBtn gePrimaryBtn";var V=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});V.className="geBtn";a.editor.cancelFirst?(k.appendChild(V),k.appendChild(U)):(k.appendChild(U),k.appendChild(V));g.appendChild(k);q.appendChild(g);d.appendChild(q);this.container=d};ExportDialog.lastBorderValue=0;
+function(){I=!0;var O=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*O).toFixed(2));0<h?(C.value=Math.floor(h*O),D.value=Math.floor(m*O)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(C,"change",function(){var O=parseInt(C.value)/h;0<O?(z.value=parseFloat((100*O).toFixed(2)),D.value=Math.floor(m*O)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var O=parseInt(D.value)/m;0<O?(z.value=parseFloat((100*O).toFixed(2)),C.value=Math.floor(h*
+O)):(z.value="100",C.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var O=u.value,M=w.value,X=Math.max(0,parseFloat(z.value)||100)/100,N=Math.max(0,parseInt(K.value)),Y=f.background,ja=Math.max(1,parseInt(G.value));if(("svg"==M||"png"==M||
+"pdf"==M)&&J.checked)Y=null;else if(null==Y||Y==mxConstants.NONE)Y="#ffffff";ExportDialog.lastBorderValue=N;ExportDialog.exportFile(a,O,M,Y,X,N,ja,T.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);q.appendChild(g);d.appendChild(q);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,g,d)),b,e);else{var q=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-q.x)/m.view.scale),Math.floor((d/g-q.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(q.width*g/m.view.scale+2*d);g=Math.ceil(q.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function e(){0<K.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var q=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=q&&(m=JSON.parse(q))}catch(Q){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],z=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(Q,N){var W=document.createElement("div");W.style.position="relative";W.style.paddingRight="20px";W.style.boxSizing="border-box";W.style.width="100%";var O=document.createElement("a"),X=mxUtils.createImage(Dialog.prototype.closeImage);X.style.height="9px";X.style.fontSize="9px";X.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";O.className="geButton";O.setAttribute("title",
-mxResources.get("delete"));O.style.position="absolute";O.style.top="4px";O.style.right="0px";O.style.margin="0px";O.style.width="9px";O.style.height="9px";O.style.cursor="pointer";O.appendChild(X);N=function(ja){return function(){for(var ka=0,ta=0;ta<w.length;ta++){if(w[ta]==ja){z[ta]=null;k.table.deleteRow(ka+(null!=D?1:0));break}null!=z[ta]&&ka++}}}(N);mxEvent.addListener(O,"click",N);N=Q.parentNode;W.appendChild(Q);W.appendChild(O);N.appendChild(W)};h=function(Q,N,W){w[Q]=N;z[Q]=k.addTextarea(w[C]+
-":",W,2);z[Q].style.width="100%";0<W.indexOf("\n")&&z[Q].setAttribute("rows","2");E(z[Q],N);null!=m[N]&&0==m[N].editable&&z[Q].setAttribute("disabled","disabled")};q=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),I=g.getCellStyle(b),J=0;J<u.length;J++)("label"!=u[J].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[J].nodeName&&q.push({name:u[J].nodeName,value:u[J].nodeValue});q.sort(function(Q,N){return"label"==Q.name?1:"label"==N.name?-1:Q.name<N.name?-1:Q.name>
-N.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(Q){Q=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(N){if(null!=N&&0<N.length&&N!=D)if(g.model.isRoot(b)){var W=a.getPageById(D);if(null!=W)if(null==a.getPageById(N)){var O=a.getPageIndex(W);0<=O&&(a.removePage(W),W.node.setAttribute("id",
-N),D=N,T.innerHTML=mxUtils.htmlEntities(N),a.insertPage(W,O))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(N)?(g.getModel().cellRemoved(b),b.setId(N),D=N,T.innerHTML=mxUtils.htmlEntities(N),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[N])})}),mxResources.get("id"));a.showDialog(Q.container,300,80,!0,!0);Q.init()})}for(J=0;J<q.length;J++)h(C,q[J].name,q[J].value),C++;q=document.createElement("div");
+var EditDataDialog=function(a,b){function e(){0<K.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var q=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=q&&(m=JSON.parse(q))}catch(O){}var k=new mxForm("properties");k.table.style.width=
+"100%";var u=d.attributes,w=[],z=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(O,M){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var N=document.createElement("a"),Y=mxUtils.createImage(Dialog.prototype.closeImage);Y.style.height="9px";Y.style.fontSize="9px";Y.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";N.className="geButton";N.setAttribute("title",
+mxResources.get("delete"));N.style.position="absolute";N.style.top="4px";N.style.right="0px";N.style.margin="0px";N.style.width="9px";N.style.height="9px";N.style.cursor="pointer";N.appendChild(Y);M=function(ja){return function(){for(var la=0,S=0;S<w.length;S++){if(w[S]==ja){z[S]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=z[S]&&la++}}}(M);mxEvent.addListener(N,"click",M);M=O.parentNode;X.appendChild(O);X.appendChild(N);M.appendChild(X)};h=function(O,M,X){w[O]=M;z[O]=k.addTextarea(w[C]+":",
+X,2);z[O].style.width="100%";0<X.indexOf("\n")&&z[O].setAttribute("rows","2");E(z[O],M);null!=m[M]&&0==m[M].editable&&z[O].setAttribute("disabled","disabled")};q=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),I=g.getCellStyle(b),J=0;J<u.length;J++)("label"!=u[J].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[J].nodeName&&q.push({name:u[J].nodeName,value:u[J].nodeValue});q.sort(function(O,M){return"label"==O.name?1:"label"==M.name?-1:O.name<M.name?-1:O.name>
+M.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(O){O=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(M){if(null!=M&&0<M.length&&M!=D)if(g.model.isRoot(b)){var X=a.getPageById(D);if(null!=X)if(null==a.getPageById(M)){var N=a.getPageIndex(X);0<=N&&(a.removePage(X),X.node.setAttribute("id",
+M),D=M,T.innerHTML=mxUtils.htmlEntities(M),a.insertPage(X,N))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(M)?(g.getModel().cellRemoved(b),b.setId(M),D=M,T.innerHTML=mxUtils.htmlEntities(M),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[M])})}),mxResources.get("id"));a.showDialog(O.container,300,80,!0,!0);O.init()})}for(J=0;J<q.length;J++)h(C,q[J].name,q[J].value),C++;q=document.createElement("div");
q.style.position="absolute";q.style.top="30px";q.style.left="30px";q.style.right="30px";q.style.bottom="80px";q.style.overflowY="auto";q.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("enterPropertyName"));K.setAttribute("type",
-"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";h.appendChild(K);q.appendChild(h);f.appendChild(q);var U=mxUtils.button(mxResources.get("addProperty"),function(){var Q=K.value;if(0<Q.length&&"label"!=Q&&"id"!=Q&&"placeholders"!=Q&&0>Q.indexOf(":"))try{var N=mxUtils.indexOf(w,Q);if(0<=N&&null!=z[N])z[N].focus();else{d.cloneNode(!1).setAttribute(Q,
-"");0<=N&&(w.splice(N,1),z.splice(N,1));w.push(Q);var W=k.addTextarea(Q+":","",2);W.style.width="100%";z.push(W);E(W,Q);W.focus()}U.setAttribute("disabled","disabled");K.value=""}catch(O){mxUtils.alert(O)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(Q){13==Q.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
-U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";h.appendChild(U);q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});q.setAttribute("title","Escape");q.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(Q){var N=g.getDataForCells([b],!0);Q=new EmbedDialog(a,JSON.stringify(N,null,2),null,null,function(){console.log(N);a.alert("Written to Console (Dev Tools)")},
-mxResources.get("export"),null,"Console","data.json");a.showDialog(Q.container,450,240,!0,!0);Q.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var V=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var Q=!1,N=0;N<w.length;N++)null==z[N]?d.removeAttribute(w[N]):(d.setAttribute(w[N],z[N].value),Q=Q||"placeholder"==w[N]&&"1"==d.getAttribute("placeholders"));Q&&d.removeAttribute("label");g.getModel().setValue(b,
-d)}catch(W){mxUtils.alert(W)}});V.setAttribute("title","Ctrl+Enter");V.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&V.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
+"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";h.appendChild(K);q.appendChild(h);f.appendChild(q);var V=mxUtils.button(mxResources.get("addProperty"),function(){var O=K.value;if(0<O.length&&"label"!=O&&"id"!=O&&"placeholders"!=O&&0>O.indexOf(":"))try{var M=mxUtils.indexOf(w,O);if(0<=M&&null!=z[M])z[M].focus();else{d.cloneNode(!1).setAttribute(O,
+"");0<=M&&(w.splice(M,1),z.splice(M,1));w.push(O);var X=k.addTextarea(O+":","",2);X.style.width="100%";z.push(X);E(X,O);X.focus()}V.setAttribute("disabled","disabled");K.value=""}catch(N){mxUtils.alert(N)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(O){13==O.keyCode&&V.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow="ellipsis";
+V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});q.setAttribute("title","Escape");q.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(O){var M=g.getDataForCells([b],!0);O=new EmbedDialog(a,JSON.stringify(M,null,2),null,null,function(){console.log(M);a.alert("Written to Console (Dev Tools)")},
+mxResources.get("export"),null,"Console","data.json");a.showDialog(O.container,450,240,!0,!0);O.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var O=!1,M=0;M<w.length;M++)null==z[M]?d.removeAttribute(w[M]):(d.setAttribute(w[M],z[M].value),O=O||"placeholder"==w[M]&&"1"==d.getAttribute("placeholders"));O&&d.removeAttribute("label");g.getModel().setValue(b,
+d)}catch(X){mxUtils.alert(X)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(O){13==O.keyCode&&mxEvent.isControlDown(O)&&W.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
G.style.marginRight="10px",I=document.createElement("input"),I.setAttribute("type","checkbox"),I.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(I.setAttribute("checked","checked"),I.defaultChecked=!0),mxEvent.addListener(I,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(I),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
-u.appendChild(G);a.editor.cancelFirst&&u.appendChild(q);u.appendChild(h);u.appendChild(V);a.editor.cancelFirst||u.appendChild(q);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
+u.appendChild(G);a.editor.cancelFirst&&u.appendChild(q);u.appendChild(h);u.appendChild(W);a.editor.cancelFirst||u.appendChild(q);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,b,e,f){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var h=document.createElement("input");h.setAttribute("value",b);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type","text");
h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
mxEvent.addListener(b,"click",function(){h.value="";h.focus()});d.appendChild(h);d.appendChild(b);g.appendChild(d);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?h.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(h,"keypress",function(m){13==m.keyCode&&(a.hideDialog(),f(h.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);e=mxUtils.button(e,function(){a.hideDialog();f(h.value)});e.className="geBtn gePrimaryBtn";d.appendChild(e);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,e,f,g){var d=a.editor.graph,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,b,e,f,g,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
-function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(q,k){for(var u=!1,w=mxEvent.getSource(q);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=q.deltaY&&Math.round(q.deltaY)!=q.deltaY&&(u=1+Math.abs(q.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(q))})},LayersWindow=function(a,b,e,f,g){function d(){var N=K.get(q.getLayerForCells(q.getSelectionCells()));
-null!=N?N.appendChild(Q):null!=Q.parentNode&&Q.parentNode.removeChild(Q)}function h(){function N(X,ja,ka,ta){var M=document.createElement("div");M.className="geToolbarContainer";K.put(ka,M);M.style.overflow="hidden";M.style.position="relative";M.style.padding="4px";M.style.height="30px";M.style.display="flex";M.style.alignItems="center";M.style.borderWidth="0px 0px 1px 0px";M.style.borderStyle="solid";M.style.whiteSpace="nowrap";M.setAttribute("title",ja+" ("+ka.getId()+")");var aa=document.createElement("div");
-aa.style.display="inline-flex";aa.style.alignItems="center";aa.style.width="100%";aa.style.textOverflow="ellipsis";aa.style.overflow="hidden";var ea=document.createElement("span");mxEvent.addListener(M,"dragover",function(Y){Y.dataTransfer.dropEffect="move";z=X;Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(M,"dragstart",function(Y){"true"!=ea.contentEditable&&(w=M,mxClient.IS_FF&&Y.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(M,"dragend",function(Y){null!=w&&null!=
-z&&1<q.model.getChildCount(q.model.root)&&q.addCell(ka,q.model.root,z);z=w=null;Y.stopPropagation();Y.preventDefault()});var da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 4px";da.style.cursor="pointer";da.setAttribute("title",mxResources.get(q.model.isVisible(ka)?"hide":"show"));q.model.isVisible(ka)?(da.setAttribute("src",Editor.visibleImage),
-mxUtils.setOpacity(M,90)):(da.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(M,40));q.isEnabled()||mxUtils.setOpacity(da,50);aa.appendChild(da);mxEvent.addListener(da,"click",function(Y){q.isEnabled()&&q.model.setVisible(ka,!q.model.isVisible(ka));mxEvent.consume(Y)});da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 0";da.setAttribute("title",
-mxResources.get("lockUnlock"));var sa=q.getCurrentCellStyle(ka);"1"==mxUtils.getValue(sa,"locked","0")?(da.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(da,90),M.style.color="red"):(da.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(da,40));q.isEnabled()&&(da.style.cursor="pointer");mxEvent.addListener(da,"click",function(Y){if(q.isEnabled()){var P=null;q.getModel().beginUpdate();try{P="1"==mxUtils.getValue(sa,"locked","0")?null:"1",q.setCellStyles("locked",P,[ka])}finally{q.getModel().endUpdate()}"1"==
-P&&q.removeSelectionCells(q.getModel().getDescendants(ka));mxEvent.consume(Y)}});aa.appendChild(da);mxUtils.write(ea,ja);ea.style.display="block";ea.style.whiteSpace="nowrap";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.position="absolute";ea.style.padding="2px";ea.style.left="52px";ea.style.right="8px";aa.appendChild(ea);M.appendChild(aa);if(q.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ja=document.createElement("div"),
-ja.style.display="block",ja.style.textAlign="right",ja.style.whiteSpace="nowrap",ja.style.position="absolute",ja.style.right="16px",ja.style.top="6px",0<X&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toBack")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9660;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(Y){q.isEnabled()&&
-q.addCell(ka,q.model.root,X-1);mxEvent.consume(Y)})),0<=X&&X<C-1&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toFront")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9650;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(Y){q.isEnabled()&&q.addCell(ka,q.model.root,X+1);mxEvent.consume(Y)})),M.appendChild(ja);mxClient.IS_SVG&&
-(!mxClient.IS_IE||10<=document.documentMode)&&(M.setAttribute("draggable","true"),M.style.cursor="move")}mxEvent.addListener(M,"dblclick",function(Y){var P=mxEvent.getSource(Y).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ea.contentEditable&&(m(ka),mxEvent.consume(Y))});q.getDefaultParent()==ka&&(M.classList.add("geActivePage"),M.style.fontWeight=q.isEnabled()?"bold":"",D=ka);mxEvent.addListener(M,"click",function(Y){q.isEnabled()&&"true"!=ea.contentEditable&&(q.setDefaultParent(ta),q.view.setCurrentRoot(null),
-mxEvent.isShiftDown(Y)&&q.setSelectionCells(ka.children),mxEvent.consume(Y))});u.appendChild(M)}q.isEnabled()?(V.classList.remove("mxDisabled"),T.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),I.classList.remove("mxDisabled")):(V.classList.add("mxDisabled"),T.classList.add("mxDisabled"),U.classList.add("mxDisabled"),I.classList.add("mxDisabled"));C=q.model.getChildCount(q.model.root);u.innerText="";K.clear();for(var W=C-1;0<=W;W--)mxUtils.bind(this,function(X){N(W,q.convertValueToString(X)||
-mxResources.get("background"),X,X)})(q.model.getChildAt(q.model.root,W));var O=q.convertValueToString(D)||mxResources.get("background");V.setAttribute("title",mxResources.get("removeIt",[O]));U.setAttribute("title",mxResources.get("duplicateIt",[O]));q.isSelectionEmpty()&&J.classList.add("mxDisabled");d()}function m(N){if(q.isEnabled()&&null!=N){var W=K.get(N);if(null!=W){var O=W.getElementsByTagName("span");if(null!=O&&0<O.length){var X=O[0],ja=mxUtils.getTextContent(X);X.style.textOverflow="";X.style.cursor=
-"text";X.contentEditable="true";X.focus();document.execCommand("selectAll",!1,null);W.removeAttribute("draggable");W.style.cursor="";var ka=function(ta){if("true"==X.contentEditable){X.contentEditable="false";var M=mxUtils.getTextContent(X);ta&&M!=ja?(M=mxUtils.getTextContent(X),0<M.length?q.cellLabelChanged(N,M):q.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(X,"keydown",function(ta){if(13==ta.keyCode||27==ta.keyCode)ka(13==ta.keyCode),mxEvent.consume(ta)});mxEvent.addListener(X,
-"blur",function(ta){ka(!0);mxEvent.consume(ta)})}}}}var q=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(N){N.dataTransfer.dropEffect="move";z=0;N.stopPropagation();
-N.preventDefault()});mxEvent.addListener(k,"drop",function(N){N.stopPropagation();N.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(I,"click",function(N){if(q.isEnabled()){q.model.beginUpdate();try{var W=q.addCell(new mxCell(mxResources.get("untitledLayer")),
-q.model.root);q.setDefaultParent(W)}finally{q.model.endUpdate()}m(W)}mxEvent.consume(N)});q.isEnabled()||I.classList.add("mxDisabled");E.appendChild(I);var J=G.cloneNode();J.style.backgroundImage="url("+Editor.layersImage+")";J.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(J,"click",function(N){if(q.isEnabled()&&!q.isSelectionEmpty()){var W=mxUtils.getOffset(J);a.showPopupMenu(mxUtils.bind(this,function(O,X){for(var ja=q.getLayerForCells(q.getSelectionCells()),
-ka=C-1;0<=ka;ka--)mxUtils.bind(this,function(ta){var M="1"==mxUtils.getValue(q.getCurrentCellStyle(ta),"locked","0"),aa=O.addItem(q.convertValueToString(ta)||mxResources.get("background"),null,mxUtils.bind(this,function(){M||q.moveCells(q.getSelectionCells(),0,0,!1,ta)}),X,null,null,!M);M?O.addCheckmark(aa,Editor.lockedImage):ta==ja&&O.addCheckmark(aa,Editor.checkmarkImage)})(q.model.getChildAt(q.model.root,ka))}),W.x,W.y+J.offsetHeight,N)}});E.appendChild(J);var T=G.cloneNode(!1);T.style.backgroundImage=
-"url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(N){q.isEnabled()&&a.showDataDialog(D);mxEvent.consume(N)});q.isEnabled()||T.classList.add("mxDisabled");E.appendChild(T);var K=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(N){if(q.isEnabled()){N=null;q.model.beginUpdate();try{N=q.cloneCell(D),
-q.cellLabelChanged(N,mxResources.get("untitledLayer")),N.setVisible(!0),N=q.addCell(N,q.model.root),q.setDefaultParent(N)}finally{q.model.endUpdate()}null==N||q.isCellLocked(N)||q.selectAll(N)}});q.isEnabled()||U.classList.add("mxDisabled");E.appendChild(U);var V=G.cloneNode(!1);V.style.backgroundImage="url("+Editor.trashImage+")";V.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(V,"click",function(N){if(q.isEnabled()){q.model.beginUpdate();try{var W=q.model.root.getIndex(D);
-q.removeCells([D],!1);0==q.model.getChildCount(q.model.root)?(q.model.add(q.model.root,new mxCell),q.setDefaultParent(null)):0<W&&W<=q.model.getChildCount(q.model.root)?q.setDefaultParent(q.model.getChildAt(q.model.root,W-1)):q.setDefaultParent(null)}finally{q.model.endUpdate()}}mxEvent.consume(N)});q.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);k.appendChild(E);var Q=document.createElement("span");Q.setAttribute("title",mxResources.get("selectionOnly"));Q.innerHTML="&#8226;";Q.style.position=
-"absolute";Q.style.fontWeight="bold";Q.style.fontSize="16pt";Q.style.right="6px";h();q.model.addListener(mxEvent.CHANGE,h);q.addListener("defaultParentChanged",h);a.addListener("lockedChanged",h);q.selectionModel.addListener(mxEvent.CHANGE,function(){q.isSelectionEmpty()?J.classList.add("mxDisabled"):J.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(q,k){for(var u=!1,w=mxEvent.getSource(q);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=q.deltaY&&Math.round(q.deltaY)!=q.deltaY&&(u=1+Math.abs(q.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(q))})},LayersWindow=function(a,b,e,f,g){function d(){var M=K.get(q.getLayerForCells(q.getSelectionCells()));
+null!=M?M.appendChild(O):null!=O.parentNode&&O.parentNode.removeChild(O)}function h(){function M(Y,ja,la,S){var U=document.createElement("div");U.className="geToolbarContainer";K.put(la,U);U.style.overflow="hidden";U.style.position="relative";U.style.padding="4px";U.style.height="30px";U.style.display="flex";U.style.alignItems="center";U.style.borderWidth="0px 0px 1px 0px";U.style.borderStyle="solid";U.style.whiteSpace="nowrap";U.setAttribute("title",ja+" ("+la.getId()+")");var aa=document.createElement("div");
+aa.style.display="inline-flex";aa.style.alignItems="center";aa.style.width="100%";aa.style.textOverflow="ellipsis";aa.style.overflow="hidden";var fa=document.createElement("span");mxEvent.addListener(U,"dragover",function(ba){ba.dataTransfer.dropEffect="move";z=Y;ba.stopPropagation();ba.preventDefault()});mxEvent.addListener(U,"dragstart",function(ba){"true"!=fa.contentEditable&&(w=U,mxClient.IS_FF&&ba.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(U,"dragend",function(ba){null!=w&&
+null!=z&&1<q.model.getChildCount(q.model.root)&&q.addCell(la,q.model.root,z);z=w=null;ba.stopPropagation();ba.preventDefault()});var ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.className="geAdaptiveAsset";ka.style.width="16px";ka.style.padding="0px 6px 0 4px";ka.style.cursor="pointer";ka.setAttribute("title",mxResources.get(q.model.isVisible(la)?"hide":"show"));q.model.isVisible(la)?(ka.setAttribute("src",Editor.visibleImage),
+mxUtils.setOpacity(U,90)):(ka.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(U,40));q.isEnabled()||mxUtils.setOpacity(ka,50);aa.appendChild(ka);mxEvent.addListener(ka,"click",function(ba){q.isEnabled()&&q.model.setVisible(la,!q.model.isVisible(la));mxEvent.consume(ba)});ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.className="geAdaptiveAsset";ka.style.width="16px";ka.style.padding="0px 6px 0 0";ka.setAttribute("title",
+mxResources.get("lockUnlock"));var ta=q.getCurrentCellStyle(la);"1"==mxUtils.getValue(ta,"locked","0")?(ka.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ka,90),U.style.color="red"):(ka.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ka,40));q.isEnabled()&&(ka.style.cursor="pointer");mxEvent.addListener(ka,"click",function(ba){if(q.isEnabled()){var R=null;q.getModel().beginUpdate();try{R="1"==mxUtils.getValue(ta,"locked","0")?null:"1",q.setCellStyles("locked",R,[la])}finally{q.getModel().endUpdate()}"1"==
+R&&q.removeSelectionCells(q.getModel().getDescendants(la));mxEvent.consume(ba)}});aa.appendChild(ka);mxUtils.write(fa,ja);fa.style.display="block";fa.style.whiteSpace="nowrap";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.position="absolute";fa.style.padding="2px";fa.style.left="52px";fa.style.right="8px";aa.appendChild(fa);U.appendChild(aa);if(q.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ja=document.createElement("div"),
+ja.style.display="block",ja.style.textAlign="right",ja.style.whiteSpace="nowrap",ja.style.position="absolute",ja.style.right="16px",ja.style.top="6px",0<Y&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toBack")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9660;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(ba){q.isEnabled()&&
+q.addCell(la,q.model.root,Y-1);mxEvent.consume(ba)})),0<=Y&&Y<C-1&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toFront")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9650;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(ba){q.isEnabled()&&q.addCell(la,q.model.root,Y+1);mxEvent.consume(ba)})),U.appendChild(ja);mxClient.IS_SVG&&
+(!mxClient.IS_IE||10<=document.documentMode)&&(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ba){var R=mxEvent.getSource(ba).nodeName;"INPUT"!=R&&"IMG"!=R&&"true"!=fa.contentEditable&&(m(la),mxEvent.consume(ba))});q.getDefaultParent()==la&&(U.classList.add("geActivePage"),U.style.fontWeight=q.isEnabled()?"bold":"",D=la);mxEvent.addListener(U,"click",function(ba){q.isEnabled()&&"true"!=fa.contentEditable&&(q.setDefaultParent(S),q.view.setCurrentRoot(null),
+mxEvent.isShiftDown(ba)&&q.setSelectionCells(la.children),mxEvent.consume(ba))});u.appendChild(U)}q.isEnabled()?(W.classList.remove("mxDisabled"),T.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),I.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),T.classList.add("mxDisabled"),V.classList.add("mxDisabled"),I.classList.add("mxDisabled"));C=q.model.getChildCount(q.model.root);u.innerText="";K.clear();for(var X=C-1;0<=X;X--)mxUtils.bind(this,function(Y){M(X,q.convertValueToString(Y)||
+mxResources.get("background"),Y,Y)})(q.model.getChildAt(q.model.root,X));var N=q.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[N]));V.setAttribute("title",mxResources.get("duplicateIt",[N]));q.isSelectionEmpty()&&J.classList.add("mxDisabled");d()}function m(M){if(q.isEnabled()&&null!=M){var X=K.get(M);if(null!=X){var N=X.getElementsByTagName("span");if(null!=N&&0<N.length){var Y=N[0],ja=mxUtils.getTextContent(Y);Y.style.textOverflow="";Y.style.cursor=
+"text";Y.contentEditable="true";Y.focus();document.execCommand("selectAll",!1,null);X.removeAttribute("draggable");X.style.cursor="";var la=function(S){if("true"==Y.contentEditable){Y.contentEditable="false";var U=mxUtils.getTextContent(Y);S&&U!=ja?(U=mxUtils.getTextContent(Y),0<U.length?q.cellLabelChanged(M,U):q.cellLabelChanged(M,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(Y,"keydown",function(S){if(13==S.keyCode||27==S.keyCode)la(13==S.keyCode),mxEvent.consume(S)});mxEvent.addListener(Y,
+"blur",function(S){la(!0);mxEvent.consume(S)})}}}}var q=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(M){M.dataTransfer.dropEffect="move";z=0;M.stopPropagation();
+M.preventDefault()});mxEvent.addListener(k,"drop",function(M){M.stopPropagation();M.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(I,"click",function(M){if(q.isEnabled()){q.model.beginUpdate();try{var X=q.addCell(new mxCell(mxResources.get("untitledLayer")),
+q.model.root);q.setDefaultParent(X)}finally{q.model.endUpdate()}m(X)}mxEvent.consume(M)});q.isEnabled()||I.classList.add("mxDisabled");E.appendChild(I);var J=G.cloneNode();J.style.backgroundImage="url("+Editor.layersImage+")";J.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(J,"click",function(M){if(q.isEnabled()&&!q.isSelectionEmpty()){var X=mxUtils.getOffset(J);a.showPopupMenu(mxUtils.bind(this,function(N,Y){for(var ja=q.getLayerForCells(q.getSelectionCells()),
+la=C-1;0<=la;la--)mxUtils.bind(this,function(S){var U="1"==mxUtils.getValue(q.getCurrentCellStyle(S),"locked","0"),aa=N.addItem(q.convertValueToString(S)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||q.moveCells(q.getSelectionCells(),0,0,!1,S)}),Y,null,null,!U);U?N.addCheckmark(aa,Editor.lockedImage):S==ja&&N.addCheckmark(aa,Editor.checkmarkImage)})(q.model.getChildAt(q.model.root,la))}),X.x,X.y+J.offsetHeight,M)}});E.appendChild(J);var T=G.cloneNode(!1);T.style.backgroundImage=
+"url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(M){q.isEnabled()&&a.showDataDialog(D);mxEvent.consume(M)});q.isEnabled()||T.classList.add("mxDisabled");E.appendChild(T);var K=new mxDictionary,V=G.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(M){if(q.isEnabled()){M=null;q.model.beginUpdate();try{M=q.cloneCell(D),
+q.cellLabelChanged(M,mxResources.get("untitledLayer")),M.setVisible(!0),M=q.addCell(M,q.model.root),q.setDefaultParent(M)}finally{q.model.endUpdate()}null==M||q.isCellLocked(M)||q.selectAll(M)}});q.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=G.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(M){if(q.isEnabled()){q.model.beginUpdate();try{var X=q.model.root.getIndex(D);
+q.removeCells([D],!1);0==q.model.getChildCount(q.model.root)?(q.model.add(q.model.root,new mxCell),q.setDefaultParent(null)):0<X&&X<=q.model.getChildCount(q.model.root)?q.setDefaultParent(q.model.getChildAt(q.model.root,X-1)):q.setDefaultParent(null)}finally{q.model.endUpdate()}}mxEvent.consume(M)});q.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var O=document.createElement("span");O.setAttribute("title",mxResources.get("selectionOnly"));O.innerHTML="&#8226;";O.style.position=
+"absolute";O.style.fontWeight="bold";O.style.fontSize="16pt";O.style.right="6px";h();q.model.addListener(mxEvent.CHANGE,h);q.addListener("defaultParentChanged",h);a.addListener("lockedChanged",h);q.selectionModel.addListener(mxEvent.CHANGE,function(){q.isSelectionEmpty()?J.classList.add("mxDisabled"):J.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
@@ -12186,13 +12184,13 @@ DrawioFile.prototype.updateFile=function(b,e,f,c,l){null!=f&&f()||(EditorUi.debu
c,l):this.reloadFile(b,e))}catch(v){null!=e&&e(v)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var v=this.getShadowPages(),t=[this.ui.diffPages(null!=c?c:v,p)],E=this.ignorePatches(t);if(E)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",E),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(v,
this.isRealtime()?this.ownPages:this.ui.pages):null,B=this.ui.patchPages(this.ui.clonePages(v),t[0]),d=this.ui.getHashValueForPages(B,{}),g=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",v,"pages",p,"patched",B,"patches",t,"changes",H,"checksum",d,"current",g,"valid",d==g,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=d&&d!=g)this.checksumError(f,t,null,null,"mergeFile",
-d,g,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var k=this.sync.patchRealtime(t,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==k||mxUtils.isEmptyObject(k)||t.push(k)}this.patch(t,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(x);try{var m=this.getCurrentUser(),u=null!=m?
-m.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),u,x)}catch(A){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(x){null!=f&&f(x)}};
+d,g,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var k=this.sync.patchRealtime(t,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==k||mxUtils.isEmptyObject(k)||t.push(k)}this.patch(t,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(x);try{var n=this.getCurrentUser(),u=null!=n?
+n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),u,x)}catch(A){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(x){null!=f&&f(x)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,f,c,l,p,v,t){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var E=this.getCurrentUser(),H=null!=E?E.id:"unknown",B=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",d=JSON.stringify(e).length,g=null;if(null!=e&&1E3>d){b=[];for(f=0;f<e.length;f++)b.push(this.ui.anonymizePatch(e[f]));g=JSON.stringify(b);g=null!=g&&1E3>
-g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(k){try{var m=null!=g?"report":"error",u=this.ui.getHashValueForPages(k.getShadowPages()),x="unknown",A="unknown",I="unknown";try{var F=null!=k.initialData&&0<k.initialData.length?mxUtils.parseXml(k.initialData).documentElement:null;null!=F&&(null!=F.getAttribute("version")&&(x=F.getAttribute("version")),null!=F.getAttribute("agent")&&(A=F.getAttribute("agent")),null!=F.getAttribute("type")&&(I=F.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
-m+" in "+l,null,this.getMode()+"."+B,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=v?"-current_"+v:"")+(null!=t?"-rev_"+this.ui.hashValue(t):"")+(null!=u?"-latest_"+u:"")+"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId())+("-latestVersion_"+x)+("-latestAgent_"+A)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+B,action:l,label:"user_"+
+g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(k){try{var n=null!=g?"report":"error",u=this.ui.getHashValueForPages(k.getShadowPages()),x="unknown",A="unknown",I="unknown";try{var G=null!=k.initialData&&0<k.initialData.length?mxUtils.parseXml(k.initialData).documentElement:null;null!=G&&(null!=G.getAttribute("version")&&(x=G.getAttribute("version")),null!=G.getAttribute("agent")&&(A=G.getAttribute("agent")),null!=G.getAttribute("type")&&(I=G.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
+n+" in "+l,null,this.getMode()+"."+B,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=v?"-current_"+v:"")+(null!=t?"-rev_"+this.ui.hashValue(t):"")+(null!=u?"-latest_"+u:"")+"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId())+("-latestVersion_"+x)+("-latestAgent_"+A)+("-latestType_"+I));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+B,action:l,label:"user_"+
H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(k){}};
DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),v=this.getCurrentUser(),t=null!=v?this.ui.hashValue(v.id):"unknown",E=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),B=H.lastIndexOf(".");v="xml";0<B&&(v=H.substring(B));var d=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+v+")\nUser="+t+E+"\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:
@@ -12201,7 +12199,7 @@ DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var
[f]),this.ui.restoreViewState(v,p,l),this.setDescriptor(t.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var E=this.ui.getCurrentFile();null!=E&&(E.stats=this.stats,E.patch([f]),E.fileChanged());this.ui.restoreViewState(v,p,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(t){null!=e&&e(t)}};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,p=l.history.slice(),v=l.indexOfNextAdd,t=this.ui.editor.graph;t.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=t.foldingEnabled,B=t.mathEnabled,d=t.cellRenderer.redraw;t.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());d.apply(this,arguments)};t.model.beginUpdate();
-try{if(f){for(var g=this.ui.pages.slice(),k=this.ui.currentPage,m=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),u=0;u<m.length;u++){var x=mxUtils.indexOf(this.ui.pages,m[u]);0>x?this.ui.insertPage(m[u],Math.min(u,this.ui.pages.length)):this.ui.movePage(x,u)}for(u=0;u<g.length;u++)0>mxUtils.indexOf(m,g[u])&&this.ui.removePage(g[u]);0<=mxUtils.indexOf(this.ui.pages,k)&&this.ui.selectPage(k,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&
+try{if(f){for(var g=this.ui.pages.slice(),k=this.ui.currentPage,n=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),u=0;u<n.length;u++){var x=mxUtils.indexOf(this.ui.pages,n[u]);0>x?this.ui.insertPage(n[u],Math.min(u,this.ui.pages.length)):this.ui.movePage(x,u)}for(u=0;u<g.length;u++)0>mxUtils.indexOf(n,g[u])&&this.ui.removePage(g[u]);0<=mxUtils.indexOf(this.ui.pages,k)&&this.ui.selectPage(k,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&
this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);t.checkDefaultParent()}finally{t.container.style.visibility="";t.model.endUpdate();t.cellRenderer.redraw=d;this.changeListenerEnabled=E;f||(l.history=p,l.indexOfNextAdd=v,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)B!=t.mathEnabled?(this.ui.editor.updateGraphComponents(),t.refresh()):(H!=t.foldingEnabled?
t.view.revalidate():t.view.validate(),t.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};
DrawioFile.prototype.save=function(b,e,f,c,l,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});
@@ -12263,7 +12261,7 @@ DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.proto
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,f,c,l){this.saveAs(this.title,e,f,c,l)};LocalFile.prototype.saveAs=function(b,e,f,c,l){this.saveFile(b,!1,e,f,null,c,l)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
LocalFile.prototype.saveFile=function(b,e,f,c,l,p,v){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),B=mxUtils.bind(this,function(d){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var g=mxUtils.bind(this,function(m){this.savingFile=!1;null!=c&&c({error:m})});this.saveDraft(E);this.fileHandle.createWritable().then(mxUtils.bind(this,function(m){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[u],"conflict",this.desc.lastModified!=u.lastModified);v||this.desc.lastModified==u.lastModified?m.write(t?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){m.close().then(mxUtils.bind(this,
+!0;var g=mxUtils.bind(this,function(n){this.savingFile=!1;null!=c&&c({error:n})});this.saveDraft(E);this.fileHandle.createWritable().then(mxUtils.bind(this,function(n){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[u],"conflict",this.desc.lastModified!=u.lastModified);v||this.desc.lastModified==u.lastModified?n.write(t?this.ui.base64ToBlob(d,"image/png"):d).then(mxUtils.bind(this,function(){n.close().then(mxUtils.bind(this,
function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var A=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(E,A,H,g);this.removeDraft()}catch(I){g(I)}}),g)}),g)}),g):(this.inConflictState=!0,g())}),mxUtils.bind(this,function(u){this.invalidFileHandle=!0;g(u)}))}),g)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(d,b,t?"image/png":"text/xml",t);else if(d.length<MAX_REQUEST_SIZE){var k=b.lastIndexOf(".");k=0<k?b.substring(k+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+k+"&xml="+encodeURIComponent(d)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}));H()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){B(d)}),c,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):B(E)};
LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.etag=this.getEtag(e)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
@@ -12284,11 +12282,11 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(l){var p=[];
StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(d,g,k,m,u,x){function A(){mxEvent.addListener(I,"click",null!=x?x:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()}),function(U){b.spinner.stop();b.handleError(U)}):
-(b.setMode(k,!0),e())})}t++;++v>f&&(mxUtils.br(E),v=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",g);var F=document.createElement("div");F.style.textOverflow=
-"ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,g);I.appendChild(F);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else F.style.paddingTop="5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
-"6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=u)for(d=0;d<u.length;d++)mxUtils.br(F),mxUtils.write(F,u[d]);if(null!=m&&null==b[m]){C.style.visibility="hidden";mxUtils.setOpacity(F,10);var P=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});P.spin(I);var R=window.setTimeout(function(){null==b[m]&&(P.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(U,O){null!=b[m]&&O.getProperty("client")==b[m]&&(window.clearTimeout(R),mxUtils.setOpacity(F,100),C.style.visibility="",P.stop(),A(),"drive"==m&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else A();E.appendChild(I)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var p=document.createElement("div");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";
+var StorageDialog=function(b,e,f){function c(d,g,k,n,u,x){function A(){mxEvent.addListener(I,"click",null!=x?x:function(){k==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()})):k==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(k,!0);e()}),function(U){b.spinner.stop();b.handleError(U)}):
+(b.setMode(k,!0),e())})}t++;++v>f&&(mxUtils.br(E),v=1);var I=document.createElement("a");I.style.overflow="hidden";I.style.display="inline-block";I.className="geBaseButton";I.style.boxSizing="border-box";I.style.fontSize="11px";I.style.position="relative";I.style.margin="4px";I.style.marginTop="8px";I.style.marginBottom="0px";I.style.padding="8px 10px 8px 10px";I.style.width="88px";I.style.height="100px";I.style.whiteSpace="nowrap";I.setAttribute("title",g);var G=document.createElement("div");G.style.textOverflow=
+"ellipsis";G.style.overflow="hidden";G.style.position="absolute";G.style.bottom="8px";G.style.left="0px";G.style.right="0px";mxUtils.write(G,g);I.appendChild(G);if(null!=d){var C=document.createElement("img");C.setAttribute("src",d);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";I.appendChild(C)}else G.style.paddingTop="5px",G.style.whiteSpace="normal",mxClient.IS_IOS?(I.style.padding="0px 10px 20px 10px",I.style.top=
+"6px"):mxClient.IS_FF&&(G.style.paddingTop="0px",G.style.marginTop="-2px");if(null!=u)for(d=0;d<u.length;d++)mxUtils.br(G),mxUtils.write(G,u[d]);if(null!=n&&null==b[n]){C.style.visibility="hidden";mxUtils.setOpacity(G,10);var P=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});P.spin(I);var R=window.setTimeout(function(){null==b[n]&&(P.stop(),I.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(U,N){null!=b[n]&&N.getProperty("client")==b[n]&&(window.clearTimeout(R),mxUtils.setOpacity(G,100),C.style.visibility="",P.stop(),A(),"drive"==n&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else A();E.appendChild(I)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var p=document.createElement("div");p.style.border="1px solid #d3d3d3";p.style.borderWidth="1px 0px 1px 0px";
p.style.padding="10px 0px 20px 0px";var v=0,t=0,E=document.createElement("div");E.style.paddingTop="2px";p.appendChild(E);var H=document.createElement("p"),B=document.createElement("p");B.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(B,mxResources.get("saveDiagramsTo")+":");l.appendChild(B);l.appendChild(p);v=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");p=document.createElement("span");p.style.position="absolute";p.style.cursor="pointer";p.style.bottom="27px";p.style.color="gray";p.style.userSelect="none";p.style.textAlign="center";p.style.left="50%";mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)");mxUtils.write(p,mxResources.get("decideLater"));
@@ -12300,72 +12298,72 @@ p.className="geBigButton";p.style.marginBottom="8px";p.style.fontSize="18px";p.s
"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);B.style.textAlign="left";B.appendChild(c);E.appendChild(H);E.appendChild(B);t.appendChild(E);v.appendChild(t);e.appendChild(v);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,
mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(p,mxResources.get("createNewDiagram"));mxEvent.addListener(p,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(p);mxUtils.br(l);p=document.createElement("button");p.className="geBigButton";p.style.marginBottom="22px";p.style.fontSize="18px";p.style.padding="10px";p.style.width="340px";mxUtils.write(p,
mxResources.get("openExistingDiagram"));mxEvent.addListener(p,"click",function(){b.actions.get("open").funct()});l.appendChild(p);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&
-mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(k){p.style.marginBottom="24px";var m=document.createElement("a");m.style.display="inline-block";m.style.color="gray";m.style.cursor="pointer";m.style.marginTop="6px";mxUtils.write(m,mxResources.get("signOut"));p.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(m,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){k()})});l.appendChild(m)},b.mode==App.MODE_GOOGLE&&
+mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(k){p.style.marginBottom="24px";var n=document.createElement("a");n.style.display="inline-block";n.style.color="gray";n.style.cursor="pointer";n.style.marginTop="6px";mxUtils.write(n,mxResources.get("signOut"));p.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(n,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){k()})});l.appendChild(n)},b.mode==App.MODE_GOOGLE&&
null!=b.drive){var d=b.drive.getUsersList();if(0<d.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");p.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var g=document.createElement("select");g.style.marginLeft="4px";g.style.width="140px";for(f=0;f<d.length;f++)v=document.createElement("option"),mxUtils.write(v,d[f].displayName),v.value=f,g.appendChild(v),v=document.createElement("option"),v.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(v,"<"+d[f].email+">"),v.setAttribute("disabled","disabled"),g.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=d.length;g.appendChild(v);mxEvent.addListener(g,"change",function(){var k=g.value,m=d.length!=k;m&&b.drive.setUser(d[k]);b.drive.authorize(m,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(u){b.handleError(u,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(g)}else f(function(){b.drive.logout()})}else b.mode!=
+mxUtils.write(v,"<"+d[f].email+">"),v.setAttribute("disabled","disabled"),g.appendChild(v);v=document.createElement("option");mxUtils.write(v,mxResources.get("addAccount"));v.value=d.length;g.appendChild(v);mxEvent.addListener(g,"change",function(){var k=g.value,n=d.length!=k;n&&b.drive.setUser(d[k]);b.drive.authorize(n,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(u){b.handleError(u,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(g)}else f(function(){b.drive.logout()})}else b.mode!=
App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var k=document.createElement("form");k.setAttribute("method","post");k.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");k.setAttribute("target","_blank");document.body.appendChild(k);k.submit();k.parentNode.removeChild(k)}):b.mode==App.MODE_TRELLO&&
null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,p,v,t,E){v=null!=v?v:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=p?mxUtils.write(c,p):mxUtils.write(c,mxResources.get(5E5>
e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);p=document.createElement("div");p.style.position="absolute";p.style.top="30px";p.style.right="30px";p.style.color="gray";mxUtils.write(p,b.formatFileSize(e.length));c.appendChild(p);var B=document.createElement("textarea");B.setAttribute("autocomplete","off");B.setAttribute("autocorrect","off");B.setAttribute("autocapitalize","off");B.setAttribute("spellcheck","false");B.style.fontFamily="monospace";B.style.wordBreak="break-all";B.style.marginTop=
"10px";B.style.resize="none";B.style.height="150px";B.style.width="440px";B.style.border="1px solid gray";B.value=mxResources.get("updatingDocument");c.appendChild(B);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(B.value=e,B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null)):(B.setAttribute("readonly","true"),B.value=mxResources.get("tooLargeUseDownload"))},0)};p=document.createElement("div");p.style.position=
-"absolute";p.style.bottom="36px";p.style.right="32px";var d=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(d=mxUtils.button(null!=t?t:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var k=5E5>e.length?B.value:e;if(null!=l)l(k);else if(H)try{var m=b.openLink(k);null!=m&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=m&&null!=
-m.location.href&&m.location.href.substring(0,8)!=k.substring(0,8)&&(m.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),f||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var u=window.open();u=null!=u?u.document:null;null!=u?(u.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),
+"absolute";p.style.bottom="36px";p.style.right="32px";var d=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(d=mxUtils.button(null!=t?t:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var k=5E5>e.length?B.value:e;if(null!=l)l(k);else if(H)try{var n=b.openLink(k);null!=n&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=n&&null!=
+n.location.href&&n.location.href.substring(0,8)!=k.substring(0,8)&&(n.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(x){}}),f||500)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}else{var u=window.open();u=null!=u?u.document:null;null!=u?(u.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),
u.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),d.className="geBtn",p.appendChild(d));if(!H||7500<e.length)t=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=E?E:"embed.txt","txt",e,"text/plain")}),t.className="geBtn",p.appendChild(t);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var g=mxUtils.button("",function(){try{var k="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(B.value);
-b.openLink(k)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}});t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border","0");g.appendChild(t);g.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";p.appendChild(g)}7168>e.length&&(g=
-mxUtils.button("",function(){try{var k="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(B.value);b.openLink(k)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",g.appendChild(t),g.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
-" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",p.appendChild(g))}!b.isOffline()&&5E5>e.length&&(g=mxUtils.button("",function(){try{var k="mailto:?subject="+encodeURIComponent(E||b.defaultFilename)+"&body="+encodeURIComponent(B.value);b.openLink(k)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.className="geAdaptiveAsset",t.setAttribute("src",Editor.mailImage),t.setAttribute("width",
+b.openLink(k)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}});t=document.createElement("img");t.setAttribute("src",Editor.facebookImage);t.setAttribute("width","18");t.setAttribute("height","18");t.setAttribute("border","0");g.appendChild(t);g.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";p.appendChild(g)}7168>e.length&&(g=
+mxUtils.button("",function(){try{var k="https://twitter.com/intent/tweet?text="+encodeURIComponent(v)+"&url="+encodeURIComponent(B.value);b.openLink(k)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.setAttribute("src",Editor.tweetImage),t.setAttribute("width","18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",g.appendChild(t),g.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",p.appendChild(g))}!b.isOffline()&&5E5>e.length&&(g=mxUtils.button("",function(){try{var k="mailto:?subject="+encodeURIComponent(E||b.defaultFilename)+"&body="+encodeURIComponent(B.value);b.openLink(k)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}}),t=document.createElement("img"),t.className="geAdaptiveAsset",t.setAttribute("src",Editor.mailImage),t.setAttribute("width",
"18"),t.setAttribute("height","18"),t.setAttribute("border","0"),t.style.marginBottom="5px",g.appendChild(t),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",p.appendChild(g));t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});p.appendChild(t);g=mxUtils.button(mxResources.get("copy"),function(){B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?t.className="geBtn gePrimaryBtn":(p.appendChild(g),g.className="geBtn gePrimaryBtn",t.className="geBtn"):null!=d&&(p.appendChild(d),t.className="geBtn",d.className="geBtn gePrimaryBtn");c.appendChild(p);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=g.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(g.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<P.length&&(O+="&s="+P);""!=k.value&&"0"!=k.value&&(O+="&border="+k.value);""!=d.value&&(O+="&height="+d.value);O+="&pan="+(m.checked?"1":"0");O+="&zoom="+(u.checked?"1":"0");O+="&fit="+(F.checked?"1":"0");
-O+="&resize="+(I.checked?"1":"0");O+="&x0="+Number(B.value);O+="&y0="+E;l.mathEnabled&&(O+="&math=1");A.checked?O+="&edit=_blank":x.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=O}else R.constructor==DriveFile||R.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=g.value?O+=encodeURIComponent(mxUtils.htmlEntities(g.value))+"&type=3":(O+=R.getHash().substring(1),O=R.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=
-U&&(O+="&title="+encodeURIComponent(U)),""!=d.value&&(U=parseInt(d.value)+parseInt(B.value),O+="&height="+U),H.value=O):H.value=""}var c=document.createElement("div"),l=b.editor.graph,p=l.getGraphBounds(),v=l.view.scale,t=Math.floor(p.x/v-l.view.translate.x),E=Math.floor(p.y/v-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";
+var GoogleSitesDialog=function(b,e){function f(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=g.value){var N="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(g.value));null!=U&&(N+="&title="+encodeURIComponent(U));0<P.length&&(N+="&s="+P);""!=k.value&&"0"!=k.value&&(N+="&border="+k.value);""!=d.value&&(N+="&height="+d.value);N+="&pan="+(n.checked?"1":"0");N+="&zoom="+(u.checked?"1":"0");N+="&fit="+(G.checked?"1":"0");
+N+="&resize="+(I.checked?"1":"0");N+="&x0="+Number(B.value);N+="&y0="+E;l.mathEnabled&&(N+="&math=1");A.checked?N+="&edit=_blank":x.checked&&(N+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=N}else R.constructor==DriveFile||R.constructor==DropboxFile?(N="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=g.value?N+=encodeURIComponent(mxUtils.htmlEntities(g.value))+"&type=3":(N+=R.getHash().substring(1),N=R.constructor==DropboxFile?N+"&type=2":N+"&type=1"),null!=
+U&&(N+="&title="+encodeURIComponent(U)),""!=d.value&&(U=parseInt(d.value)+parseInt(B.value),N+="&height="+U),H.value=N):H.value=""}var c=document.createElement("div"),l=b.editor.graph,p=l.getGraphBounds(),v=l.view.scale,t=Math.floor(p.x/v-l.view.translate.x),E=Math.floor(p.y/v-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";
c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","4");B.style.marginRight="16px";B.style.marginLeft="4px";B.value=t;c.appendChild(B);mxUtils.write(c,mxResources.get("height")+":");var d=document.createElement("input");d.setAttribute("type","text");
d.setAttribute("size","4");d.style.marginLeft="4px";d.value=Math.ceil(p.height/v);c.appendChild(d);mxUtils.br(c);p=document.createElement("hr");p.setAttribute("size","1");p.style.marginBottom="16px";p.style.marginTop="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","28");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";g.value=e||"";c.appendChild(g);
-mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","3");k.style.marginBottom="8px";k.style.marginLeft="4px";k.value="0";c.appendChild(k);mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="16px";c.appendChild(m);mxUtils.write(c,mxResources.get("pan")+" ");var u=document.createElement("input");
+mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","3");k.style.marginBottom="8px";k.style.marginLeft="4px";k.value="0";c.appendChild(k);mxUtils.br(c);var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;n.style.marginLeft="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("pan")+" ");var u=document.createElement("input");
u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="8px";c.appendChild(u);mxUtils.write(c,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);c.appendChild(x);mxUtils.write(c,mxResources.get("edit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";c.appendChild(A);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("checked","checked");I.defaultChecked=!0;I.style.marginLeft="16px";c.appendChild(I);mxUtils.write(c,mxResources.get("resize")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft="8px";c.appendChild(F);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var P=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(m,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(F,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(d,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);f();
+mxResources.get("asNew")+" ");mxUtils.br(c);var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("checked","checked");I.defaultChecked=!0;I.style.marginLeft="16px";c.appendChild(I);mxUtils.write(c,mxResources.get("resize")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft="8px";c.appendChild(G);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var P=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(n,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(I,"change",f);mxEvent.addListener(G,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(d,"change",f);mxEvent.addListener(B,"change",f);mxEvent.addListener(k,"change",f);mxEvent.addListener(g,"change",f);f();
mxEvent.addListener(H,"click",function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";p=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});p.className="geBtn gePrimaryBtn";e.appendChild(p);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.boxSizing="border-box";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.setCellsCloneable(!0);p.setPanning(!0);p.setAllowDanglingEdges(!1);p.connectionHandler.select=!1;p.view.setTranslate(20,20);p.border=20;p.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&
-null!=p.view.getDrawPane()&&(l=p.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var v="curved=1;";p.cellRenderer.installCellOverlayListeners=function(m,u,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(A){u.fireEvent(new mxEventObject("pointerdown","event",A,"state",m))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(A){u.fireEvent(new mxEventObject("pointerdown",
-"event",A,"state",m))})};p.getAllConnectionConstraints=function(){return null};p.connectionHandler.marker.highlight.keepOnTop=!1;p.connectionHandler.createEdgeState=function(m){m=p.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,m,this.graph.getCellStyle(m))};var t=p.getDefaultParent(),E=mxUtils.bind(this,function(m){var u=new mxCellOverlay(this.connectImage,"Add outgoing");u.cursor="hand";u.addListener(mxEvent.CLICK,function(x,A){p.connectionHandler.reset();p.clearSelection();
-var I=p.getCellGeometry(m),F;d(function(){F=p.insertVertex(t,null,"Entry",I.x,I.y,80,30,"rounded=1;");E(F);p.view.refresh(F);p.insertEdge(t,null,"",m,F,v)},function(){p.scrollCellToVisible(F)})});u.addListener("pointerdown",function(x,A){x=A.getProperty("event");A=A.getProperty("state");p.popupMenuHandler.hideMenu();p.stopEditing(!1);var I=mxUtils.convertPoint(p.container,mxEvent.getClientX(x),mxEvent.getClientY(x));p.connectionHandler.start(A,I.x,I.y);p.isMouseDown=!0;p.isMouseTrigger=mxEvent.isMouseEvent(x);
-mxEvent.consume(x)});p.addCellOverlay(m,u)});p.getModel().beginUpdate();try{var H=p.insertVertex(t,null,"Start",0,0,80,30,"ellipse");E(H)}finally{p.getModel().endUpdate()}if("horizontalTree"==f){var B=new mxCompactTreeLayout(p);B.edgeRouting=!1;B.levelDistance=30;B.sortEdges=!0;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(B=new mxCompactTreeLayout(p,!1),B.edgeRouting=!1,B.levelDistance=30,B.sortEdges=!0,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(B=new mxRadialTreeLayout(p,
-!1),B.edgeRouting=!1,B.levelDistance=80):"verticalFlow"==f?B=new mxHierarchicalLayout(p,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?B=new mxHierarchicalLayout(p,mxConstants.DIRECTION_WEST):"circle"==f?B=new mxCircleLayout(p):(B=new mxFastOrganicLayout(p,!1),B.forceConstant=80);if(null!=B){var d=function(m,u){p.getModel().beginUpdate();try{null!=m&&m(),B.execute(p.getDefaultParent(),H)}catch(x){throw x;}finally{m=new mxMorphing(p),m.addListener(mxEvent.DONE,mxUtils.bind(this,function(){p.getModel().endUpdate();
-null!=u&&u()})),m.startAnimation()}},g=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(m,u,x,A,I){g.apply(this,arguments);d()};p.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};p.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var k=mxUtils.button(mxResources.get("insert"),
-function(m){p.clearCellOverlays();var u=p.getModel().getChildren(p.getDefaultParent());m=mxEvent.isAltDown(m)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(p.getBoundingBoxFromGeometry(u,!0));u=b.editor.graph.importCells(u,m.x,m.y);m=b.editor.graph.view;var x=m.getBounds(u);null!=x&&(x.x-=m.translate.x,x.y-=m.translate.y,b.editor.graph.scrollRectToVisible(x),b.editor.graph.setSelectionCells(u));b.hideDialog()});c.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+null!=p.view.getDrawPane()&&(l=p.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var v="curved=1;";p.cellRenderer.installCellOverlayListeners=function(n,u,x){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(x.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(A){u.fireEvent(new mxEventObject("pointerdown","event",A,"state",n))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(x.node,"touchstart",function(A){u.fireEvent(new mxEventObject("pointerdown",
+"event",A,"state",n))})};p.getAllConnectionConstraints=function(){return null};p.connectionHandler.marker.highlight.keepOnTop=!1;p.connectionHandler.createEdgeState=function(n){n=p.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var t=p.getDefaultParent(),E=mxUtils.bind(this,function(n){var u=new mxCellOverlay(this.connectImage,"Add outgoing");u.cursor="hand";u.addListener(mxEvent.CLICK,function(x,A){p.connectionHandler.reset();p.clearSelection();
+var I=p.getCellGeometry(n),G;d(function(){G=p.insertVertex(t,null,"Entry",I.x,I.y,80,30,"rounded=1;");E(G);p.view.refresh(G);p.insertEdge(t,null,"",n,G,v)},function(){p.scrollCellToVisible(G)})});u.addListener("pointerdown",function(x,A){x=A.getProperty("event");A=A.getProperty("state");p.popupMenuHandler.hideMenu();p.stopEditing(!1);var I=mxUtils.convertPoint(p.container,mxEvent.getClientX(x),mxEvent.getClientY(x));p.connectionHandler.start(A,I.x,I.y);p.isMouseDown=!0;p.isMouseTrigger=mxEvent.isMouseEvent(x);
+mxEvent.consume(x)});p.addCellOverlay(n,u)});p.getModel().beginUpdate();try{var H=p.insertVertex(t,null,"Start",0,0,80,30,"ellipse");E(H)}finally{p.getModel().endUpdate()}if("horizontalTree"==f){var B=new mxCompactTreeLayout(p);B.edgeRouting=!1;B.levelDistance=30;B.sortEdges=!0;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(B=new mxCompactTreeLayout(p,!1),B.edgeRouting=!1,B.levelDistance=30,B.sortEdges=!0,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(B=new mxRadialTreeLayout(p,
+!1),B.edgeRouting=!1,B.levelDistance=80):"verticalFlow"==f?B=new mxHierarchicalLayout(p,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?B=new mxHierarchicalLayout(p,mxConstants.DIRECTION_WEST):"circle"==f?B=new mxCircleLayout(p):(B=new mxFastOrganicLayout(p,!1),B.forceConstant=80);if(null!=B){var d=function(n,u){p.getModel().beginUpdate();try{null!=n&&n(),B.execute(p.getDefaultParent(),H)}catch(x){throw x;}finally{n=new mxMorphing(p),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){p.getModel().endUpdate();
+null!=u&&u()})),n.startAnimation()}},g=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,u,x,A,I){g.apply(this,arguments);d()};p.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);d()};p.connectionHandler.addListener(mxEvent.CONNECT,function(){d()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var k=mxUtils.button(mxResources.get("insert"),
+function(n){p.clearCellOverlays();var u=p.getModel().getChildren(p.getDefaultParent());n=mxEvent.isAltDown(n)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(p.getBoundingBoxFromGeometry(u,!0));u=b.editor.graph.importCells(u,n.x,n.y);n=b.editor.graph.view;var x=n.getBounds(u);null!=x&&(x.x-=n.translate.x,x.y-=n.translate.y,b.editor.graph.scrollRectToVisible(x),b.editor.graph.setSelectionCells(u));b.hideDialog()});c.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
c.appendChild(l);this.graph=p};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,
26);
var BackgroundImageDialog=function(b,e,f,c,l){function p(){null==q||q==mxConstants.NONE?(V.style.display="none",U.checked=!1):(V.style.backgroundColor=q,V.style.display="",U.checked=!0)}var v=b.editor.graph,t=document.createElement("div");t.style.whiteSpace="nowrap";var E=document.createElement("h2");mxUtils.write(E,mxResources.get("background"));E.style.marginTop="0px";t.appendChild(E);var H=null!=f&&null!=f.originalSrc;E=!1;var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value",
"url");B.setAttribute("type","radio");B.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=H||null==f?"":f.src;var k=document.createElement("select");k.style.width="360px";
-if(null!=b.pages)for(var m=0;m<b.pages.length;m++){var u=document.createElement("option");mxUtils.write(u,b.pages[m].getName()||mxResources.get("pageWithNumber",[m+1]));u.setAttribute("value","data:page/id,"+b.pages[m].getId());b.pages[m]==b.currentPage&&u.setAttribute("disabled","disabled");null!=f&&f.originalSrc==u.getAttribute("value")&&(u.setAttribute("selected","selected"),E=!0);k.appendChild(u)}H||null!=b.pages&&1!=b.pages.length||(B.style.display="none",d.style.display="none",k.style.display=
-"none");var x=document.createElement("option"),A=!1,I=!1,F=function(D,J){A||null!=D&&I||(d.checked?null!=J&&J(x.selected?null:k.value):""==g.value||b.isOffline()?(P.value="",R.value="",null!=J&&J("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(L){P.value=L.width;R.value=L.height;null!=J&&J(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));P.value="";R.value="";null!=J&&J(null)})))},C=mxUtils.bind(this,function(D){b.importFiles(D,
-0,0,b.maxBackgroundSize,function(J,L,K,n,z,G){g.value=J;F();g.focus()},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var L=0;L<J.length;L++)J[L]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){B.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");B.setAttribute("checked","checked");
+if(null!=b.pages)for(var n=0;n<b.pages.length;n++){var u=document.createElement("option");mxUtils.write(u,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1]));u.setAttribute("value","data:page/id,"+b.pages[n].getId());b.pages[n]==b.currentPage&&u.setAttribute("disabled","disabled");null!=f&&f.originalSrc==u.getAttribute("value")&&(u.setAttribute("selected","selected"),E=!0);k.appendChild(u)}H||null!=b.pages&&1!=b.pages.length||(B.style.display="none",d.style.display="none",k.style.display=
+"none");var x=document.createElement("option"),A=!1,I=!1,G=function(D,J){A||null!=D&&I||(d.checked?null!=J&&J(x.selected?null:k.value):""==g.value||b.isOffline()?(P.value="",R.value="",null!=J&&J("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(L){P.value=L.width;R.value=L.height;null!=J&&J(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));P.value="";R.value="";null!=J&&J(null)})))},C=mxUtils.bind(this,function(D){b.importFiles(D,
+0,0,b.maxBackgroundSize,function(J,L,K,m,z,F){g.value=J;G();g.focus()},function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var L=0;L<J.length;L++)J[L]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){B.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");B.setAttribute("checked","checked");
B.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=t.parentNode,J=null;mxEvent.addListener(D,"dragleave",function(L){null!=J&&(J.parentNode.removeChild(J),J=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(L){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=b.highlightElement(D));L.stopPropagation();L.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(L){null!=
-J&&(J.parentNode.removeChild(J),J=null);if(0<L.dataTransfer.files.length)C(L.dataTransfer.files);else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var K=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)&&(g.value=decodeURIComponent(K),F())}L.stopPropagation();L.preventDefault()}),!1)}};t.appendChild(B);t.appendChild(g);mxUtils.br(t);m=document.createElement("span");m.style.marginLeft="30px";mxUtils.write(m,mxResources.get("width")+":");t.appendChild(m);
-var P=document.createElement("input");P.setAttribute("type","text");P.style.width="60px";P.style.marginLeft="8px";P.style.marginRight="16px";P.value=null==f||H?"":f.width;t.appendChild(P);mxUtils.write(t,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;t.appendChild(R);mxUtils.br(t);mxUtils.br(t);mxEvent.addListener(g,"change",F);ImageDialog.filePicked=
-function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(g.value=D.url,F()));g.focus()};t.appendChild(d);t.appendChild(k);mxUtils.br(t);mxUtils.br(t);H?(d.setAttribute("checked","checked"),d.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!E&&d.checked&&(mxUtils.write(x,mxResources.get("pageNotFound")),x.setAttribute("disabled","disabled"),x.setAttribute("selected","selected"),x.setAttribute("value",
+J&&(J.parentNode.removeChild(J),J=null);if(0<L.dataTransfer.files.length)C(L.dataTransfer.files);else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var K=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)&&(g.value=decodeURIComponent(K),G())}L.stopPropagation();L.preventDefault()}),!1)}};t.appendChild(B);t.appendChild(g);mxUtils.br(t);n=document.createElement("span");n.style.marginLeft="30px";mxUtils.write(n,mxResources.get("width")+":");t.appendChild(n);
+var P=document.createElement("input");P.setAttribute("type","text");P.style.width="60px";P.style.marginLeft="8px";P.style.marginRight="16px";P.value=null==f||H?"":f.width;t.appendChild(P);mxUtils.write(t,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;t.appendChild(R);mxUtils.br(t);mxUtils.br(t);mxEvent.addListener(g,"change",G);ImageDialog.filePicked=
+function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(g.value=D.url,G()));g.focus()};t.appendChild(d);t.appendChild(k);mxUtils.br(t);mxUtils.br(t);H?(d.setAttribute("checked","checked"),d.checked=!0):(B.setAttribute("checked","checked"),B.checked=!0);!E&&d.checked&&(mxUtils.write(x,mxResources.get("pageNotFound")),x.setAttribute("disabled","disabled"),x.setAttribute("selected","selected"),x.setAttribute("value",
"pageNotFound"),k.appendChild(x),mxEvent.addListener(k,"change",function(){null==x.parentNode||x.selected||x.parentNode.removeChild(x)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=c!=mxConstants.NONE&&null!=c;U.checked=U.defaultChecked;
-f.appendChild(U);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=v.shadowVisible;O.checked=O.defaultChecked;l.appendChild(O);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(D){mxEvent.getSource(D)!=O&&(O.checked=!O.checked)});
+f.appendChild(U);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.margin="0px 10px 0px 30px";N.style.verticalAlign="bottom";N.defaultChecked=v.shadowVisible;N.checked=N.defaultChecked;l.appendChild(N);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||N.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(D){mxEvent.getSource(D)!=N&&(N.checked=!N.checked)});
var V=document.createElement("button");V.style.width="36px";V.style.height="18px";V.style.cursor="pointer";V.style.marginLeft="10px";V.style.backgroundPosition="center center";V.style.backgroundRepeat="no-repeat";V.style.verticalAlign="bottom";V.className="geColorBtn";var q=c;p();mxEvent.addListener(f,"click",function(D){mxEvent.getSource(D)!=U&&(U.checked=!U.checked);q=U.checked?"#ffffff":null;p()});mxEvent.addListener(V,"click",function(D){b.pickColor(q||"none",function(J){q=J;p()});mxEvent.consume(D)});
f.appendChild(V);t.appendChild(f);t.appendChild(l);mxUtils.br(t);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";v=mxUtils.button(mxResources.get("cancel"),function(){A=!0;b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&c.appendChild(v);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";P.value="";R.value="";B.checked=!0;q=mxConstants.NONE;p();A=!1});mxEvent.addGestureListeners(l,function(){A=!0});l.className="geBtn";l.width="100";c.appendChild(l);
-if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(D){null!=y.files&&(C(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";t.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();F(null,function(D){e(""!=D&&null!=D?new mxImage(D,
-P.value,R.value):null,null==D,q,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(v);t.appendChild(c);this.container=t},ParseDialog=function(b,e,f){function c(k,m,u){var x=k.split("\n");if("plantUmlPng"==m||"plantUmlSvg"==m||"plantUmlTxt"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(K,n,z,G,M){p=mxEvent.isAltDown(u)?
-p:I.getCenterInsertPoint(new mxRectangle(0,0,G,M));var N=null;I.getModel().beginUpdate();try{N="txt"==n?b.insertAsPreText(z,p.x,p.y):I.insertVertex(null,null,null,p.x,p.y,G,M,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),I.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:K,format:n},null,2))}finally{I.getModel().endUpdate()}null!=N&&(I.setSelectionCell(N),I.scrollCellToVisible(N))},I=b.editor.graph,F="plantUmlTxt"==m?"txt":"plantUmlPng"==
-m?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==k&&"svg"==F?window.setTimeout(function(){b.spinner.stop();A(k,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(k,F,function(K,n,z){b.spinner.stop();A(k,F,K,n,z)},function(K){b.handleError(K)})}}else if("mermaid"==m||"mermaid2drawio"==m){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<x.length&&(0==x[C].trim().length||"%%"==x[C].substring(0,2));)C++;if("---"==x[C].trim()){do C++;while(C<x.length&&"---"!=x[C].trim());C++}C=x[C].trim().toLowerCase();x=C.indexOf(" ");C=C.substring(0,0<x?x:C.length);var P="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==m&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;P&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(K){b.spinner.stop();I.setSelectionCells(b.importXml(K,Math.max(p.x,20),Math.max(p.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(k,null,function(K,n,z){if(!P){p=
-mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(new mxRectangle(0,0,n,z));b.spinner.stop();var G=null;I.getModel().beginUpdate();try{G=I.insertVertex(null,null,null,p.x,p.y,n,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+K+";"),I.setAttributeForCell(G,"mermaidData",JSON.stringify({data:k},null,2))}finally{I.getModel().endUpdate()}null!=G&&(I.setSelectionCell(G),I.scrollCellToVisible(G))}},function(K){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(K)})}}else if("table"==
-m){m=null;var R=[],U=0,O={};for(C=0;C<x.length;C++){var V=mxUtils.trim(x[C]);if("primary key"==V.substring(0,11).toLowerCase()){var q=V.match(/\((.+)\)/);q&&q[1]&&(O[q[1]]=!0);x.splice(C,1)}else 0<V.toLowerCase().indexOf("primary key")&&(O[V.split(" ")[0]]=!0,x[C]=mxUtils.trim(V.replace(/primary key/i,"")))}for(C=0;C<x.length;C++)if(V=mxUtils.trim(x[C]),"create table"==V.substring(0,12).toLowerCase())V=mxUtils.trim(V.substring(12)),"("==V.charAt(V.length-1)&&(V=mxUtils.trim(V.substring(0,V.length-
-1))),m=new mxCell(V,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),m.vertex=!0,R.push(m),V=b.editor.graph.getPreferredSizeForCell(y),null!=V&&(m.geometry.width=V.width+10);else if(null!=m&&")"==V.charAt(0))U+=m.geometry.width+40,m=null;else if("("!=V&&null!=m){V=V.substring(0,","==V.charAt(V.length-1)?V.length-1:V.length);q=O[V.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,
+if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(D){null!=y.files&&(C(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";t.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();G(null,function(D){e(""!=D&&null!=D?new mxImage(D,
+P.value,R.value):null,null==D,q,!mxClient.IS_SVG||mxClient.IS_SF?null:N.checked)})});mxEvent.addGestureListeners(applyBtn,function(){I=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(v);t.appendChild(c);this.container=t},ParseDialog=function(b,e,f){function c(k,n,u){var x=k.split("\n");if("plantUmlPng"==n||"plantUmlSvg"==n||"plantUmlTxt"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var A=function(K,m,z,F,M){p=mxEvent.isAltDown(u)?
+p:I.getCenterInsertPoint(new mxRectangle(0,0,F,M));var O=null;I.getModel().beginUpdate();try{O="txt"==m?b.insertAsPreText(z,p.x,p.y):I.insertVertex(null,null,null,p.x,p.y,F,M,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),I.setAttributeForCell(O,"plantUmlData",JSON.stringify({data:K,format:m},null,2))}finally{I.getModel().endUpdate()}null!=O&&(I.setSelectionCell(O),I.scrollCellToVisible(O))},I=b.editor.graph,G="plantUmlTxt"==n?"txt":"plantUmlPng"==
+n?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==k&&"svg"==G?window.setTimeout(function(){b.spinner.stop();A(k,G,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(k,G,function(K,m,z){b.spinner.stop();A(k,G,K,m,z)},function(K){b.handleError(K)})}}else if("mermaid"==n||"mermaid2drawio"==n){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<x.length&&(0==x[C].trim().length||"%%"==x[C].substring(0,2));)C++;if("---"==x[C].trim()){do C++;while(C<x.length&&"---"!=x[C].trim());C++}C=x[C].trim().toLowerCase();x=C.indexOf(" ");C=C.substring(0,0<x?x:C.length);var P="undefined"!==typeof mxMermaidToDrawio&&
+"mermaid2drawio"==n&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);I=b.editor.graph;P&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(K){b.spinner.stop();I.setSelectionCells(b.importXml(K,Math.max(p.x,20),Math.max(p.y,20),!0,null,null,!0));I.scrollCellToVisible(I.getSelectionCell())}));b.generateMermaidImage(k,null,function(K,m,z){if(!P){p=
+mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var F=null;I.getModel().beginUpdate();try{F=I.insertVertex(null,null,null,p.x,p.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+K+";"),I.setAttributeForCell(F,"mermaidData",JSON.stringify({data:k},null,2))}finally{I.getModel().endUpdate()}null!=F&&(I.setSelectionCell(F),I.scrollCellToVisible(F))}},function(K){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(K)})}}else if("table"==
+n){n=null;var R=[],U=0,N={};for(C=0;C<x.length;C++){var V=mxUtils.trim(x[C]);if("primary key"==V.substring(0,11).toLowerCase()){var q=V.match(/\((.+)\)/);q&&q[1]&&(N[q[1]]=!0);x.splice(C,1)}else 0<V.toLowerCase().indexOf("primary key")&&(N[V.split(" ")[0]]=!0,x[C]=mxUtils.trim(V.replace(/primary key/i,"")))}for(C=0;C<x.length;C++)if(V=mxUtils.trim(x[C]),"create table"==V.substring(0,12).toLowerCase())V=mxUtils.trim(V.substring(12)),"("==V.charAt(V.length-1)&&(V=mxUtils.trim(V.substring(0,V.length-
+1))),n=new mxCell(V,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),n.vertex=!0,R.push(n),V=b.editor.graph.getPreferredSizeForCell(y),null!=V&&(n.geometry.width=V.width+10);else if(null!=n&&")"==V.charAt(0))U+=n.geometry.width+40,n=null;else if("("!=V&&null!=n){V=V.substring(0,","==V.charAt(V.length-1)?V.length-1:V.length);q=N[V.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,
0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var D=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));D.vertex=!0;y.insert(D);V=new mxCell(V,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));V.vertex=!0;y.insert(V);V=b.editor.graph.getPreferredSizeForCell(V);null!=V&&m.geometry.width<V.width+30&&(m.geometry.width=Math.min(320,Math.max(m.geometry.width,V.width+30)));m.insert(y,q?0:null);m.geometry.height+=30}0<R.length&&(I=b.editor.graph,p=mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,
-!0)),I.setSelectionCells(I.importCells(R,p.x,p.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==m){if(0<x.length){I=b.editor.graph;m=null;R=[];for(C=y=0;C<x.length;C++)";"!=x[C].charAt(0)&&(0==x[C].length?m=null:null==m?(m=new mxCell(x[C],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),m.vertex=!0,R.push(m),V=I.getPreferredSizeForCell(m),
-null!=V&&m.geometry.width<V.width+10&&(m.geometry.width=V.width+10),y+=m.geometry.width+40):"--"==x[C]?(V=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),V.vertex=!0,m.geometry.height+=V.geometry.height,m.insert(V)):0<x[C].length&&(U=new mxCell(x[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-U.vertex=!0,V=I.getPreferredSizeForCell(U),null!=V&&U.geometry.width<V.width&&(U.geometry.width=V.width),m.geometry.width=Math.max(m.geometry.width,U.geometry.width),m.geometry.height+=U.geometry.height,m.insert(U)));if(0<R.length){p=mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,!0));I.getModel().beginUpdate();try{R=I.importCells(R,p.x,p.y);V=[];for(C=0;C<R.length;C++)V.push(R[C]),V=V.concat(R[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",V))}finally{I.getModel().endUpdate()}I.setSelectionCells(R);
-I.scrollCellToVisible(I.getSelectionCell())}}}else{y=function(K){var n=J[K];null==n&&(n=new mxCell(K,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),n.vertex=!0,J[K]=n,R.push(n));return n};var J={};R=[];for(C=0;C<x.length;C++)if(";"!=x[C].charAt(0)){var L=x[C].split("->");2<=L.length&&(q=y(L[0]),D=y(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,L.geometry.relative=!0,q.insertEdge(L,!0),D.insertEdge(L,!1),R.push(L))}if(0<R.length){x=document.createElement("div");x.style.visibility=
-"hidden";document.body.appendChild(x);I=new Graph(x);I.getModel().beginUpdate();try{R=I.importCells(R);for(C=0;C<R.length;C++)I.getModel().isVertex(R[C])&&(V=I.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,V.width),R[C].geometry.height=Math.max(R[C].geometry.height,V.height));C=!0;"horizontalFlow"==m||"verticalFlow"==m?((new mxHierarchicalLayout(I,"horizontalFlow"==m?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),R),C=!1):"circle"==
-m?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(U=new mxFastOrganicLayout(I),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(I.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(I),O.spacing=30,O.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();V=[];b.editor.graph.getModel().beginUpdate();try{R=I.getModel().getChildren(I.getDefaultParent()),p=mxEvent.isAltDown(u)?p:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,!0)),V=b.editor.graph.importCells(R,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));V.vertex=!0;y.insert(V);V=b.editor.graph.getPreferredSizeForCell(V);null!=V&&n.geometry.width<V.width+30&&(n.geometry.width=Math.min(320,Math.max(n.geometry.width,V.width+30)));n.insert(y,q?0:null);n.geometry.height+=30}0<R.length&&(I=b.editor.graph,p=mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,
+!0)),I.setSelectionCells(I.importCells(R,p.x,p.y)),I.scrollCellToVisible(I.getSelectionCell()))}else if("list"==n){if(0<x.length){I=b.editor.graph;n=null;R=[];for(C=y=0;C<x.length;C++)";"!=x[C].charAt(0)&&(0==x[C].length?n=null:null==n?(n=new mxCell(x[C],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),n.vertex=!0,R.push(n),V=I.getPreferredSizeForCell(n),
+null!=V&&n.geometry.width<V.width+10&&(n.geometry.width=V.width+10),y+=n.geometry.width+40):"--"==x[C]?(V=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),V.vertex=!0,n.geometry.height+=V.geometry.height,n.insert(V)):0<x[C].length&&(U=new mxCell(x[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+U.vertex=!0,V=I.getPreferredSizeForCell(U),null!=V&&U.geometry.width<V.width&&(U.geometry.width=V.width),n.geometry.width=Math.max(n.geometry.width,U.geometry.width),n.geometry.height+=U.geometry.height,n.insert(U)));if(0<R.length){p=mxEvent.isAltDown(u)?p:I.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,!0));I.getModel().beginUpdate();try{R=I.importCells(R,p.x,p.y);V=[];for(C=0;C<R.length;C++)V.push(R[C]),V=V.concat(R[C].children);I.fireEvent(new mxEventObject("cellsInserted","cells",V))}finally{I.getModel().endUpdate()}I.setSelectionCells(R);
+I.scrollCellToVisible(I.getSelectionCell())}}}else{y=function(K){var m=J[K];null==m&&(m=new mxCell(K,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,J[K]=m,R.push(m));return m};var J={};R=[];for(C=0;C<x.length;C++)if(";"!=x[C].charAt(0)){var L=x[C].split("->");2<=L.length&&(q=y(L[0]),D=y(L[L.length-1]),L=new mxCell(2<L.length?L[1]:"",new mxGeometry),L.edge=!0,L.geometry.relative=!0,q.insertEdge(L,!0),D.insertEdge(L,!1),R.push(L))}if(0<R.length){x=document.createElement("div");x.style.visibility=
+"hidden";document.body.appendChild(x);I=new Graph(x);I.getModel().beginUpdate();try{R=I.importCells(R);for(C=0;C<R.length;C++)I.getModel().isVertex(R[C])&&(V=I.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,V.width),R[C].geometry.height=Math.max(R[C].geometry.height,V.height));C=!0;"horizontalFlow"==n||"verticalFlow"==n?((new mxHierarchicalLayout(I,"horizontalFlow"==n?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(I.getDefaultParent(),R),C=!1):"circle"==
+n?(new mxCircleLayout(I)).execute(I.getDefaultParent()):(U=new mxFastOrganicLayout(I),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(I.getDefaultParent()));C&&(N=new mxParallelEdgeLayout(I),N.spacing=30,N.execute(I.getDefaultParent()))}finally{I.getModel().endUpdate()}I.clearCellOverlays();V=[];b.editor.graph.getModel().beginUpdate();try{R=I.getModel().getChildren(I.getDefaultParent()),p=mxEvent.isAltDown(u)?p:b.editor.graph.getCenterInsertPoint(I.getBoundingBoxFromGeometry(R,!0)),V=b.editor.graph.importCells(R,
p.x,p.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",V))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(V);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());I.destroy();x.parentNode.removeChild(x)}}}function l(){return"list"==t.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==t.value||
"mermaid2drawio"==t.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==t.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==t.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==t.value||"plantUmlTxt"==t.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var p=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var v=document.createElement("textarea");v.style.boxSizing="border-box";v.style.resize=
@@ -12374,120 +12372,120 @@ E.setAttribute("value","table");mxUtils.write(E,mxResources.get("formatSql"));"f
"none";t.appendChild(E);E=document.createElement("option");E.setAttribute("value","diagram");mxUtils.write(E,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var B=document.createElement("option");B.setAttribute("value","horizontalFlow");mxUtils.write(B,mxResources.get("horizontalFlow"));var d=document.createElement("option");d.setAttribute("value","verticalFlow");mxUtils.write(d,mxResources.get("verticalFlow"));
"plantUml"!=f&&"mermaid"!=f&&(t.appendChild(E),t.appendChild(H),t.appendChild(B),t.appendChild(d));E=document.createElement("option");E.setAttribute("value","plantUmlSvg");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&E.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");B=document.createElement("option");B.setAttribute("value",
"plantUmlTxt");mxUtils.write(B,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(t.appendChild(E),t.appendChild(H),t.appendChild(B));var g=l();v.value=g;e.appendChild(v);this.init=function(){v.focus()};Graph.fileSupport&&(v.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),v.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=
-k.dataTransfer.files[0];var m=new FileReader;m.onload=function(u){v.value=u.target.result};m.readAsText(k)}},!1));e.appendChild(t);mxEvent.addListener(t,"change",function(){var k=l();if(0==v.value.length||v.value==g)g=k,v.value=g});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(E=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),E.className="geBtn",e.appendChild(E));E=mxUtils.button(mxResources.get("close"),
-function(){v.value==g?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});E.className="geBtn";b.editor.cancelFirst&&e.appendChild(E);H=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),c(v.value,t.value,k)}catch(m){b.handleError(m)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,l,p,v,t,E,H,B,d,g,k,m,u,x,A,I){function F(ka){null!=ka&&(la=Ea=ka?135:140);ka=
-!0;if(null!=Wa)for(;n<Wa.length&&(ka||0!=mxUtils.mod(n,30));){var qa=Wa[n++];qa=y(qa.url,qa.libs,qa.title,qa.tooltip?qa.tooltip:qa.title,qa.select,qa.imgUrl,qa.info,qa.onClick,qa.preview,qa.noImg,qa.clibs,qa.type);ka&&qa.click();ka=!1}}function C(ka,qa,ta,ra,pa,wa){if(null!=ka&&mxUtils.isAncestorNode(document.body,ra)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ha=new mxCodec(ka.ownerDocument),Fa=new mxGraphModel;Ha.decode(ka,Fa);b.sidebar.createTooltip(ra,
-Fa.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=pa?mxResources.get(pa):null,!0,new mxPoint(qa,ta),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=wa&&U(ra,null,null,wa,infoObj,clibs)},!0,!1)}}function P(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow=
-"visible";ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var qa=document.createElement("input");qa.setAttribute("type","text");qa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));qa.style.width="100%";qa.style.marginTop="6px";qa.style.marginBottom="4px";qa.style.boxSizing="border-box";ka.appendChild(qa);ka.init=function(){qa.focus()};mxUtils.br(ka);var ta=document.createElement("div");
-ta.style.top="86px";ta.style.left="2px";ta.style.right="2px";ta.style.bottom="2px";ta.style.position="absolute";ta.style.border="1px solid #424242";var ra=document.createElement("div");ra.style.boxSizing="border-box";ra.style.position="relative";ra.style.textAlign="center";ra.style.top="50%";mxUtils.write(ra,mxResources.get("blankDiagram"));ta.appendChild(ra);var pa=document.createElement("select");pa.className="geBtn";pa.style.maxWidth="160px";pa.style.marginLeft="0px";ra=document.createElement("option");
-mxUtils.write(ra,mxResources.get("diagramType"));ra.setAttribute("value","");pa.appendChild(ra);for(var wa=0;wa<EditorUi.mermaidDiagramTypes.length;wa++){ra=document.createElement("option");var Ha=EditorUi.mermaidDiagramTypes[wa],Fa=Ha;Ha==urlParams["smart-template-type"]&&ra.setAttribute("selected","selected");"erDiagram"==Fa&&(Fa="entityRelationshipDiagram");Fa=mxResources.get(Fa,null,Fa.charAt(0).toUpperCase()+Fa.substring(1).replace(/[A-Z]/g," $&"));ra.setAttribute("value",Ha);mxUtils.write(ra,
-Fa);pa.appendChild(ra)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=qa.value,Qa=pa.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+(""!=Qa?Qa:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Qa=""!=pa.value?" ("+mxUtils.trim(mxUtils.getTextContent(pa.options[pa.selectedIndex]))+")":"";var Xa="gantt"==pa.value||"pie"==pa.value||
-"timeline"==pa.value||"quadrantchart"==pa.value||"c4context"==pa.value,Na=qa.value+Qa;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Oa){Xa||(ya=fa=Oa,ua="Smart Template: "+Na)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Oa,Ia,bb,Za){b.spinner.stop();ta.innerHTML="";var Ya=document.createElement("img");Ya.setAttribute("title",Na);Ya.src="data:image/svg+xml;base64,"+Ia.substring(Ia.indexOf(",")+
-1);Ya.style.cursor="pointer";Ya.style.width="100%";Ya.style.height="100%";ta.appendChild(Ya);Oa=b.createMermaidXml(Oa,EditorUi.defaultMermaidConfig,Ia,bb,Za,Na);var hb="<mxfile><diagram>"+Graph.compress(Oa)+"</diagram></mxfile>";if(Xa||"undefined"===typeof mxMermaidToDrawio)ya=fa=Oa;Oa=M.cloneNode(!0);ta.appendChild(Oa);Ia=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};bb=function(gb){S||C(hb,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ya,Na)};mxEvent.addGestureListeners(Ya,
-Ia,null,bb);mxEvent.addGestureListeners(Oa,Ia,null,bb)},function(Oa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Oa)})});La.setAttribute("disabled","disabled");La.className="geBtn gePrimaryBtn";ra=function(){window.setTimeout(function(){""!=qa.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};wa=urlParams["smart-template"];null!=wa&&"1"!=wa&&(qa.value=decodeURIComponent(wa),ra(),"1"==urlParams["smart-template-generate"]&&
-window.setTimeout(function(){La.click()},0));mxEvent.addListener(qa,"change",ra);mxEvent.addListener(qa,"keydown",ra);mxEvent.addListener(qa,"cut",ra);mxEvent.addListener(qa,"paste",ra);mxEvent.addListener(qa,"keydown",function(Pa){13==Pa.keyCode&&La.click()});ra=document.createElement("div");ra.style.height="40px";ra.style.marginTop="4px";ra.style.marginBottom="4px";ra.style.whiteSpace="nowrap";ra.style.overflowX="auto";ra.style.overflowY="hidden";ra.appendChild(pa);ra.appendChild(La);ka.appendChild(ra);
-ka.appendChild(ta);return ka}function R(){if(ja&&null!=k)f||b.hideDialog(),k(ja,ea,K.value);else if(c)f||b.hideDialog(),c(fa,K.value,ha,ia);else{var ka=K.value;if(null!=ka&&0<ka.length){var qa=function(ra,pa,wa){b.createFile(wa,fa,null!=ia&&0<ia.length?ia:null,ra,function(){b.hideDialog()},null,pa,null,null!=ca&&0<ca.length?ca:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,ka,mxUtils.bind(this,function(ra,pa,wa){qa(pa,wa,ra.value)}),null,null,null,null,b.mode);
-b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(ra){qa(b.mode,ra,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function U(ka,qa,ta,ra,pa,wa,Ha){return aa!=ka?(null!=aa&&(aa.classList.remove("geTemplateSelected"),aa==va&&(xa.style.display="none",Da.style.display="",Aa.style.visibility="hidden",Ja.style.visibility=null!=ya?"visible":"hidden")),ka==va&&(qa=ya,null!=qa?(Ja.style.visibility="visible",Ja.style.visibility=null!=ya?"visible":
-"hidden",Aa.style.visibility="visible"):(xa.style.display="",Aa.style.visibility="hidden",Ja.style.visibility="hidden")),G.removeAttribute("disabled"),fa=qa,ia=ta,ca=wa,aa=ka,ja=ra,ha=Ha,ea=pa,aa.classList.add("geTemplateSelected"),!0):!1}function O(){xa.style.display="";Da.style.display="none";Aa.style.visibility="hidden";Ja.style.visibility="hidden";Ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Ba.select():document.execCommand("selectAll",!1,null)}function V(){Da.style.backgroundImage=
-Ca;Da.style.backgroundSize="contain";xa.style.display="none";Da.style.display="";Aa.style.visibility="visible";Ja.style.visibility="visible"}function q(ka){var qa=mxUtils.trim(Ba.value);if(ka||""==qa)null!=ua&&(Ba.value=ua,V());else{var ta=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=qa?qa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(ra){ra!=b.emptyDiagramXml&&(ta=!0,fa=ra)}));Da.style.backgroundImage="url("+Editor.spinImage+")";Da.style.backgroundSize="12px 12px";Da.style.display="";xa.style.display="none";b.generateOpenAiMermaidDiagram(ka,function(ra,pa,wa,Ha){aa==va&&"none"==xa.style.display&&(Ca="url(data:image/svg+xml;base64,"+pa.substring(pa.indexOf(",")+1)+")",va.setAttribute("title",qa),Ja.style.display="",ya=fa=ra=ta?fa:b.createMermaidXml(ra,EditorUi.defaultMermaidConfig,pa,wa,Ha,qa),ua=qa,V())},function(ra){aa==
-va&&(xa.style.display="",Da.style.display="none",Aa.style.visibility="hidden",Ja.style.visibility="hidden",b.handleError(ra))})}}function y(ka,qa,ta,ra,pa,wa,Ha,Fa,La,Pa,Qa,Xa){function Na(Sa,db){null==bb?(Za=Sa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(eb){200<=eb.getStatus()&&299>=eb.getStatus()&&(bb=eb.getText());db(bb,Za)}))):db(bb,Za)}function Oa(Sa,db){if(null==ka||N||
-b.sidebar.currentElt==Ia)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var eb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";C(eb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),ta,ka)}else b.sidebar.currentElt=
-Ia,N=!0,Na(ka,function(jb){if(N&&b.sidebar.currentElt==Ia)try{C(jb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),Ia,db)}catch(kb){b.sidebar.currentElt=null,b.handleError(kb)}N=!1})}var Ia=null;if("generative"!=Xa||null==va){Ia=document.createElement("div");Ia.className="geTemplate";var bb=null,Za=ka;null!=ta?Ia.setAttribute("title",mxResources.get(ta,null,ta)):null!=ra&&0<ra.length&&Ia.setAttribute("title",ra)}else Ia=va;var Ya=document.createElement("span");Ya.className="geAdaptiveAsset";mxUtils.write(Ya,
-mxResources.get(ta,null,ta));if(null!=wa){Ia.style.display="inline-flex";Ia.style.justifyContent="center";Ia.style.alignItems="center";La=document.createElement("img");La.setAttribute("src",wa);La.setAttribute("alt",ra);La.style.maxWidth=la+"px";La.style.maxHeight=Ea+"px";Q=La;var hb=wa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ia.appendChild(La);La.onerror=function(){this.src!=hb?this.src=hb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ia,mxUtils.bind(this,
-function(Sa){U(Ia,null,null,ka,Ha,Qa)}),null,null);mxEvent.addListener(Ia,"dblclick",function(Sa){R();mxEvent.consume(Sa)})}else if(!Pa&&null!=ka&&0<ka.length){var gb=function(Sa){z.spin(na)&&Na(ka,function(db,eb){z.stop();null!=db&&(U(Ia,db,qa,null,null,Qa,eb),Sa&&R())})};wa=La||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";La=Da.cloneNode(!1);La.style.backgroundImage="url("+wa+")";La.style.display="";Ia.appendChild(La);null!=ta&&Ia.appendChild(Ya);mxEvent.addGestureListeners(Ia,mxUtils.bind(this,
-function(Sa){gb()}),null,null);mxEvent.addListener(Ia,"dblclick",function(Sa){gb(!0);mxEvent.consume(Sa)})}else Ia.appendChild(Ya),"generative"==Xa&&null==va&&(Ia.appendChild(Da),Ia.appendChild(xa),Ia.appendChild(Ja),Ia.appendChild(Aa),va=Ia),pa&&U(Ia),null!=Fa?(mxEvent.addGestureListeners(Ia,null,null,mxUtils.bind(this,function(Sa){U(Ia,null,null,ka,Ha)})),mxEvent.addListener(Ia,"click",Fa)):(mxEvent.addListener(Ia,"click",function(Sa){U(Ia,null,null,ka,Ha)&&"generative"==Xa&&null==ya&&O()}),mxEvent.addListener(Ia,
-"dblclick",function(Sa){"generative"!=Xa?R():"none"==xa.style.display&&O();mxEvent.consume(Sa)}));null!=ka&&(wa=M.cloneNode(!0),Ia.appendChild(wa),mxEvent.addGestureListeners(wa,mxUtils.bind(this,function(Sa){S=b.sidebar.currentElt==Ia}),null,null),mxEvent.addListener(wa,"click",mxUtils.bind(this,function(Sa){S||Oa(Sa,null!=ta?ta:ra);mxEvent.consume(Sa)})));na.appendChild(Ia);return Ia}function D(){function ka(Na,Oa){Na=mxResources.get(Na,null,Na.substring(0,1).toUpperCase()+Na.substring(1));18<Na.length&&
-(Na=Na.substring(0,18)+"&hellip;");return Na+(null!=Oa?" ("+Oa.length+")":"")}function qa(Na,Oa,Ia){mxEvent.addListener(Oa,"click",function(){Ta!=Oa&&(null!=Ta&&(Ta.style.backgroundColor=""),Ta=Oa,Ta.style.backgroundColor=v,na.scrollTop=0,na.innerText="",n=0,null!=Ma[Na].content?(na.appendChild(Ma[Na].content),fa=ya,Wa=null,null!=Ma[Na].content.init&&Ma[Na].content.init()):(Wa=Ia?Va[Na][Ia]:Ma[Na],W=null,F(!1)))});"smartTemplate"!=Na||!I&&null==urlParams["smart-template"]||Oa.click()}cb&&(cb=!1,mxEvent.addListener(na,
-"scroll",function(Na){na.scrollTop+na.clientHeight>=na.scrollHeight&&(F(),mxEvent.consume(Na))}));if(0<fb){var ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));oa.appendChild(ta);for(var ra in Ua){var pa=document.createElement("div");ta=ra;var wa=Ua[ra];18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-pa.setAttribute("title",ta+" ("+wa.length+")");mxUtils.write(pa,pa.getAttribute("title"));null!=H&&(pa.style.padding=H);oa.appendChild(pa);(function(Na,Oa){mxEvent.addListener(pa,"click",function(){Ta!=Oa&&(Ta.style.backgroundColor="",Ta=Oa,Ta.style.backgroundColor=v,na.scrollTop=0,na.innerText="",n=0,Wa=Ua[Na],W=null,F(!1))})})(ra,pa)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");oa.appendChild(ta)}for(ra in Ma){ta=
-wa=null;if(null!=Ma[ra].content)pa=document.createElement(Ha?"ul":"div"),ta=ka(ra),pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",ta),mxUtils.write(pa,ta),oa.appendChild(pa),ta=pa;else{var Ha=Va[ra];ta=pa=document.createElement(Ha?"ul":"div");wa=Ma[ra];var Fa=ka(ra,wa);if(null!=Ha){wa=document.createElement("li");var La=document.createElement("div");
-La.className="geTempTreeCaret";La.setAttribute("title",Fa);mxUtils.write(La,Fa);ta=La;wa.appendChild(La);Fa=document.createElement("ul");Fa.className="geTempTreeNested";Fa.style.visibility="hidden";for(var Pa in Ha){var Qa=document.createElement("li"),Xa=ka(Pa,Ha[Pa]);Qa.setAttribute("title",Xa);mxUtils.write(Qa,Xa);qa(ra,Qa,Pa);Fa.appendChild(Qa)}wa.appendChild(Fa);pa.className="geTempTree";pa.appendChild(wa);(function(Na,Oa){mxEvent.addListener(Oa,"click",function(){Na.style.visibility="visible";
-Na.classList.toggle("geTempTreeActive");Na.classList.toggle("geTempTreeNested")&&setTimeout(function(){Na.style.visibility="hidden"},550);Oa.classList.toggle("geTempTreeCaret-down")})})(Fa,La)}else pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",Fa),mxUtils.write(pa,Fa);null!=H&&(pa.style.padding=H);oa.appendChild(pa)}qa(ra,ta);null==Ta&&ta.click()}F(!1)}
+k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){v.value=u.target.result};n.readAsText(k)}},!1));"plantUml"==f&&(E=document.createElement("div"),E.style.display="inline-block",E.style.color="#c00",E.style.fontSize="12px",E.style.marginRight="16px",E.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',e.appendChild(E));e.appendChild(t);mxEvent.addListener(t,
+"change",function(){var k=l();if(0==v.value.length||v.value==g)g=k,v.value=g});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(E=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),E.className="geBtn",e.appendChild(E));E=mxUtils.button(mxResources.get("close"),function(){v.value==g?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});E.className="geBtn";b.editor.cancelFirst&&e.appendChild(E);
+H=mxUtils.button(mxResources.get("insert"),function(k){try{b.hideDialog(),c(v.value,t.value,k)}catch(n){b.handleError(n)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,l,p,v,t,E,H,B,d,g,k,n,u,x,A,I){function G(ka){null!=ka&&(la=Ea=ka?135:140);ka=!0;if(null!=Wa)for(;m<Wa.length&&(ka||0!=mxUtils.mod(m,30));){var qa=Wa[m++];qa=y(qa.url,qa.libs,qa.title,qa.tooltip?qa.tooltip:qa.title,qa.select,qa.imgUrl,qa.info,
+qa.onClick,qa.preview,qa.noImg,qa.clibs,qa.type);ka&&qa.click();ka=!1}}function C(ka,qa,ra,ta,pa,wa){if(null!=ka&&mxUtils.isAncestorNode(document.body,ta)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ia=new mxCodec(ka.ownerDocument),Fa=new mxGraphModel;Ia.decode(ka,Fa);b.sidebar.createTooltip(ta,Fa.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-120,800),null!=pa?mxResources.get(pa):null,!0,new mxPoint(qa,ra),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=wa&&U(ta,null,null,wa,infoObj,clibs)},!0,!1)}}function P(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var qa=document.createElement("input");
+qa.setAttribute("type","text");qa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));qa.style.width="100%";qa.style.marginTop="6px";qa.style.marginBottom="4px";qa.style.boxSizing="border-box";ka.appendChild(qa);ka.init=function(){qa.focus()};mxUtils.br(ka);var ra=document.createElement("div");ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var ta=document.createElement("div");
+ta.style.boxSizing="border-box";ta.style.position="relative";ta.style.textAlign="center";ta.style.top="50%";mxUtils.write(ta,mxResources.get("blankDiagram"));ra.appendChild(ta);var pa=document.createElement("select");pa.className="geBtn";pa.style.maxWidth="160px";pa.style.marginLeft="0px";ta=document.createElement("option");mxUtils.write(ta,mxResources.get("diagramType"));ta.setAttribute("value","");pa.appendChild(ta);for(var wa=0;wa<EditorUi.mermaidDiagramTypes.length;wa++){ta=document.createElement("option");
+var Ia=EditorUi.mermaidDiagramTypes[wa],Fa=Ia;Ia==urlParams["smart-template-type"]&&ta.setAttribute("selected","selected");"erDiagram"==Fa&&(Fa="entityRelationshipDiagram");Fa=mxResources.get(Fa,null,Fa.charAt(0).toUpperCase()+Fa.substring(1).replace(/[A-Z]/g," $&"));ta.setAttribute("value",Ia);mxUtils.write(ta,Fa);pa.appendChild(ta)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=qa.value,Qa=pa.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+
+(""!=Qa?Qa:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Qa=""!=pa.value?" ("+mxUtils.trim(mxUtils.getTextContent(pa.options[pa.selectedIndex]))+")":"";var Xa="gantt"==pa.value||"pie"==pa.value||"timeline"==pa.value||"quadrantchart"==pa.value||"c4context"==pa.value,Na=qa.value+Qa;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Oa){Xa||(ya=fa=Oa,ua="Smart Template: "+
+Na)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Oa,Ha,bb,Za){b.spinner.stop();ra.innerHTML="";var Ya=document.createElement("img");Ya.setAttribute("title",Na);Ya.src="data:image/svg+xml;base64,"+Ha.substring(Ha.indexOf(",")+1);Ya.style.cursor="pointer";Ya.style.width="100%";Ya.style.height="100%";ra.appendChild(Ya);Oa=b.createMermaidXml(Oa,EditorUi.defaultMermaidConfig,Ha,bb,Za,Na);var hb="<mxfile><diagram>"+Graph.compress(Oa)+"</diagram></mxfile>";
+if(Xa||"undefined"===typeof mxMermaidToDrawio)ya=fa=Oa;Oa=M.cloneNode(!0);ra.appendChild(Oa);Ha=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};bb=function(gb){S||C(hb,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ya,Na)};mxEvent.addGestureListeners(Ya,Ha,null,bb);mxEvent.addGestureListeners(Oa,Ha,null,bb)},function(Oa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Oa)})});La.setAttribute("disabled","disabled");
+La.className="geBtn gePrimaryBtn";ta=function(){window.setTimeout(function(){""!=qa.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};wa=urlParams["smart-template"];null!=wa&&"1"!=wa&&(qa.value=decodeURIComponent(wa),ta(),"1"==urlParams["smart-template-generate"]&&window.setTimeout(function(){La.click()},0));mxEvent.addListener(qa,"change",ta);mxEvent.addListener(qa,"keydown",ta);mxEvent.addListener(qa,"cut",ta);mxEvent.addListener(qa,"paste",ta);mxEvent.addListener(qa,
+"keydown",function(Pa){13==Pa.keyCode&&La.click()});ta=document.createElement("div");ta.style.height="40px";ta.style.marginTop="4px";ta.style.marginBottom="4px";ta.style.whiteSpace="nowrap";ta.style.overflowX="auto";ta.style.overflowY="hidden";ta.appendChild(pa);ta.appendChild(La);ka.appendChild(ta);ka.appendChild(ra);return ka}function R(){if(ja&&null!=k)f||b.hideDialog(),k(ja,ea,K.value);else if(c)f||b.hideDialog(),c(fa,K.value,ha,ia);else{var ka=K.value;if(null!=ka&&0<ka.length){var qa=function(ta,
+pa,wa){b.createFile(wa,fa,null!=ia&&0<ia.length?ia:null,ta,function(){b.hideDialog()},null,pa,null,null!=ca&&0<ca.length?ca:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,ka,mxUtils.bind(this,function(ta,pa,wa){qa(pa,wa,ta.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(ta){qa(b.mode,ta,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function U(ka,qa,ra,ta,
+pa,wa,Ia){return aa!=ka?(null!=aa&&(aa.classList.remove("geTemplateSelected"),aa==va&&(xa.style.display="none",Da.style.display="",Aa.style.visibility="hidden",Ja.style.visibility=null!=ya?"visible":"hidden")),ka==va&&(qa=ya,null!=qa?(Ja.style.visibility="visible",Ja.style.visibility=null!=ya?"visible":"hidden",Aa.style.visibility="visible"):(xa.style.display="",Aa.style.visibility="hidden",Ja.style.visibility="hidden")),F.removeAttribute("disabled"),fa=qa,ia=ra,ca=wa,aa=ka,ja=ta,ha=Ia,ea=pa,aa.classList.add("geTemplateSelected"),
+!0):!1}function N(){xa.style.display="";Da.style.display="none";Aa.style.visibility="hidden";Ja.style.visibility="hidden";Ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Ba.select():document.execCommand("selectAll",!1,null)}function V(){Da.style.backgroundImage=Ca;Da.style.backgroundSize="contain";xa.style.display="none";Da.style.display="";Aa.style.visibility="visible";Ja.style.visibility="visible"}function q(ka){var qa=mxUtils.trim(Ba.value);ka||""==qa?null!=ua&&(Ba.value=ua,
+V()):(Da.style.backgroundImage="url("+Editor.spinImage+")",Da.style.backgroundSize="12px 12px",Da.style.display="",xa.style.display="none",b.generateDiagram(qa,mxUtils.bind(this,function(ra,ta){aa==va&&"none"==xa.style.display&&(Ca="url(data:image/svg+xml;base64,"+ta.substring(ta.indexOf(",")+1)+")",va.setAttribute("title",qa),Ja.style.display="",ya=fa=ra,ua=qa,V())}),mxUtils.bind(this,function(ra){aa==va&&(xa.style.display="",Da.style.display="none",Aa.style.visibility="hidden",Ja.style.visibility=
+"hidden",b.handleError(ra))})))}function y(ka,qa,ra,ta,pa,wa,Ia,Fa,La,Pa,Qa,Xa){function Na(Sa,db){null==bb?(Za=Sa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(eb){200<=eb.getStatus()&&299>=eb.getStatus()&&(bb=eb.getText());db(bb,Za)}))):db(bb,Za)}function Oa(Sa,db){if(null==ka||O||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var eb=
+"<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";C(eb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),ra,ka)}else b.sidebar.currentElt=Ha,O=!0,Na(ka,function(jb){if(O&&b.sidebar.currentElt==Ha)try{C(jb,mxEvent.getClientX(Sa),
+mxEvent.getClientY(Sa),Ha,db)}catch(kb){b.sidebar.currentElt=null,b.handleError(kb)}O=!1})}var Ha=null;if("generative"!=Xa||null==va){Ha=document.createElement("div");Ha.className="geTemplate";var bb=null,Za=ka;null!=ra?Ha.setAttribute("title",mxResources.get(ra,null,ra)):null!=ta&&0<ta.length&&Ha.setAttribute("title",ta)}else Ha=va;var Ya=document.createElement("span");Ya.className="geAdaptiveAsset";mxUtils.write(Ya,mxResources.get(ra,null,ra));if(null!=wa){Ha.style.display="inline-flex";Ha.style.justifyContent=
+"center";Ha.style.alignItems="center";La=document.createElement("img");La.setAttribute("src",wa);La.setAttribute("alt",ta);La.style.maxWidth=la+"px";La.style.maxHeight=Ea+"px";Q=La;var hb=wa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(La);La.onerror=function(){this.src!=hb?this.src=hb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Sa){U(Ha,null,null,ka,Ia,Qa)}),null,null);mxEvent.addListener(Ha,"dblclick",
+function(Sa){R();mxEvent.consume(Sa)})}else if(!Pa&&null!=ka&&0<ka.length){var gb=function(Sa){z.spin(na)&&Na(ka,function(db,eb){z.stop();null!=db&&(U(Ha,db,qa,null,null,Qa,eb),Sa&&R())})};wa=La||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";La=Da.cloneNode(!1);La.style.backgroundImage="url("+wa+")";La.style.display="";Ha.appendChild(La);null!=ra&&Ha.appendChild(Ya);mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Sa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Sa){gb(!0);
+mxEvent.consume(Sa)})}else Ha.appendChild(Ya),"generative"==Xa&&null==va&&(Ha.appendChild(Da),Ha.appendChild(xa),Ha.appendChild(Ja),Ha.appendChild(Aa),va=Ha),pa&&U(Ha),null!=Fa?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Sa){U(Ha,null,null,ka,Ia)})),mxEvent.addListener(Ha,"click",Fa)):(mxEvent.addListener(Ha,"click",function(Sa){U(Ha,null,null,ka,Ia)&&"generative"==Xa&&null==ya&&N()}),mxEvent.addListener(Ha,"dblclick",function(Sa){"generative"!=Xa?R():"none"==xa.style.display&&
+N();mxEvent.consume(Sa)}));null!=ka&&(wa=M.cloneNode(!0),Ha.appendChild(wa),mxEvent.addGestureListeners(wa,mxUtils.bind(this,function(Sa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(wa,"click",mxUtils.bind(this,function(Sa){S||Oa(Sa,null!=ra?ra:ta);mxEvent.consume(Sa)})));na.appendChild(Ha);return Ha}function D(){function ka(Na,Oa){Na=mxResources.get(Na,null,Na.substring(0,1).toUpperCase()+Na.substring(1));18<Na.length&&(Na=Na.substring(0,18)+"&hellip;");return Na+(null!=Oa?" ("+Oa.length+
+")":"")}function qa(Na,Oa,Ha){mxEvent.addListener(Oa,"click",function(){Ta!=Oa&&(null!=Ta&&(Ta.style.backgroundColor=""),Ta=Oa,Ta.style.backgroundColor=v,na.scrollTop=0,na.innerText="",m=0,null!=Ma[Na].content?(na.appendChild(Ma[Na].content),fa=ya,Wa=null,null!=Ma[Na].content.init&&Ma[Na].content.init()):(Wa=Ha?Va[Na][Ha]:Ma[Na],W=null,G(!1)))});"smartTemplate"!=Na||!I&&null==urlParams["smart-template"]||Oa.click()}cb&&(cb=!1,mxEvent.addListener(na,"scroll",function(Na){na.scrollTop+na.clientHeight>=
+na.scrollHeight&&(G(),mxEvent.consume(Na))}));if(0<fb){var ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));oa.appendChild(ra);for(var ta in Ua){var pa=document.createElement("div");ra=ta;var wa=Ua[ta];18<ra.length&&(ra=ra.substring(0,18)+"&hellip;");pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+pa.setAttribute("title",ra+" ("+wa.length+")");mxUtils.write(pa,pa.getAttribute("title"));null!=H&&(pa.style.padding=H);oa.appendChild(pa);(function(Na,Oa){mxEvent.addListener(pa,"click",function(){Ta!=Oa&&(Ta.style.backgroundColor="",Ta=Oa,Ta.style.backgroundColor=v,na.scrollTop=0,na.innerText="",m=0,Wa=Ua[Na],W=null,G(!1))})})(ta,pa)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");oa.appendChild(ra)}for(ta in Ma){ra=
+wa=null;if(null!=Ma[ta].content)pa=document.createElement(Ia?"ul":"div"),ra=ka(ta),pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",ra),mxUtils.write(pa,ra),oa.appendChild(pa),ra=pa;else{var Ia=Va[ta];ra=pa=document.createElement(Ia?"ul":"div");wa=Ma[ta];var Fa=ka(ta,wa);if(null!=Ia){wa=document.createElement("li");var La=document.createElement("div");
+La.className="geTempTreeCaret";La.setAttribute("title",Fa);mxUtils.write(La,Fa);ra=La;wa.appendChild(La);Fa=document.createElement("ul");Fa.className="geTempTreeNested";Fa.style.visibility="hidden";for(var Pa in Ia){var Qa=document.createElement("li"),Xa=ka(Pa,Ia[Pa]);Qa.setAttribute("title",Xa);mxUtils.write(Qa,Xa);qa(ta,Qa,Pa);Fa.appendChild(Qa)}wa.appendChild(Fa);pa.className="geTempTree";pa.appendChild(wa);(function(Na,Oa){mxEvent.addListener(Oa,"click",function(){Na.style.visibility="visible";
+Na.classList.toggle("geTempTreeActive");Na.classList.toggle("geTempTreeNested")&&setTimeout(function(){Na.style.visibility="hidden"},550);Oa.classList.toggle("geTempTreeCaret-down")})})(Fa,La)}else pa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",pa.setAttribute("title",Fa),mxUtils.write(pa,Fa);null!=H&&(pa.style.padding=H);oa.appendChild(pa)}qa(ta,ra);null==Ta&&ra.click()}G(!1)}
t=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;v=null!=v?v:"light-dark(#ebf2f9, "+Editor.darkColor+")";B=null!=B?B:EditorUi.templateFile;var J=document.createElement("div");J.style.userSelect="none";J.style.height="100%";E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.height="46px";f&&J.appendChild(E);var L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width=
"40px";L.style.height="40px";L.style.marginRight="10px";L.style.paddingBottom="4px";L.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
e||t||!f||E.appendChild(L);f&&mxUtils.write(E,(t?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");L=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?L=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?L=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?L=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?L=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?
L=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(L=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+L);K.style.marginLeft="10px";K.style.width=e||t?"144px":"244px";this.init=function(){f&&Editor.selectFilename(K);null!=na.parentNode&&null!=na.parentNode.parentNode&&mxEvent.addGestureListeners(na.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};f&&(E.appendChild(K),A?K.style.width=
-e||t?"350px":"450px":null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=e||t?"80px":"180px",E.appendChild(A)));A=!1;var n=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(u||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");R();G.removeAttribute("disabled")});
-G.className="geBtn gePrimaryBtn";var M=document.createElement("img");M.setAttribute("src",Editor.magnifyImage);M.setAttribute("title",mxResources.get("preview"));M.className="geButton geRoundButton";var N=!1,Q=null,S=!1;if(d||g){var T=[],W=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var qa=0;qa<T.length;qa++)T[qa].className=qa==ka?"geBtn gePrimaryBtn":"geBtn"};A=!0;u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.height="30px";J.appendChild(u);t=
-mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";za.style.display="";na.style.left="160px";Y(0);na.scrollTop=0;na.innerText="";n=0;W!=Wa&&(Wa=W,Ma=X,fb=Z,oa.innerText="",D(),W=null)});T.push(t);u.appendChild(t);var ba=function(ka){oa.style.display="none";za.style.display="none";na.style.left="30px";Y(ka?-1:1);null==W&&(W=Wa);na.scrollTop=0;na.innerText="";z.spin(na);var qa=function(ta,ra,pa){n=0;z.stop();Wa=ta;pa=pa||{};var wa=0,Ha;for(Ha in pa)wa+=pa[Ha].length;
-if(ra)na.innerText=ra;else if(0==ta.length&&0==wa)na.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(na.innerText="",0<wa){oa.style.display="";na.style.left="160px";oa.innerText="";fb=0;Ma={"draw.io":ta};for(Ha in pa)Ma[Ha]=pa[Ha];D()}else F(!0)};ka?g(da.value,qa):d(qa)};d&&(t=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),u.appendChild(t),T.push(t));if(g){t=document.createElement("span");t.style.marginLeft="10px";t.innerText=mxResources.get("search")+
+e||t?"350px":"450px":null!=b.editor.diagramFileTypes&&(A=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),A.style.marginLeft="6px",A.style.width=e||t?"80px":"180px",E.appendChild(A)));A=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),F=mxUtils.button(u||mxResources.get("create"),function(){F.setAttribute("disabled","disabled");R();F.removeAttribute("disabled")});
+F.className="geBtn gePrimaryBtn";var M=document.createElement("img");M.setAttribute("src",Editor.magnifyImage);M.setAttribute("title",mxResources.get("preview"));M.className="geButton geRoundButton";var O=!1,Q=null,S=!1;if(d||g){var T=[],W=null,X=null,Z=null,Y=function(ka){F.setAttribute("disabled","disabled");for(var qa=0;qa<T.length;qa++)T[qa].className=qa==ka?"geBtn gePrimaryBtn":"geBtn"};A=!0;u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.height="30px";J.appendChild(u);t=
+mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";za.style.display="";na.style.left="160px";Y(0);na.scrollTop=0;na.innerText="";m=0;W!=Wa&&(Wa=W,Ma=X,fb=Z,oa.innerText="",D(),W=null)});T.push(t);u.appendChild(t);var ba=function(ka){oa.style.display="none";za.style.display="none";na.style.left="30px";Y(ka?-1:1);null==W&&(W=Wa);na.scrollTop=0;na.innerText="";z.spin(na);var qa=function(ra,ta,pa){m=0;z.stop();Wa=ra;pa=pa||{};var wa=0,Ia;for(Ia in pa)wa+=pa[Ia].length;
+if(ta)na.innerText=ta;else if(0==ra.length&&0==wa)na.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(na.innerText="",0<wa){oa.style.display="";na.style.left="160px";oa.innerText="";fb=0;Ma={"draw.io":ra};for(Ia in pa)Ma[Ia]=pa[Ia];D()}else G(!0)};ka?g(da.value,qa):d(qa)};d&&(t=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),u.appendChild(t),T.push(t));if(g){t=document.createElement("span");t.style.marginLeft="10px";t.innerText=mxResources.get("search")+
":";u.appendChild(t);var da=document.createElement("input");da.style.marginRight="10px";da.style.marginLeft="10px";da.style.width="220px";mxEvent.addListener(da,"keypress",function(ka){13==ka.keyCode&&ba(!0)});u.appendChild(da);t=mxUtils.button(mxResources.get("search"),function(){ba(!0)});t.className="geBtn";u.appendChild(t)}Y(0)}var ia=null,ca=null,fa=null,aa=null,ja=null,ha=null,ea=null,ya=null,ua=null,na=document.createElement("div");na.style.border="1px solid #d3d3d3";na.style.position="absolute";
na.style.left="160px";na.style.right="34px";u=(f?72:40)+(A?30:0);na.style.top=u+"px";na.style.bottom="68px";na.style.margin="6px 0 0 -1px";na.style.padding="6px";na.style.overflow="auto";var za=document.createElement("div");za.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";
ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");za.appendChild(ma);var sa=document.createElement("img");sa.setAttribute("src",Editor.magnifyImage);sa.setAttribute("title",mxResources.get("search"));sa.className="geAdaptiveAsset";sa.style.position="relative";sa.style.cursor="pointer";sa.style.outline="none";sa.style.opacity="0.5";sa.style.height="16px";sa.style.left="-20px";sa.style.top="4px";za.appendChild(sa);mxEvent.addListener(sa,"click",function(){sa.getAttribute("src")!=
-Editor.magnifyImage&&(sa.setAttribute("src",Editor.magnifyImage),sa.setAttribute("title",mxResources.get("search")),ma.value="",null!=$a&&($a.click(),$a=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var qa=ma.value;if(""==qa)null!=$a&&($a.click(),$a=null);else{if(null==NewDialog.tagsList[B]){var ta={};for(Qa in Ma)if(null==Ma[Qa].content)for(var ra=Ma[Qa],pa=0;pa<ra.length;pa++){var wa=ra[pa];if(null!=wa.tags)for(var Ha=wa.tags.toLowerCase().split(";"),
-Fa=0;Fa<Ha.length;Fa++)null==ta[Ha[Fa]]&&(ta[Ha[Fa]]=[]),ta[Ha[Fa]].push(wa)}NewDialog.tagsList[B]=ta}var La=qa.toLowerCase().split(" ");ta=NewDialog.tagsList[B];if(0<fb&&null==ta.__tagsList__){for(Qa in Ua)for(ra=Ua[Qa],pa=0;pa<ra.length;pa++)for(wa=ra[pa],Ha=wa.title.split(" "),Ha.push(Qa),Fa=0;Fa<Ha.length;Fa++){var Pa=Ha[Fa].toLowerCase();null==ta[Pa]&&(ta[Pa]=[]);ta[Pa].push(wa)}ta.__tagsList__=!0}var Qa=[];ra={};for(pa=Ha=0;pa<La.length;pa++)if(0<La[pa].length){Pa=ta[La[pa]];var Xa={};Qa=[];
-if(null!=Pa)for(Fa=0;Fa<Pa.length;Fa++)wa=Pa[Fa],0==Ha==(null==ra[wa.url])&&(Xa[wa.url]=!0,Qa.push(wa));ra=Xa;Ha++}na.scrollTop=0;na.innerText="";n=0;ta=document.createElement("div");ta.style.padding="6px";ta.style.whiteSpace="nowrap";ta.style.overflow="hidden";ta.style.textOverflow="ellipsis";wa=mxResources.get(0==Qa.length?"noResultsFor":"resultsFor",[qa]);ta.setAttribute("title",wa);mxUtils.write(ta,wa);na.appendChild(ta);null!=Ta&&null==$a&&(Ta.style.backgroundColor="",$a=Ta,Ta=ta);Wa=Qa;W=null;
-F(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(sa.setAttribute("src",Editor.magnifyImage),sa.setAttribute("title",mxResources.get("search"))):(sa.setAttribute("src",Editor.crossImage),sa.setAttribute("title",mxResources.get("reset")))}));u+=23;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(na,
+Editor.magnifyImage&&(sa.setAttribute("src",Editor.magnifyImage),sa.setAttribute("title",mxResources.get("search")),ma.value="",null!=$a&&($a.click(),$a=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ka){if(13==ka.keyCode){var qa=ma.value;if(""==qa)null!=$a&&($a.click(),$a=null);else{if(null==NewDialog.tagsList[B]){var ra={};for(Qa in Ma)if(null==Ma[Qa].content)for(var ta=Ma[Qa],pa=0;pa<ta.length;pa++){var wa=ta[pa];if(null!=wa.tags)for(var Ia=wa.tags.toLowerCase().split(";"),
+Fa=0;Fa<Ia.length;Fa++)null==ra[Ia[Fa]]&&(ra[Ia[Fa]]=[]),ra[Ia[Fa]].push(wa)}NewDialog.tagsList[B]=ra}var La=qa.toLowerCase().split(" ");ra=NewDialog.tagsList[B];if(0<fb&&null==ra.__tagsList__){for(Qa in Ua)for(ta=Ua[Qa],pa=0;pa<ta.length;pa++)for(wa=ta[pa],Ia=wa.title.split(" "),Ia.push(Qa),Fa=0;Fa<Ia.length;Fa++){var Pa=Ia[Fa].toLowerCase();null==ra[Pa]&&(ra[Pa]=[]);ra[Pa].push(wa)}ra.__tagsList__=!0}var Qa=[];ta={};for(pa=Ia=0;pa<La.length;pa++)if(0<La[pa].length){Pa=ra[La[pa]];var Xa={};Qa=[];
+if(null!=Pa)for(Fa=0;Fa<Pa.length;Fa++)wa=Pa[Fa],0==Ia==(null==ta[wa.url])&&(Xa[wa.url]=!0,Qa.push(wa));ta=Xa;Ia++}na.scrollTop=0;na.innerText="";m=0;ra=document.createElement("div");ra.style.padding="6px";ra.style.whiteSpace="nowrap";ra.style.overflow="hidden";ra.style.textOverflow="ellipsis";wa=mxResources.get(0==Qa.length?"noResultsFor":"resultsFor",[qa]);ra.setAttribute("title",wa);mxUtils.write(ra,wa);na.appendChild(ra);null!=Ta&&null==$a&&(Ta.style.backgroundColor="",$a=Ta,Ta=ra);Wa=Qa;W=null;
+G(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ka){""==ma.value?(sa.setAttribute("src",Editor.magnifyImage),sa.setAttribute("title",mxResources.get("search"))):(sa.setAttribute("src",Editor.crossImage),sa.setAttribute("title",mxResources.get("reset")))}));u+=23;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:30px;width:128px;top:"+u+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(na,
"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var la=140,Ea=la,va=null,Ca="url("+Editor.sparklesImage+")",xa=document.createElement("div");xa.className="geGenerateDiagramForm";xa.style.position="absolute";xa.style.width="100%";xa.style.height="100%";var Da=document.createElement("div");Da.className="geTemplatePreview geAdaptiveAsset";Da.style.backgroundImage=Ca;var Ba=document.createElement("textarea");Ba.setAttribute("placeholder",mxResources.get("describeYourDiagram"));Ba.className=
"geGenerateDiagramDescription";var Ka=document.createElement("button");Ka.className="geBtn gePrimaryBtn geGenerateDiagramButton";Ka.setAttribute("disabled","disabled");Ka.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ka,mxResources.get("ok"));var Ja=M.cloneNode(!0);Ja.style.display="none";var Ga=!1;mxEvent.addGestureListeners(Ja,function(ka){Ga=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!Ga&&null!=ya){var qa="<mxfile><diagram>"+Graph.compress(ya)+
"</diagram></mxfile>";C(qa,mxEvent.getClientX(ka),mxEvent.getClientY(ka),va,ua)}});var Aa=M.cloneNode(!0);Aa.setAttribute("src",Editor.editImage);Aa.setAttribute("title",mxResources.get("edit"));Aa.style.visibility="hidden";Aa.style.left="0px";u=M.cloneNode(!0);u.setAttribute("src",Editor.helpImage);u.setAttribute("title",mxResources.get("help"));mxEvent.addListener(u,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.appendChild(Ba);
-xa.appendChild(Ka);xa.appendChild(u);xa.style.display="none";mxEvent.addListener(Aa,"click",O);mxEvent.addListener(Ba,"input",function(){""!=Ba.value?Ka.removeAttribute("disabled"):Ka.setAttribute("disabled","disabled")});mxEvent.addListener(Ka,"click",function(){q()});mxEvent.addListener(Ba,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(q(!0),mxEvent.consume(ka)):(q(),mxEvent.consume(ka))});var Ma={},Va={},Ua={},fb=0,cb=!0,Ta=null,$a=null;Ma.basic=[{title:"blankDiagram"}];
+xa.appendChild(Ka);xa.appendChild(u);xa.style.display="none";mxEvent.addListener(Aa,"click",N);mxEvent.addListener(Ba,"input",function(){""!=Ba.value?Ka.removeAttribute("disabled"):Ka.setAttribute("disabled","disabled")});mxEvent.addListener(Ka,"click",function(){q()});mxEvent.addListener(Ba,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(q(!0),mxEvent.consume(ka)):(q(),mxEvent.consume(ka))});var Ma={},Va={},Ua={},fb=0,cb=!0,Ta=null,$a=null;Ma.basic=[{title:"blankDiagram"}];
var Wa=Ma.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ma.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ma.smartTemplate={content:P()});if(!e){var ab=function(){mxUtils.get(Ra,function(ka){if(!ib){ib=!0;ka=ka.getXml().documentElement.firstChild;for(var qa=
-{};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&console.log("Parser error in "+B+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ta=ka.getAttribute("name"),ra=ka.getElementsByTagName("add"),pa=[],wa=0;wa<ra.length;wa++)pa.push(encodeURIComponent(mxUtils.getTextContent(ra[wa])));null!=ta&&0<pa.length&&(qa[ta]=pa.join(";"))}else if(pa=ka.getAttribute("url"),null!=pa){ra=ka.getAttribute("section");ta=ka.getAttribute("subsection");if(null==
-ra&&(wa=pa.indexOf("/"),ra=pa.substring(0,wa),null==ta)){var Ha=pa.indexOf("/",wa+1);-1<Ha&&(ta=pa.substring(wa+1,Ha))}wa=Ma[ra];null==wa&&(wa=[],Ma[ra]=wa);pa=ka.getAttribute("clibs");null!=qa[pa]&&(pa=qa[pa]);pa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:pa,tags:ka.getAttribute("tags")};wa.push(pa);null!=ta&&(wa=Va[ra],null==wa&&(wa={},Va[ra]=wa),ra=wa[ta],
-null==ra&&(ra=[],wa[ta]=ra),ra.push(pa))}ka=ka.nextSibling}z.stop();D()}})};J.appendChild(za);J.appendChild(oa);J.appendChild(na);var ib=!1,Ra=B;/^https?:\/\//.test(Ra)&&!b.editor.isCorsEnabledForUrl(Ra)&&(Ra=PROXY_URL+"?url="+encodeURIComponent(Ra));z.spin(na);null!=x?x(function(ka,qa){Ua=ka;Z=fb=qa;ab()},ab):ab();X=Ma}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==J&&13==ka.keyCode&&R()});x=document.createElement("div");x.style.marginTop=e?"4px":"16px";x.style.textAlign=
+{};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&console.log("Parser error in "+B+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),ta=ka.getElementsByTagName("add"),pa=[],wa=0;wa<ta.length;wa++)pa.push(encodeURIComponent(mxUtils.getTextContent(ta[wa])));null!=ra&&0<pa.length&&(qa[ra]=pa.join(";"))}else if(pa=ka.getAttribute("url"),null!=pa){ta=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==
+ta&&(wa=pa.indexOf("/"),ta=pa.substring(0,wa),null==ra)){var Ia=pa.indexOf("/",wa+1);-1<Ia&&(ra=pa.substring(wa+1,Ia))}wa=Ma[ta];null==wa&&(wa=[],Ma[ta]=wa);pa=ka.getAttribute("clibs");null!=qa[pa]&&(pa=qa[pa]);pa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:pa,tags:ka.getAttribute("tags")};wa.push(pa);null!=ra&&(wa=Va[ta],null==wa&&(wa={},Va[ta]=wa),ta=wa[ra],
+null==ta&&(ta=[],wa[ra]=ta),ta.push(pa))}ka=ka.nextSibling}z.stop();D()}})};J.appendChild(za);J.appendChild(oa);J.appendChild(na);var ib=!1,Ra=B;/^https?:\/\//.test(Ra)&&!b.editor.isCorsEnabledForUrl(Ra)&&(Ra=PROXY_URL+"?url="+encodeURIComponent(Ra));z.spin(na);null!=x?x(function(ka,qa){Ua=ka;Z=fb=qa;ab()},ab):ab();X=Ma}mxEvent.addListener(K,"keypress",function(ka){b.dialog.container.firstChild==J&&13==ka.keyCode&&R()});x=document.createElement("div");x.style.marginTop=e?"4px":"16px";x.style.textAlign=
"right";x.style.position="absolute";x.style.left="40px";x.style.bottom="24px";x.style.right="40px";u=mxUtils.button(mxResources.get("cancel"),function(){null!=p&&p();b.hideDialog(!0)});u.className="geBtn";!b.editor.cancelFirst||l&&null==p||x.appendChild(u);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(qa){null!=qa&&0<qa.length&&
-b.editor.loadUrl(b.editor.getProxiedUrl(qa),function(ta){fa=ta;ia=null;templateRealURl=qa;b.hideDialog();R()},function(ta){b.handleError(ta)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",x.appendChild(e));Graph.fileSupport&&m&&(m=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,
-"change",function(qa){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),m.className="geBtn",x.appendChild(m));x.appendChild(G);b.editor.cancelFirst||null!=c||l&&null==p||x.appendChild(u);J.appendChild(x);this.container=J};NewDialog.tagsList={};
-var SaveDialog=function(b,e,f,c,l,p,v,t){function E(D,J,L,K,n,z){var G=null;if(null==c||0>mxUtils.indexOf(c,D))if(n=null!=n?n:b.getTitleForService(D),0<=mxUtils.indexOf(U,D)||null!=b.getServiceForName(D)){G=document.createElement("option");if("pick"==z)G.innerHTML=mxUtils.htmlEntities(n)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+D),G.setAttribute("title",n+" - "+mxResources.get("pickFolder")+"...");else{var M=D+
-(null!=L?"-"+L:""),N=q[M];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=J){"/"==J.charAt(J.length-1)&&(J=J.substring(0,J.length-1));"/"==J.charAt(0)&&(J=J.substring(1));N=J;if(D!=App.MODE_GITHUB&&D==App.MODE_GITLAB){var Q=N.lastIndexOf("/");0<=Q&&(N=N.substring(Q+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}G.innerHTML=mxUtils.htmlEntities(n)+(null!=N?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(N):"");G.setAttribute("title",n+
-(null!=J?" ("+J+")":"")+(null!=L&&decodeURIComponent(L)!=J?" ["+L+"]":""));G.setAttribute("value",M);q[M]={option:G,mode:D,path:J,id:L};SaveDialog.lastValue==M&&null==t?K=!0:null==K&&("root"==z?K=null==t&&b.mode==D||null!=D&&D==t:"pickFolder-"==P.value.substring(0,11)&&(K=!0));K&&G.setAttribute("selected","selected")}P.appendChild(G)}return G}function H(D){b.pickFolder(D,function(J){var L=null;D==App.MODE_GOOGLE&&null!=J.docs&&0<J.docs.length?L={mode:D,path:J.docs[0].name,id:J.docs[0].id}:D==App.MODE_ONEDRIVE&&
-null!=J.value&&0<J.value.length?L={mode:D,path:J.value[0].name,id:OneDriveFile.prototype.getIdOf(J.value[0])}:(D==App.MODE_GITHUB||D==App.MODE_GITLAB)&&null!=J&&0<J.length&&(L={mode:D,path:decodeURIComponent(J),id:J});null!=L&&(R.style.display="",b.addRecent(L,"Folders",5),J=E(L.mode,L.path,L.id,!0),P.innerHTML="",q={},B(),L=P.selectedIndex,P.value=J.value,0>P.selectedIndex&&(P.selectedIndex=L))},!0,!0,!0,!0)}function B(){var D=b.getRecent("Folders"),J=0;if(null!=D&&0<D.length){for(var L=0;L<D.length;L++)null!=
-E(D[L].mode,D[L].path,D[L].id)&&J++;0<J&&P.appendChild(O.cloneNode(!0))}E(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");E(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(E(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),E(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&E(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);E(App.MODE_GITHUB,null,null,null,null,"pick");E(App.MODE_GITLAB,null,
-null,null,null,"pick");E(App.MODE_TRELLO);D=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&D&&E(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&E(App.MODE_BROWSER);D&&E("download");Editor.popupsAllowed&&E("_blank",null,null,null,mxResources.get("openInNewWindow"));0<J&&(P.appendChild(O.cloneNode(!0)),J=P.value,P.appendChild(R),
-P.value=J);if("pickFolder-"==P.value.substring(0,11)||"reset"==P.value)J=document.createElement("option"),J.setAttribute("value",""),J.setAttribute("selected","selected"),mxUtils.write(J,mxResources.get("pickFolder")+"..."),P.insertBefore(J,P.firstChild);V=P.value}function d(){if("reset"==P.value)b.resetRecent("Folders"),P.innerHTML="",P.value="",pickFolderOption=null,q={},B();else if("pickFolder-"==P.value.substring(0,11)){var D=P.value.substring(11);P.value=V;H(D)}else if(null!=C&&null!=q[P.value]&&
-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){D=b.getExtensionForService(q[P.value].mode);var J=F.value;null!=D&&0>e.indexOf(".")&&0>J.indexOf(".")&&(F.value=J+D)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==P.value||"_blank"==P.value?"ok":"save"));""==P.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var g=document.createElement("div");g.style.display="flex";g.style.flexWrap="wrap";g.style.whiteSpace="nowrap";var k=
-document.createElement("div");k.style.display="grid";k.style.gap="5px 8px";k.style.gridAutoRows="auto auto 44px";k.style.gridAutoColumns="0fr minmax(0,1fr)";k.style.width="100%";var m=null,u=null;if(null!=l&&null!=p&&"image/"==p.substring(0,6)&&("image/svg"!=p.substring(0,9)||mxClient.IS_SVG)){k.style.display="inline-grid";k.style.flexBasis="75%";m=document.createElement("div");m.style.display="inline-block";m.style.height="auto";m.style.maxWidth="25%";m.style.margin="auto";var x=document.createElement("img"),
-A=v?l:btoa(unescape(encodeURIComponent(l)));x.setAttribute("src","data:"+p+";base64,"+A);x.style.boxSizing="border-box";x.style.maxHeight="50px";x.style.maxWidth="100%";x.style.paddingLeft="10px";m.appendChild(x);mxClient.IS_FF||"image/png"!=p||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(u=mxUtils.button(mxResources.get("copy"),function(){var D=b.base64ToBlob(A,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+p+";base64,"+A+'">'],{type:"text/html"})});
-navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(m.setAttribute("title",mxResources.get("openInNewWindow")),m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(D){mxEvent.isPopupTrigger(D)||b.openInNewWindow(l,p,v)})):m.setAttribute("title",mxResources.get("preview"))}x=document.createElement("div");
-x.style.display="flex";x.style.padding="1px";x.style.alignItems="center";x.style.justifyContent="flex-end";x.style.gridColumn="1";x.style.whiteSpace="nowrap";var I=document.createElement("div");I.style.display="grid";I.style.padding="1px";I.style.alignItems="center";I.style.gridColumn="2";I.style.gridAutoColumns="minmax(0,1fr) auto";I.style.gap="6px";mxUtils.write(x,mxResources.get("saveAs")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("value",e);F.style.boxSizing=
-"border-box";F.style.width="100%";I.appendChild(F);k.appendChild(x);k.appendChild(I);var C=null;null!=b.editor.diagramFileTypes&&null==p&&(x=x.cloneNode(!1),I=I.cloneNode(!1),mxUtils.write(x,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",I.appendChild(C),k.appendChild(x),k.appendChild(I));x=x.cloneNode(!1);I=I.cloneNode(!1);mxUtils.write(x,mxResources.get("where")+":");var P=document.createElement("select");
-P.style.textOverflow="ellipsis";P.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var V=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=P.value;var D=q[SaveDialog.lastValue];null!=D&&f(F,D.mode,D.id)},null,"geBtn gePrimaryBtn");
-mxEvent.addListener(F,"keypress",function(D){13==D.keyCode&&y.click()});mxEvent.addListener(P,"change",d);B();d();I.appendChild(P);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(P.value=SaveDialog.lastValue);k.appendChild(x);k.appendChild(I);g.appendChild(k);null!=m&&g.appendChild(m);k=document.createElement("div");k.style.flexBasis="100%";k.style.textAlign="right";k.style.marginTop=null!=p?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
-m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&k.appendChild(m);null!=u&&k.appendChild(u);k.appendChild(y);b.editor.cancelFirst||k.appendChild(m);g.appendChild(k);this.init=function(){Editor.selectFilename(F)};this.container=g},CreateDialog=function(b,e,f,c,l,p,v,t,E,H,B,d,g,k,m,u,x){function A(V,q,y,D){function J(){mxEvent.addListener(L,"click",function(){var M=y;if(v){var N=C.value,Q=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>Q){M=null!=
-M?M:O.value;var S="";M==App.MODE_GOOGLE?S=b.drive.extension:M==App.MODE_GITHUB?S=b.gitHub.extension:M==App.MODE_GITLAB?S=b.gitLab.extension:M==App.MODE_TRELLO?S=b.trello.extension:M==App.MODE_DROPBOX?S=b.dropbox.extension:M==App.MODE_ONEDRIVE?S=b.oneDrive.extension:M==App.MODE_DEVICE&&(S=".drawio");0<=Q&&(N=N.substring(0,Q));C.value=N+S}}I(y)})}var L=document.createElement("a");L.style.overflow="hidden";var K=document.createElement("img");K.src=V;K.setAttribute("border","0");K.setAttribute("align",
-"absmiddle");K.style.width="60px";K.style.height="60px";K.style.paddingBottom="6px";L.style.display="inline-block";L.className="geBaseButton";L.style.position="relative";L.style.margin="4px";L.style.padding="8px 8px 10px 8px";L.style.whiteSpace="nowrap";L.appendChild(K);L.style.color="gray";L.style.fontSize="11px";var n=document.createElement("div");L.appendChild(n);mxUtils.write(n,q);if(null!=D&&null==b[D]){K.style.visibility="hidden";mxUtils.setOpacity(n,10);var z=new Spinner({lines:12,length:12,
-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(L);var G=window.setTimeout(function(){null==b[D]&&(z.stop(),L.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[D]&&(window.clearTimeout(G),mxUtils.setOpacity(n,100),K.style.visibility="",z.stop(),J())}))}else J();R.appendChild(L);++U==d&&(mxUtils.br(R),U=0)}function I(V){var q=C.value;if(null==V||null!=q&&0<q.length)x&&b.hideDialog(),
-f(q,V,C)}B="1"==urlParams.noDevice?!1:B;v=null!=v?v:!0;t=null!=t?t:!0;d=null!=d?d:4;x=null!=x?x:!0;p=document.createElement("div");p.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(p);var F=document.createElement("h2");mxUtils.write(F,l||mxResources.get("create"));F.style.marginTop="0px";F.style.marginBottom="24px";p.appendChild(F);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";
-l.style.display="inline-block";p.appendChild(l);var C=document.createElement("input");C.setAttribute("value",e);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};p.appendChild(C);null!=u&&null!=b.editor.diagramFileTypes&&(u=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),u.style.marginLeft="6px",u.style.width="90px",p.appendChild(u));u=null;if("1"!=urlParams.noDevice&&null!=g&&null!=k&&"image/"==
-k.substring(0,6)&&("image/svg"!=k.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";l=document.createElement("img");var P=m?g:btoa(unescape(encodeURIComponent(g)));l.setAttribute("src","data:"+k+";base64,"+P);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");p.appendChild(l);mxClient.IS_FF||"image/png"!=k||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
-(u=mxUtils.button(mxResources.get("copy"),function(V){V=b.base64ToBlob(P,"image/png");V=new ClipboardItem({"image/png":V,"text/html":new Blob(['<img src="data:'+k+";base64,"+P+'">'],{type:"text/html"})});navigator.clipboard.write([V]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),u.style.marginTop="6px",u.className="geBtn");E&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,
-null,null,function(V){mxEvent.isPopupTrigger(V)||I("_blank")}))}mxUtils.br(p);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";p.appendChild(R);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),O.appendChild(g),A(IMAGE_PATH+"/google-drive-logo.svg",
-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),O.appendChild(g),b.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),
-mxUtils.write(g,mxResources.get("dropbox")),O.appendChild(g),b.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),O.appendChild(g),A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(g=document.createElement("option"),
-g.setAttribute("value",App.MODE_GITLAB),mxUtils.write(g,mxResources.get("gitlab")),O.appendChild(g),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),O.appendChild(g),A(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||
-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),O.appendChild(g),b.mode!=App.MODE_DEVICE&&t||g.setAttribute("selected","selected"),B&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);t&&isLocalStorage&&"0"!=urlParams.browser&&(t=document.createElement("option"),t.setAttribute("value",App.MODE_BROWSER),mxUtils.write(t,mxResources.get("browser")),O.appendChild(t),
-b.mode==App.MODE_BROWSER&&t.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));t=document.createElement("div");t.style.marginTop="26px";t.style.textAlign="center";null!=H&&(B=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),B.className="geBtn",t.appendChild(B));B=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});
-B.className="geBtn";b.editor.cancelFirst&&null==c&&t.appendChild(B);null==c&&(g=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),g.className="geBtn",t.appendChild(g));E&&Editor.popupsAllowed&&(E=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),E.className="geBtn",t.appendChild(E));CreateDialog.showDownloadButton&&(E=mxUtils.button(mxResources.get("download"),function(){I("download")}),E.className="geBtn",t.appendChild(E),null!=u&&(E.style.marginTop="6px",
-t.style.marginTop="6px"));null!=u&&(mxUtils.br(t),t.appendChild(u));b.editor.cancelFirst&&null==c||t.appendChild(B);mxEvent.addListener(C,"keypress",function(V){13==V.keyCode?I(App.MODE_DEVICE):27==V.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});p.appendChild(t);this.container=p};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+b.editor.loadUrl(b.editor.getProxiedUrl(qa),function(ra){fa=ra;ia=null;templateRealURl=qa;b.hideDialog();R()},function(ra){b.handleError(ra)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),e.className="geBtn",x.appendChild(e));Graph.fileSupport&&n&&(n=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,
+"change",function(qa){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),n.className="geBtn",x.appendChild(n));x.appendChild(F);b.editor.cancelFirst||null!=c||l&&null==p||x.appendChild(u);J.appendChild(x);this.container=J};NewDialog.tagsList={};
+var SaveDialog=function(b,e,f,c,l,p,v,t){function E(D,J,L,K,m,z){var F=null;if(null==c||0>mxUtils.indexOf(c,D)){m=null!=m?m:b.getTitleForService(D);var M=0<=mxUtils.indexOf(U,D);if(M||null!=b.getServiceForName(D)){F=document.createElement("option");var O="";!M&&b.isOffline()&&(F.setAttribute("disabled","disabled"),O=" ("+mxResources.get("offline")+")");if("pick"==z)F.innerHTML=mxUtils.htmlEntities(m)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+O,F.setAttribute("value",
+"pickFolder-"+D),F.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{M=D+(null!=L?"-"+L:"");var Q=q[M];null!=Q&&null!=Q.option&&Q.option.parentNode.removeChild(Q.option);Q=null;if(null!=J){"/"==J.charAt(J.length-1)&&(J=J.substring(0,J.length-1));"/"==J.charAt(0)&&(J=J.substring(1));Q=J;if(D!=App.MODE_GITHUB&&D==App.MODE_GITLAB){var S=Q.lastIndexOf("/");0<=S&&(Q=Q.substring(S+1))}40<Q.length&&(Q=Q.substring(0,20)+"..."+Q.substring(Q.length-20))}F.innerHTML=mxUtils.htmlEntities(m)+
+(null!=Q?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(Q):"")+O;F.setAttribute("title",m+(null!=J?" ("+J+")":"")+(null!=L&&decodeURIComponent(L)!=J?" ["+L+"]":""));F.setAttribute("value",M);q[M]={option:F,mode:D,path:J,id:L};SaveDialog.lastValue==M&&null==t&&"disabled"==!F.getAttribute("disabled")?K=!0:null==K&&("root"==z?K=null==t&&b.mode==D||null!=D&&D==t:"pickFolder-"==P.value.substring(0,11)&&(K=!0));K&&F.setAttribute("selected","selected")}P.appendChild(F)}}return F}function H(D){b.pickFolder(D,
+function(J){var L=null;D==App.MODE_GOOGLE&&null!=J.docs&&0<J.docs.length?L={mode:D,path:J.docs[0].name,id:J.docs[0].id}:D==App.MODE_ONEDRIVE&&null!=J.value&&0<J.value.length?L={mode:D,path:J.value[0].name,id:OneDriveFile.prototype.getIdOf(J.value[0])}:(D==App.MODE_GITHUB||D==App.MODE_GITLAB)&&null!=J&&0<J.length&&(L={mode:D,path:decodeURIComponent(J),id:J});null!=L&&(R.style.display="",b.addRecent(L,"Folders",5),J=E(L.mode,L.path,L.id,!0),P.innerHTML="",q={},B(),L=P.selectedIndex,P.value=J.value,
+0>P.selectedIndex&&(P.selectedIndex=L))},!0,!0,!0,!0)}function B(){var D=b.getRecent("Folders"),J=0;if(null!=D&&0<D.length){for(var L=0;L<D.length;L++)null!=E(D[L].mode,D[L].path,D[L].id)&&J++;0<J&&P.appendChild(N.cloneNode(!0))}E(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");E(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(E(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),E(App.MODE_ONEDRIVE,null,
+null,null,null,"pick"));null!=b.dropbox&&E(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);E(App.MODE_GITHUB,null,null,null,null,"pick");E(App.MODE_GITLAB,null,null,null,null,"pick");E(App.MODE_TRELLO);D=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&D&&E(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&E(App.MODE_BROWSER);
+D&&E("download");Editor.popupsAllowed&&E("_blank",null,null,null,mxResources.get("openInNewWindow"));0<J&&(P.appendChild(N.cloneNode(!0)),J=P.value,P.appendChild(R),P.value=J);if("pickFolder-"==P.value.substring(0,11)||"reset"==P.value)J=document.createElement("option"),J.setAttribute("value",""),J.setAttribute("selected","selected"),mxUtils.write(J,mxResources.get("pickFolder")+"..."),P.insertBefore(J,P.firstChild);V=P.value}function d(){if("reset"==P.value)b.resetRecent("Folders"),P.innerHTML="",
+P.value="",pickFolderOption=null,q={},B();else if("pickFolder-"==P.value.substring(0,11)){var D=P.value.substring(11);P.value=V;H(D)}else if(null!=C&&null!=q[P.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){D=b.getExtensionForService(q[P.value].mode);var J=G.value;null!=D&&0>e.indexOf(".")&&0>J.indexOf(".")&&(G.value=J+D)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==P.value||"_blank"==P.value?"ok":"save"));""==P.value?y.setAttribute("disabled",
+"disabled"):y.removeAttribute("disabled")}var g=document.createElement("div");g.style.display="flex";g.style.flexWrap="wrap";g.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="grid";k.style.gap="5px 8px";k.style.gridAutoRows="auto auto 44px";k.style.gridAutoColumns="0fr minmax(0,1fr)";k.style.width="100%";var n=null,u=null;if(null!=l&&null!=p&&"image/"==p.substring(0,6)&&("image/svg"!=p.substring(0,9)||mxClient.IS_SVG)){k.style.display="inline-grid";k.style.flexBasis=
+"75%";n=document.createElement("div");n.style.display="inline-block";n.style.height="auto";n.style.maxWidth="25%";n.style.margin="auto";var x=document.createElement("img"),A=v?l:btoa(unescape(encodeURIComponent(l)));x.setAttribute("src","data:"+p+";base64,"+A);x.style.boxSizing="border-box";x.style.maxHeight="50px";x.style.maxWidth="100%";x.style.paddingLeft="10px";n.appendChild(x);mxClient.IS_FF||"image/png"!=p||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(u=mxUtils.button(mxResources.get("copy"),
+function(){var D=b.base64ToBlob(A,"image/png");D=new ClipboardItem({"image/png":D,"text/html":new Blob(['<img src="data:'+p+";base64,"+A+'">'],{type:"text/html"})});navigator.clipboard.write([D]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(J){b.handleError(J)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(n.setAttribute("title",mxResources.get("openInNewWindow")),n.style.cursor="pointer",
+mxEvent.addGestureListeners(n,null,null,function(D){mxEvent.isPopupTrigger(D)||b.openInNewWindow(l,p,v)})):n.setAttribute("title",mxResources.get("preview"))}x=document.createElement("div");x.style.display="flex";x.style.padding="1px";x.style.alignItems="center";x.style.justifyContent="flex-end";x.style.gridColumn="1";x.style.whiteSpace="nowrap";var I=document.createElement("div");I.style.display="grid";I.style.padding="1px";I.style.alignItems="center";I.style.gridColumn="2";I.style.gridAutoColumns=
+"minmax(0,1fr) auto";I.style.gap="6px";mxUtils.write(x,mxResources.get("saveAs")+":");var G=document.createElement("input");G.setAttribute("type","text");G.setAttribute("value",e);G.style.boxSizing="border-box";G.style.width="100%";I.appendChild(G);k.appendChild(x);k.appendChild(I);var C=null;null!=b.editor.diagramFileTypes&&null==p&&(x=x.cloneNode(!1),I=I.cloneNode(!1),mxUtils.write(x,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,G,b.editor.diagramFileTypes),C.style.boxSizing="border-box",
+C.style.width="100%",I.appendChild(C),k.appendChild(x),k.appendChild(I));x=x.cloneNode(!1);I=I.cloneNode(!1);mxUtils.write(x,mxResources.get("where")+":");var P=document.createElement("select");P.style.textOverflow="ellipsis";P.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],N=document.createElement("option");N.setAttribute("disabled","disabled");N.innerHTML="-----------------";
+var V=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=P.value;var D=q[SaveDialog.lastValue];null!=D&&f(G,D.mode,D.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(G,"keypress",function(D){13==D.keyCode&&y.click()});mxEvent.addListener(P,"change",d);B();d();I.appendChild(P);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(P.value=SaveDialog.lastValue);k.appendChild(x);k.appendChild(I);g.appendChild(k);null!=n&&g.appendChild(n);k=document.createElement("div");
+k.style.flexBasis="100%";k.style.textAlign="right";k.style.marginTop=null!=p?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||k.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&k.appendChild(n);null!=u&&k.appendChild(u);k.appendChild(y);b.editor.cancelFirst||k.appendChild(n);g.appendChild(k);this.init=function(){Editor.selectFilename(G)};this.container=g},CreateDialog=
+function(b,e,f,c,l,p,v,t,E,H,B,d,g,k,n,u,x){function A(V,q,y,D){function J(){mxEvent.addListener(L,"click",function(){var M=y;if(v){var O=C.value,Q=O.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>Q){M=null!=M?M:N.value;var S="";M==App.MODE_GOOGLE?S=b.drive.extension:M==App.MODE_GITHUB?S=b.gitHub.extension:M==App.MODE_GITLAB?S=b.gitLab.extension:M==App.MODE_TRELLO?S=b.trello.extension:M==App.MODE_DROPBOX?S=b.dropbox.extension:M==App.MODE_ONEDRIVE?S=b.oneDrive.extension:M==App.MODE_DEVICE&&(S=".drawio");
+0<=Q&&(O=O.substring(0,Q));C.value=O+S}}I(y)})}var L=document.createElement("a");L.style.overflow="hidden";var K=document.createElement("img");K.src=V;K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="60px";K.style.height="60px";K.style.paddingBottom="6px";L.style.display="inline-block";L.className="geBaseButton";L.style.position="relative";L.style.margin="4px";L.style.padding="8px 8px 10px 8px";L.style.whiteSpace="nowrap";L.appendChild(K);L.style.color="gray";L.style.fontSize=
+"11px";var m=document.createElement("div");L.appendChild(m);mxUtils.write(m,q);if(null!=D&&null==b[D]){K.style.visibility="hidden";mxUtils.setOpacity(m,10);var z=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(L);var F=window.setTimeout(function(){null==b[D]&&(z.stop(),L.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[D]&&(window.clearTimeout(F),
+mxUtils.setOpacity(m,100),K.style.visibility="",z.stop(),J())}))}else J();R.appendChild(L);++U==d&&(mxUtils.br(R),U=0)}function I(V){var q=C.value;if(null==V||null!=q&&0<q.length)x&&b.hideDialog(),f(q,V,C)}B="1"==urlParams.noDevice?!1:B;v=null!=v?v:!0;t=null!=t?t:!0;d=null!=d?d:4;x=null!=x?x:!0;p=document.createElement("div");p.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(p);var G=document.createElement("h2");mxUtils.write(G,l||mxResources.get("create"));G.style.marginTop="0px";G.style.marginBottom=
+"24px";p.appendChild(G);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.display="inline-block";p.appendChild(l);var C=document.createElement("input");C.setAttribute("value",e);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};p.appendChild(C);null!=u&&null!=b.editor.diagramFileTypes&&
+(u=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),u.style.marginLeft="6px",u.style.width="90px",p.appendChild(u));u=null;if("1"!=urlParams.noDevice&&null!=g&&null!=k&&"image/"==k.substring(0,6)&&("image/svg"!=k.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";l=document.createElement("img");var P=n?g:btoa(unescape(encodeURIComponent(g)));l.setAttribute("src","data:"+k+";base64,"+P);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";
+l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");p.appendChild(l);mxClient.IS_FF||"image/png"!=k||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(u=mxUtils.button(mxResources.get("copy"),function(V){V=b.base64ToBlob(P,"image/png");V=new ClipboardItem({"image/png":V,"text/html":new Blob(['<img src="data:'+k+";base64,"+P+'">'],{type:"text/html"})});navigator.clipboard.write([V]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,
+function(q){b.handleError(q)}))}),u.style.marginTop="6px",u.className="geBtn");E&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(V){mxEvent.isPopupTrigger(V)||I("_blank")}))}mxUtils.br(p);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";p.appendChild(R);var N=document.createElement("select");N.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),
+g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),N.appendChild(g),A(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(g,mxResources.get("oneDrive")),N.appendChild(g),b.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),A(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),N.appendChild(g),b.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),A(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),N.appendChild(g),
+A(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITLAB),mxUtils.write(g,mxResources.get("gitlab")),N.appendChild(g),A(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),N.appendChild(g),A(IMAGE_PATH+
+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),N.appendChild(g),b.mode!=App.MODE_DEVICE&&t||g.setAttribute("selected","selected"),B&&A(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);t&&isLocalStorage&&"0"!=urlParams.browser&&
+(t=document.createElement("option"),t.setAttribute("value",App.MODE_BROWSER),mxUtils.write(t,mxResources.get("browser")),N.appendChild(t),b.mode==App.MODE_BROWSER&&t.setAttribute("selected","selected"),A(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));t=document.createElement("div");t.style.marginTop="26px";t.style.textAlign="center";null!=H&&(B=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),B.className="geBtn",t.appendChild(B));B=mxUtils.button(mxResources.get(null!=
+c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});B.className="geBtn";b.editor.cancelFirst&&null==c&&t.appendChild(B);null==c&&(g=mxUtils.button(mxResources.get("decideLater"),function(){I(null)}),g.className="geBtn",t.appendChild(g));E&&Editor.popupsAllowed&&(E=mxUtils.button(mxResources.get("openInNewWindow"),function(){I("_blank")}),E.className="geBtn",t.appendChild(E));CreateDialog.showDownloadButton&&(E=mxUtils.button(mxResources.get("download"),
+function(){I("download")}),E.className="geBtn",t.appendChild(E),null!=u&&(E.style.marginTop="6px",t.style.marginTop="6px"));null!=u&&(mxUtils.br(t),t.appendChild(u));b.editor.cancelFirst&&null==c||t.appendChild(B);mxEvent.addListener(C,"keypress",function(V){13==V.keyCode?I(App.MODE_DEVICE):27==V.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});p.appendChild(t);this.container=p};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var p=document.createElement("div");p.style.textAlign="center";p.style.height="100%";mxUtils.write(p,mxResources.get("fileOpenLocation"));mxUtils.br(p);mxUtils.br(p);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";p.appendChild(v);mxUtils.br(p);var t=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});t.className="geBtn gePrimaryBtn";t.style.width=v.style.width;p.appendChild(t);mxUtils.br(p);mxUtils.br(p);mxUtils.write(p,mxResources.get("allowPopups"));this.container=p},ImageDialog=function(b,e,f,c,l,p,v,t){function E(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}p=null!=p?p:!0;var H=b.editor.graph,B=document.createElement("div");
+null!=f&&f();b.openLink(e,null,!0)});t.className="geBtn gePrimaryBtn";t.style.width=v.style.width;p.appendChild(t);mxUtils.br(p);mxUtils.br(p);mxUtils.write(p,mxResources.get("allowPopups"));this.container=p},ImageDialog=function(b,e,f,c,l,p,v,t){function E(){0<d.value.length?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");"data:"!=d.value.substring(0,5)?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")}p=null!=p?p:!0;var H=b.editor.graph,B=document.createElement("div");
mxUtils.write(B,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var d=document.createElement("input");d.setAttribute("value",f);d.setAttribute("type","text");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.marginTop=
"6px";d.style.width=(Graph.fileSupport?460:340)-20+"px";d.style.backgroundImage="url('"+Editor.crossImage+"')";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="100% 50%";d.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(f,"click",function(){d.value="";d.focus()});e.appendChild(d);e.appendChild(f);B.appendChild(e);var g=t,k,m,u=function(C,P,R,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(V){b.spinner.stop();b.hideDialog();var q=!1===U?1:null!=P&&null!=R?Math.max(P/V.width,R/V.height):Math.min(1,Math.min(520/V.width,520/V.height));p&&(C=b.convertDataUri(C));c(C,
-Math.round(Number(V.width)*q),Math.round(Number(V.height)*q),g,k,m)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,g,k,m)):(C=b.convertDataUri(C),P=null==P?120:P,R=null==R?100:R,b.hideDialog(),c(C,P,R,g,k,m))},x=function(C,P){if(null!=C){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?u(C,R.width,R.height,P):u(C,null,null,P)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
+"')";mxEvent.addListener(f,"click",function(){d.value="";d.focus()});e.appendChild(d);e.appendChild(f);B.appendChild(e);var g=t,k,n,u=function(C,P,R,U){var N="data:"==C.substring(0,5);!b.isOffline()||N&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(V){b.spinner.stop();b.hideDialog();var q=!1===U?1:null!=P&&null!=R?Math.max(P/V.width,R/V.height):Math.min(1,Math.min(520/V.width,520/V.height));p&&(C=b.convertDataUri(C));c(C,
+Math.round(Number(V.width)*q),Math.round(Number(V.height)*q),g,k,n)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(C,null,null,g,k,n)):(C=b.convertDataUri(C),P=null==P?120:P,R=null==R?100:R,b.hideDialog(),c(C,P,R,g,k,n))},x=function(C,P){if(null!=C){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?u(C,R.width,R.height,P):u(C,null,null,P)}else b.hideDialog(),c(null)};this.init=function(){d.focus();
if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=B.parentNode,P=null;mxEvent.addListener(C,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=P&&(P.parentNode.removeChild(P),
-P=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(O,V,q,y,D,J,L,K){x(O,K)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var V=0;V<O.length;V++)O[V]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&x(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),
+P=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(N,V,q,y,D,J,L,K){x(N,K)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var V=0;V<N.length;V++)N[V]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&x(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),
!1)}};t=document.createElement("div");t.style.marginTop="14px";t.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&t.appendChild(f);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(d.value=C.url));d.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var A=document.createElement("input");
-A.setAttribute("multiple","multiple");A.setAttribute("type","file");mxEvent.addListener(A,"change",function(C){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(P,R,U,O,V,q){x(P)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var R=0;R<P.length;R++)P[R]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
-e.className="geBtn";t.appendChild(e)}mxEvent.addListener(d,"keypress",function(C){13==C.keyCode&&x(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,g,function(P,R,U){g=P;k=R;m=U});b.showDialog(C.container,300,390,!0,!0)});v&&(I.className="geBtn",t.appendChild(I));var F=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),
-P=new Image;P.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(P,R,mxUtils.bind(this,function(O,V,q){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(d.value=O,E()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},P.width>b.maxImageSize||P.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};P.onerror=function(){b.spinner.stop();
-b.handleError({message:mxResources.get("fileNotFound")})};P.src=C}});F.className="geBtn";mxEvent.addListener(d,"change",function(C){g=null;E()});E();t.appendChild(F);v=mxUtils.button(mxResources.get("apply"),function(){x(d.value)});v.className="geBtn gePrimaryBtn";t.appendChild(v);b.editor.cancelFirst||t.appendChild(f);Graph.fileSupport&&(t.style.marginTop="120px",B.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",B.style.backgroundPosition="center 65%",B.style.backgroundRepeat="no-repeat",
-v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),B.appendChild(v));B.appendChild(t);this.container=B},LinkDialog=function(b,e,f,c,l,p,v){function t(C,P){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;I.appendChild(R);F[C]=P}var E=document.createElement("div");E.style.height="100%";mxUtils.write(E,
+A.setAttribute("multiple","multiple");A.setAttribute("type","file");mxEvent.addListener(A,"change",function(C){null!=A.files&&(b.importFiles(A.files,0,0,b.maxImageSize,function(P,R,U,N,V,q){x(P)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var R=0;R<P.length;R++)P[R]()},!0),A.type="",A.type="file",A.value="")});A.style.display="none";document.body.appendChild(A);b.imgDlgFileInputElt=A}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
+e.className="geBtn";t.appendChild(e)}mxEvent.addListener(d,"keypress",function(C){13==C.keyCode&&x(d.value)});var I=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,d.value,g,function(P,R,U){g=P;k=R;n=U});b.showDialog(C.container,300,390,!0,!0)});v&&(I.className="geBtn",t.appendChild(I));var G=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=d.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(d.value),
+P=new Image;P.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(P,R,mxUtils.bind(this,function(N,V,q){b.spinner.stop();null!=N&&N.length<b.maxImageBytes?(d.value=N,E()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},P.width>b.maxImageSize||P.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};P.onerror=function(){b.spinner.stop();
+b.handleError({message:mxResources.get("fileNotFound")})};P.src=C}});G.className="geBtn";mxEvent.addListener(d,"change",function(C){g=null;E()});E();t.appendChild(G);v=mxUtils.button(mxResources.get("apply"),function(){x(d.value)});v.className="geBtn gePrimaryBtn";t.appendChild(v);b.editor.cancelFirst||t.appendChild(f);Graph.fileSupport&&(t.style.marginTop="120px",B.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",B.style.backgroundPosition="center 65%",B.style.backgroundRepeat="no-repeat",
+v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),B.appendChild(v));B.appendChild(t);this.container=B},LinkDialog=function(b,e,f,c,l,p,v){function t(C,P){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;I.appendChild(R);G[C]=P}var E=document.createElement("div");E.style.height="100%";mxUtils.write(E,
mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geUrlLinkContainer";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var B=document.createElement("input");B.setAttribute("placeholder",mxResources.get("dragUrlsHere"));B.setAttribute("type","text");B.style.marginTop="6px";B.style.width="414px";B.style.boxSizing="border-box";B.style.backgroundRepeat="no-repeat";B.style.backgroundPosition=
"100% 50%";B.style.paddingRight="16px";B.style.marginBottom="4px";var d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.backgroundImage="url("+Editor.crossImage+")";d.className="geAdaptiveAsset";d.style.display="inline-block";d.style.position="relative";d.style.top="3px";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";mxEvent.addListener(d,"click",function(){B.value="";B.focus()});var g=document.createElement("input");
-g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var m=document.createElement("select");m.style.width="414px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin=
+g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","geLinkDialogOption");var n=document.createElement("select");n.style.width="414px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.margin=
"0 6p 0 6px";null!=v&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);v=null!=v?v:"_blank";u.setAttribute("title",v);p&&(B.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(k.setAttribute("checked","checked"),k.defaultChecked=!0):(B.setAttribute("value",e),g.setAttribute("checked","checked"),g.defaultChecked=!0);H.appendChild(g);H.appendChild(B);H.appendChild(d);p&&(H.appendChild(u),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);H.appendChild(k);
-l=!1;for(p=0;p<b.pages.length;p++)d=document.createElement("option"),mxUtils.write(d,b.pages[p].getName()||mxResources.get("pageWithNumber",[p+1])),d.setAttribute("value","data:page/id,"+b.pages[p].getId()),e==d.getAttribute("value")&&(d.setAttribute("selected","selected"),l=!0),m.appendChild(d);if(!l&&k.checked){var x=document.createElement("option");mxUtils.write(x,mxResources.get("pageNotFound"));x.setAttribute("disabled","disabled");x.setAttribute("selected","selected");x.setAttribute("value",
-"pageNotFound");m.appendChild(x);mxEvent.addListener(m,"change",function(){null==x.parentNode||x.selected||x.parentNode.removeChild(x)})}H.appendChild(m)}else B.setAttribute("value",e),H.appendChild(B),H.appendChild(d);E.appendChild(H);var A=mxUtils.button(f,function(){b.hideDialog();c(k.checked?"pageNotFound"!==m.value?m.value:e:B.value,LinkDialog.selectedDocs,u.checked?v:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){k.checked?m.focus():(B.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(m,"focus",function(){g.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(B,"focus",function(){k.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var C=E.parentNode,P=null;mxEvent.addListener(C,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();R.preventDefault()});
+l=!1;for(p=0;p<b.pages.length;p++)d=document.createElement("option"),mxUtils.write(d,b.pages[p].getName()||mxResources.get("pageWithNumber",[p+1])),d.setAttribute("value","data:page/id,"+b.pages[p].getId()),e==d.getAttribute("value")&&(d.setAttribute("selected","selected"),l=!0),n.appendChild(d);if(!l&&k.checked){var x=document.createElement("option");mxUtils.write(x,mxResources.get("pageNotFound"));x.setAttribute("disabled","disabled");x.setAttribute("selected","selected");x.setAttribute("value",
+"pageNotFound");n.appendChild(x);mxEvent.addListener(n,"change",function(){null==x.parentNode||x.selected||x.parentNode.removeChild(x)})}H.appendChild(n)}else B.setAttribute("value",e),H.appendChild(B),H.appendChild(d);E.appendChild(H);var A=mxUtils.button(f,function(){b.hideDialog();c(k.checked?"pageNotFound"!==n.value?n.value:e:B.value,LinkDialog.selectedDocs,u.checked?v:null)});A.style.verticalAlign="middle";A.className="geBtn gePrimaryBtn";this.init=function(){k.checked?n.focus():(B.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?B.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(n,"focus",function(){g.removeAttribute("checked");k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(B,"focus",function(){k.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var C=E.parentNode,P=null;mxEvent.addListener(C,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();R.preventDefault()});
mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){try{null!=P&&(P.parentNode.removeChild(P),P=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(B.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,A.click())}catch(U){b.handleError(U)}R.stopPropagation();
R.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;
-var P=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?P="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(P="https://drive.google.com/#folders/"+C.docs[0].id);B.value=P;B.focus()}else LinkDialog.selectedDocs=null;B.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var F={};
+var P=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?P="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(P="https://drive.google.com/#folders/"+C.docs[0].id);B.value=P;B.focus()}else LinkDialog.selectedDocs=null;B.focus()};var I=document.createElement("select");I.className="geBtn";I.style.position="relative";I.style.top="1px";I.style.maxWidth="120px";var G={};
l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";I.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&t("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(P){LinkDialog.filePicked(P)}).build()}b.linkPicker.setVisible(!0)}))});
"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&t("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){B.value=C[0].link;B.focus()}})});null!=b.oneDrive&&t("oneDrive",function(){b.oneDrive.pickFile(function(C,P){null!=P&&null!=P.value&&0<P.value.length&&(B.value=P.value[0].webUrl,B.focus())},!0)});null!=b.gitHub&&t("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var P=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");
-B.value="https://github.com/"+P+"/"+R+"/blob/"+U+"/"+C;B.focus()}})});null!=b.gitLab&&t("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var P=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");B.value=DRAWIO_GITLAB_URL+"/"+P+"/"+R+"/blob/"+U+"/"+C;B.focus()}})});1<I.children.length&&(f.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=F[I.value]&&(F[I.value](),I.value="")}));mxEvent.addListener(B,"keypress",function(C){13==C.keyCode&&A.click()});f.appendChild(A);
+B.value="https://github.com/"+P+"/"+R+"/blob/"+U+"/"+C;B.focus()}})});null!=b.gitLab&&t("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var P=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");B.value=DRAWIO_GITLAB_URL+"/"+P+"/"+R+"/blob/"+U+"/"+C;B.focus()}})});1<I.children.length&&(f.appendChild(I),mxEvent.addListener(I,"change",function(C){null!=G[I.value]&&(G[I.value](),I.value="")}));mxEvent.addListener(B,"keypress",function(C){13==C.keyCode&&A.click()});f.appendChild(A);
b.editor.cancelFirst||f.appendChild(H);E.appendChild(f);this.container=E},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),p=document.createElement("div");mxUtils.write(p,mxResources.get("sendYourFeedback"));p.style.fontSize="18px";p.style.marginBottom="18px";l.appendChild(p);p=document.createElement("div");mxUtils.write(p,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(p);var v=document.createElement("input");v.setAttribute("type",
"text");v.style.marginTop="6px";v.style.width="600px";var t=mxUtils.button(mxResources.get("sendMessage"),function(){var d=B.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;d.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+d),function(g){b.spinner.stop();200<=g.getStatus()&&299>=g.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});t.className=
@@ -12498,60 +12496,60 @@ f.appendChild(p));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmen
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="3px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var p=document.createElement("div");p.style.position="absolute";p.style.left="200px";p.style.width="470px";p.style.height="376px";p.style.overflow="hidden";p.style.borderWidth=
"1px";p.style.borderStyle="solid";var v=document.createElement("div");v.style.position="absolute";v.style.display="none";v.style.textAlign="center";v.style.padding="8px";v.style.borderRadius="8px";v.style.left="50%";v.style.top="50%";v.style.whiteSpace="nowrap";v.style.transform="translate(-50%, -50%)";v.style.background="inherit";v.style.border="1px solid";p.appendChild(v);mxEvent.disableContextMenu(p);c.appendChild(p);var t=new Graph(p);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=
!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var E=0,H=null,B=0,d=t.getGlobalVariable;t.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[B]?H[B].getAttribute("name"):"pagenumber"==X?B+1:"pagecount"==X?null!=H?H.length:1:d.apply(this,arguments)};t.getLinkForCell=function(){return null};for(var g=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),k=b.getCurrentFile(),m=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),u={},x=0;x<m.length;x++)u[m[x].getAttribute("id")]=m[x];var A=null,I=null,F=null,C=null,P=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=F&&t.zoomIn()},20);P.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=F&&t.zoomOut()},20);R.setAttribute("disabled",
-"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=F&&(1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual(),t.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));O.setAttribute("disabled","disabled");var V=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));V.setAttribute("disabled","disabled");var q=p.cloneNode(!1);q.style.pointerEvent="none";p.parentNode.appendChild(q);
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),k=b.getCurrentFile(),n=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),u={},x=0;x<n.length;x++)u[n[x].getAttribute("id")]=n[x];var A=null,I=null,G=null,C=null,P=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=G&&t.zoomIn()},20);P.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=G&&t.zoomOut()},20);R.setAttribute("disabled",
+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=G&&(1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual(),t.center())},20);U.setAttribute("disabled","disabled");var N=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));N.setAttribute("disabled","disabled");var V=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));V.setAttribute("disabled","disabled");var q=p.cloneNode(!1);q.style.pointerEvent="none";p.parentNode.appendChild(q);
var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var D=document.createElement("div");D.style.textAlign="left";D.style.color="gray";D.style.backgroundColor="transparent";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.style.whiteSpace="nowrap";D.style.cursor="default";D.style.height="100%";D.style.display="inline-flex";D.style.alignItems=
-"center";D.style.flexGrow="1";mxEvent.addListener(D,"click",function(){var X=mxUtils.getTextContent(D);""!=X&&b.alert(X)});var J=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=H[E]?u[H[E].getAttribute("id")]:null;mxUtils.setOpacity(O,20);v.innerText="";if(null==Z)v.style.display="inline-block",mxUtils.write(v,mxResources.get("pageNotFound"));else{J=D.innerHTML;D.innerHTML=mxResources.get("current");p.style.display="none";q.style.display="";q.style.backgroundColor=p.style.backgroundColor;
-var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(t.view.scale,t.view.translate.x,t.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){v.style.display="inline-block",v.innerText="",mxUtils.write(v,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,60);v.style.display=
-"none";v.innerText="";"none"==p.style.display&&(p.style.display="",D.innerHTML=J,q.style.display="none")});mxEvent.addListener(V,"click",mxUtils.bind(this,function(X){null!=F&&(X=b.getPagesForNode(F.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{k.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},
-null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var L=mxUtils.button(mxResources.get("restore"),function(X){null!=F&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(L.setAttribute("disabled","disabled"),k.save(!0,function(Z){b.spinner.stop();L.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();
-L.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");var K=document.createElement("select");K.setAttribute("disabled","disabled");K.style.userSelect="none";K.style.maxWidth="100px";K.style.marginLeft="10px";K.style.display="none";var n=null;mxEvent.addListener(K,"change",function(X){null!=n&&(n(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),
-function(){null!=F&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(F.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=f&&(z.style.display="none");m=document.createElement("div");m.style.position="absolute";m.style.top="482px";
-m.style.right="28px";m.style.left="32px";m.style.justifyContent="end";m.style.display="flex";var M=document.createElement("div");M.className="geToolbarContainer";M.style.backgroundColor="transparent";M.style.left="32px";M.style.right="32px";M.style.border="none";M.style.top="442px";var N=null;if(null!=e&&0<e.length){p.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width=
+"center";D.style.flexGrow="1";mxEvent.addListener(D,"click",function(){var X=mxUtils.getTextContent(D);""!=X&&b.alert(X)});var J=null;mxEvent.addGestureListeners(N,function(X){try{var Z=null!=H[E]?u[H[E].getAttribute("id")]:null;mxUtils.setOpacity(N,20);v.innerText="";if(null==Z)v.style.display="inline-block",mxUtils.write(v,mxResources.get("pageNotFound"));else{J=D.innerHTML;D.innerHTML=mxResources.get("current");p.style.display="none";q.style.display="";q.style.backgroundColor=p.style.backgroundColor;
+var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(t.view.scale,t.view.translate.x,t.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){v.style.display="inline-block",v.innerText="",mxUtils.write(v,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(N,60);v.style.display=
+"none";v.innerText="";"none"==p.style.display&&(p.style.display="",D.innerHTML=J,q.style.display="none")});mxEvent.addListener(V,"click",mxUtils.bind(this,function(X){null!=G&&(X=b.getPagesForNode(G.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{k.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},
+null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var L=mxUtils.button(mxResources.get("restore"),function(X){null!=G&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(L.setAttribute("disabled","disabled"),k.save(!0,function(Z){b.spinner.stop();L.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();
+L.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");var K=document.createElement("select");K.setAttribute("disabled","disabled");K.style.userSelect="none";K.style.maxWidth="100px";K.style.marginLeft="10px";K.style.display="none";var m=null;mxEvent.addListener(K,"change",function(X){null!=m&&(m(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),
+function(){null!=G&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(G.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var F=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});F.className="geBtn";F.setAttribute("disabled","disabled");null!=f&&(z.style.display="none");n=document.createElement("div");n.style.position="absolute";n.style.top="482px";
+n.style.right="28px";n.style.left="32px";n.style.justifyContent="end";n.style.display="flex";var M=document.createElement("div");M.className="geToolbarContainer";M.style.backgroundColor="transparent";M.style.left="32px";M.style.right="32px";M.style.border="none";M.style.top="442px";var O=null;if(null!=e&&0<e.length){p.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width=
"100%";var S=document.createElement("tbody"),T=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(E=mxUtils.indexOf(b.pages,b.currentPage));for(x=e.length-1;0<=x;x--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ia){g.stop();v.innerText="";var ca=mxUtils.parseXml(ia),fa=b.editor.extractGraphModel(ca.documentElement,!0);if(null!=fa){var aa=function(ua){null!=ua&&(ua=ja(Editor.parseDiagramNode(ua)));return ua},ja=function(ua){var na=ua.getAttribute("background");
-if(null==na||""==na||na==mxConstants.NONE)na=t.defaultPageBackgroundColor;p.style.backgroundColor=mxUtils.getLightDarkColor(na);(new mxCodec(ua.ownerDocument)).decode(ua,t.getModel());t.maxFitScale=1;t.fit(8);t.center();t.mathEnabled="1"==ua.getAttribute("math");t.setAdaptiveColors(ua.getAttribute("adaptiveColors"));Editor.MathJaxRender&&t.mathEnabled&&Editor.MathJaxRender(t.container);return ua};K.style.display="none";K.innerText="";F=ca;C=ia;H=parseSelectFunction=null;B=0;if("mxfile"==fa.nodeName){ca=
+if(null==na||""==na||na==mxConstants.NONE)na=t.defaultPageBackgroundColor;p.style.backgroundColor=mxUtils.getLightDarkColor(na);(new mxCodec(ua.ownerDocument)).decode(ua,t.getModel());t.maxFitScale=1;t.fit(8);t.center();t.mathEnabled="1"==ua.getAttribute("math");t.setAdaptiveColors(ua.getAttribute("adaptiveColors"));Editor.MathJaxRender&&t.mathEnabled&&Editor.MathJaxRender(t.container);return ua};K.style.display="none";K.innerText="";G=ca;C=ia;H=parseSelectFunction=null;B=0;if("mxfile"==fa.nodeName){ca=
fa.getElementsByTagName("diagram");H=[];for(ia=0;ia<ca.length;ia++)H.push(ca[ia]);B=Math.min(E,H.length-1);0<H.length&&aa(H[B]);if(1<H.length)for(K.removeAttribute("disabled"),K.style.display="",ia=0;ia<H.length;ia++){ca=document.createElement("option");ca.setAttribute("title",ha+" ("+H[ia].getAttribute("id")+")");ca.setAttribute("value",ia);var ha=H[ia].getAttribute("name")||mxResources.get("pageWithNumber",[ia+1]);fa=b.getPageById(H[ia].getAttribute("id"));var ea="";if(null!=fa){var ya=new DiagramPage(H[ia]);
-b.getHashValueForPages([fa])!=b.getHashValueForPages([ya])&&(ea=" (M)")}else ea=" (X)";mxUtils.write(ca,ha+ea);ia==B&&ca.setAttribute("selected","selected");K.appendChild(ca)}n=function(){try{var ua=parseInt(K.value);B=E=ua;aa(H[ua])}catch(na){K.value=E,b.handleError(na)}}}else ja(fa);ha=X.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");D.innerText="";mxUtils.write(D,(null!=ha?ha+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());D.setAttribute("title",Y.getAttribute("title"));
-P.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");V.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&L.removeAttribute("disabled"),z.removeAttribute("disabled"),G.removeAttribute("disabled"));mxUtils.setOpacity(P,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(V,60)}else K.style.display="none",K.innerText="",D.innerText="",v.innerText="",mxUtils.write(D,
+b.getHashValueForPages([fa])!=b.getHashValueForPages([ya])&&(ea=" (M)")}else ea=" (X)";mxUtils.write(ca,ha+ea);ia==B&&ca.setAttribute("selected","selected");K.appendChild(ca)}m=function(){try{var ua=parseInt(K.value);B=E=ua;aa(H[ua])}catch(na){K.value=E,b.handleError(na)}}}else ja(fa);ha=X.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");D.innerText="";mxUtils.write(D,(null!=ha?ha+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());D.setAttribute("title",Y.getAttribute("title"));
+P.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");N.removeAttribute("disabled");V.removeAttribute("disabled");null!=k&&k.isRestricted()||(b.editor.graph.isEnabled()&&L.removeAttribute("disabled"),z.removeAttribute("disabled"),F.removeAttribute("disabled"));mxUtils.setOpacity(P,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(N,60);mxUtils.setOpacity(V,60)}else K.style.display="none",K.innerText="",D.innerText="",v.innerText="",mxUtils.write(D,
mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(da,mxResources.get("current")):Z.toDateString()===T?mxUtils.write(da,Z.toLocaleTimeString()):mxUtils.write(da,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());
-Y.appendChild(da);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ia){I!=X&&(g.stop(),null!=A&&(A.style.backgroundColor=""),I=X,A=Y,A.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=F=null,D.removeAttribute("title"),D.innerText=mxResources.get("loading")+"...",p.style.backgroundColor=t.defaultPageBackgroundColor,
-v.innerText="",t.getModel().clear(),L.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(P,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(V,20),g.spin(p),X.getXml(function(ca){if(I==
+Y.appendChild(da);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ia){I!=X&&(g.stop(),null!=A&&(A.style.backgroundColor=""),I=X,A=Y,A.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=G=null,D.removeAttribute("title"),D.innerText=mxResources.get("loading")+"...",p.style.backgroundColor=t.defaultPageBackgroundColor,
+v.innerText="",t.getModel().clear(),L.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(P,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(N,20),mxUtils.setOpacity(V,20),g.spin(p),X.getXml(function(ca){if(I==
X)try{ba(ca)}catch(fa){D.innerText=mxResources.get("error")+": "+fa.message}},function(ca){g.stop();K.style.display="none";K.innerText="";D.innerText="";mxUtils.write(D,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ia))});mxEvent.addListener(Y,"dblclick",function(ia){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ia)},!1);S.appendChild(Y)}return Y}(e[x]);
-null!=W&&x==e.length-1&&(N=W)}Q.appendChild(S);l.appendChild(Q)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(p.style.display="none",M.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(p.style.display="none",M.style.display="none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";
-M.appendChild(D);M.appendChild(O);M.appendChild(R);M.appendChild(U);M.appendChild(P);M.appendChild(K);M.appendChild(V);b.editor.cancelFirst&&m.appendChild(l);m.appendChild(z);null!=k&&k.constructor==DriveFile&&m.appendChild(G);m.appendChild(L);b.editor.cancelFirst||m.appendChild(l);c.appendChild(m);c.appendChild(M);this.container=c},DraftDialog=function(b,e,f,c,l,p,v,t,E){var H=document.createElement("div"),B=document.createElement("div");B.style.marginTop="0px";B.style.whiteSpace="nowrap";B.style.overflow=
-"auto";B.style.lineHeight="normal";mxUtils.write(B,e);H.appendChild(B);var d=document.createElement("select"),g=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,g(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,V;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(V=0;V<E.length;V++)l.apply(O,[V,mxUtils.bind(O,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(E[d.value].data),
-F=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=E){d.style.marginLeft="4px";for(e=0;e<E.length;e++){var k=document.createElement("option");k.setAttribute("value",e);var m=new Date(E[e].created),u=new Date(E[e].modified);mxUtils.write(k,m.toLocaleDateString()+" "+m.toLocaleTimeString()+" - "+(m.toDateString(),u.toDateString(),u.toLocaleDateString())+" "+u.toLocaleTimeString());d.appendChild(k)}k=document.createElement("option");k.setAttribute("value","-1");mxUtils.write(k,
+null!=W&&x==e.length-1&&(O=W)}Q.appendChild(S);l.appendChild(Q)}else null==k||null==b.drive&&k.constructor==window.DriveFile||null==b.dropbox&&k.constructor==window.DropboxFile?(p.style.display="none",M.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(p.style.display="none",M.style.display="none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";
+M.appendChild(D);M.appendChild(N);M.appendChild(R);M.appendChild(U);M.appendChild(P);M.appendChild(K);M.appendChild(V);b.editor.cancelFirst&&n.appendChild(l);n.appendChild(z);null!=k&&k.constructor==DriveFile&&n.appendChild(F);n.appendChild(L);b.editor.cancelFirst||n.appendChild(l);c.appendChild(n);c.appendChild(M);this.container=c},DraftDialog=function(b,e,f,c,l,p,v,t,E){var H=document.createElement("div"),B=document.createElement("div");B.style.marginTop="0px";B.style.whiteSpace="nowrap";B.style.overflow=
+"auto";B.style.lineHeight="normal";mxUtils.write(B,e);H.appendChild(B);var d=document.createElement("select"),g=mxUtils.bind(this,function(){"-1"==d.value?(d.value=d.options[0].value,g(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var N=this,V;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(V=0;V<E.length;V++)l.apply(N,[V,mxUtils.bind(N,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(I=mxUtils.parseXml(E[d.value].data),
+G=b.editor.extractGraphModel(I.documentElement,!0),C=0,this.init())});if(null!=E){d.style.marginLeft="4px";for(e=0;e<E.length;e++){var k=document.createElement("option");k.setAttribute("value",e);var n=new Date(E[e].created),u=new Date(E[e].modified);mxUtils.write(k,n.toLocaleDateString()+" "+n.toLocaleTimeString()+" - "+(n.toDateString(),u.toDateString(),u.toLocaleDateString())+" "+u.toLocaleTimeString());d.appendChild(k)}k=document.createElement("option");k.setAttribute("value","-1");mxUtils.write(k,
mxResources.get("deleteAll"));d.appendChild(k);B.appendChild(d);mxEvent.addListener(d,"change",g)}null==f&&(f=E[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.left="40px";x.style.right="40px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);H.appendChild(x);var A=new Graph(x);A.setEnabled(!1);A.setPanning(!0);A.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";
-A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var I=mxUtils.parseXml(f),F=b.editor.extractGraphModel(I.documentElement,!0),C=0,P=null,R=A.getGlobalVariable;A.getGlobalVariable=function(O){return"page"==O&&null!=P&&null!=P[C]?P[C].getAttribute("name"):"pagenumber"==O?C+1:"pagecount"==O?null!=P?P.length:1:R.apply(this,arguments)};A.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){A.zoomIn()},20);B=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){A.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==A.view.scale?(A.maxFitScale=8,A.fit(8)):A.zoomActual();A.center()},20);v=mxUtils.button(v||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(V){l.apply(O,[d.value,
-mxUtils.bind(O,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,g()):b.hideDialog(!0))})]);V.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});v.className="geBtn";var U=document.createElement("select");U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";p=mxUtils.button(p||mxResources.get("edit"),
-function(){c.apply(this,[d.value])});p.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function O(D){if(null!=D){var J=D.getAttribute("background");if(null==J||""==J||J==mxConstants.NONE)J=
-"light-dark(#ffffff, transparent)";x.style.backgroundColor=J;(new mxCodec(D.ownerDocument)).decode(D,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return D}function V(D){null!=D&&(D=O(Editor.parseDiagramNode(D)));return D}mxEvent.addListener(U,"change",function(D){C=parseInt(U.value);V(P[C]);mxEvent.consume(D)});if("mxfile"==F.nodeName){var q=F.getElementsByTagName("diagram");P=[];for(var y=0;y<q.length;y++)P.push(q[y]);0<P.length&&V(P[C]);U.innerText="";if(1<P.length)for(U.style.display="",y=
-0;y<P.length;y++)q=document.createElement("option"),mxUtils.write(q,P[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==C&&q.setAttribute("selected","selected"),U.appendChild(q);else U.style.display="none"}else O(F)};m.appendChild(U);m.appendChild(f);m.appendChild(B);m.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.className="geBtn";t=null!=t?mxUtils.button(mxResources.get("ignore"),t):null;null!=t&&(t.className=
-"geBtn");b.editor.cancelFirst?(k.appendChild(f),null!=t&&k.appendChild(t),k.appendChild(v),k.appendChild(p)):(k.appendChild(p),k.appendChild(v),null!=t&&k.appendChild(t),k.appendChild(f));H.appendChild(k);H.appendChild(m);this.container=H},FindWindow=function(b,e,f,c,l,p){function v(n,z,G){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var M=0;M<z.length;M++)if("label"!=z[M].nodeName){var N=mxUtils.trim(z[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();
-if(null==n&&0<=N.indexOf(G)||null!=n&&n.test(N))return!0}}return!1}function t(){k?(J.removeAttribute("disabled"),L.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"));C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function E(n,z,G){y.innerText="";var M=B.model.getDescendants(B.model.getRoot()),N=C.value.toLowerCase(),Q=R.checked?new RegExp(N):null,S=null;u=null;d!=N&&(d=N,g=null,m=!1);var T=null==g;if(0<N.length){if(m){m=
-!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}n=(W+1)%b.pages.length;g=null;do m=!1,M=b.pages[n],B=b.createTemporaryGraph(B.getStylesheet()),b.updatePageRoot(M),B.model.setRoot(M.root),n=(n+1)%b.pages.length;while(!E(!0,z,G)&&n!=W);g&&(g=null,G?b.editor.graph.model.execute(new SelectPage(b,M)):b.selectPage(M));m=!1;B=b.editor.graph;return E(!0,z,G)}for(X=0;X<M.length;X++){W=B.view.getState(M[X]);z&&(T=T||W==g);if(null!=W&&null!=W.cell.value&&(T||null==S)&&(B.model.isVertex(W.cell)||
-B.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=B.sanitizeHtml(B.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=B.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&p&&W==g&&(label=label.substr(x),Z=x);var Y=""==P.value;if(null==Q&&(0<=label.indexOf(N)||Y&&v(Q,W.cell,N))||null!=Q&&(Q.test(label)||Y&&v(Q,W.cell,N)))if(p&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(u=Y[0].toLowerCase(),x=Z+Y.index+
-u.length)):(u=N,x=Z+label.indexOf(N)+u.length)),T){S=W;break}else null==S&&(S=W)}T=T||W==g}}if(null!=S){if(X==M.length&&U.checked)return g=null,m=!0,E(!0,z,G);g=S;B.scrollCellToVisible(g.cell);B.isEnabled()&&!B.isCellLocked(g.cell)?G||B.getSelectionCell()==g.cell&&1==B.getSelectionCount()||B.setSelectionCell(g.cell):B.highlightCell(g.cell)}else{if(!n&&U.checked)return m=!0,E(!0,z,G);B.isEnabled()&&!G&&B.clearSelection()}k=null!=S;p&&!n&&t();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),
-B=b.editor.graph,d=null,g=null,k=!1,m=!1,u=null,x=0,A=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var F=p?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=F;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(p){var P=
-document.createElement("input");P.setAttribute("placeholder",mxResources.get("replaceWith"));P.setAttribute("type","text");P.style.marginTop="4px";P.style.marginBottom="6px";P.style.width=F;P.style.fontSize="12px";P.style.borderRadius="4px";P.style.padding="6px";I.appendChild(P);mxUtils.br(I);mxEvent.addListener(P,"input",t)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";I.appendChild(R);F=document.createElement("label");
-F.setAttribute("for","geFindWinRegExChck");I.appendChild(F);mxUtils.write(F,mxResources.get("regularExpression"));I.appendChild(F);F=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");F.style.position="relative";F.style.marginLeft="6px";F.style.top="3px";I.appendChild(F);mxUtils.br(I);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";I.appendChild(U);F=document.createElement("label");F.setAttribute("for",
-"geFindWinAllPagesChck");I.appendChild(F);mxUtils.write(F,mxResources.get("allPages"));I.appendChild(F);var O=document.createElement("div");mxUtils.br(I);F=document.createElement("div");F.style.left="0px";F.style.right="0px";F.style.marginTop="6px";F.style.padding="0 6px 0 6px";F.style.textAlign="center";I.appendChild(F);var V=mxUtils.button(mxResources.get("reset"),function(){y.innerText="";C.value="";C.style.backgroundColor="";p&&(P.value="",t());d=g=null;m=!1;C.focus()});V.setAttribute("title",
-mxResources.get("reset"));V.style.float="none";V.style.width="120px";V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn";p||F.appendChild(V);var q=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(n){b.handleError(n)}});q.setAttribute("title",mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft=
-"8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";F.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(p){var D=function(n,z,G,M,N){if(null==N||"1"!=N.html)return M=n.toLowerCase().indexOf(z,M),0>M?n:n.substr(0,M)+G+n.substr(M+z.length);var Q=n;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(n=n.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=n.indexOf("<",
-S+1));)N.push(S);S=n.match(/<[^>]*>/g);n=n.replace(/<[^>]*>/g,"");M=n.toLowerCase().indexOf(z,M);if(0>M)return Q;Q=M+z.length;G=mxUtils.htmlEntities(G);n=n.substr(0,M)+G+n.substr(Q);for(var T=0,W=0;W<N.length;W++){if(N[W]-T<M)n=n.substr(0,N[W])+S[W]+n.substr(N[W]);else{var X=N[W]-T<Q?M+T:N[W]+(G.length-z.length);n=n.substr(0,X)+S[W]+n.substr(X)}T+=S[W].length}return n.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},J=mxUtils.button(mxResources.get("replFind"),
-function(){try{if(null!=u&&null!=g){var n=g.cell,z=B.getLabel(n);B.isCellEditable(n)&&B.model.setValue(n,D(z,u,P.value,x-u.length,B.getCurrentCellStyle(n)));C.style.backgroundColor=E(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});J.setAttribute("title",mxResources.get("replFind"));J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled",
-"disabled");F.appendChild(J);mxUtils.br(F);var L=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=u&&null!=g){var n=g.cell,z=B.getLabel(n);B.model.setValue(n,D(z,u,P.value,x-u.length,B.getCurrentCellStyle(n)));J.setAttribute("disabled","disabled");L.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});L.setAttribute("title",mxResources.get("replace"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";
-L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");F.appendChild(L);var K=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";d=null;var n=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;B.getModel().beginUpdate();try{for(var G=0,M={};E(!1,!0,!0)&&100>G;){var N=g.cell,Q=B.getLabel(N),S=M[N.id];if(S&&S.replAllMrk==A&&S.replAllPos>=x)break;M[N.id]={replAllMrk:A,replAllPos:x};B.isCellEditable(N)&&(B.model.setValue(N,
-D(Q,u,P.value,x-u.length,B.getCurrentCellStyle(N))),G++)}n!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,n));mxUtils.write(y,mxResources.get("matchesRepl",[G]))}catch(T){b.handleError(T)}finally{B.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}A++});K.setAttribute("title",mxResources.get("replaceAll"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
-K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");F.appendChild(K);mxUtils.br(F);F.appendChild(V);V=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));V.setAttribute("title",mxResources.get("close"));V.style.float="none";V.style.width="120px";V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn";F.appendChild(V);mxUtils.br(F);F.appendChild(y)}else V.style.width=
-"90px",q.style.width="90px";mxEvent.addListener(C,"keyup",function(n){if(91==n.keyCode||93==n.keyCode||17==n.keyCode)mxEvent.consume(n);else if(27==n.keyCode)H.funct();else if(d!=C.value.toLowerCase()||13==n.keyCode)try{C.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(n){70==n.keyCode&&b.keyHandler.isControlDown(n)&&!mxEvent.isShiftDown(n)&&(H.funct(),mxEvent.consume(n))});this.window=
+A.panningHandler.ignoreCell=!0;A.panningHandler.useLeftButtonForPanning=!0;A.minFitScale=null;A.maxFitScale=null;A.centerZoom=!0;var I=mxUtils.parseXml(f),G=b.editor.extractGraphModel(I.documentElement,!0),C=0,P=null,R=A.getGlobalVariable;A.getGlobalVariable=function(N){return"page"==N&&null!=P&&null!=P[C]?P[C].getAttribute("name"):"pagenumber"==N?C+1:"pagecount"==N?null!=P?P.length:1:R.apply(this,arguments)};A.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){A.zoomIn()},20);B=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){A.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==A.view.scale?(A.maxFitScale=8,A.fit(8)):A.zoomActual();A.center()},20);v=mxUtils.button(v||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var N=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(V){l.apply(N,[d.value,
+mxUtils.bind(N,function(){null!=d.parentNode&&(d.options[d.selectedIndex].parentNode.removeChild(d.options[d.selectedIndex]),1<d.options.length?(d.value=d.options[0].value,g()):b.hideDialog(!0))})]);V.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});v.className="geBtn";var U=document.createElement("select");U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";p=mxUtils.button(p||mxResources.get("edit"),
+function(){c.apply(this,[d.value])});p.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.right="40px";k.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function N(D){if(null!=D){var J=D.getAttribute("background");if(null==J||""==J||J==mxConstants.NONE)J=
+"light-dark(#ffffff, transparent)";x.style.backgroundColor=J;(new mxCodec(D.ownerDocument)).decode(D,A.getModel());A.maxFitScale=1;A.fit(8);A.center()}return D}function V(D){null!=D&&(D=N(Editor.parseDiagramNode(D)));return D}mxEvent.addListener(U,"change",function(D){C=parseInt(U.value);V(P[C]);mxEvent.consume(D)});if("mxfile"==G.nodeName){var q=G.getElementsByTagName("diagram");P=[];for(var y=0;y<q.length;y++)P.push(q[y]);0<P.length&&V(P[C]);U.innerText="";if(1<P.length)for(U.style.display="",y=
+0;y<P.length;y++)q=document.createElement("option"),mxUtils.write(q,P[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==C&&q.setAttribute("selected","selected"),U.appendChild(q);else U.style.display="none"}else N(G)};n.appendChild(U);n.appendChild(f);n.appendChild(B);n.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.className="geBtn";t=null!=t?mxUtils.button(mxResources.get("ignore"),t):null;null!=t&&(t.className=
+"geBtn");b.editor.cancelFirst?(k.appendChild(f),null!=t&&k.appendChild(t),k.appendChild(v),k.appendChild(p)):(k.appendChild(p),k.appendChild(v),null!=t&&k.appendChild(t),k.appendChild(f));H.appendChild(k);H.appendChild(n);this.container=H},FindWindow=function(b,e,f,c,l,p){function v(m,z,F){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var M=0;M<z.length;M++)if("label"!=z[M].nodeName){var O=mxUtils.trim(z[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();
+if(null==m&&0<=O.indexOf(F)||null!=m&&m.test(O))return!0}}return!1}function t(){k?(J.removeAttribute("disabled"),L.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"));C.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function E(m,z,F){y.innerText="";var M=B.model.getDescendants(B.model.getRoot()),O=C.value.toLowerCase(),Q=R.checked?new RegExp(O):null,S=null;u=null;d!=O&&(d=O,g=null,n=!1);var T=null==g;if(0<O.length){if(n){n=
+!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;g=null;do n=!1,M=b.pages[m],B=b.createTemporaryGraph(B.getStylesheet()),b.updatePageRoot(M),B.model.setRoot(M.root),m=(m+1)%b.pages.length;while(!E(!0,z,F)&&m!=W);g&&(g=null,F?b.editor.graph.model.execute(new SelectPage(b,M)):b.selectPage(M));n=!1;B=b.editor.graph;return E(!0,z,F)}for(X=0;X<M.length;X++){W=B.view.getState(M[X]);z&&(T=T||W==g);if(null!=W&&null!=W.cell.value&&(T||null==S)&&(B.model.isVertex(W.cell)||
+B.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(N.innerHTML=B.sanitizeHtml(B.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([N])):label=B.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&p&&W==g&&(label=label.substr(x),Z=x);var Y=""==P.value;if(null==Q&&(0<=label.indexOf(O)||Y&&v(Q,W.cell,O))||null!=Q&&(Q.test(label)||Y&&v(Q,W.cell,O)))if(p&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(u=Y[0].toLowerCase(),x=Z+Y.index+
+u.length)):(u=O,x=Z+label.indexOf(O)+u.length)),T){S=W;break}else null==S&&(S=W)}T=T||W==g}}if(null!=S){if(X==M.length&&U.checked)return g=null,n=!0,E(!0,z,F);g=S;B.scrollCellToVisible(g.cell);B.isEnabled()&&!B.isCellLocked(g.cell)?F||B.getSelectionCell()==g.cell&&1==B.getSelectionCount()||B.setSelectionCell(g.cell):B.highlightCell(g.cell)}else{if(!m&&U.checked)return n=!0,E(!0,z,F);B.isEnabled()&&!F&&B.clearSelection()}k=null!=S;p&&!m&&t();return 0==O.length||null!=S}var H=b.actions.get("findReplace"),
+B=b.editor.graph,d=null,g=null,k=!1,n=!1,u=null,x=0,A=1,I=document.createElement("div");I.style.userSelect="none";I.style.overflow="hidden";I.style.padding="10px";I.style.height="100%";var G=p?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=G;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";I.appendChild(C);mxUtils.br(I);if(p){var P=
+document.createElement("input");P.setAttribute("placeholder",mxResources.get("replaceWith"));P.setAttribute("type","text");P.style.marginTop="4px";P.style.marginBottom="6px";P.style.width=G;P.style.fontSize="12px";P.style.borderRadius="4px";P.style.padding="6px";I.appendChild(P);mxUtils.br(I);mxEvent.addListener(P,"input",t)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";I.appendChild(R);G=document.createElement("label");
+G.setAttribute("for","geFindWinRegExChck");I.appendChild(G);mxUtils.write(G,mxResources.get("regularExpression"));I.appendChild(G);G=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");G.style.position="relative";G.style.marginLeft="6px";G.style.top="3px";I.appendChild(G);mxUtils.br(I);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");U.setAttribute("type","checkbox");U.style.marginRight="4px";I.appendChild(U);G=document.createElement("label");G.setAttribute("for",
+"geFindWinAllPagesChck");I.appendChild(G);mxUtils.write(G,mxResources.get("allPages"));I.appendChild(G);var N=document.createElement("div");mxUtils.br(I);G=document.createElement("div");G.style.left="0px";G.style.right="0px";G.style.marginTop="6px";G.style.padding="0 6px 0 6px";G.style.textAlign="center";I.appendChild(G);var V=mxUtils.button(mxResources.get("reset"),function(){y.innerText="";C.value="";C.style.backgroundColor="";p&&(P.value="",t());d=g=null;n=!1;C.focus()});V.setAttribute("title",
+mxResources.get("reset"));V.style.float="none";V.style.width="120px";V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn";p||G.appendChild(V);var q=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft=
+"8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";G.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(p){var D=function(m,z,F,M,O){if(null==O||"1"!=O.html)return M=m.toLowerCase().indexOf(z,M),0>M?m:m.substr(0,M)+F+m.substr(M+z.length);var Q=m;z=mxUtils.htmlEntities(z,!1,!1,!1);O=[];var S=-1;for(m=m.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",
+S+1));)O.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");M=m.toLowerCase().indexOf(z,M);if(0>M)return Q;Q=M+z.length;F=mxUtils.htmlEntities(F);m=m.substr(0,M)+F+m.substr(Q);for(var T=0,W=0;W<O.length;W++){if(O[W]-T<M)m=m.substr(0,O[W])+S[W]+m.substr(O[W]);else{var X=O[W]-T<Q?M+T:O[W]+(F.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}T+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},J=mxUtils.button(mxResources.get("replFind"),
+function(){try{if(null!=u&&null!=g){var m=g.cell,z=B.getLabel(m);B.isCellEditable(m)&&B.model.setValue(m,D(z,u,P.value,x-u.length,B.getCurrentCellStyle(m)));C.style.backgroundColor=E(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(F){b.handleError(F)}});J.setAttribute("title",mxResources.get("replFind"));J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled",
+"disabled");G.appendChild(J);mxUtils.br(G);var L=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=u&&null!=g){var m=g.cell,z=B.getLabel(m);B.model.setValue(m,D(z,u,P.value,x-u.length,B.getCurrentCellStyle(m)));J.setAttribute("disabled","disabled");L.setAttribute("disabled","disabled")}}catch(F){b.handleError(F)}});L.setAttribute("title",mxResources.get("replace"));L.style.float="none";L.style.width="120px";L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";
+L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");G.appendChild(L);var K=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";d=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;B.getModel().beginUpdate();try{for(var F=0,M={};E(!1,!0,!0)&&100>F;){var O=g.cell,Q=B.getLabel(O),S=M[O.id];if(S&&S.replAllMrk==A&&S.replAllPos>=x)break;M[O.id]={replAllMrk:A,replAllPos:x};B.isCellEditable(O)&&(B.model.setValue(O,
+D(Q,u,P.value,x-u.length,B.getCurrentCellStyle(O))),F++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[F]))}catch(T){b.handleError(T)}finally{B.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}A++});K.setAttribute("title",mxResources.get("replaceAll"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
+K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");G.appendChild(K);mxUtils.br(G);G.appendChild(V);V=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));V.setAttribute("title",mxResources.get("close"));V.style.float="none";V.style.width="120px";V.style.marginTop="6px";V.style.marginLeft="8px";V.style.overflow="hidden";V.style.textOverflow="ellipsis";V.className="geBtn";G.appendChild(V);mxUtils.br(G);G.appendChild(y)}else V.style.width=
+"90px",q.style.width="90px";mxEvent.addListener(C,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(d!=C.value.toLowerCase()||13==m.keyCode)try{C.style.backgroundColor=E()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(I,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&!mxEvent.isShiftDown(m)&&(H.funct(),mxEvent.consume(m))});this.window=
new mxWindow(mxResources.get("find")+(p?"/"+mxResources.get("replace"):""),I,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=
!1,U.setAttribute("disabled","disabled"))):B.container.focus()}));b.installResizeHandler(this,!1);this.focus=function(){C.focus()}},FreehandWindow=function(b,e,f,c,l,p){var v=b.editor.graph,t=document.createElement("div");t.style.textAlign="center";t.style.userSelect="none";t.style.overflow="hidden";t.style.height="100%";if(p){var E=function(){var k=v.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=mxResources.get("useBlackAndWhite"):(k="#"==
k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&B.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=v.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";t.appendChild(H);v.freehand.setPerfectFreehandMode(H.checked);p=document.createElement("label");p.setAttribute("for","geFreehandBrush");p.style.float="left";p.style.marginTop=
"10px";t.appendChild(p);mxUtils.write(p,mxResources.get("brush"));t.appendChild(p);var B=document.createElement("tempDiv");B.style.display="block";B.style.width="100%";B.style.height="100%";B.style.borderRadius="2px";B.style.boxSizing="border-box";B.style.border="1px solid black";B.style.backgroundColor=v.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){B.style.backgroundColor=v.freehand.getStrokeColor()});E();p=mxUtils.button("",mxUtils.bind(this,function(k){b.pickColor(v.freehand.getStrokeColor(!0),
-function(m){v.freehand.setStrokeColor(m);B.style.backgroundColor=v.freehand.getStrokeColor();E()},"default");mxEvent.consume(k)}));p.style.position="absolute";p.style.boxSizing="border-box";p.style.padding="2px";p.style.top="8px";p.style.right="8px";p.style.width="28px";p.style.height="18px";p.className="geColorBtn";p.innerText="";p.appendChild(B);t.appendChild(p);p=document.createElement("img");p.setAttribute("title",mxResources.get("settings"));p.setAttribute("src",Editor.gearImage);p.className=
-"geButton";p.style.position="absolute";p.style.boxSizing="border-box";p.style.padding="2px";p.style.top="8px";p.style.right="38px";p.style.width="18px";p.style.height="18px";p.style.opacity="0.6";t.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(k){k=v.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(m){!isNaN(m)&&0<m&&20>=m&&v.freehand.setSmoothing(parseInt(m))})}));mxUtils.br(t);var d=document.createElement("input");d.setAttribute("type",
+function(n){v.freehand.setStrokeColor(n);B.style.backgroundColor=v.freehand.getStrokeColor();E()},"default");mxEvent.consume(k)}));p.style.position="absolute";p.style.boxSizing="border-box";p.style.padding="2px";p.style.top="8px";p.style.right="8px";p.style.width="28px";p.style.height="18px";p.className="geColorBtn";p.innerText="";p.appendChild(B);t.appendChild(p);p=document.createElement("img");p.setAttribute("title",mxResources.get("settings"));p.setAttribute("src",Editor.gearImage);p.className=
+"geButton";p.style.position="absolute";p.style.boxSizing="border-box";p.style.padding="2px";p.style.top="8px";p.style.right="38px";p.style.width="18px";p.style.height="18px";p.style.opacity="0.6";t.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(k){k=v.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(n){!isNaN(n)&&0<n&&20>=n&&v.freehand.setSmoothing(parseInt(n))})}));mxUtils.br(t);var d=document.createElement("input");d.setAttribute("type",
"range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",v.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";t.appendChild(d);mxUtils.br(t);p=function(){v.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",p);p();mxEvent.addListener(d,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var g=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?
v.freehand.stopDrawing():v.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.width="90%";g.style.position="relative";g.className="geBtn gePrimaryBtn";t.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),t,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);v.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(v.freehand.isDrawing()?
"stopDrawing":"startDrawing"));var k=document.createElement("span");k.className="geShortcutKey";k.style.margin="0 2px 4px 0";mxUtils.write(k,"X");g.appendChild(k);g.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(v.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&v.freehand.stopDrawing()}));
@@ -12560,114 +12558,114 @@ b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var p=
t=t.cloneNode(!1);t.appendChild(E);t.style.paddingTop="8px";mxUtils.write(t,mxResources.get("labels"));v.appendChild(t);this.window=new mxWindow(mxResources.get("adaptiveColors"),v,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function p(){V=
!0;x.value=q;d.isSelectionEmpty()?(I.setAttribute("disabled","disabled"),"selectionOnly"==x.value&&(x.value="includeCopyOfMyDiagram")):I.removeAttribute("disabled");b.isDiagramEmpty()?(A.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==x.value&&(x.value="help")):A.removeAttribute("disabled");V=!1}function v(D,J,L){var K=document.createElement("button");K.className="geBtn gePrimaryBtn";K.style.padding="4px";K.style.height="auto";K.style.position="relative";"flex"==L?(K.style.overflow=
"hidden",K.style.textOverflow="ellipsis",K.style.whiteSpace="nowrap",K.style.margin="0px",K.style.flexGrow="1"):(K.style.display="block",K.style.margin="8px",K.style.left="50%",K.style.transform="translateX(-50%)");mxUtils.write(K,D);K.setAttribute("title",D);mxEvent.addListener(K,"click",J);return K}function t(D){var J=document.createElement("div");J.style.display="block";J.style.position="relative";J.style.backgroundColor="#e0e0e0";J.style.borderRadius="4px";J.style.wordWrap="break-word";J.style.textAlign=
-"left";J.style.padding="6px";J.style.margin="12px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,D);k.appendChild(J);return J}function E(D){var J=D.indexOf("<mxGraphModel "),L=D.indexOf("</mxGraphModel>");0>J&&(J=D.indexOf("<mxGraphModel>"));if(0<=J&&L>J){var K=mxUtils,n=K.trim,z=D.substring(0,J),G=z.indexOf("```");0<=G&&(z=z.substring(z,0,G+6));K=n.call(K,z);J=D.substring(J,L+15);n=mxUtils;z=n.trim;D=D.substring(L+15);L=D.lastIndexOf("```");0<=L&&(D=D.substring(L+3));return[K,J,z.call(n,
-D)]}return null}function H(D){var J=t(D);J.style.cursor="pointer";J.style.marginBottom="2px";J.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(J,"click",function(T){O.value=D;O.focus()});var L=t("");L.style.marginTop="2px";var K=b.currentPage,n=D,z=[],G=null;if("includeCopyOfMyDiagram"==x.value||"selectionOnly"==x.value){var M=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==x.value&&(M.isObjectIgnored=function(T){return T.constructor==mxCell&&!d.model.isRoot(T)&&!d.model.isLayer(T)&&
-!d.isCellSelected(T)&&!d.isAncestorSelected(T)});G=M.encode(d.getModel());M.document.appendChild(G);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==x.value?(n=C.value.replace(/([A-Z])/g," $1").toLowerCase(),n="Write the declaration code for a "+(""!=n?n:"graph")+' that shows "'+(""!=D?D:"something random")+
-'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:n});var N={model:Editor.gptModel,messages:z},Q=0;for(z=0;z<N.messages.length;z++)Q+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){L.innerHTML="";mxUtils.write(L,
-mxResources.get("loading")+"...");var T=document.createElement("img");T.setAttribute("title","Processing "+Q+" tokens");T.setAttribute("src",IMAGE_PATH+"/spin.gif");T.style.marginLeft="6px";L.appendChild(T);L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,da){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);
+"left";J.style.padding="6px";J.style.margin="12px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,D);k.appendChild(J);return J}function E(D){var J=D.indexOf("<mxGraphModel "),L=D.indexOf("</mxGraphModel>");0>J&&(J=D.indexOf("<mxGraphModel>"));if(0<=J&&L>J){var K=mxUtils,m=K.trim,z=D.substring(0,J),F=z.indexOf("```");0<=F&&(z=z.substring(z,0,F+6));K=m.call(K,z);J=D.substring(J,L+15);m=mxUtils;z=m.trim;D=D.substring(L+15);L=D.lastIndexOf("```");0<=L&&(D=D.substring(L+3));return[K,J,z.call(m,
+D)]}return null}function H(D){var J=t(D);J.style.cursor="pointer";J.style.marginBottom="2px";J.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(J,"click",function(T){N.value=D;N.focus()});var L=t("");L.style.marginTop="2px";var K=b.currentPage,m=D,z=[],F=null;if("includeCopyOfMyDiagram"==x.value||"selectionOnly"==x.value){var M=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==x.value&&(M.isObjectIgnored=function(T){return T.constructor==mxCell&&!d.model.isRoot(T)&&!d.model.isLayer(T)&&
+!d.isCellSelected(T)&&!d.isAncestorSelected(T)});F=M.encode(d.getModel());M.document.appendChild(F);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(F)})}else"create"==x.value?(m=C.value.replace(/([A-Z])/g," $1").toLowerCase(),m="Write the declaration code for a "+(""!=m?m:"graph")+' that shows "'+(""!=D?D:"something random")+
+'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:m});var O={model:Editor.gptModel,messages:z},Q=0;for(z=0;z<O.messages.length;z++)Q+=O.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){L.innerHTML="";mxUtils.write(L,
+mxResources.get("loading")+"...");var T=document.createElement("img");T.setAttribute("title","Processing "+Q+" tokens");T.setAttribute("src",IMAGE_PATH+"/spin.gif");T.style.marginLeft="6px";L.appendChild(T);L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(O),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,da){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);
ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();L.innerHTML="";mxUtils.write(L,ba.message);L.appendChild(v(mxResources.get("tryAgain"),S));L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var da=E(ba),ia=null!=da?b.stringToCells(da[1]):null;if(null!=ia&&0<ia.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";
-ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var ca=mxUtils.parseXml(da[1]),fa=new mxCodec(ca),aa=new mxGraphModel;fa.decode(ca.documentElement,aa);var ja=null;null!=G&&(ca=new mxCodec(G.ownerDocument),ja=new mxGraphModel,ca.decode(G,ja));ca=mxUtils.bind(this,function(ha){d.model.beginUpdate();try{if(null!=ja&&null!=b.getPageIndex(K)){b.selectPage(K);var ea=b.diffCells(ja.root,aa.root);b.patchPage(K,ea,null,!0)}else{var ya=aa.getChildren(aa.getChildAt(aa.getRoot(),
+ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var ca=mxUtils.parseXml(da[1]),fa=new mxCodec(ca),aa=new mxGraphModel;fa.decode(ca.documentElement,aa);var ja=null;null!=F&&(ca=new mxCodec(F.ownerDocument),ja=new mxGraphModel,ca.decode(F,ja));ca=mxUtils.bind(this,function(ha){d.model.beginUpdate();try{if(null!=ja&&null!=b.getPageIndex(K)){b.selectPage(K);var ea=b.diffCells(ja.root,aa.root);b.patchPage(K,ea,null,!0)}else{var ya=aa.getChildren(aa.getChildAt(aa.getRoot(),
0));d.setSelectionCells(d.importCells(ya))}}finally{d.model.endUpdate()}mxEvent.consume(ha)});fa=d.getBoundingBoxFromGeometry(ia);null!=fa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ia,fa.width,fa.height,"",!0,null,!0,!0,ca,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));L.innerHTML="";J=L;0<da[0].length&&(mxUtils.write(J,da[0]),mxUtils.br(J));J.appendChild(ba);ia=document.createElement("div");ia.style.display="flex";ia.style.gap=
-"6px";ia.style.margin="6px";ia.appendChild(v(mxResources.get("tryAgain"),S,"flex"));ia.appendChild(v(mxResources.get(null!=G?"apply":"insert"),ca,"flex"));L.appendChild(ia);0<da[2].length&&(mxUtils.br(J),mxUtils.write(J,da[2]));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else L.innerHTML="",J=L,mxUtils.write(J,ba),L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var da=
-JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",N,"response:",da);var ia=mxUtils.trim(da.choices[0].message.content);if("create"==x.value){var ca=b.extractMermaidDeclaration(ia);null!=ca?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ja){Y(ja)})),b.generateMermaidImage(ca,null,function(){},function(ja){mxMermaidToDrawio.resetListeners();Z(ja)})):(Y(ia),L.appendChild(v(mxResources.get("tryAgain"),S)))}else Y(ia)}else{var fa="Error: "+ba.getStatus();try{var aa=
-JSON.parse(ba.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(fa=aa.error.message)}catch(ja){}L.innerHTML="";mxUtils.write(L,fa);L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ja){Z(ja)}}),Z)}),function(W){L.innerHTML="";mxUtils.write(L,W.message);L.appendChild(v(mxResources.get("tryAgain"),S));L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function B(){""!=mxUtils.trim(O.value)&&(H(O.value),O.value="")}var d=b.editor.graph,g=document.createElement("div");
-g.style.textAlign="center";g.style.overflow="hidden";g.style.height="100%";var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.top="0px";k.style.left="0px";k.style.right="0px";k.style.bottom="104px";g.appendChild(k);var m=document.createElement("div");m.style.position="absolute";m.style.boxSizing="border-box";m.style.borderRadius="4px";m.style.border="1px solid lightgray";m.style.margin="8px 8px 16px 8px";m.style.padding="8px";m.style.left="0px";m.style.right=
-"0px";m.style.bottom="0px";m.style.padding="6px";m.style.height="80px";var u=document.createElement("div");u.style.display="flex";u.style.gap="6px";u.style.marginBottom="6px";var x=document.createElement("select");x.style.textOverflow="ellipsis";x.style.flexGrow="1";x.style.padding="4px";x.style.minWidth="0";m.appendChild(u);var A=document.createElement("option");A.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(A);var I=document.createElement("option");
-I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));x.appendChild(I);u.appendChild(x);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var F=document.createElement("option");F.setAttribute("value","create");mxUtils.write(F,mxResources.get("create"));x.appendChild(F)}F=document.createElement("option");F.setAttribute("value","help");mxUtils.write(F,mxResources.get("help"));x.appendChild(F);F=document.createElement("option");F.setAttribute("value",
-"reset");mxUtils.write(F,mxResources.get("reset"));x.appendChild(F);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(F=0;F<EditorUi.mermaidDiagramTypes.length;F++){var P=document.createElement("option"),R=EditorUi.mermaidDiagramTypes[F],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));P.setAttribute("value",R);mxUtils.write(P,
-U);C.appendChild(P)}u.appendChild(C);u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.textOverflow="clip";u.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";u.appendChild(O);F=document.createElement("img");F.setAttribute("src",Editor.sendImage);F.setAttribute("title",mxResources.get("sendMessage"));
-F.className="geAdaptiveAsset";F.style.position="relative";F.style.cursor="pointer";F.style.opacity="0.5";F.style.height="19px";F.style.left="-24px";F.style.top="5px";F.style.background="url('"+b.editor.transparentImage+"')";u.appendChild(F);m.appendChild(u);d.isSelectionEmpty()?b.isDiagramEmpty()?x.value="help":x.value="includeCopyOfMyDiagram":x.value="selectionOnly";var V=!1,q=x.value,y=function(){O.setAttribute("placeholder",mxResources.get("create"==x.value?"describeYourDiagram":"askMeAnything"));
-"create"==x.value?(x.style.width="",C.style.display=""):(x.style.width="100%",C.style.display="none")};y();mxEvent.addListener(x,"change",function(){V||("reset"==x.value?(x.value=q,k.innerHTML=""):q=x.value,y())});d.selectionModel.addListener(mxEvent.CHANGE,p);d.getModel().addListener(mxEvent.CHANGE,p);p();mxEvent.addListener(F,"click",B);mxEvent.addListener(O,"keydown",function(D){13!=D.keyCode||mxEvent.isShiftDown(D)||B()});g.appendChild(m);this.window=new mxWindow(mxResources.get("chatWindowTitle"),
-g,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(p)}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var p=b.editor.graph,v=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)v=
-b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var t=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(E,H){if(p.isEnabled()){var B=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=d.split(" ");for(var g=[],k=[],m=0;m<d.length;m++){var u=mxUtils.trim(d[m]);""!=u&&(k.push(u),0>mxUtils.indexOf(E,u)&&g.push(u))}p.isSelectionEmpty()?H(E.concat(g)):p.addTagsForCells(p.getSelectionCells(),
+"6px";ia.style.margin="6px";ia.appendChild(v(mxResources.get("tryAgain"),S,"flex"));ia.appendChild(v(mxResources.get(null!=F?"apply":"insert"),ca,"flex"));L.appendChild(ia);0<da[2].length&&(mxUtils.br(J),mxUtils.write(J,da[2]));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else L.innerHTML="",J=L,mxUtils.write(J,ba),L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var da=
+JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",O,"response:",da);var ia=mxUtils.trim(da.choices[0].message.content);if("create"==x.value){var ca=b.extractMermaidDeclaration(ia);null!=ca?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ja){Y(ja)})),b.generateMermaidImage(ca,null,function(){},function(ja){mxMermaidToDrawio.resetListeners();Z(ja)})):(Y(ia),L.appendChild(v(mxResources.get("tryAgain"),S)))}else Y(ia)}else{var fa="Error: "+ba.getStatus();try{var aa=
+JSON.parse(ba.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(fa=aa.error.message)}catch(ja){}L.innerHTML="";mxUtils.write(L,fa);L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ja){Z(ja)}}),Z)}),function(W){L.innerHTML="";mxUtils.write(L,W.message);L.appendChild(v(mxResources.get("tryAgain"),S));L.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function B(){""!=mxUtils.trim(N.value)&&(H(N.value),N.value="")}var d=b.editor.graph,g=document.createElement("div");
+g.style.textAlign="center";g.style.overflow="hidden";g.style.height="100%";var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.top="0px";k.style.left="0px";k.style.right="0px";k.style.bottom="104px";g.appendChild(k);var n=document.createElement("div");n.style.position="absolute";n.style.boxSizing="border-box";n.style.borderRadius="4px";n.style.border="1px solid lightgray";n.style.margin="8px 8px 16px 8px";n.style.padding="8px";n.style.left="0px";n.style.right=
+"0px";n.style.bottom="0px";n.style.padding="6px";n.style.height="80px";var u=document.createElement("div");u.style.display="flex";u.style.gap="6px";u.style.marginBottom="6px";var x=document.createElement("select");x.style.textOverflow="ellipsis";x.style.flexGrow="1";x.style.padding="4px";x.style.minWidth="0";n.appendChild(u);var A=document.createElement("option");A.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(A);var I=document.createElement("option");
+I.setAttribute("value","selectionOnly");mxUtils.write(I,mxResources.get("selectionOnly"));x.appendChild(I);u.appendChild(x);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var G=document.createElement("option");G.setAttribute("value","create");mxUtils.write(G,mxResources.get("create"));x.appendChild(G)}G=document.createElement("option");G.setAttribute("value","help");mxUtils.write(G,mxResources.get("help"));x.appendChild(G);G=document.createElement("option");G.setAttribute("value",
+"reset");mxUtils.write(G,mxResources.get("reset"));x.appendChild(G);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(G=0;G<EditorUi.mermaidDiagramTypes.length;G++){var P=document.createElement("option"),R=EditorUi.mermaidDiagramTypes[G],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));P.setAttribute("value",R);mxUtils.write(P,
+U);C.appendChild(P)}u.appendChild(C);u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.textOverflow="clip";u.style.cursor="default";var N=document.createElement("input");N.setAttribute("type","text");N.style.width="100%";N.style.outline="none";N.style.border="none";N.style.background="transparent";N.style.padding="8px 26px 8px 8px";N.style.boxSizing="border-box";u.appendChild(N);G=document.createElement("img");G.setAttribute("src",Editor.sendImage);G.setAttribute("title",mxResources.get("sendMessage"));
+G.className="geAdaptiveAsset";G.style.position="relative";G.style.cursor="pointer";G.style.opacity="0.5";G.style.height="19px";G.style.left="-24px";G.style.top="5px";G.style.background="url('"+b.editor.transparentImage+"')";u.appendChild(G);n.appendChild(u);d.isSelectionEmpty()?b.isDiagramEmpty()?x.value="help":x.value="includeCopyOfMyDiagram":x.value="selectionOnly";var V=!1,q=x.value,y=function(){N.setAttribute("placeholder",mxResources.get("create"==x.value?"describeYourDiagram":"askMeAnything"));
+"create"==x.value?(x.style.width="",C.style.display=""):(x.style.width="100%",C.style.display="none")};y();mxEvent.addListener(x,"change",function(){V||("reset"==x.value?(x.value=q,k.innerHTML=""):q=x.value,y())});d.selectionModel.addListener(mxEvent.CHANGE,p);d.getModel().addListener(mxEvent.CHANGE,p);p();mxEvent.addListener(G,"click",B);mxEvent.addListener(N,"keydown",function(D){13!=D.keyCode||mxEvent.isShiftDown(D)||B()});g.appendChild(n);this.window=new mxWindow(mxResources.get("chatWindowTitle"),
+g,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){d.getModel().removeListener(p)}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();N.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var p=b.editor.graph,v=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)v=
+b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var t=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(E,H){if(p.isEnabled()){var B=new FilenameDialog(b,"",mxResources.get("add"),function(d){b.hideDialog();if(null!=d&&0<d.length){d=d.split(" ");for(var g=[],k=[],n=0;n<d.length;n++){var u=mxUtils.trim(d[n]);""!=u&&(k.push(u),0>mxUtils.indexOf(E,u)&&g.push(u))}p.isSelectionEmpty()?H(E.concat(g)):p.addTagsForCells(p.getSelectionCells(),
k)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(B.container,320,80,!0,!0);B.init()}},v);v=t.div;this.window=new mxWindow(mxResources.get("tags"),v,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){t.refresh();this.window.fit()}));b.installResizeHandler(this,
!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var p=document.createElement("p");p.style.fontSize="16pt";p.style.padding="0px";p.style.margin="0px";p.style.color="gray";mxUtils.write(p,mxResources.get("authorizationRequired"));var v="Unknown",t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),t.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
e==b.dropbox?(v=mxResources.get("dropbox"),t.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),t.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),t.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),t.src=IMAGE_PATH+"/gitlab-logo.svg",t.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),t.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
[v]));var E=document.createElement("input");E.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(E.checked)});v.insertBefore(t,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize="18px";v.style.padding="14px";l.appendChild(p);l.appendChild(b);l.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(E),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberMe")),f.appendChild(p),
l.appendChild(f),E.checked=!0,E.defaultChecked=!0,mxEvent.addListener(p,"click",function(H){E.checked=!E.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var p=0;p<b.sidebar.customEntries.length;p++){for(var v=b.sidebar.customEntries[p]||{},t={title:b.getResource(v.title),entries:[]},E=0;null!=v.entries&&E<v.entries.length;E++){var H=v.entries[E];t.entries.push({id:H.id,
-title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<t.entries.length&&l.push(t)}for(p=0;p<f.length;p++)if(null==b.sidebar.enabledLibraries)l.push(f[p]);else{t={title:f[p].title,entries:[]};for(E=0;E<f[p].entries.length;E++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[p].entries[E].id)&&t.entries.push(f[p].entries[E]);0<t.entries.length&&l.push(t)}f=l;if(e){p=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(O){var V=m.cloneNode(!1);V.style.fontWeight="bold";
-V.style.backgroundColor="light-dark(#e5e5e5, #505759)";V.style.padding="6px 0px 6px 20px";mxUtils.write(V,O.title);B.appendChild(V);for(var q=0;q<O.entries.length;q++)(function(y){var D=m.cloneNode(!1);D.style.cursor="pointer";D.style.padding="4px 0px 4px 20px";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.setAttribute("title",y.title+" ("+y.id+")");var J=document.createElement("input");J.setAttribute("type","checkbox");J.checked=b.sidebar.isEntryVisible(y.id);
-J.defaultChecked=J.checked;D.appendChild(J);mxUtils.write(D," "+y.title);B.appendChild(D);var L=function(K){if(null==K||"INPUT"!=mxEvent.getSource(K).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=y.desc){var n=document.createElement("pre");n.style.boxSizing="border-box";n.style.fontFamily="inherit";n.style.margin="20px";n.style.right="0px";n.style.textAlign="left";mxUtils.write(n,y.desc);d.appendChild(n)}null!=y.imageCallback?y.imageCallback(d):
-null!=y.image?(n=document.createElement("img"),n.setAttribute("border","0"),n.style.maxWidth="100%",n.setAttribute("src",y.image),d.appendChild(n)):null==y.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=g&&(g.style.backgroundColor="");g=D;g.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=K&&mxEvent.consume(K)}};mxEvent.addListener(D,"click",L);mxEvent.addListener(D,"dblclick",function(K){J.checked=!J.checked;mxEvent.consume(K)});
-k.push(function(){return J.checked?y.id:null});0==U&&0==q&&L()})(O.entries[q])})(R[U])});E=document.createElement("div");E.className="geDialogTitle";mxUtils.write(E,mxResources.get("shapes"));E.style.position="absolute";E.style.top="0px";E.style.left="0px";E.style.lineHeight="40px";E.style.height="40px";E.style.right="0px";var B=document.createElement("div"),d=document.createElement("div");B.style.position="absolute";B.style.top="40px";B.style.left="0px";B.style.width="202px";B.style.bottom="60px";
-B.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var g=null,k=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";p(f);c.style.padding="30px";c.appendChild(E);c.appendChild(B);c.appendChild(d);f=document.createElement("div");f.className="geDialogFooter";
+title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<t.entries.length&&l.push(t)}for(p=0;p<f.length;p++)if(null==b.sidebar.enabledLibraries)l.push(f[p]);else{t={title:f[p].title,entries:[]};for(E=0;E<f[p].entries.length;E++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[p].entries[E].id)&&t.entries.push(f[p].entries[E]);0<t.entries.length&&l.push(t)}f=l;if(e){p=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(N){var V=n.cloneNode(!1);V.style.fontWeight="bold";
+V.style.backgroundColor="light-dark(#e5e5e5, #505759)";V.style.padding="6px 0px 6px 20px";mxUtils.write(V,N.title);B.appendChild(V);for(var q=0;q<N.entries.length;q++)(function(y){var D=n.cloneNode(!1);D.style.cursor="pointer";D.style.padding="4px 0px 4px 20px";D.style.whiteSpace="nowrap";D.style.overflow="hidden";D.style.textOverflow="ellipsis";D.setAttribute("title",y.title+" ("+y.id+")");var J=document.createElement("input");J.setAttribute("type","checkbox");J.checked=b.sidebar.isEntryVisible(y.id);
+J.defaultChecked=J.checked;D.appendChild(J);mxUtils.write(D," "+y.title);B.appendChild(D);var L=function(K){if(null==K||"INPUT"!=mxEvent.getSource(K).nodeName){d.style.textAlign="center";d.style.padding="0px";d.style.color="";d.innerText="";if(null!=y.desc){var m=document.createElement("pre");m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20px";m.style.right="0px";m.style.textAlign="left";mxUtils.write(m,y.desc);d.appendChild(m)}null!=y.imageCallback?y.imageCallback(d):
+null!=y.image?(m=document.createElement("img"),m.setAttribute("border","0"),m.style.maxWidth="100%",m.setAttribute("src",y.image),d.appendChild(m)):null==y.desc&&(d.style.padding="20px",d.style.color="rgb(179, 179, 179)",mxUtils.write(d,mxResources.get("noPreview")));null!=g&&(g.style.backgroundColor="");g=D;g.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=K&&mxEvent.consume(K)}};mxEvent.addListener(D,"click",L);mxEvent.addListener(D,"dblclick",function(K){J.checked=!J.checked;mxEvent.consume(K)});
+k.push(function(){return J.checked?y.id:null});0==U&&0==q&&L()})(N.entries[q])})(R[U])});E=document.createElement("div");E.className="geDialogTitle";mxUtils.write(E,mxResources.get("shapes"));E.style.position="absolute";E.style.top="0px";E.style.left="0px";E.style.lineHeight="40px";E.style.height="40px";E.style.right="0px";var B=document.createElement("div"),d=document.createElement("div");B.style.position="absolute";B.style.top="40px";B.style.left="0px";B.style.width="202px";B.style.bottom="60px";
+B.style.overflow="auto";d.style.position="absolute";d.style.left="202px";d.style.right="0px";d.style.top="40px";d.style.bottom="60px";d.style.overflow="auto";d.style.borderLeftStyle="solid";d.style.borderLeftWidth="1px";d.style.textAlign="center";var g=null,k=[],n=document.createElement("div");n.style.position="relative";n.style.left="0px";n.style.right="0px";p(f);c.style.padding="30px";c.appendChild(E);c.appendChild(B);c.appendChild(d);f=document.createElement("div");f.className="geDialogFooter";
f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.position="relative";u.style.top="1px";u.checked=b.sidebar.sidebarTitles;u.defaultChecked=u.checked;f.appendChild(u);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("labels"));p.style.paddingRight="20px";f.appendChild(p);mxEvent.addListener(p,
"click",function(R){u.checked=!u.checked;mxEvent.consume(R)});var x=document.createElement("input");x.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)p=document.createElement("span"),p.style.paddingRight="20px",p.appendChild(x),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),x.style.position="relative",x.style.top="1px",x.checked=!0,x.defaultChecked=!0,mxEvent.addListener(p,"click",function(R){mxEvent.getSource(R)!=x&&(x.checked=!x.checked,mxEvent.consume(R))}),
-f.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<k.length;U++){var O=k[U].apply(this,arguments);null!=O&&R.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,
+f.appendChild(p);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<k.length;U++){var N=k[U].apply(this,arguments);null!=N&&R.push(N)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,
"search"),mxSettings.settings.search=0<=U&&0<R.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),x.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),x.checked,!0);b.setSidebarTitles(u.checked,x.checked)});E.className="geBtn gePrimaryBtn"}else{var A=document.createElement("table");p=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";E=document.createElement("tr");A.style.width="100%";e=document.createElement("td");l=document.createElement("td");
-v=document.createElement("td");var I=mxUtils.bind(this,function(R,U,O){var V=document.createElement("input");V.type="checkbox";A.appendChild(V);V.checked=b.sidebar.isEntryVisible(O);var q=document.createElement("span");mxUtils.write(q,U);U=document.createElement("div");U.style.display="block";U.appendChild(V);U.appendChild(q);mxEvent.addListener(q,"click",function(y){V.checked=!V.checked;mxEvent.consume(y)});R.appendChild(U);return function(){return V.checked?O:null}});E.appendChild(e);E.appendChild(l);
-E.appendChild(v);p.appendChild(E);A.appendChild(p);k=[];var F=0;for(p=0;p<f.length;p++)for(E=0;E<f[p].entries.length;E++)F++;var C=[e,l,v],P=0;for(p=0;p<f.length;p++)(function(R){for(var U=0;U<R.entries.length;U++){var O=R.entries[U];k.push(I(C[Math.floor(P/(F/3))],O.title,O.id));P++}})(f[p]);c.appendChild(A);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=
-!0,f.appendChild(x),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),f.appendChild(p),mxEvent.addListener(p,"click",function(R){x.checked=!x.checked;mxEvent.consume(R)}));c.appendChild(f);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<k.length;U++){var O=k[U].apply(this,arguments);null!=O&&R.push(O)}b.sidebar.showEntries(0<R.length?
-R.join(";"):"",x.checked);b.hideDialog()});E.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(p),f.appendChild(E)):(f.appendChild(E),f.appendChild(p));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function l(){E=!0;if(0==t.length)v.innerText=mxResources.get("noPlugins");else{v.innerText="";for(var k=0;k<t.length;k++){var m=document.createElement("span");m.style.display="flex";
-m.style.alignItems="center";m.style.whiteSpace="nowrap";var u=document.createElement("img");u.src=Editor.trashImage;u.style.position="relative";u.style.cursor="pointer";u.style.marginRight="4px";u.style.display="inline-block";u.style.width="18px";u.setAttribute("title",mxResources.get("delete"));m.appendChild(u);mxUtils.write(m,t[k]);v.appendChild(m);mxUtils.br(v);mxEvent.addListener(u,"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+t[x]+'"?',function(){null!=f&&f(t[x]);
-t.splice(x,1);l()})}}(k))}}}var p=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var t=mxSettings.getPlugins().slice(),E=!1;p.appendChild(v);l();E=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(k){k&&0>mxUtils.indexOf(t,k)&&t.push(k);l()})}:function(){var k=document.createElement("div"),m=document.createElement("span");m.style.marginTop="6px";mxUtils.write(m,mxResources.get("builtinPlugins")+": ");k.appendChild(m);
-var u=document.createElement("select");u.style.width="150px";for(m=0;m<App.publicPlugin.length;m++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[m]);x.value=App.publicPlugin[m];u.appendChild(x)}k.appendChild(u);mxUtils.br(k);mxUtils.br(k);m=mxUtils.button(mxResources.get("custom")+"...",function(){var A=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var F=0;F<I.length;F++){var C=I[F],P=App.pluginRegistry[C];
-null!=P&&(C=P);0<C.length&&0>mxUtils.indexOf(t,C)&&t.push(C)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(A.container,300,80,!0,!0);A.init()});m.className="geBtn";ALLOW_CUSTOM_PLUGINS||(m.style.display="none");k=new CustomDialog(b,k,mxUtils.bind(this,function(){var A=App.pluginRegistry[u.value];0>mxUtils.indexOf(t,A)&&(t.push(A),l())}),null,null,null,m);b.showDialog(k.container,360,100,!0,!0)});H.className="geBtn";var B=mxUtils.button(mxResources.get("cancel"),
+v=document.createElement("td");var I=mxUtils.bind(this,function(R,U,N){var V=document.createElement("input");V.type="checkbox";A.appendChild(V);V.checked=b.sidebar.isEntryVisible(N);var q=document.createElement("span");mxUtils.write(q,U);U=document.createElement("div");U.style.display="block";U.appendChild(V);U.appendChild(q);mxEvent.addListener(q,"click",function(y){V.checked=!V.checked;mxEvent.consume(y)});R.appendChild(U);return function(){return V.checked?N:null}});E.appendChild(e);E.appendChild(l);
+E.appendChild(v);p.appendChild(E);A.appendChild(p);k=[];var G=0;for(p=0;p<f.length;p++)for(E=0;E<f[p].entries.length;E++)G++;var C=[e,l,v],P=0;for(p=0;p<f.length;p++)(function(R){for(var U=0;U<R.entries.length;U++){var N=R.entries[U];k.push(I(C[Math.floor(P/(G/3))],N.title,N.id));P++}})(f[p]);c.appendChild(A);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";x=document.createElement("input");isLocalStorage&&(x.setAttribute("type","checkbox"),x.checked=!0,x.defaultChecked=
+!0,f.appendChild(x),p=document.createElement("span"),mxUtils.write(p," "+mxResources.get("rememberThisSetting")),f.appendChild(p),mxEvent.addListener(p,"click",function(R){x.checked=!x.checked;mxEvent.consume(R)}));c.appendChild(f);p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";E=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<k.length;U++){var N=k[U].apply(this,arguments);null!=N&&R.push(N)}b.sidebar.showEntries(0<R.length?
+R.join(";"):"",x.checked);b.hideDialog()});E.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(p),f.appendChild(E)):(f.appendChild(E),f.appendChild(p));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function l(){E=!0;if(0==t.length)v.innerText=mxResources.get("noPlugins");else{v.innerText="";for(var k=0;k<t.length;k++){var n=document.createElement("span");n.style.display="flex";
+n.style.alignItems="center";n.style.whiteSpace="nowrap";var u=document.createElement("img");u.src=Editor.trashImage;u.style.position="relative";u.style.cursor="pointer";u.style.marginRight="4px";u.style.display="inline-block";u.style.width="18px";u.setAttribute("title",mxResources.get("delete"));n.appendChild(u);mxUtils.write(n,t[k]);v.appendChild(n);mxUtils.br(v);mxEvent.addListener(u,"click",function(x){return function(){b.confirm(mxResources.get("delete")+' "'+t[x]+'"?',function(){null!=f&&f(t[x]);
+t.splice(x,1);l()})}}(k))}}}var p=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var t=mxSettings.getPlugins().slice(),E=!1;p.appendChild(v);l();E=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(k){k&&0>mxUtils.indexOf(t,k)&&t.push(k);l()})}:function(){var k=document.createElement("div"),n=document.createElement("span");n.style.marginTop="6px";mxUtils.write(n,mxResources.get("builtinPlugins")+": ");k.appendChild(n);
+var u=document.createElement("select");u.style.width="150px";for(n=0;n<App.publicPlugin.length;n++){var x=document.createElement("option");mxUtils.write(x,App.publicPlugin[n]);x.value=App.publicPlugin[n];u.appendChild(x)}k.appendChild(u);mxUtils.br(k);mxUtils.br(k);n=mxUtils.button(mxResources.get("custom")+"...",function(){var A=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();if(null!=I&&0<I.length){I=I.split(";");for(var G=0;G<I.length;G++){var C=I[G],P=App.pluginRegistry[C];
+null!=P&&(C=P);0<C.length&&0>mxUtils.indexOf(t,C)&&t.push(C)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(A.container,300,80,!0,!0);A.init()});n.className="geBtn";ALLOW_CUSTOM_PLUGINS||(n.style.display="none");k=new CustomDialog(b,k,mxUtils.bind(this,function(){var A=App.pluginRegistry[u.value];0>mxUtils.indexOf(t,A)&&(t.push(A),l())}),null,null,null,n);b.showDialog(k.container,360,100,!0,!0)});H.className="geBtn";var B=mxUtils.button(mxResources.get("cancel"),
function(){b.hideDialog()});B.className="geBtn";var d=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){E?(mxSettings.setPlugins(t),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});d.className="geBtn gePrimaryBtn";var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";b.isOffline()||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||g.appendChild(B),
-g.appendChild(H),g.appendChild(d)):(g.appendChild(H),g.appendChild(d),c||g.appendChild(B));p.appendChild(g);this.container=p},CropImageDialog=function(b,e,f,c){function l(){var R=x.checked,U=A.checked,O=k.geometry,V=E.width,q=E.height,y=(300-V)/2,D=(300-q)/2;O.x<y?(O.width-=y-O.x,O.x=y):O.x+O.width>y+V&&(O.width=y+V-O.x,O.x=Math.min(O.x,y+V));O.y<D?(O.height-=D-O.y,O.y=D):O.y+O.height>D+q&&(O.height=D+q-O.y,O.y=Math.min(O.y,D+q));var J=(O.x-y)/V*100;V=100-(O.x+O.width-y)/V*100;y=(O.y-D)/q*100;O=100-
-(O.y+O.height-D)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(V)+"% "+mxUtils.format(O)+"% "+mxUtils.format(J)+"%"+(R?" round "+g+"%":U?" round 50%":"")+")"}function p(R){null!=B&&(!0!==R&&(B.model.setGeometry(k,d.clone()),g=5,F.value=g),B.model.setStyle(k,m+l()),B.selectAll(),I.style.visibility=x.checked?"visible":"hidden")}var v=document.createElement("div"),t=document.createElement("div");t.style.height="300px";t.style.width="300px";t.style.display="inline-flex";t.style.justifyContent=
-"center";t.style.alignItems="center";t.style.position="absolute";var E=document.createElement("img");E.onload=function(){function R(){B.model.setStyle(k,m+l())}B=new Graph(H);B.autoExtend=!1;B.autoScroll=!1;B.setGridEnabled(!1);B.setEnabled(!0);B.setPanning(!1);B.setConnectable(!1);B.getRubberband().setEnabled(!1);B.graphHandler.allowLivePreview=!1;var U=B.createVertexHandler;B.createVertexHandler=function(){var Q=U.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=f)try{if("inset"==f.substring(0,
-5)){var O=k.geometry,V=E.width,q=E.height,y=(300-V)/2,D=(300-q)/2,J=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),L=parseFloat(J[0]),K=parseFloat(J[1]),n=parseFloat(J[2]),z=parseFloat(J[3]);isFinite(L)&&isFinite(K)&&isFinite(n)&&isFinite(z)?(O.x=z/100*V+y,O.y=L/100*q+D,O.width=(100-K)/100*V+y-O.x,O.height=(100-n)/100*q+D-O.y,"round"==J[4]?"50%"==J[5]?A.setAttribute("checked","checked"):(g=parseInt(J[5]),F.value=g,x.setAttribute("checked","checked"),I.style.visibility="visible"):u.setAttribute("checked",
-"checked")):f=null}else f=null}catch(Q){}k.style=m+(f?f:l());k.vertex=!0;B.addCell(k,null,null,null,null);B.selectAll();B.addListener(mxEvent.CELLS_MOVED,R);B.addListener(mxEvent.CELLS_RESIZED,R);var G=B.graphHandler.mouseUp,M=B.graphHandler.mouseDown;B.graphHandler.mouseUp=function(){G.apply(this,arguments);H.style.backgroundColor="#fff9"};B.graphHandler.mouseDown=function(){M.apply(this,arguments);H.style.backgroundColor=""};B.dblClick=function(){};var N=B.getSelectionModel().changeSelection;B.getSelectionModel().changeSelection=
-function(){N.call(this,[k],[k])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";t.appendChild(E);v.appendChild(t);var H=document.createElement("div");H.style.width="300px";H.style.height="300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";v.appendChild(H);var B=null,d=new mxGeometry(100,100,100,100),g=5,k=new mxCell("",d.clone(),""),m="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+
+g.appendChild(H),g.appendChild(d)):(g.appendChild(H),g.appendChild(d),c||g.appendChild(B));p.appendChild(g);this.container=p},CropImageDialog=function(b,e,f,c){function l(){var R=x.checked,U=A.checked,N=k.geometry,V=E.width,q=E.height,y=(300-V)/2,D=(300-q)/2;N.x<y?(N.width-=y-N.x,N.x=y):N.x+N.width>y+V&&(N.width=y+V-N.x,N.x=Math.min(N.x,y+V));N.y<D?(N.height-=D-N.y,N.y=D):N.y+N.height>D+q&&(N.height=D+q-N.y,N.y=Math.min(N.y,D+q));var J=(N.x-y)/V*100;V=100-(N.x+N.width-y)/V*100;y=(N.y-D)/q*100;N=100-
+(N.y+N.height-D)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(V)+"% "+mxUtils.format(N)+"% "+mxUtils.format(J)+"%"+(R?" round "+g+"%":U?" round 50%":"")+")"}function p(R){null!=B&&(!0!==R&&(B.model.setGeometry(k,d.clone()),g=5,G.value=g),B.model.setStyle(k,n+l()),B.selectAll(),I.style.visibility=x.checked?"visible":"hidden")}var v=document.createElement("div"),t=document.createElement("div");t.style.height="300px";t.style.width="300px";t.style.display="inline-flex";t.style.justifyContent=
+"center";t.style.alignItems="center";t.style.position="absolute";var E=document.createElement("img");E.onload=function(){function R(){B.model.setStyle(k,n+l())}B=new Graph(H);B.autoExtend=!1;B.autoScroll=!1;B.setGridEnabled(!1);B.setEnabled(!0);B.setPanning(!1);B.setConnectable(!1);B.getRubberband().setEnabled(!1);B.graphHandler.allowLivePreview=!1;var U=B.createVertexHandler;B.createVertexHandler=function(){var Q=U.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=f)try{if("inset"==f.substring(0,
+5)){var N=k.geometry,V=E.width,q=E.height,y=(300-V)/2,D=(300-q)/2,J=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),L=parseFloat(J[0]),K=parseFloat(J[1]),m=parseFloat(J[2]),z=parseFloat(J[3]);isFinite(L)&&isFinite(K)&&isFinite(m)&&isFinite(z)?(N.x=z/100*V+y,N.y=L/100*q+D,N.width=(100-K)/100*V+y-N.x,N.height=(100-m)/100*q+D-N.y,"round"==J[4]?"50%"==J[5]?A.setAttribute("checked","checked"):(g=parseInt(J[5]),G.value=g,x.setAttribute("checked","checked"),I.style.visibility="visible"):u.setAttribute("checked",
+"checked")):f=null}else f=null}catch(Q){}k.style=n+(f?f:l());k.vertex=!0;B.addCell(k,null,null,null,null);B.selectAll();B.addListener(mxEvent.CELLS_MOVED,R);B.addListener(mxEvent.CELLS_RESIZED,R);var F=B.graphHandler.mouseUp,M=B.graphHandler.mouseDown;B.graphHandler.mouseUp=function(){F.apply(this,arguments);H.style.backgroundColor="#fff9"};B.graphHandler.mouseDown=function(){M.apply(this,arguments);H.style.backgroundColor=""};B.dblClick=function(){};var O=B.getSelectionModel().changeSelection;B.getSelectionModel().changeSelection=
+function(){O.call(this,[k],[k])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";t.appendChild(E);v.appendChild(t);var H=document.createElement("div");H.style.width="300px";H.style.height="300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";v.appendChild(H);var B=null,d=new mxGeometry(100,100,100,100),g=5,k=new mxCell("",d.clone(),""),n="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+
e.replace(";base64","")+";clipPath=",u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingRect");u.setAttribute("name","croppingShape");u.setAttribute("checked","checked");u.style.margin="5px";v.appendChild(u);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id","croppingRounded");x.setAttribute("name",
"croppingShape");x.style.margin="5px";v.appendChild(x);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingEllipse");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);
-mxEvent.addListener(u,"change",p);mxEvent.addListener(x,"change",p);mxEvent.addListener(A,"change",p);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min","1");F.setAttribute("max","49");F.setAttribute("value",g);F.setAttribute("title",mxResources.get("arcSize"));I.appendChild(F);v.appendChild(I);mxEvent.addListener(F,"change",function(){g=this.value;p(!0)});e=mxUtils.button(mxResources.get("cancel"),
+mxEvent.addListener(u,"change",p);mxEvent.addListener(x,"change",p);mxEvent.addListener(A,"change",p);var I=document.createElement("div");I.style.textAlign="center";I.style.visibility="hidden";var G=document.createElement("input");G.setAttribute("type","range");G.setAttribute("min","1");G.setAttribute("max","49");G.setAttribute("value",g);G.setAttribute("title",mxResources.get("arcSize"));I.appendChild(G);v.appendChild(I);mxEvent.addListener(G,"change",function(){g=this.value;p(!0)});e=mxUtils.button(mxResources.get("cancel"),
function(){b.hideDialog()});e.className="geBtn";t=mxUtils.button(mxResources.get("apply"),function(){c(l(),k.geometry.width,k.geometry.height);b.hideDialog()});t.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){c(null,E.width,E.height);b.hideDialog()});C.className="geBtn";var P=document.createElement("div");P.style.marginTop="10px";P.style.textAlign="right";b.editor.cancelFirst?(P.appendChild(e),P.appendChild(C),P.appendChild(t)):(P.appendChild(C),P.appendChild(t),
P.appendChild(e));v.appendChild(P);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),p=document.createElement("table"),v=document.createElement("tbody"),t=document.createElement("tr"),E=document.createElement("td"),H=document.createElement("td");p.style.paddingLeft="6px";mxUtils.write(E,mxResources.get("relative")+":");var B=document.createElement("input");B.setAttribute("type","checkbox");null!=c&&c.relative&&
(B.setAttribute("checked","checked"),B.defaultChecked=!0);this.init=function(){B.focus()};H.appendChild(B);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("left")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.x:"";H.appendChild(d);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");
E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c?c.y:"";H.appendChild(g);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("dx")+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width=
-"100px";k.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(k);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("dy")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(m);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");
+"100px";k.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(k);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("dy")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(n);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");
H=document.createElement("td");mxUtils.write(E,mxResources.get("width")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.width:"";H.appendChild(u);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=
c?c.height:"";H.appendChild(x);t.appendChild(E);t.appendChild(H);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");H=document.createElement("td");mxUtils.write(E,mxResources.get("rotation")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(A);t.appendChild(E);t.appendChild(H);v.appendChild(t);p.appendChild(v);l.appendChild(p);
-c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var F=0;F<e.length;F++){var C=f.getCellGeometry(e[F]);null!=C&&(C=C.clone(),f.isCellMovable(e[F])&&(C.relative=B.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(C.y=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=
-Number(k.value)),0<mxUtils.trim(m.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(m.value))),f.isCellResizable(e[F])&&(0<mxUtils.trim(u.value).length&&(C.width=Number(u.value)),0<mxUtils.trim(x.value).length&&(C.height=Number(x.value))),f.getModel().setGeometry(e[F],C));0<mxUtils.trim(A.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[e[F]])}}finally{f.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(F){13==
-F.keyCode&&I.click()});p=document.createElement("div");p.style.marginTop="20px";p.style.textAlign="right";b.editor.cancelFirst?(p.appendChild(c),p.appendChild(I)):(p.appendChild(I),p.appendChild(c));l.appendChild(p);this.container=l},LibraryDialog=function(b,e,f,c,l,p,v){function t(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=m;)O=O.parentNode;var V=null;if(null!=O){var q=m.firstChild;for(V=0;null!=q&&q!=O;)q=q.nextSibling,V++}return V}function E(O,V,q,y,D,J,L,K,
-n){try{if(b.spinner.stop(),null==V||"image/"==V.substring(0,6))if(null==O&&null!=L||null==x[O]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};m.style.backgroundImage="";u.style.display="none";var G=D,M=J;if(D>b.maxImageSize||J>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/
-Math.max(1,D)),b.maxImageSize/Math.max(1,J));D*=N;J*=N}G>M?(M=Math.round(100*M/G),G=100):(G=Math.round(100*G/M),M=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding="0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=O){var S=document.createElement("img");S.setAttribute("src",C.convert(O));S.style.width=G+"px";S.style.height=M+"px";S.style.margin=
-"10px";S.style.paddingBottom=Math.floor((100-M)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";Q.appendChild(S)}else if(null!=L){var T=b.stringToCells("<"==L.xml.charAt(0)?L.xml:Graph.decompress(L.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");
+c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var G=0;G<e.length;G++){var C=f.getCellGeometry(e[G]);null!=C&&(C=C.clone(),f.isCellMovable(e[G])&&(C.relative=B.checked,0<mxUtils.trim(d.value).length&&(C.x=Number(d.value)),0<mxUtils.trim(g.value).length&&(C.y=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=
+Number(k.value)),0<mxUtils.trim(n.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(n.value))),f.isCellResizable(e[G])&&(0<mxUtils.trim(u.value).length&&(C.width=Number(u.value)),0<mxUtils.trim(x.value).length&&(C.height=Number(x.value))),f.getModel().setGeometry(e[G],C));0<mxUtils.trim(A.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(A.value),[e[G]])}}finally{f.getModel().endUpdate()}});I.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(G){13==
+G.keyCode&&I.click()});p=document.createElement("div");p.style.marginTop="20px";p.style.textAlign="right";b.editor.cancelFirst?(p.appendChild(c),p.appendChild(I)):(p.appendChild(I),p.appendChild(c));l.appendChild(p);this.container=l},LibraryDialog=function(b,e,f,c,l,p,v){function t(N){for(N=document.elementFromPoint(N.clientX,N.clientY);null!=N&&N.parentNode!=n;)N=N.parentNode;var V=null;if(null!=N){var q=n.firstChild;for(V=0;null!=q&&q!=N;)q=q.nextSibling,V++}return V}function E(N,V,q,y,D,J,L,K,
+m){try{if(b.spinner.stop(),null==V||"image/"==V.substring(0,6))if(null==N&&null!=L||null==x[N]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};n.style.backgroundImage="";u.style.display="none";var F=D,M=J;if(D>b.maxImageSize||J>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/
+Math.max(1,D)),b.maxImageSize/Math.max(1,J));D*=O;J*=O}F>M?(M=Math.round(100*M/F),F=100):(F=Math.round(100*F/M),M=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding="0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=N){var S=document.createElement("img");S.setAttribute("src",C.convert(N));S.style.width=F+"px";S.style.height=M+"px";S.style.margin=
+"10px";S.style.paddingBottom=Math.floor((100-M)/2)+"px";S.style.paddingLeft=Math.floor((100-F)/2)+"px";Q.appendChild(S)}else if(null!=L){var T=b.stringToCells("<"==L.xml.charAt(0)?L.xml:Graph.decompress(L.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");
W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(ca){mxEvent.consume(ca)});(function(ca,fa,aa){mxEvent.addListener(W,"click",function(ja){x[fa]=null;for(var ha=0;ha<d.length;ha++)if(null!=d[ha].data&&d[ha].data==fa||null!=d[ha].xml&&null!=aa&&d[ha].xml==aa.xml){d.splice(ha,1);break}Q.parentNode.removeChild(ca);
-0==d.length&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(ja)});mxEvent.addListener(W,"dblclick",function(ja){mxEvent.consume(ja)})})(Q,O,L);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign=
-"center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:D,h:J,title:n},null!=K&&(Z.aspect=K),x[O]=S,d.push(Z)):null!=L&&(L.aspect="fixed",d.push(L),Z=L);mxEvent.addListener(X,"keydown",function(ca){13==ca.keyCode&&null!=F&&(F(),F=null,mxEvent.consume(ca))});z();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(ca){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(ca)});T=function(ca){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
-9<document.documentMode)){var fa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(aa){null!=aa&&(Z.title=aa,z())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ca)}else if("true"!=X.getAttribute("contentEditable")){null!=F&&(F(),F=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,
-"user-select","text");X.focus();document.execCommand("selectAll",!1,null);F=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(ca)}};mxEvent.addListener(X,"click",T);mxEvent.addListener(Q,"dblclick",T);m.appendChild(Q);mxEvent.addListener(Q,"dragstart",function(ca){null==F&&(null==O&&null!=L&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=L.xml&&ca.dataTransfer.setData("Text",L.xml),A=t(ca),
-mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(ca){"hidden"==W.style.visibility&&(W.style.visibility="",X.style.visibility="");A=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else P||(P=!0,b.handleError({message:mxResources.get("fileExists")}));else{D=!1;try{if(G=
-mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){M=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=M&&0<M.length)for(var Y=0;Y<M.length;Y++)null!=M[Y].xml?E(null,null,0,0,0,0,M[Y]):E(M[Y].data,null,0,0,M[Y].w,M[Y].h,null,"fixed",M[Y].title);D=!0}else if("mxfile"==G.documentElement.nodeName){var ba=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var da=Editor.getDiagramNodeXml(ba[Y]);T=b.stringToCells(da);if(0<T.length){var ia=b.editor.graph.getBoundingBoxFromGeometry(T);
-null!=ia&&E(null,null,0,0,0,0,{xml:da,w:ia.width,h:ia.height})}}D=!0}}catch(ca){null!=window.console&&console.error("Error in library dialog: "+ca)}D||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){null!=window.console&&console.log("Error in library dialog: "+ca)}return null}function H(O){O.dataTransfer.dropEffect=null!=A?"move":"copy";O.stopPropagation();O.preventDefault()}function B(O){O.stopPropagation();O.preventDefault();P=!1;I=t(O);if(null!=A)null!=
-I&&I<m.children.length?(d.splice(I>A?I-1:I,0,d.splice(A,1)[0]),m.insertBefore(m.children[A],m.children[I])):(d.push(d.splice(A,1)[0]),m.appendChild(m.children[A]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,R(O));else if(0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")){var V=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(V)||/(\.png)($|\?)/i.test(V)||/(\.gif)($|\?)/i.test(V)||/(\.svg)($|\?)/i.test(V))&&b.loadImage(V,
-function(q){E(V,null,0,0,q.width,q.height);m.scrollTop=m.scrollHeight})}O.stopPropagation();O.preventDefault()}var d=[];f=document.createElement("div");f.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";f.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var k=document.createElement("input");k.setAttribute("value",e);k.style.marginRight="20px";k.style.marginLeft="10px";k.style.width="500px";
-null==l||l.isRenamable()||k.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};g.appendChild(k);Editor.enableUncompressedLibraries&&(k.style.width="420px",e=document.createElement("input"),e.setAttribute("type","checkbox"),e.style.marginRight="10px",g.appendChild(e),mxUtils.write(g,mxResources.get("compressed")));var m=document.createElement("div");
-m.style.borderWidth="1px 0px 1px 0px";m.style.borderColor="#d3d3d3";m.style.borderStyle="solid";m.style.marginTop="6px";m.style.overflow="auto";m.style.height="340px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";0==d.length&&Graph.fileSupport&&(m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";
-u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));f.appendChild(u);var x={},A=null,I=null,F=null;g=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=F&&(F(),F=null,mxEvent.consume(O))};mxEvent.addListener(m,"mousedown",g);mxEvent.addListener(m,"pointerdown",g);mxEvent.addListener(m,"touchstart",g);var C=new mxUrlConverter,P=!1;if(null!=c)for(g=0;g<c.length;g++)e=c[g],E(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(m,"dragleave",
-function(O){u.style.cursor="";for(var V=mxEvent.getSource(O);null!=V;){if(V==m||V==u){O.stopPropagation();O.preventDefault();break}V=V.parentNode}});var R=function(O){return function(V,q,y,D,J,L,K,n,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(G){E(G,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(O)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(V,z.name)?b.isExternalDataComms()?b.parseFile(z,
-mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(E(G.responseText,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(O)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(E(V,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(O)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),m.scrollTop=m.scrollHeight)}};mxEvent.addListener(m,"dragover",H);
-mxEvent.addListener(m,"drop",B);mxEvent.addListener(u,"dragover",H);mxEvent.addListener(u,"drop",B);f.appendChild(m);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.setAttribute("id","btnCancel");g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),
-function(){b.getPublicUrl(l,function(O){if(null!=O){var V=b.getSearch("create title mode url drive splash state clibs ui".split(" "));V+=(0==V.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+V,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(O.container,450,240,!0);O.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),
-mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(d),V=k.value;/(\.xml)$/i.test(V)||(V+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,V,"text/xml",null,null,null!=v?v:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(V)+
-"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(O){P=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(V,q,y,D,J,L,K,n,z){null!=U.files&&(R(O)(V,q,y,D,J,L,K,n,z),U.type="",U.type="file",U.value="")});m.scrollTop=
-m.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}e=mxUtils.button(mxResources.get("import"),function(){null!=F&&(F(),F=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),function(){null!=F&&(F(),F=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,V,q){P=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var y=O.indexOf(",");0<y&&(O=
-O.substring(0,y)+";base64,"+O.substring(y+1))}E(O,null,0,0,V,q);m.scrollTop=m.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(O,V,q,y){b.saveLibrary(O,V,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=F&&(F(),F=null);this.saveBtnClickHandler(k.value,d,l,p)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(g);f.appendChild(c);
+0==d.length&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(ja)});mxEvent.addListener(W,"dblclick",function(ja){mxEvent.consume(ja)})})(Q,N,L);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign=
+"center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=N?(Z={data:N,w:D,h:J,title:m},null!=K&&(Z.aspect=K),x[N]=S,d.push(Z)):null!=L&&(L.aspect="fixed",d.push(L),Z=L);mxEvent.addListener(X,"keydown",function(ca){13==ca.keyCode&&null!=G&&(G(),G=null,mxEvent.consume(ca))});z();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(ca){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(ca)});T=function(ca){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
+9<document.documentMode)){var fa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(aa){null!=aa&&(Z.title=aa,z())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(ca)}else if("true"!=X.getAttribute("contentEditable")){null!=G&&(G(),G=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,
+"user-select","text");X.focus();document.execCommand("selectAll",!1,null);G=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(ca)}};mxEvent.addListener(X,"click",T);mxEvent.addListener(Q,"dblclick",T);n.appendChild(Q);mxEvent.addListener(Q,"dragstart",function(ca){null==G&&(null==N&&null!=L&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=L.xml&&ca.dataTransfer.setData("Text",L.xml),A=t(ca),
+mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(ca){"hidden"==W.style.visibility&&(W.style.visibility="",X.style.visibility="");A=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else P||(P=!0,b.handleError({message:mxResources.get("fileExists")}));else{D=!1;try{if(F=
+mxUtils.parseXml(N),"mxlibrary"==F.documentElement.nodeName){M=JSON.parse(mxUtils.getTextContent(F.documentElement));if(null!=M&&0<M.length)for(var Y=0;Y<M.length;Y++)null!=M[Y].xml?E(null,null,0,0,0,0,M[Y]):E(M[Y].data,null,0,0,M[Y].w,M[Y].h,null,"fixed",M[Y].title);D=!0}else if("mxfile"==F.documentElement.nodeName){var ba=F.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var da=Editor.getDiagramNodeXml(ba[Y]);T=b.stringToCells(da);if(0<T.length){var ia=b.editor.graph.getBoundingBoxFromGeometry(T);
+null!=ia&&E(null,null,0,0,0,0,{xml:da,w:ia.width,h:ia.height})}}D=!0}}catch(ca){null!=window.console&&console.error("Error in library dialog: "+ca)}D||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ca){null!=window.console&&console.log("Error in library dialog: "+ca)}return null}function H(N){N.dataTransfer.dropEffect=null!=A?"move":"copy";N.stopPropagation();N.preventDefault()}function B(N){N.stopPropagation();N.preventDefault();P=!1;I=t(N);if(null!=A)null!=
+I&&I<n.children.length?(d.splice(I>A?I-1:I,0,d.splice(A,1)[0]),n.insertBefore(n.children[A],n.children[I])):(d.push(d.splice(A,1)[0]),n.appendChild(n.children[A]));else if(0<N.dataTransfer.files.length)b.importFiles(N.dataTransfer.files,0,0,b.maxImageSize,R(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var V=decodeURIComponent(N.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(V)||/(\.png)($|\?)/i.test(V)||/(\.gif)($|\?)/i.test(V)||/(\.svg)($|\?)/i.test(V))&&b.loadImage(V,
+function(q){E(V,null,0,0,q.width,q.height);n.scrollTop=n.scrollHeight})}N.stopPropagation();N.preventDefault()}var d=[];f=document.createElement("div");f.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="40px";f.appendChild(g);mxUtils.write(g,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var k=document.createElement("input");k.setAttribute("value",e);k.style.marginRight="20px";k.style.marginLeft="10px";k.style.width="500px";
+null==l||l.isRenamable()||k.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};g.appendChild(k);Editor.enableUncompressedLibraries&&(k.style.width="420px",e=document.createElement("input"),e.setAttribute("type","checkbox"),e.style.marginRight="10px",g.appendChild(e),mxUtils.write(g,mxResources.get("compressed")));var n=document.createElement("div");
+n.style.borderWidth="1px 0px 1px 0px";n.style.borderColor="#d3d3d3";n.style.borderStyle="solid";n.style.marginTop="6px";n.style.overflow="auto";n.style.height="340px";n.style.backgroundPosition="center center";n.style.backgroundRepeat="no-repeat";0==d.length&&Graph.fileSupport&&(n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";
+u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));f.appendChild(u);var x={},A=null,I=null,G=null;g=function(N){"true"!=mxEvent.getSource(N).getAttribute("contentEditable")&&null!=G&&(G(),G=null,mxEvent.consume(N))};mxEvent.addListener(n,"mousedown",g);mxEvent.addListener(n,"pointerdown",g);mxEvent.addListener(n,"touchstart",g);var C=new mxUrlConverter,P=!1;if(null!=c)for(g=0;g<c.length;g++)e=c[g],E(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(n,"dragleave",
+function(N){u.style.cursor="";for(var V=mxEvent.getSource(N);null!=V;){if(V==n||V==u){N.stopPropagation();N.preventDefault();break}V=V.parentNode}});var R=function(N){return function(V,q,y,D,J,L,K,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(F){E(F,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(N)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(V,z.name)?b.isExternalDataComms()?b.parseFile(z,
+mxUtils.bind(this,function(F){4==F.readyState&&(b.spinner.stop(),200<=F.status&&299>=F.status&&(E(F.responseText,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(N)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(E(V,q,y,D,J,L,K,"fixed",mxEvent.isAltDown(N)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),n.scrollTop=n.scrollHeight)}};mxEvent.addListener(n,"dragover",H);
+mxEvent.addListener(n,"drop",B);mxEvent.addListener(u,"dragover",H);mxEvent.addListener(u,"drop",B);f.appendChild(n);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});g.setAttribute("id","btnCancel");g.className="geBtn";b.editor.cancelFirst&&c.appendChild(g);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),
+function(){b.getPublicUrl(l,function(N){if(null!=N){var V=b.getSearch("create title mode url drive splash state clibs ui".split(" "));V+=(0==V.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(N);N=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+V,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(N.container,450,240,!0);N.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),
+mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var N=b.createLibraryDataFromImages(d),V=k.value;/(\.xml)$/i.test(V)||(V+=".xml");b.isLocalFileSave()?b.saveLocalFile(N,V,"text/xml",null,null,null!=v?v:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(V)+
+"&format=xml&xml="+encodeURIComponent(N))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(N){P=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(V,q,y,D,J,L,K,m,z){null!=U.files&&(R(N)(V,q,y,D,J,L,K,m,z),U.type="",U.type="file",U.value="")});n.scrollTop=
+n.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}e=mxUtils.button(mxResources.get("import"),function(){null!=G&&(G(),G=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),function(){null!=G&&(G(),G=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(N,V,q){P=!1;if(null!=N){if("data:image/"==N.substring(0,11)){var y=N.indexOf(",");0<y&&(N=
+N.substring(0,y)+";base64,"+N.substring(y+1))}E(N,null,0,0,V,q);n.scrollTop=n.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(N,V,q,y){b.saveLibrary(N,V,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=G&&(G(),G=null);this.saveBtnClickHandler(k.value,d,l,p)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(g);f.appendChild(c);
this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var p=document.createElement("table"),v=document.createElement("tbody");p.style.cellPadding="4px";var t=document.createElement("tr");var E=document.createElement("td");E.setAttribute("colspan","2");E.style.fontSize="10pt";mxUtils.write(E,f);t.appendChild(E);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize=
"none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};E.appendChild(H);t.appendChild(E);E=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);E.appendChild(f);var B=new Graph(f);B.setEnabled(!1);var d=b.editor.graph.cloneCell(e);
B.addCells([d]);f=B.view.getState(d);var g="";null!=f.shape&&null!=f.shape.stencil&&(g=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,g||"");f=B.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);B.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);t.appendChild(E);v.appendChild(t);t=document.createElement("tr");E=document.createElement("td");E.setAttribute("colspan","2");E.style.paddingTop="2px";E.style.whiteSpace="nowrap";E.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",E.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&E.appendChild(l);var k=function(m,u,x){var A=H.value,I=mxUtils.parseXml(A);A=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
-mxResources.get("ok"));else if(x&&b.hideDialog(),I=!m.model.contains(u),!x||I||A!=g){A=Graph.compress(A);m.getModel().beginUpdate();try{if(I){var F=b.editor.graph.getFreeInsertPoint();u.geometry.x=F.x;u.geometry.y=F.y;m.addCell(u)}m.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+A+")",[u])}catch(C){throw C;}finally{m.getModel().endUpdate()}I&&(m.setSelectionCell(u),m.scrollCellToVisible(u))}};f=mxUtils.button(mxResources.get("preview"),function(){k(B,d,!1)});f.className="geBtn";E.appendChild(f);
+function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",E.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&E.appendChild(l);var k=function(n,u,x){var A=H.value,I=mxUtils.parseXml(A);A=mxUtils.getPrettyXml(I.documentElement);I=I.documentElement.getElementsByTagName("parsererror");if(null!=I&&0<I.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+mxResources.get("ok"));else if(x&&b.hideDialog(),I=!n.model.contains(u),!x||I||A!=g){A=Graph.compress(A);n.getModel().beginUpdate();try{if(I){var G=b.editor.graph.getFreeInsertPoint();u.geometry.x=G.x;u.geometry.y=G.y;n.addCell(u)}n.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+A+")",[u])}catch(C){throw C;}finally{n.getModel().endUpdate()}I&&(n.setSelectionCell(u),n.scrollCellToVisible(u))}};f=mxUtils.button(mxResources.get("preview"),function(){k(B,d,!1)});f.className="geBtn";E.appendChild(f);
f=mxUtils.button(mxResources.get("apply"),function(){k(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(l);t.appendChild(E);v.appendChild(t);p.appendChild(v);this.container=p},CustomDialog=function(b,e,f,c,l,p,v,t,E,H,B,d){var g=document.createElement("div");g.appendChild(e);var k=document.createElement("div");k.style.marginTop=null!=d?d:"30px";k.style.textAlign="right";null!=v&&k.appendChild(v);b.isOffline()||null==p||k.appendChild(b.createHelpIcon(p));
-e=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";t&&(e.style.display="none");b.editor.cancelFirst&&k.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var m=f();if("string"===typeof m){b.showError(mxResources.get("error"),m);return}}H&&b.hideDialog(null,null,this.container)}));k.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(e);
-if(null!=B)for(t=0;t<B.length;t++)(function(m,u,x){m=mxUtils.button(m,function(A){u(A)});null!=x&&m.setAttribute("title",x);m.className="geBtn";k.appendChild(m)})(B[t][0],B[t][1],B[t][2]);g.appendChild(k);this.cancelBtn=e;this.okButton=l;this.container=g},BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var p=document.createElement("p");p.style.fontSize="16pt";p.style.padding="0px";p.style.margin="0px";p.style.color="gray";mxUtils.write(p,mxResources.get("done"));
+e=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";t&&(e.style.display="none");b.editor.cancelFirst&&k.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var n=f();if("string"===typeof n){b.showError(mxResources.get("error"),n);return}}H&&b.hideDialog(null,null,this.container)}));k.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(e);
+if(null!=B)for(t=0;t<B.length;t++)(function(n,u,x){n=mxUtils.button(n,function(A){u(A)});null!=x&&n.setAttribute("title",x);n.className="geBtn";k.appendChild(n)})(B[t][0],B[t][1],B[t][2]);g.appendChild(k);this.cancelBtn=e;this.okButton=l;this.container=g},BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var p=document.createElement("p");p.style.fontSize="16pt";p.style.padding="0px";p.style.margin="0px";p.style.color="gray";mxUtils.write(p,mxResources.get("done"));
var v="Unknown",t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),t.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(v=mxResources.get("dropbox"),t.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),t.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),t.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
(v=mxResources.get("gitlab"),t.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),t.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(t,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(p);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,
-e,f,c,l){function p(F){this.style.border="";13==F.keyCode&&I.click()}var v=document.createElement("table"),t=document.createElement("tbody");v.style.marginTop="8px";var E=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","sysfonts");B.setAttribute("type","radio");B.setAttribute("name",
+e,f,c,l){function p(G){this.style.border="";13==G.keyCode&&I.click()}var v=document.createElement("table"),t=document.createElement("tbody");v.style.marginTop="8px";var E=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var B=document.createElement("input");B.style.cssText="margin-right:8px;margin-bottom:8px;";B.setAttribute("value","sysfonts");B.setAttribute("type","radio");B.setAttribute("name",
"current-fontdialog");B.setAttribute("id","fontdialog-sysfonts");H.appendChild(B);var d=document.createElement("label");d.setAttribute("for","fontdialog-sysfonts");mxUtils.write(d,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(d);E.appendChild(H);t.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+
":");E.appendChild(H);var g=document.createElement("input");"s"==c&&g.setAttribute("value",e);g.style.marginLeft="4px";g.style.width="250px";g.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(g);E.appendChild(H);t.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value",
"googlefonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-googlefonts");H.appendChild(k);d=document.createElement("label");d.setAttribute("for","fontdialog-googlefonts");mxUtils.write(d,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(d);if(!b.isOffline()||EditorUi.isElectronApp)d=b.createHelpIcon("https://fonts.google.com/"),H.appendChild(d);E.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&t.appendChild(E);E=document.createElement("tr");
-H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var m=document.createElement("input");"g"==c&&m.setAttribute("value",e);m.style.marginLeft="4px";m.style.width="250px";m.className="dlg_fontName_g";H=document.createElement("td");H.appendChild(m);E.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&t.appendChild(E);E=document.createElement("tr");
+H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var n=document.createElement("input");"g"==c&&n.setAttribute("value",e);n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_g";H=document.createElement("td");H.appendChild(n);E.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&t.appendChild(E);E=document.createElement("tr");
H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","webfonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-webfonts");H.appendChild(u);d=document.createElement("label");d.setAttribute("for","fontdialog-webfonts");mxUtils.write(d,mxResources.get("webfonts",
null,"Web Fonts"));H.appendChild(d);E.appendChild(H);Editor.enableWebFonts&&t.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");E.appendChild(H);var x=document.createElement("input");"w"==c&&(Editor.enableWebFonts?x.setAttribute("value",e):g.setAttribute("value",e));x.style.marginLeft="4px";x.style.width="250px";
x.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(x);E.appendChild(H);Editor.enableWebFonts&&t.appendChild(E);E=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontUrl",null,"Font URL")+":");E.appendChild(H);var A=document.createElement("input");A.setAttribute("value",f||"");A.style.marginLeft="4px";A.style.width="250px";A.className=
-"dlg_fontUrl";H=document.createElement("td");H.appendChild(A);E.appendChild(H);Editor.enableWebFonts&&t.appendChild(E);this.init=function(){var F=g;"g"==c?F=m:"w"==c&&Editor.enableWebFonts&&(F=x);F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)};E=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));
-e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var I=mxUtils.button(mxResources.get("apply"),function(){if(B.checked){var F=g.value;var C="s"}else if(k.checked){F=m.value;var P=Editor.GOOGLE_FONTS+encodeURIComponent(F).replace(/%20/g,"+");C="g"}else u.checked&&(F=x.value,P=A.value,C="w");var R=F;var U=P,O=C,V=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=v.querySelector(".dlg_fontName_"+
-O);null==q||null!=R&&0!=R.length?(q=v.querySelector(".dlg_fontUrl"),null==q||"w"!=O||V.test(U)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(F,P,C),b.hideDialog())});I.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",p);mxEvent.addListener(m,"keypress",p);mxEvent.addListener(x,"keypress",p);mxEvent.addListener(A,"keypress",p);mxEvent.addListener(g,"focus",function(){B.setAttribute("checked","checked");B.checked=!0});mxEvent.addListener(m,"focus",
+"dlg_fontUrl";H=document.createElement("td");H.appendChild(A);E.appendChild(H);Editor.enableWebFonts&&t.appendChild(E);this.init=function(){var G=g;"g"==c?G=n:"w"==c&&Editor.enableWebFonts&&(G=x);G.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)};E=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));
+e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var I=mxUtils.button(mxResources.get("apply"),function(){if(B.checked){var G=g.value;var C="s"}else if(k.checked){G=n.value;var P=Editor.GOOGLE_FONTS+encodeURIComponent(G).replace(/%20/g,"+");C="g"}else u.checked&&(G=x.value,P=A.value,C="w");var R=G;var U=P,N=C,V=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=v.querySelector(".dlg_fontName_"+
+N);null==q||null!=R&&0!=R.length?(q=v.querySelector(".dlg_fontUrl"),null==q||"w"!=N||V.test(U)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(G,P,C),b.hideDialog())});I.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",p);mxEvent.addListener(n,"keypress",p);mxEvent.addListener(x,"keypress",p);mxEvent.addListener(A,"keypress",p);mxEvent.addListener(g,"focus",function(){B.setAttribute("checked","checked");B.checked=!0});mxEvent.addListener(n,"focus",
function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(A,"focus",function(){u.setAttribute("checked","checked");u.checked=!0});H.appendChild(I);b.editor.cancelFirst||H.appendChild(e);E.appendChild(H);t.appendChild(E);v.appendChild(t);this.container=v};
function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var p=document.createElement("h5");p.style.margin="0 0 10px";mxUtils.write(p,mxResources.get("pages"));e.appendChild(p);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);p=document.createElement("h5");p.style.margin="0 0 10px";mxUtils.write(p,mxResources.get("layers"));e.appendChild(p);p=document.createElement("div");p.className="geAspectDlgList";
e.appendChild(p);this.pagesContainer=f;this.layersContainer=p;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});p.className="geBtn";b.editor.cancelFirst&&f.appendChild(p);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
@@ -12678,33 +12676,33 @@ AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createEleme
this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var p=l.model;p=p.getChildCells(p.getRoot());for(var v=0;v<p.length;v++)this.createLayerItem(p[v],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b,e){function f(C){var P=H;H=function(R,U){try{C(function(){P(R,U)},U)}catch(O){U(O)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var p=b.getCurrentFile(),v=null!=p&&null!=p.getTitle()?p.getTitle():b.defaultFilename,t=/(\.png)$/i.test(v),E=/(\.svg)$/i.test(v),H=function(C,P){C()},B=null!=p?p.isLocked():!1;var d=document.createElement("tr");var g=document.createElement("td");
+var FilePropertiesDialog=function(b,e){function f(C){var P=H;H=function(R,U){try{C(function(){P(R,U)},U)}catch(N){U(N)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var p=b.getCurrentFile(),v=null!=p&&null!=p.getTitle()?p.getTitle():b.defaultFilename,t=/(\.png)$/i.test(v),E=/(\.svg)$/i.test(v),H=function(C,P){C()},B=null!=p?p.isLocked():!1;var d=document.createElement("tr");var g=document.createElement("td");
g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("locked")+":");d.appendChild(g);var k=document.createElement("input");k.setAttribute("type","checkbox");B&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(k);d.appendChild(g);l.appendChild(d);this.init=function(){k.focus()};f(function(C,P){null!=b.fileNode&&B!=k.checked?window.setTimeout(function(){null!=
-p&&p.setLocked(k.checked);C()},0):C()});if(t||E){v=1;t=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(v=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(t=parseInt(d.getAttribute("border"))));d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+":");d.appendChild(g);var m=document.createElement("input");m.setAttribute("value",100*v+"%");m.style.marginLeft="4px";m.style.width="100%";
-g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(m);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var u=document.createElement("input");u.setAttribute("value",t);u.style.marginLeft="4px";u.style.width="100%";g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(u);d.appendChild(g);l.appendChild(d);
-this.init=this.init||function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)};f(function(C,P){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(m.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(u.value))),null!=p&&p.fileChanged());C()})}else if(!/(\.html)$/i.test(v)&&!/(\.svg)$/i.test(v)){var x=null!=p?p.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");g=document.createElement("td");
+p&&p.setLocked(k.checked);C()},0):C()});if(t||E){v=1;t=0;d=b.fileNode;null!=d&&(d.hasAttribute("scale")&&(v=parseFloat(d.getAttribute("scale"))),d.hasAttribute("border")&&(t=parseInt(d.getAttribute("border"))));d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("zoom")+":");d.appendChild(g);var n=document.createElement("input");n.setAttribute("value",100*v+"%");n.style.marginLeft="4px";n.style.width="100%";
+g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(n);d.appendChild(g);l.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("borderWidth")+":");d.appendChild(g);var u=document.createElement("input");u.setAttribute("value",t);u.style.marginLeft="4px";u.style.width="100%";g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(u);d.appendChild(g);l.appendChild(d);
+this.init=this.init||function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null)};f(function(C,P){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(n.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(u.value))),null!=p&&p.fileChanged());C()})}else if(!/(\.html)$/i.test(v)&&!/(\.svg)$/i.test(v)){var x=null!=p?p.isCompressed():Editor.defaultCompressed;d=document.createElement("tr");g=document.createElement("td");
g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("compressed")+":");d.appendChild(g);var A=document.createElement("input");A.setAttribute("type","checkbox");x&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(A);d.appendChild(g);l.appendChild(d);this.init=this.init||function(){A.focus()};f(function(C,P){null!=b.fileNode&&x!=
A.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",A.checked?"true":"false");null!=p&&(p.compressionChanged(A.checked),p.fileChanged());C()},0):C()})}if(null!=p&&p.isRealtimeOptional()){d=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("realtimeCollaboration")+":");d.appendChild(g);var I=document.createElement("input");I.setAttribute("type",
-"checkbox");var F=p.isRealtimeEnabled();if(F="disabled"!=b.drive.getCustomProperty(p.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;f(function(C,P){I.checked!=F?p.setRealtimeEnabled(I.checked,C,P):C()});this.init=null!=this.init?this.init:function(){I.focus()};g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(I);g.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(g);l.appendChild(d)}null!=p&&
+"checkbox");var G=p.isRealtimeEnabled();if(G="disabled"!=b.drive.getCustomProperty(p.desc,"collaboration"))I.setAttribute("checked","checked"),I.defaultChecked=!0;f(function(C,P){I.checked!=G?p.setRealtimeEnabled(I.checked,C,P):C()});this.init=null!=this.init?this.init:function(){I.focus()};g=document.createElement("td");g.style.whiteSpace="nowrap";g.appendChild(I);g.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));d.appendChild(g);l.appendChild(d)}null!=p&&
"draw.io"==b.getServiceName()&&0<p.getSize()&&"1"!=urlParams.embed&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize="10pt",mxUtils.write(g,mxResources.get("size")+":"),d.appendChild(g),g=b.formatFileSize(p.getSize()),v=document.createElement("input"),v.setAttribute("title",g),v.setAttribute("value",g),v.setAttribute("disabled","disabled"),v.style.marginLeft="4px",v.style.width="100%",
g=document.createElement("td"),g.style.whiteSpace="nowrap",g.appendChild(v),d.appendChild(g),l.appendChild(d));null!=e&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize="10pt",mxUtils.write(g,mxResources.get("publicDiagramUrl")+":"),d.appendChild(g),v=document.createElement("a"),v.setAttribute("href",e),v.setAttribute("title",e),v.style.whiteSpace="nowrap",v.style.overflow="hidden",
v.style.textOverflow="ellipsis",v.style.display="block",v.style.margin="2px 0px 2px 8px",v.style.fontSize="10pt",mxUtils.write(v,e),mxEvent.addListener(v,"click",function(C){b.openLink(e);mxEvent.consume(C)}),g=document.createElement("td"),g.appendChild(v),d.appendChild(g),l.appendChild(d));null!=p&&null!=p.fileObject&&null!=p.fileObject.path&&(d=document.createElement("tr"),g=document.createElement("td"),g.style.whiteSpace="nowrap",g.style.overflow="hidden",g.style.textOverflow="ellipsis",g.style.fontSize=
"10pt",mxUtils.write(g,mxResources.get("pathFilename")+":"),d.appendChild(g),v=document.createElement("input"),v.setAttribute("title",p.fileObject.path),v.setAttribute("value",p.fileObject.path),v.setAttribute("disabled","disabled"),v.style.marginLeft="4px",v.style.width="100%",g=document.createElement("td"),g.appendChild(v),d.appendChild(g),l.appendChild(d));this.init=null!=this.init?this.init:function(){};v=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
H(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});v.className="geBtn gePrimaryBtn";d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&g.appendChild(t);g.appendChild(v);b.editor.cancelFirst||g.appendChild(t);d.appendChild(g);
-l.appendChild(d);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function p(D,J,L){D=new mxCell("",new mxGeometry(D,J,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");D.vertex=!0;D.cp=!0;D.constObj=L;return d.addCell(D)}function v(D){D=d.getSelectionCells();d.deleteCells(D)}
-function t(){var D=parseInt(O.value)||0;D=0>D?0:100<D?100:D;O.value=D;var J=parseInt(q.value)||0;J=0>J?0:100<J?100:J;q.value=J;var L=parseInt(V.value)||0,K=parseInt(y.value)||0;L=new mxConnectionConstraint(new mxPoint(D/100,J/100),!1,null,L,K);D=d.getConnectionPoint(m,L);J=d.getSelectionCell();if(null!=J){J.constObj=L;L=J.geometry.clone();K=d.view.scale;var n=d.view.translate;L.x=(D.x-3*K)/K-n.x;L.y=(D.y-3*K)/K-n.y;d.model.setGeometry(J,L)}}function E(D){if(D.constObj)return{x:D.constObj.point.x,
-y:D.constObj.point.y,dx:D.constObj.dx,dy:D.constObj.dy};var J=0,L=0,K=g.geometry,n=mxUtils.format((D.geometry.x+3-K.x)/K.width);D=mxUtils.format((D.geometry.y+3-K.y)/K.height);0>n?(J=n*K.width,n=0):1<n&&(J=(n-1)*K.width,n=1);0>D?(L=D*K.height,D=0):1<D&&(L=(D-1)*K.height,D=1);return{x:n,y:D,dx:parseInt(J),dy:parseInt(L)}}function H(D){if(1==d.getSelectionCount()){var J=d.getSelectionCell();D&&(J.constObj=null);D=E(J);O.value=100*D.x;q.value=100*D.y;V.value=D.dx;y.value=D.dy;U.style.visibility=""}else U.style.visibility=
-"hidden"}var B=document.createElement("div");B.style.width="350px";B.style.height="350px";B.style.overflow="hidden";B.style.border="1px solid lightGray";B.style.boxSizing="border-box";mxEvent.disableContextMenu(B);c.appendChild(B);var d=new Graph(B);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;B=e.geometry;var g=new mxCell(e.value,
-new mxGeometry(0,0,B.width,B.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");g.vertex=!0;d.addCell(g);d.dblClick=function(D,J){if(null!=J&&J!=g)d.setSelectionCell(J);else{J=mxUtils.convertPoint(d.container,mxEvent.getClientX(D),mxEvent.getClientY(D));mxEvent.consume(D);D=d.view.scale;var L=d.view.translate;d.setSelectionCell(p((J.x-3*D)/D-L.x,(J.y-3*D)/D-L.y))}};l=new mxKeyHandler(d);l.bindKey(46,v);l.bindKey(8,v);d.getRubberband().isForceRubberbandEvent=
-function(D){return 0==D.evt.button&&(null==D.getCell()||D.getCell()==g)};d.panningHandler.isForcePanningEvent=function(D){return 2==D.evt.button};var k=d.isCellSelectable;d.isCellSelectable=function(D){return D==g?!1:k.apply(this,arguments)};d.getLinkForCell=function(){return null};var m=d.view.getState(g);B=d.getAllConnectionConstraints(m);for(var u=0;null!=B&&u<B.length;u++){var x=d.getConnectionPoint(m,B[u]);p(x.x-3,x.y-3,B[u])}d.fit(8);d.center();u=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){d.zoomIn()});x=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var A=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(D){!isNaN(D)&&0<D&&(d.setGridSize(D),d.setGridEnabled(!0),d.refresh())})},F=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(D){mxEvent.isShiftDown(D)?
-I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(F,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),v);mxUtils.setOpacity(C,10);B=document.createElement("div");B.style.display="flex";B.style.alignItems="center";B.style.paddingTop="6px";B.appendChild(u);B.appendChild(x);B.appendChild(A);B.appendChild(F);B.appendChild(C);c.appendChild(B);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("value",
-"1");P.style.width="45px";P.style.position="relative";P.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";x=["left","right","top","bottom"];for(u=0;u<x.length;u++)A=x[u],F=document.createElement("option"),mxUtils.write(F,mxResources.get(A)),F.value=A,R.appendChild(F);u=mxUtils.button(mxResources.get("add"),function(){var D=parseInt(P.value);D=1>D?1:100<D?100:D;P.value=D;for(var J=R.value,L=g.geometry,K=[],n=0;n<D;n++){switch(J){case "left":var z=L.x;var G=
-L.y+(n+1)*L.height/(D+1);break;case "right":z=L.x+L.width;G=L.y+(n+1)*L.height/(D+1);break;case "top":z=L.x+(n+1)*L.width/(D+1);G=L.y;break;case "bottom":z=L.x+(n+1)*L.width/(D+1),G=L.y+L.height}K.push(p(z-3,G-3))}d.setSelectionCells(K)});u.style.marginLeft="auto";B.appendChild(u);B.appendChild(P);B.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";B=document.createElement("span");mxUtils.write(B,mxResources.get("dx"));
-U.appendChild(B);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var V=document.createElement("input");V.setAttribute("type","number");V.style.width="45px";V.style.margin="0 4px 0 4px";U.appendChild(V);mxUtils.write(U,"pt");B=document.createElement("span");mxUtils.write(B,mxResources.get("dy"));B.style.marginLeft="12px";U.appendChild(B);
+l.appendChild(d);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function p(D,J,L){var K="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";D=new mxCell("",new mxGeometry(D,J,6,6),K);D.vertex=!0;D.cp=!0;D.constObj=L;return d.addCell(D)}function v(D){D=d.getSelectionCells();
+d.deleteCells(D)}function t(){var D=parseInt(N.value)||0;D=0>D?0:100<D?100:D;N.value=D;var J=parseInt(q.value)||0;J=0>J?0:100<J?100:J;q.value=J;var L=parseInt(V.value)||0,K=parseInt(y.value)||0;L=new mxConnectionConstraint(new mxPoint(D/100,J/100),!1,null,L,K);D=d.getConnectionPoint(n,L);J=d.getSelectionCell();if(null!=J){J.constObj=L;L=J.geometry.clone();K=d.view.scale;var m=d.view.translate;L.x=(D.x-3*K)/K-m.x;L.y=(D.y-3*K)/K-m.y;d.model.setGeometry(J,L)}}function E(D){if(D.constObj)return{x:D.constObj.point.x,
+y:D.constObj.point.y,dx:D.constObj.dx,dy:D.constObj.dy};var J=0,L=0,K=g.geometry,m=mxUtils.format((D.geometry.x+3-K.x)/K.width);D=mxUtils.format((D.geometry.y+3-K.y)/K.height);0>m?(J=m*K.width,m=0):1<m&&(J=(m-1)*K.width,m=1);0>D?(L=D*K.height,D=0):1<D&&(L=(D-1)*K.height,D=1);return{x:m,y:D,dx:parseInt(J),dy:parseInt(L)}}function H(D){if(1==d.getSelectionCount()){var J=d.getSelectionCell();D&&(J.constObj=null);D=E(J);N.value=100*D.x;q.value=100*D.y;V.value=D.dx;y.value=D.dy;U.style.visibility=""}else U.style.visibility=
+"hidden"}var B=document.createElement("div");B.style.width="350px";B.style.height="350px";B.style.overflow="hidden";B.style.borderStyle="solid";B.style.borderWidth="1px";B.style.boxSizing="border-box";mxEvent.disableContextMenu(B);c.appendChild(B);var d=new Graph(B);d.transparentBackground=!1;d.autoExtend=!1;d.autoScroll=!1;d.setGridEnabled(!1);d.setEnabled(!0);d.setPanning(!0);d.setConnectable(!1);d.setTooltips(!1);d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;d.maxFitScale=2;B=e.geometry;
+var g=new mxCell(e.value,new mxGeometry(0,0,B.width,B.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");g.vertex=!0;d.addCell(g);d.dblClick=function(D,J){if(null!=J&&J!=g)d.setSelectionCell(J);else{J=mxUtils.convertPoint(d.container,mxEvent.getClientX(D),mxEvent.getClientY(D));mxEvent.consume(D);D=d.view.scale;var L=d.view.translate;d.setSelectionCell(p((J.x-3*D)/D-L.x,(J.y-3*D)/D-L.y))}};l=new mxKeyHandler(d);l.bindKey(46,v);l.bindKey(8,v);d.getRubberband().isForceRubberbandEvent=
+function(D){return 0==D.evt.button&&(null==D.getCell()||D.getCell()==g)};d.panningHandler.isForcePanningEvent=function(D){return 2==D.evt.button};var k=d.isCellSelectable;d.isCellSelectable=function(D){return D==g?!1:k.apply(this,arguments)};d.getLinkForCell=function(){return null};var n=d.view.getState(g);B=d.getAllConnectionConstraints(n);for(var u=0;null!=B&&u<B.length;u++){var x=d.getConnectionPoint(n,B[u]);p(x.x-3,x.y-3,B[u])}d.fit(8);d.center();u=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){d.zoomIn()});x=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){d.zoomOut()});var A=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==d.view.scale?(d.maxFitScale=8,d.fit(8)):d.zoomActual();d.center()}),I=function(){b.prompt(mxResources.get("gridSize"),d.gridSize,function(D){!isNaN(D)&&0<D&&(d.setGridSize(D),d.setGridEnabled(!0),d.refresh())})},G=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(D){mxEvent.isShiftDown(D)?
+I():(d.setGridEnabled(!d.isGridEnabled()),d.refresh())});mxEvent.addListener(G,"dblclick",I);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),v);mxUtils.setOpacity(C,10);B=document.createElement("div");B.style.display="flex";B.style.alignItems="center";B.style.paddingTop="6px";B.appendChild(u);B.appendChild(x);B.appendChild(A);B.appendChild(G);B.appendChild(C);c.appendChild(B);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("value",
+"1");P.style.width="45px";P.style.position="relative";P.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";x=["left","right","top","bottom"];for(u=0;u<x.length;u++)A=x[u],G=document.createElement("option"),mxUtils.write(G,mxResources.get(A)),G.value=A,R.appendChild(G);u=mxUtils.button(mxResources.get("add"),function(){var D=parseInt(P.value);D=1>D?1:100<D?100:D;P.value=D;for(var J=R.value,L=g.geometry,K=[],m=0;m<D;m++){switch(J){case "left":var z=L.x;var F=
+L.y+(m+1)*L.height/(D+1);break;case "right":z=L.x+L.width;F=L.y+(m+1)*L.height/(D+1);break;case "top":z=L.x+(m+1)*L.width/(D+1);F=L.y;break;case "bottom":z=L.x+(m+1)*L.width/(D+1),F=L.y+L.height}K.push(p(z-3,F-3))}d.setSelectionCells(K)});u.style.marginLeft="auto";B.appendChild(u);B.appendChild(P);B.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";B=document.createElement("span");mxUtils.write(B,mxResources.get("dx"));
+U.appendChild(B);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";U.appendChild(N);mxUtils.write(U,"%");var V=document.createElement("input");V.setAttribute("type","number");V.style.width="45px";V.style.margin="0 4px 0 4px";U.appendChild(V);mxUtils.write(U,"pt");B=document.createElement("span");mxUtils.write(B,mxResources.get("dy"));B.style.marginLeft="12px";U.appendChild(B);
var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";U.appendChild(q);mxUtils.write(U,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";U.appendChild(y);mxUtils.write(U,"pt");c.appendChild(U);H();d.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<d.getSelectionCount()?mxUtils.setOpacity(C,60):
-mxUtils.setOpacity(C,10);H()});d.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(O,"change",t);mxEvent.addListener(q,"change",t);mxEvent.addListener(V,"change",t);mxEvent.addListener(y,"change",t);B=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});B.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){var D=d.model.cells,J=[],L=[],K;for(K in D){var n=D[K];n.cp&&L.push(E(n))}L.sort(function(z,G){return z.x!=G.x?z.x-G.x:z.y!=G.y?z.y-G.y:z.dx!=G.dx?z.dx-
-G.dx:z.dy-G.dy});for(D=0;D<L.length;D++)0<D&&L[D].x==L[D-1].x&&L[D].y==L[D-1].y&&L[D].dx==L[D-1].dx&&L[D].dy==L[D-1].dy||J.push("["+L[D].x+","+L[D].y+",0,"+L[D].dx+","+L[D].dy+"]");b.editor.graph.setCellStyles("points","["+J.join(",")+"]",[e]);f();b.hideDialog()});u.className="geBtn gePrimaryBtn";x=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});x.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign=
+mxUtils.setOpacity(C,10);H()});d.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(N,"change",t);mxEvent.addListener(q,"change",t);mxEvent.addListener(V,"change",t);mxEvent.addListener(y,"change",t);B=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});B.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){var D=d.model.cells,J=[],L=[],K;for(K in D){var m=D[K];m.cp&&L.push(E(m))}L.sort(function(z,F){return z.x!=F.x?z.x-F.x:z.y!=F.y?z.y-F.y:z.dx!=F.dx?z.dx-
+F.dx:z.dy-F.dy});for(D=0;D<L.length;D++)0<D&&L[D].x==L[D-1].x&&L[D].y==L[D-1].y&&L[D].dx==L[D-1].dx&&L[D].dy==L[D-1].dy||J.push("["+L[D].x+","+L[D].y+",0,"+L[D].dx+","+L[D].dy+"]");b.editor.graph.setCellStyles("points","["+J.join(",")+"]",[e]);f();b.hideDialog()});u.className="geBtn gePrimaryBtn";x=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});x.className="geBtn";A=document.createElement("div");A.style.marginTop="10px";A.style.textAlign=
"right";b.isOffline()||A.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&A.appendChild(B);A.appendChild(x);A.appendChild(u);b.editor.cancelFirst||A.appendChild(B);c.appendChild(A)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -12752,130 +12750,130 @@ Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAY
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableUncompressedLibraries=!1;Editor.enableCustomProperties=!0;
-Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(n){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
+Editor.enableSimpleTheme=!0;Editor.enableHashObjects=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"1"!=urlParams.embed&&window.top==window.self;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||"1"==urlParams.enableSW||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));try{Editor.enableServiceWorker&&navigator.serviceWorker}catch(m){Editor.enableServiceWorker=!1}Editor.enableWebFonts=
"1"!=urlParams["safe-style-src"]&&!window.mxIsElectron;Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.enableRealtimeCache=!0;Editor.p2pSyncNotify=!1;Editor.compressXml=!0;Editor.defaultCompressed=!1;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.defaultBorder=5;Editor.addSvgMetadata=!1;Editor.enableAnimations=!0;Editor.enableChatGpt=/test\.draw\.io$/.test(window.location.hostname)||
/preprod\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname);Editor.gptApiKey=null!=urlParams["gpt-api-key"]?decodeURIComponent(urlParams["gpt-api-key"]):null;Editor.gptModel=null!=urlParams["gpt-model"]?decodeURIComponent(urlParams["gpt-model"]):"gpt-3.5-turbo";Editor.gptUrl=null!=urlParams["gpt-url"]?decodeURIComponent(urlParams["gpt-url"]):"https://api.openai.com/v1/chat/completions";Editor.replaceSvgDataUris=
-!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(n){n.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,
-z){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"comic","0")||"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
-isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
-dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch",
-"1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(n,
-z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(n,z){return"1"==
-mxUtils.getValue(n.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
-type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_SHADOW,
-"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(n,z){return"1"==mxUtils.getValue(n.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(n.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
+!0;Editor.foreignObjectImages=!0;Editor.svgFileTheme="auto";Editor.svgRasterScale=4;Editor.htmlRasterScale=4;Editor.config=null;Editor.configVersion=null;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(m){m.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(m,
+z){return"1"!=mxUtils.getValue(m.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"comic","0")||"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,
+isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",
+dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch",
+"1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(m,
+z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")&&0<m.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:mxConstants.STYLE_SHADOWCOLOR,dispName:"Shadow Color",type:"color",getDefaultValue:function(){return mxConstants.SHADOWCOLOR},isVisible:function(m,z){return"1"==
+mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OPACITY,dispName:"Shadow Opacity",type:"int",min:0,max:100,getDefaultValue:function(){return 100*mxConstants.SHADOW_OPACITY},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_X,dispName:"Shadow Offset X",
+type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_X},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:mxConstants.STYLE_SHADOW_OFFSET_Y,dispName:"Shadow Offset Y",type:"int",getDefaultValue:function(){return mxConstants.SHADOW_OFFSET_Y},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,
+"0")}},{name:mxConstants.STYLE_SHADOW_BLUR,dispName:"Shadow Blur",type:"int",min:0,getDefaultValue:function(){return mxConstants.SHADOW_BLUR},isVisible:function(m,z){return"1"==mxUtils.getValue(m.style,mxConstants.STYLE_SHADOW,"0")||"1"==mxUtils.getValue(m.style,mxConstants.STYLE_TEXT_SHADOW,"0")}},{name:"linecap",dispName:"Line Cap",type:"enum",defVal:null,enumList:[{val:null,dispName:"Flat"},{val:"round",dispName:"Round"},{val:"square",dispName:"Square"}]},{name:"linejoin",dispName:"Line Join",
type:"enum",defVal:null,enumList:[{val:null,dispName:"Miter"},{val:"arcs",dispName:"Arcs"},{val:"bevel",dispName:"Bevel"},{val:"miter-clip",dispName:"Miter-Clip"},{val:"round",dispName:"Round"}]}];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(n){return"orthogonalEdgeStyle"==mxUtils.getValue(n.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",
-dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(n){return"entityRelationEdgeStyle"==mxUtils.getValue(n.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",
+{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(m){return"orthogonalEdgeStyle"==mxUtils.getValue(m.style,mxConstants.STYLE_EDGE,null)}},{name:"segment",
+dispName:"Segment Size",type:"int",min:0,defVal:mxConstants.ENTITY_SEGMENT,isVisible:function(m){return"entityRelationEdgeStyle"==mxUtils.getValue(m.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:"startFillColor",dispName:"Start Fill Color",type:"color",defVal:null},{name:"endFill",
dispName:"End Fill",type:"bool",defVal:!0},{name:"endFillColor",dispName:"End Fill Color",type:"color",defVal:null},{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:"dashPattern",dispName:"Dash Pattern",type:"numbers",defVal:""},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"flowAnimationDuration",
-dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(n){return"1"==mxUtils.getValue(n.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(n){return"1"==mxUtils.getValue(n.style,"flowAnimation",null)}},{name:"flowAnimationDirection",
-dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(n){return"1"==mxUtils.getValue(n.style,"flowAnimation",null)}},{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},
+dispName:"Flow Duration",type:"int",defVal:500,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationTimingFunction",dispName:"Flow Timing",type:"enum",defVal:"linear",enumList:[{val:"linear",dispName:"Linear"},{val:"ease",dispName:"Ease"},{val:"ease-in",dispName:"Ease-in"},{val:"ease-out",dispName:"Ease-out"},{val:"ease-in-out",dispName:"Ease-in-out"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{name:"flowAnimationDirection",
+dispName:"Flow Direction",type:"enum",defVal:"normal",enumList:[{val:"normal",dispName:"Normal"},{val:"reverse",dispName:"Reverse"},{val:"alternate",dispName:"Alternate"},{val:"alternate-reverse",dispName:"Alternate-Reverse"}],isVisible:function(m){return"1"==mxUtils.getValue(m.style,"flowAnimation",null)}},{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:"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(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,
-z){n=z.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,z){n=z.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast",
-"0")},isVisible:function(n,z){z=z.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&z.isTable(n.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"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTableCell(m.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(m,
+z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLastRow","0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(m,z){m=z.editorUi.editor.graph.getCellStyle(1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null);return"1"==mxUtils.getValue(m,"resizeLast",
+"0")},isVisible:function(m,z){z=z.editorUi.editor.graph;return 1==m.vertices.length&&0==m.edges.length&&z.isTable(m.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(n,z){return z.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,z){return 0<n.vertices.length&&0==n.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{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(m,z){return z.editorUi.editor.graph.isCellConnectable(0<m.vertices.length&&0==m.edges.length?m.vertices[0]:null)},isVisible:function(m,z){return 0<m.vertices.length&&0==m.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",getDefaultValue:function(n,z){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;z=z.editorUi.editor.graph;return null!=n&&z.isSwimlane(n)},
-isVisible:function(n,z){return 1==n.vertices.length&&0==n.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,z){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;z=z.editorUi.editor.graph;return null!=n&&(z.isSwimlane(n)||0<z.model.getChildCount(n))},isVisible:function(n,z){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,z){var G=1==n.vertices.length&&0==n.edges.length?
-n.vertices[0]:null;z=z.editorUi.editor.graph;return null!=G&&(z.isContainer(G)&&"0"!=n.style.collapsible||!z.isContainer(G)&&"1"==n.style.collapsible)},isVisible:function(n,z){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,z){return 1==n.vertices.length&&0==n.edges.length&&!z.editorUi.editor.graph.isSwimlane(n.vertices[0])&&null==mxUtils.getValue(n.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
-type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(n,z){z=z.editorUi.editor.graph.model;return 0<n.vertices.length?z.isVertex(z.getParent(n.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(n,z){n=0<n.vertices.length?z.editorUi.editor.graph.getCellGeometry(n.vertices[0]):null;return null!=n&&!n.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(n,z){return 0<n.vertices.length&&z.editorUi.editor.graph.isAutoSizeCell(n.vertices[0])}},{name:"fixedWidth",
+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",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&z.isSwimlane(m)},
+isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(m,z){m=1==m.vertices.length&&0==m.edges.length?m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=m&&(z.isSwimlane(m)||0<z.model.getChildCount(m))},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(m,z){var F=1==m.vertices.length&&0==m.edges.length?
+m.vertices[0]:null;z=z.editorUi.editor.graph;return null!=F&&(z.isContainer(F)&&"0"!=m.style.collapsible||!z.isContainer(F)&&"1"==m.style.collapsible)},isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(m,z){return 1==m.vertices.length&&0==m.edges.length&&!z.editorUi.editor.graph.isSwimlane(m.vertices[0])&&null==mxUtils.getValue(m.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
+type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;return 0<m.vertices.length?z.isVertex(z.getParent(m.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(m,z){m=0<m.vertices.length?z.editorUi.editor.graph.getCellGeometry(m.vertices[0]):null;return null!=m&&!m.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isAutoSizeCell(m.vertices[0])}},{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(n,z){var G=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==G||G==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||null!=n.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
-type:"bool",defVal:!1,isVisible:function(n,z){return 0<n.vertices.length&&z.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(n){var z=rough.canvas({getContext:function(){return n}});z.draw=function(G){var M=G.sets||[];G=G.options||this.getDefaultOptions();for(var N=0;N<M.length;N++){var Q=M[N];switch(Q.type){case "path":null!=G.stroke&&this._drawToContext(n,Q,G);break;case "fillPath":this._drawToContext(n,Q,G);break;case "fillSketch":this.fillSketch(n,Q,G)}}};z.fillSketch=function(G,M,N){var Q=n.state.strokeColor,S=n.state.strokeWidth,T=n.state.strokeAlpha,W=n.state.dashed,X=N.fillWeight;
-0>X&&(X=N.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(N.fill||"");n.setStrokeWidth(X);n.setDashed(!1);this._drawToContext(G,M,N);n.setDashed(W);n.setStrokeWidth(S);n.setStrokeColor(Q);n.setStrokeAlpha(T)};z._drawToContext=function(G,M,N){G.begin();for(var Q=0;Q<M.ops.length;Q++){var S=M.ops[Q],T=S.data;switch(S.op){case "move":G.moveTo(T[0],T[1]);break;case "bcurveTo":G.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":G.lineTo(T[0],T[1])}}G.end();"fillPath"===M.type&&
-N.filled?G.fill():G.stroke()};return z};(function(){function n(Q,S,T){this.canvas=Q;this.rc=S;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,n.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,n.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,n.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,n.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,n.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(Q,S){var T=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)T=(T<<5)-T+W.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};W=this.rc.getDefaultOptions();T.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var F=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==F||F==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(F){var M=F.sets||[];F=F.options||this.getDefaultOptions();for(var O=0;O<M.length;O++){var Q=M[O];switch(Q.type){case "path":null!=F.stroke&&this._drawToContext(m,Q,F);break;case "fillPath":this._drawToContext(m,Q,F);break;case "fillSketch":this.fillSketch(m,Q,F)}}};z.fillSketch=function(F,M,O){var Q=m.state.strokeColor,S=m.state.strokeWidth,T=m.state.strokeAlpha,W=m.state.dashed,X=O.fillWeight;
+0>X&&(X=O.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(O.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(F,M,O);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(Q);m.setStrokeAlpha(T)};z._drawToContext=function(F,M,O){F.begin();for(var Q=0;Q<M.ops.length;Q++){var S=M.ops[Q],T=S.data;switch(S.op){case "move":F.moveTo(T[0],T[1]);break;case "bcurveTo":F.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":F.lineTo(T[0],T[1])}}F.end();"fillPath"===M.type&&
+O.filled?F.fill():F.stroke()};return z};(function(){function m(Q,S,T){this.canvas=Q;this.rc=S;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);
+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(Q,S){var T=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)T=(T<<5)-T+W.charCodeAt(X)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};W=this.rc.getDefaultOptions();T.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
mxConstants.NONE;Q=null;(T.filled=S)?(T.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",
W.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==S?-1:S;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
S);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);T.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=T.fill&&(null!=Q||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(T.fill)))?
-"solid":W.fillStyle);T.fillStyle=S;return T};n.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-n.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};n.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(Q,S,T,W){this.passThrough?
-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,S,T,W),this.lastX=T,this.lastY=W)};n.prototype.curveTo=function(Q,S,T,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,T,W,X,Z),this.lastX=X,this.lastY=Z)};n.prototype.arcTo=function(Q,S,T,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,T,W,X,Z,Y);if(null!=ba)for(var da=0;da<ba.length;da+=
-6)this.curveTo(ba[da],ba[da+1],ba[da+2],ba[da+3],ba[da+4],ba[da+5]);this.lastX=Z;this.lastY=Y}};n.prototype.rect=function(Q,S,T,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,T,W,this.getStyle(!0,!0)))};n.prototype.ellipse=function(Q,S,T,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+T/2,S+W/2,T,W,this.getStyle(!0,!0)))};n.prototype.roundrect=
-function(Q,S,T,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,S),this.lineTo(Q+T-X,S),this.quadTo(Q+T,S,Q+T,S+Z),this.lineTo(Q+T,S+W-Z),this.quadTo(Q+T,S+W,Q+T-X,S+W),this.lineTo(Q+X,S+W),this.quadTo(Q,S+W,Q,S+W-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+X,S))};n.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=
-Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?
-this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;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(Q){return new n(Q,Editor.createRoughCanvas(Q),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,T,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||G.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==n&&!this.outline){Q.save();
+"solid":W.fillStyle);T.fillStyle=S;return T};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+m.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};m.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(Q,S,T,W){this.passThrough?
+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,S,T,W),this.lastX=T,this.lastY=W)};m.prototype.curveTo=function(Q,S,T,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,T,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(Q,S,T,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,T,W,X,Z,Y);if(null!=ba)for(var da=0;da<ba.length;da+=
+6)this.curveTo(ba[da],ba[da+1],ba[da+2],ba[da+3],ba[da+4],ba[da+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(Q,S,T,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,T,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(Q,S,T,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+T/2,S+W/2,T,W,this.getStyle(!0,!0)))};m.prototype.roundrect=
+function(Q,S,T,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,S),this.lineTo(Q+T-X,S),this.quadTo(Q+T,S,Q+T,S+Z),this.lineTo(Q+T,S+W-Z),this.quadTo(Q+T,S+W,Q+T-X,S+W),this.lineTo(Q+X,S+W),this.quadTo(Q,S+W,Q,S+W-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+X,S))};m.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=
+Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?
+this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;
+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new m(Q,Editor.createRoughCanvas(Q),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var F=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,T,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||F.apply(this,arguments)};var M=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==m&&!this.outline){Q.save();
var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=Q.setStrokeColor;Q.setStrokeColor=function(){};var ba=Q.setFillColor;Q.setFillColor=function(){};T||null==W||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;M.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=ba;Q.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;Q.restore();T&&null!=W&&(Q.addTolerance=function(){})}M.apply(this,arguments);Q.addTolerance=
-S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,T,W,X,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==n?(Q.handJiggle.passThrough=!0,N.apply(this,arguments),Q.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),
-{to:"string"})};Editor.extractGraphModel=function(n,z,G){if(null!=n&&"undefined"!==typeof pako){var M=n.ownerDocument.getElementsByTagName("div"),N=[];if(null!=M&&0<M.length)for(var Q=0;Q<M.length;Q++)if("mxgraph"==M[Q].getAttribute("class")){N.push(M[Q]);break}0<N.length&&(M=N[0].getAttribute("data-mxgraph"),null!=M?(N=JSON.parse(M),null!=N&&null!=N.xml&&(n=mxUtils.parseXml(N.xml),n=n.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(M=mxUtils.getTextContent(N[0]),M=Graph.decompress(M,
-null,G),0<M.length&&(n=mxUtils.parseXml(M),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(M=n.getAttribute("content"),null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(cont,M))),null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M)),null!=M&&0<M.length)n=mxUtils.parseXml(M).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||z||(N=null,"diagram"==n.nodeName?N=n:"mxfile"==n.nodeName&&(M=n.getElementsByTagName("diagram"),0<
-M.length&&(N=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=N&&(n=Editor.parseDiagramNode(N,G)));null==n||"mxGraphModel"==n.nodeName||z&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,z,G){Editor.validateDiagramNode(n);var M=mxUtils.trim(mxUtils.getTextContent(n)),N=null;0<M.length?(z=Graph.decompress(M,null,z),null!=z&&0<z.length&&(N=mxUtils.parseXml(z).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(N=n[0],G&&(N=Editor.parseDiagramNode(N,z,
-!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(N,!0)),N=z.documentElement));return N};Editor.getDiagramNodeXml=function(n){Editor.validateDiagramNode(n);var z=mxUtils.getNodeValue(n),G=null;0<z.length?G=Graph.decompress(z):(n=n.getElementsByTagName("mxGraphModel"),null!=n&&0<n.length&&(G=mxUtils.getXml(n[0])));return G};Editor.validateDiagramNode=function(n){if(0==mxUtils.trim(mxUtils.getTextContent(n)).length&&0==mxUtils.getChildNodes(n).length){var z=new mxCodec,G=new mxGraphModel;
-n.appendChild(z.encode(G))}return n};Editor.extractGraphModelFromPdf=function(n){var z=null;n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var G=n.indexOf("EmbeddedFile");if(-1<G){var M=n.indexOf("stream",G)+9;if(0<n.substring(G,M).indexOf("application#2Fvnd.jgraph.mxfile")){var N=n.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(M,N)),{to:"string"})}}for(G=n.indexOf("/ObjStm");0<G;){M=
-n.indexOf("stream",G)+9;N=n.indexOf("endstream",M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(M,N)),{to:"string"});N=M.indexOf("/Subject <");if(0<N){G=M.substring(N+14,M.indexOf(">",N));if(null!=G){z=G;G=[];for(M=0;M<z.length;M+=2)N=z.substr(M,2),"00"!=N&&G.push(String.fromCharCode(parseInt(N,16)));z=G.join("")}break}G=n.indexOf("/ObjStm",G+1)}}if(null==z&&"%PDF-1.4"==n.substring(0,8)){G="";N=M=0;for(var Q=[],S=null;N<n.length;){var T=n.charCodeAt(N);N+=1;10!=T&&(G+=String.fromCharCode(T));
-T=="/Subject (%3Cmxfile".charCodeAt(M)?M++:M=0;if(19==M){var W=n.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=n.substring(N,W);break}}10==T&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],Q[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==z&&null!=Q&&(z=Editor.extractGraphModelFromXref(Q));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(n){var z=n.trailer,G=null;null!=
-z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=n[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(n=n[z[1]],null!=n&&(n=n.join("\n"),G=n.substring(1,n.length-1))))));return G};Editor.extractParserError=function(n,z){var G=null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(G=z||mxResources.get("invalidChars"),z=n[0].getElementsByTagName("div"),0<z.length&&(G=mxUtils.getTextContent(z[0])));return null!=
-G?mxUtils.trim(G):G};Editor.addRetryToError=function(n,z){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=z))};Editor.mermaidToDrawio=function(n,z,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(n,z,G)};Editor.configure=function(n){if(null!=n){Editor.config=n;Editor.configVersion=n.version;n.debug&&(urlParams.test="1");null!=n.defaultFonts&&(Menus.prototype.defaultFonts=n.defaultFonts);null!=n.presetColors&&(ColorDialog.prototype.presetColors=n.presetColors);null!=
-n.defaultColors&&(ColorDialog.prototype.defaultColors=n.defaultColors);null!=n.colorNames&&(ColorDialog.prototype.colorNames=n.colorNames);null!=n.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.defaultColorSchemes);null!=n.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=n.defaultEdgeLength);null!=n.selectParentLayer&&(Graph.selectParentLayer=n.selectParentLayer);null!=n.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=n.autosaveDelay);null!=n.templateFile&&(EditorUi.templateFile=
-n.templateFile);null!=n.styles&&(Array.isArray(n.styles)?Editor.styles=n.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=n.globalVars&&(Editor.globalVars=n.globalVars);null!=n.compressXml&&(Editor.defaultCompressed=n.compressXml,Editor.compressXml=n.compressXml);null!=n.includeDiagram&&(Editor.defaultIncludeDiagram=n.includeDiagram);null!=n.simpleLabels&&(Editor.simpleLabels=n.simpleLabels);null!=n.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=n.oneDriveInlinePicker);
-null!=n.defaultAdaptiveColors?Graph.defaultAdaptiveColors=n.defaultAdaptiveColors:0==n.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=n.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=n.enableLightDarkColors);null!=n.darkColor&&(Editor.darkColor=n.darkColor);null!=n.darkColorVar&&(Editor.darkColorVar=n.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+
-", "+Editor.darkColor+"))";null!=n.settingsName&&(Editor.configurationKey="."+n.settingsName+"-configuration",Editor.settingsKey="."+n.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=n.customFonts&&(Menus.prototype.defaultFonts=n.customFonts.concat(Menus.prototype.defaultFonts));null!=n.customPresetColors&&(ColorDialog.prototype.presetColors=n.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
-n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(n.css));var G=document.getElementsByTagName("script")[0];G.parentNode.insertBefore(z,G)}null!=n.expandLibraries&&(Sidebar.prototype.expandLibraries=n.expandLibraries);null!=n.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=n.appendCustomLibraries);null!=n.libraries&&(Sidebar.prototype.customEntries=
-n.libraries);null!=n.enabledLibraries&&(Array.isArray(n.enabledLibraries)?Sidebar.prototype.enabledLibraries=n.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=n.defaultLibraries&&(Sidebar.prototype.defaultEntries=n.defaultLibraries);null!=n.defaultCustomLibraries&&(Editor.defaultCustomLibraries=n.defaultCustomLibraries);null!=n.enableCustomLibraries&&(Editor.enableCustomLibraries=n.enableCustomLibraries);null!=n.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
-n.defaultVertexStyle);null!=n.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=n.defaultEdgeStyle);null!=n.defaultPageVisible&&(Graph.prototype.defaultPageVisible=n.defaultPageVisible);null!=n.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=n.defaultGridEnabled);null!=n.zoomWheel&&(Graph.zoomWheel=n.zoomWheel);null!=n.zoomFactor&&(z=parseFloat(n.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.defaultGridSize&&
-(z=parseInt(n.defaultGridSize),!isNaN(z)&&0<z?mxGraph.prototype.gridSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=n.gridSteps&&(z=parseInt(n.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=n.pageFormat&&(z=parseInt(n.pageFormat.width),G=parseInt(n.pageFormat.height),!isNaN(z)&&0<z&&!isNaN(G)&&0<G?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,G),mxGraph.prototype.pageFormat=
-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);null!=n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);null!=n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=n.emptyLibraryXml);null!=n.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=n.emptyDiagramXml);null!=n.sidebarWidth&&(EditorUi.prototype.hsplitPosition=n.sidebarWidth);null!=n.updateDefaultStyle&&
-(EditorUi.prototype.updateDefaultStyle=n.updateDefaultStyle);null!=n.sidebarTitles&&(Sidebar.prototype.sidebarTitles=n.sidebarTitles);null!=n.sidebarTitleSize&&(z=parseInt(n.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=n.fontCss&&("string"===typeof n.fontCss?Editor.configureFontCss(n.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=n.autosaveDelay&&(z=parseInt(n.autosaveDelay),
-!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors);null!=n.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
-n.restrictExport);null!=n.replaceSvgDataUris&&(Editor.replaceSvgDataUris=n.replaceSvgDataUris);null!=n.foreignObjectImages&&(Editor.foreignObjectImages=n.foreignObjectImages);null!=n.shadowColor&&(mxConstants.SHADOW_COLOR=n.shadowColor);null!=n.shadowOpacity&&(mxConstants.SHADOW_OPACITY=n.shadowOpacity);null!=n.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=n.shadowOffsetX);null!=n.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=n.shadowOffsetY);null!=n.shadowBlur&&(mxConstants.SHADOW_BLUR=n.shadowBlur);
-null!=n.enableAnimations&&(Editor.enableAnimations=n.enableAnimations);null!=n.enableChatGpt&&(Editor.enableChatGpt=n.enableChatGpt);null!=n.gptApiKey&&(Editor.gptApiKey=n.gptApiKey);null!=n.gptModel&&(Editor.gptModel=n.gptModel);null!=n.gptUrl&&(Editor.gptUrl=n.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var z=document.getElementsByTagName("script")[0];
-if(null!=z&&null!=z.parentNode){var G=document.createElement("style");G.setAttribute("type","text/css");G.appendChild(document.createTextNode(n));z.parentNode.insertBefore(G,z);n=n.split("url(");for(G=1;G<n.length;G++){var M=n[G].indexOf(")");M=Editor.trimCssUrl(n[G].substring(0,M));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",M);N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+",
-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=n?n:Editor.GUID_LENGTH;for(var z=[],G=0;G<n;G++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=
+S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,T,W,X,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==m?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),
+{to:"string"})};Editor.extractGraphModel=function(m,z,F){if(null!=m&&"undefined"!==typeof pako){var M=m.ownerDocument.getElementsByTagName("div"),O=[];if(null!=M&&0<M.length)for(var Q=0;Q<M.length;Q++)if("mxgraph"==M[Q].getAttribute("class")){O.push(M[Q]);break}0<O.length&&(M=O[0].getAttribute("data-mxgraph"),null!=M?(O=JSON.parse(M),null!=O&&null!=O.xml&&(m=mxUtils.parseXml(O.xml),m=m.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(M=mxUtils.getTextContent(O[0]),M=Graph.decompress(M,
+null,F),0<M.length&&(m=mxUtils.parseXml(M),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(M=m.getAttribute("content"),null!=M&&"<"!=M.charAt(0)&&"%"!=M.charAt(0)&&(M=unescape(window.atob?atob(M):Base64.decode(cont,M))),null!=M&&"%"==M.charAt(0)&&(M=decodeURIComponent(M)),null!=M&&0<M.length)m=mxUtils.parseXml(M).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(O=null,"diagram"==m.nodeName?O=m:"mxfile"==m.nodeName&&(M=m.getElementsByTagName("diagram"),0<
+M.length&&(O=M[Math.max(0,Math.min(M.length-1,urlParams.page||0))])),null!=O&&(m=Editor.parseDiagramNode(O,F)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z,F){Editor.validateDiagramNode(m);var M=mxUtils.trim(mxUtils.getTextContent(m)),O=null;0<M.length?(z=Graph.decompress(M,null,z),null!=z&&0<z.length&&(O=mxUtils.parseXml(z).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(O=m[0],F&&(O=Editor.parseDiagramNode(O,z,
+!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(O,!0)),O=z.documentElement));return O};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var z=mxUtils.getNodeValue(m),F=null;0<z.length?F=Graph.decompress(z):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(F=mxUtils.getXml(m[0])));return F};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var z=new mxCodec,F=new mxGraphModel;
+m.appendChild(z.encode(F))}return m};Editor.extractGraphModelFromPdf=function(m){var z=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var F=m.indexOf("EmbeddedFile");if(-1<F){var M=m.indexOf("stream",F)+9;if(0<m.substring(F,M).indexOf("application#2Fvnd.jgraph.mxfile")){var O=m.indexOf("endstream",M-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,O)),{to:"string"})}}for(F=m.indexOf("/ObjStm");0<F;){M=
+m.indexOf("stream",F)+9;O=m.indexOf("endstream",M-1);M=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(M,O)),{to:"string"});O=M.indexOf("/Subject <");if(0<O){F=M.substring(O+14,M.indexOf(">",O));if(null!=F){z=F;F=[];for(M=0;M<z.length;M+=2)O=z.substr(M,2),"00"!=O&&F.push(String.fromCharCode(parseInt(O,16)));z=F.join("")}break}F=m.indexOf("/ObjStm",F+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){F="";O=M=0;for(var Q=[],S=null;O<m.length;){var T=m.charCodeAt(O);O+=1;10!=T&&(F+=String.fromCharCode(T));
+T=="/Subject (%3Cmxfile".charCodeAt(M)?M++:M=0;if(19==M){var W=m.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(W>O){z=m.substring(O,W);break}}10==T&&("endobj"==F?S=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(S=[],Q[F.split(" ")[0]]=S):null!=S&&S.push(F),F="")}}null==z&&null!=Q&&(z=Editor.extractGraphModelFromXref(Q));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,F=null;null!=
+z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),F=m.substring(1,m.length-1))))));return F};Editor.extractParserError=function(m,z){var F=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(F=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(F=mxUtils.getTextContent(z[0])));return null!=
+F?mxUtils.trim(F):F};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.mermaidToDrawio=function(m,z,F){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,z,F)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=
+m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=
+m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.defaultCompressed=m.compressXml,Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=m.simpleLabels);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=m.oneDriveInlinePicker);
+null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=m.enableLightDarkColors);null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+
+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
+m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(m.css));var F=document.getElementsByTagName("script")[0];F.parentNode.insertBefore(z,F)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=
+m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
+m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(z=parseFloat(m.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&
+(z=parseInt(m.defaultGridSize),!isNaN(z)&&0<z?mxGraph.prototype.gridSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(z=parseInt(m.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=m.pageFormat&&(z=parseInt(m.pageFormat.width),F=parseInt(m.pageFormat.height),!isNaN(z)&&0<z&&!isNaN(F)&&0<F?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,F),mxGraph.prototype.pageFormat=
+mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&
+(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(z=parseInt(m.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),
+!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
+m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);
+null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];
+if(null!=z&&null!=z.parentNode){var F=document.createElement("style");F.setAttribute("type","text/css");F.appendChild(document.createTextNode(m));z.parentNode.insertBefore(F,z);m=m.split("url(");for(F=1;F<m.length;F++){var M=m[F].indexOf(")");M=Editor.trimCssUrl(m[F].substring(0,M));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",M);O.setAttribute("as","font");O.setAttribute("crossorigin","");z.parentNode.insertBefore(O,z)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+",
+"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var z=[],F=0;F<m;F++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=
1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",
-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):null;if(null!=n){var z=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[n],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==n.nodeName){z=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(G=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=G&&(M=new mxCodec(G.ownerDocument),M.decode(G,this.graph.getStylesheet())));else{var G=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=G){var M=new mxCodec(G.ownerDocument);M.decode(G,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");this.graph.setAdaptiveColors(n.getAttribute("adaptiveColors"));z=n.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(z=n.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),G=0;G<z.length;G++)this.graph.addExtFont(z[G].name,z[G].url)}catch(N){console.log("ExtFonts format error: "+N.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(n,z){n=null!=n?n:!0;var G=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&G.setAttribute("style",this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=M&&G.setAttribute("backgroundImage",JSON.stringify(M));G.setAttribute("math",this.graph.mathEnabled?"1":"0");G.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?G.setAttribute("adaptiveColors",this.graph.adaptiveColors):G.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),G.setAttribute("extFonts",M.join("|")));return G};Editor.prototype.isDataSvg=function(n){try{var z=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=
-unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var G=mxUtils.parseXml(z).documentElement;return"mxfile"==G.nodeName||"mxGraphModel"==G.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=function(n,z,G){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(n,z){if("undefined"===
-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};n=null!=n?n:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=function(S){try{null==M?(MathJax.typesetClear([S]),MathJax.typeset([S]),G()):M!=S&&Editor.mathJaxQueue.push(S)}catch(T){MathJax.typesetClear([S]),null!=T.retry?(M=S,T.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+
-W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};
-Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var S=mxUtils.bind(this,function(T,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");
-if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(n){if(0<n.length){var z="",G=[""],M=0,N=!0,Q;n=$jscomp.makeIterator(n);for(Q=n.next();!Q.done;Q=n.next())Q=Q.value,'"'===Q?(N&&Q===z&&(G[M]+=Q),N=!N):","===Q&&N?Q=G[++M]="":G[M]+=Q,z=Q;return G}return[]};Editor.prototype.getProxiedUrl=function(n){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
-!this.isCorsEnabledForUrl(n)){var z=EditorUi.isVisioFilename(n);z=/\.png$/i.test(n)||/\.pdf$/i.test(n)||z;var G="t="+(new Date).getTime();n=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+G+(z?"&base64=1":"")}return n};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.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(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var z=n.convert,G=this;n.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,n.baseUrl.length)==n.baseUrl||G.crossOriginImages&&
-G.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=z.apply(this,arguments)):M=PROXY_URL+"?url="+encodeURIComponent(M));return M};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,z,G,M,N){try{var Q=!0,S=window.setTimeout(mxUtils.bind(this,function(){Q=!1;z(n)}),this.timeout),T=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(n,z,G,M,!0):z(n)});if(/(\.svg)$/i.test(n)&&
-!N)mxUtils.get(n,mxUtils.bind(this,function(X){window.clearTimeout(S);Q&&(200>X.getStatus()||299<X.getStatus()?T():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);Q&&T()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(Q)try{M=null!=M&&N?M:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(M,M);X.height=W.height*M;X.width=W.width*M;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(n)}};
-W.onerror=function(){window.clearTimeout(S);Q&&(null!=G?G():z(n))};W.src=n}}catch(X){null!=G?G():z(n)}};Editor.prototype.convertImages=function(n,z,G,M){function N(){0<Q.length?Q.shift()():z(n)}null==M&&(M=this.createImageUrlConverter());var Q=[],S=G||{};G=mxUtils.bind(this,function(T,W){T=n.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(Z){Q.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=M.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=
-S[Y];null==ba?this.convertImageToDataUri(Y,function(da){null!=da&&(S[Y]=da,Z.setAttribute(W,da));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,Y),N()}}catch(da){N()}}))})(T[X])});G("image","xlink:href");G("img","src");N()};Editor.base64Encode=function(n){for(var z="",G=0,M=n.length,N,Q,S;G<M;){N=n.charCodeAt(G++)&255;if(G==M){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4);z+="==";break}Q=n.charCodeAt(G++);if(G==M){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);z+="=";break}S=n.charCodeAt(G++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(n,z,G,M,N,Q,S,T){try{var W=!S&&(M||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(Z){200<=Z.getStatus()&&299>=
-Z.getStatus()?null!=z&&(Z=Z.getText(),W&&(Q=null!=Q?Q:"data:image/png;base64,",Z=Q+Editor.base64Encode(Z)),z(Z)):null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(Z){null!=G&&G(Z)}};
-Editor.prototype.getErrorMessage=function(n){var z=mxResources.get("error")+" "+n.getStatus();try{var G=n.getText(),M=JSON.parse(G);null!=M&&null!=M.error&&null!=M.error.message&&(z=M.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=function(n){var z=null;if(null!=n){var G=n.split("url(");if(0<G.length){z=[G[0]];n=window.location.pathname;var M=null!=n?n.lastIndexOf("/"):-1;0<=M&&(n=n.substring(0,M+1));M=document.getElementsByTagName("base");var N=null;null!=M&&0<M.length&&
-(N=M[0].getAttribute("href"));for(var Q=1;Q<G.length;Q++)if(M=G[Q].indexOf(")"),0<M){var S=Editor.trimCssUrl(G[Q].substring(0,M));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":n)+S);z.push('url("'+S+'"'+G[Q].substring(M))}else z.push(G[Q])}else z=[n]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(n,z,G){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+encodeURIComponent(z));G(n,
-z)};Editor.prototype.embedCssFonts=function(n,z){var G=n.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==M){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}z(W.join(""))}});if(0<G.length){for(n=1;n<G.length;n++){var Q=G[n].indexOf(")"),S=null,T=G[n].indexOf("format(",Q);0<T&&(S=Editor.trimCssUrl(G[n].substring(T+7,G[n].indexOf(")",
+title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",
+[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(F=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=F&&(M=new mxCodec(F.ownerDocument),M.decode(F,this.graph.getStylesheet())));else{var F=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
+"/default-old.xml").getDocumentElement();if(null!=F){var M=new mxCodec(F.ownerDocument);M.decode(F,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),F=0;F<z.length;F++)this.graph.addExtFont(z[F].name,z[F].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var F=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&F.setAttribute("style",this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=M&&F.setAttribute("backgroundImage",JSON.stringify(M));F.setAttribute("math",this.graph.mathEnabled?"1":"0");F.setAttribute("shadow",
+this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?F.setAttribute("adaptiveColors",this.graph.adaptiveColors):F.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),F.setAttribute("extFonts",M.join("|")));return F};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=
+unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var F=mxUtils.parseXml(z).documentElement;return"mxfile"==F.nodeName||"mxGraphModel"==F.nodeName}}catch(M){}return!1};Editor.prototype.extractGraphModel=function(m,z,F){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
+this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===
+typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var F=function(){M=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var M=null;Editor.doMathJaxRender=function(S){try{null==M?(MathJax.typesetClear([S]),MathJax.typeset([S]),F()):M!=S&&Editor.mathJaxQueue.push(S)}catch(T){MathJax.typesetClear([S]),null!=T.retry?(M=S,T.retry.then(function(){MathJax.typesetPromise([S]).then(F)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+
+W.toString());F()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());F()})):null!=window.console&&console.log("Error in MathJax.typeset: "+T.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};
+Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var S=mxUtils.bind(this,function(T,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");
+if(null!=z&&0<z.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",m);z[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z="",F=[""],M=0,O=!0,Q;m=$jscomp.makeIterator(m);for(Q=m.next();!Q.done;Q=m.next())Q=Q.value,'"'===Q?(O&&Q===z&&(F[M]+=Q),O=!O):","===Q&&O?Q=F[++M]="":F[M]+=Q,z=Q;return F}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
+!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var F="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+F+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,F=this;m.convert=function(M){null!=M&&navigator.onLine&&("http://"!=M.substring(0,7)&&"https://"!=M.substring(0,8)||M.substring(0,m.baseUrl.length)==m.baseUrl||F.crossOriginImages&&
+F.isCorsEnabledForUrl(M)?"chrome-extension://"!=M.substring(0,19)&&(M=z.apply(this,arguments)):M=PROXY_URL+"?url="+encodeURIComponent(M));return M};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,F,M,O){try{var Q=!0,S=window.setTimeout(mxUtils.bind(this,function(){Q=!1;z(m)}),this.timeout),T=mxUtils.bind(this,function(){null!=M?this.convertImageToDataUri(m,z,F,M,!0):z(m)});if(/(\.svg)$/i.test(m)&&
+!O)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);Q&&(200>X.getStatus()||299<X.getStatus()?T():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);Q&&T()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(Q)try{M=null!=M&&O?M:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(M,M);X.height=W.height*M;X.width=W.width*M;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};
+W.onerror=function(){window.clearTimeout(S);Q&&(null!=F?F():z(m))};W.src=m}}catch(X){null!=F?F():z(m)}};Editor.prototype.convertImages=function(m,z,F,M){function O(){0<Q.length?Q.shift()():z(m)}null==M&&(M=this.createImageUrlConverter());var Q=[],S=F||{};F=mxUtils.bind(this,function(T,W){T=m.getElementsByTagName(T);for(var X=0;X<T.length;X++)mxUtils.bind(this,function(Z){Q.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=M.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=
+S[Y];null==ba?this.convertImageToDataUri(Y,function(da){null!=da&&(S[Y]=da,Z.setAttribute(W,da));O()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),O())}else null!=Y&&Z.setAttribute(W,Y),O()}}catch(da){O()}}))})(T[X])});F("image","xlink:href");F("img","src");O()};Editor.base64Encode=function(m){for(var z="",F=0,M=m.length,O,Q,S;F<M;){O=m.charCodeAt(F++)&255;if(F==M){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);z+="==";break}Q=m.charCodeAt(F++);if(F==M){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);z+="=";break}S=m.charCodeAt(F++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(Q&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(m,z,F,M,O,Q,S,T){try{var W=!S&&(M||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));O=null!=O?O:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){200<=Z.getStatus()&&299>=
+Z.getStatus()?null!=z&&(Z=Z.getText(),W&&(Q=null!=Q?Q:"data:image/png;base64,",Z=Q+Editor.base64Encode(Z)),z(Z)):null!=F&&(0==Z.getStatus()?F({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?F({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):F({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=F&&F({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){O&&null!=F&&F({code:App.ERROR_TIMEOUT,retry:X})},T)});X()}catch(Z){null!=F&&F(Z)}};
+Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var F=m.getText(),M=JSON.parse(F);null!=M&&null!=M.error&&null!=M.error.message&&(z=M.error.message+" ("+z+")")}catch(O){}return z};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var F=m.split("url(");if(0<F.length){z=[F[0]];m=window.location.pathname;var M=null!=m?m.lastIndexOf("/"):-1;0<=M&&(m=m.substring(0,M+1));M=document.getElementsByTagName("base");var O=null;null!=M&&0<M.length&&
+(O=M[0].getAttribute("href"));for(var Q=1;Q<F.length;Q++)if(M=F[Q].indexOf(")"),0<M){var S=Editor.trimCssUrl(F[Q].substring(0,M));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+F[Q].substring(M))}else z.push(F[Q])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,F){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+encodeURIComponent(z));F(m,
+z)};Editor.prototype.embedCssFonts=function(m,z){var F=m.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==M){for(var W=[F[0]],X=1;X<F.length;X++){var Z=F[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(F[X].substring(0,Z))]);W.push('"'+F[X].substring(Z))}z(W.join(""))}});if(0<F.length){for(m=1;m<F.length;m++){var Q=F[m].indexOf(")"),S=null,T=F[m].indexOf("format(",Q);0<T&&(S=Editor.trimCssUrl(F[m].substring(T+7,F[m].indexOf(")",
T))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;M++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==
-S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;M--;N()}),mxUtils.bind(this,function(ba){M--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[n].substring(0,Q)),S)}N()}else z(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=
-z;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(n[z]=Graph.fontMapping[z]);return n};Editor.prototype.embedExtFonts=function(n){var z=this.graph.getCustomFonts();if(0<z.length){var G=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(G.join(""),n)}),Q=0;Q<z.length;Q++)mxUtils.bind(this,function(S,T){Graph.isCssFontUrl(T)?
-null==this.cachedGoogleFonts[T]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(W){this.cachedGoogleFonts[T]=W;G.push(W+"\n");M--;N()}),mxUtils.bind(this,function(W){M--;G.push("@import url("+T+");\n");N()}))):G.push(this.cachedGoogleFonts[T]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+T+'")}\n')})(z[Q].name,z[Q].url);N()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var z=document.getElementsByTagName("style"),
-G=0;G<z.length;G++){var M=mxUtils.getTextContent(z[G]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&n[0].appendChild(z[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var G=mxUtils.getSvgDefs(n),M=z.split("\n");z=[];for(var N=[],Q=0;Q<M.length;Q++)"@import"==M[Q].substring(0,7)?z.push(M[Q]):N.push(M[Q]);n=n.ownerDocument;n=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"style"):n.createElement("style");
-n.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(n,z.join("\n")),G.appendChild(n));0<N.length&&(n=n.cloneNode(!1),mxUtils.setTextContent(n,N.join("\n")),G.appendChild(n))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,z,G){var M=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(M/n,M/z))};Editor.prototype.exportToCanvas=function(n,z,G,M,N,Q,S,T,W,X,Z,Y,ba,da,ia,ca,fa,aa){try{Q=
-null!=Q?Q:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ja=W?null:Y.background;ja==mxConstants.NONE&&(ja=null);null==ja&&(ja=M);null==ja&&0==W&&(ja="dark"==ca&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,da,null,S,null,null,null,X,null,ca,fa,aa),mxUtils.bind(this,function(ha){try{var ea=new Image;ea.onload=mxUtils.bind(this,function(){try{var ua=function(){mxClient.IS_SF?window.setTimeout(function(){sa.drawImage(ea,0,0);n(na,ha)},
-0):(sa.drawImage(ea,0,0),n(na,ha))},na=document.createElement("canvas"),za=parseInt(ha.getAttribute("width")),ma=parseInt(ha.getAttribute("height"));T=null!=T?T:1;null!=z&&(T=Q?Math.min(1,Math.min(3*z/(4*ma),z/za)):z/za);T=this.getMaxCanvasScale(za,ma,T);za=Math.ceil(T*za);ma=Math.ceil(T*ma);na.setAttribute("width",za);na.setAttribute("height",ma);var sa=na.getContext("2d");if(null!=ja){var oa=mxUtils.getLightDarkColor(ja);sa.beginPath();sa.rect(0,0,za,ma);sa.fillStyle="dark"==ca&&"none"!=Y.getAdaptiveColors()?
-oa.dark:oa.light;sa.fill()}1!=T&&sa.scale(T,T);if(ia){var la=Y.view,Ea=la.scale;la.scale=1;var va=btoa(unescape(encodeURIComponent(la.createSvgGrid(la.gridColor))));la.scale=Ea;va="data:image/svg+xml;base64,"+va;var Ca=Y.gridSize*la.gridSteps*T,xa=Y.getGraphBounds(),Da=la.translate.x*Ea,Ba=la.translate.y*Ea,Ka=Da+(xa.x-Da)/Ea-ba,Ja=Ba+(xa.y-Ba)/Ea-ba,Ga=new Image;Ga.onload=function(){try{for(var Aa=-Math.round(Ca-mxUtils.mod((Da-Ka)*T,Ca)),Ma=-Math.round(Ca-mxUtils.mod((Ba-Ja)*T,Ca));Aa<za;Aa+=Ca)for(var Va=
-Ma;Va<ma;Va+=Ca)sa.drawImage(Ga,Aa/T,Va/T);ua()}catch(Ua){null!=N&&N(Ua)}};Ga.onerror=function(Aa){null!=N&&N(Aa)};Ga.src=va}else ua()}catch(Aa){null!=N&&N(Aa)}});ea.onerror=function(ua){null!=N&&N(ua)};X&&this.graph.addSvgShadow(ha);this.graph.mathEnabled&&this.addMathCss(ha);var ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ha,this.resolvedFontCss),ea.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}catch(ua){null!=N&&N(ua)}});this.embedExtFonts(mxUtils.bind(this,
-function(ua){try{null!=ua&&this.addFontCss(ha,ua),this.loadFonts(ya)}catch(na){null!=N&&N(na)}}))}catch(ua){null!=N&&N(ua)}}),G,Z)}catch(ha){null!=N&&N(ha)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var p=l,v=0;8>v;v++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[l]=p;Editor.updateCRC=function(n,z,G,M){for(var N=0;N<M;N++)n=Editor.crcTable[(n^z.charCodeAt(G+N))&255]^n>>>8;return n};Editor.crc32=function(n){for(var z=-1,G=0;G<n.length;G++)z=z>>>8^Editor.crcTable[(z^n.charCodeAt(G))&255];return(z^
--1)>>>0};Editor.writeGraphModelToPng=function(n,z,G,M,N){function Q(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function T(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}n=n.substring(n.indexOf(",")+1);n=window.atob?atob(n):Base64.decode(n,!0);var W=0;if(Q(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(Q(n,4),"IHDR"!=Q(n,4))null!=
-N&&N();else{Q(n,17);N=n.substring(0,W);do{var X=S(n);if("IDAT"==Q(n,4)){N=n.substring(0,W-8);"pHYs"==z&&"dpi"==G?(G=Math.round(M/.0254),G=T(G)+T(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,z,0,4);M=Editor.updateCRC(M,G,0,G.length);N+=T(G.length)+z+G+T(M^4294967295);N+=n.substring(W-8,n.length);break}N+=n.substring(W-8,W-4+X);Q(n,X);Q(n,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,
-!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var t=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,z){t.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
-function(n,z){var G=null;null!=n.editor.graph.getModel().getParent(z)?G=z.getId():null!=n.currentPage&&(G=n.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var B=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?B.apply(this,arguments):
-this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(n){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=d.apply(this,arguments);var z=this.editorUi,G=z.editor.graph;if(G.isEnabled()){var M=z.getCurrentFile();null!=M&&M.isAutosaveOptional()&&n.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},
-function(Q){z.editor.setAutosave(Q);z.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(Q){this.listener=function(){Q(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(Q){z.actions.get("mathematicalTypesetting").funct()},
-{install:function(Q){this.listener=function(){Q(G.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});n.appendChild(N);(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&N.appendChild(z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;M--;O()}),mxUtils.bind(this,function(ba){M--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(F[m].substring(0,Q)),S)}O()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=
+z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var F=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(F.join(""),m)}),Q=0;Q<z.length;Q++)mxUtils.bind(this,function(S,T){Graph.isCssFontUrl(T)?
+null==this.cachedGoogleFonts[T]?(M++,this.loadUrl(Graph.rewriteGoogleFontUrl(T),mxUtils.bind(this,function(W){this.cachedGoogleFonts[T]=W;F.push(W+"\n");M--;O()}),mxUtils.bind(this,function(W){M--;F.push("@import url("+T+");\n");O()}))):F.push(this.cachedGoogleFonts[T]+"\n"):F.push('@font-face {font-family: "'+S+'";src: url("'+T+'")}\n')})(z[Q].name,z[Q].url);O()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),
+F=0;F<z.length;F++){var M=mxUtils.getTextContent(z[F]);0>M.indexOf("mxPageSelector")&&0<M.indexOf("MathJax")&&m[0].appendChild(z[F].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var F=mxUtils.getSvgDefs(m),M=z.split("\n");z=[];for(var O=[],Q=0;Q<M.length;Q++)"@import"==M[Q].substring(0,7)?z.push(M[Q]):O.push(M[Q]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");
+m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),F.appendChild(m));0<O.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,O.join("\n")),F.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,F){var M=mxClient.IS_FF?8192:16384;return Math.min(F,Math.min(M/m,M/z))};Editor.prototype.exportToCanvas=function(m,z,F,M,O,Q,S,T,W,X,Z,Y,ba,da,ia,ca,fa,aa){try{Q=
+null!=Q?Q:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ja=W?null:Y.background;ja==mxConstants.NONE&&(ja=null);null==ja&&(ja=M);null==ja&&0==W&&(ja="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,ba,da,null,S,null,null,null,X,null,ca,fa,aa),mxUtils.bind(this,function(ha){try{var ea=new Image;ea.onload=mxUtils.bind(this,function(){try{var ua=function(){mxClient.IS_SF?window.setTimeout(function(){sa.drawImage(ea,0,0);m(na,ha)},0):(sa.drawImage(ea,0,
+0),m(na,ha))},na=document.createElement("canvas"),za=parseInt(ha.getAttribute("width")),ma=parseInt(ha.getAttribute("height"));T=null!=T?T:1;null!=z&&(T=Q?Math.min(1,Math.min(3*z/(4*ma),z/za)):z/za);T=this.getMaxCanvasScale(za,ma,T);za=Math.ceil(T*za);ma=Math.ceil(T*ma);na.setAttribute("width",za);na.setAttribute("height",ma);var sa=na.getContext("2d");if(null!=ja){var oa=mxUtils.getLightDarkColor(ja);sa.beginPath();sa.rect(0,0,za,ma);sa.fillStyle="dark"==ca&&"none"!=Y.getAdaptiveColors()?oa.dark:
+oa.light;sa.fill()}1!=T&&sa.scale(T,T);if(ia){var la=Y.view,Ea=la.scale;la.scale=1;var va=btoa(unescape(encodeURIComponent(la.createSvgGrid(la.gridColor))));la.scale=Ea;va="data:image/svg+xml;base64,"+va;var Ca=Y.gridSize*la.gridSteps*T,xa=Y.getGraphBounds(),Da=la.translate.x*Ea,Ba=la.translate.y*Ea,Ka=Da+(xa.x-Da)/Ea-ba,Ja=Ba+(xa.y-Ba)/Ea-ba,Ga=new Image;Ga.onload=function(){try{for(var Aa=-Math.round(Ca-mxUtils.mod((Da-Ka)*T,Ca)),Ma=-Math.round(Ca-mxUtils.mod((Ba-Ja)*T,Ca));Aa<za;Aa+=Ca)for(var Va=
+Ma;Va<ma;Va+=Ca)sa.drawImage(Ga,Aa/T,Va/T);ua()}catch(Ua){null!=O&&O(Ua)}};Ga.onerror=function(Aa){null!=O&&O(Aa)};Ga.src=va}else ua()}catch(Aa){null!=O&&O(Aa)}});ea.onerror=function(ua){null!=O&&O(ua)};X&&this.graph.addSvgShadow(ha);this.graph.mathEnabled&&this.addMathCss(ha);var ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ha,this.resolvedFontCss),ea.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}catch(ua){null!=O&&O(ua)}});this.embedExtFonts(mxUtils.bind(this,
+function(ua){try{null!=ua&&this.addFontCss(ha,ua),this.loadFonts(ya)}catch(na){null!=O&&O(na)}}))}catch(ua){null!=O&&O(ua)}}),F,Z)}catch(ha){null!=O&&O(ha)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var p=l,v=0;8>v;v++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[l]=p;Editor.updateCRC=function(m,z,F,M){for(var O=0;O<M;O++)m=Editor.crcTable[(m^z.charCodeAt(F+O))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,F=0;F<m.length;F++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(F))&255];return(z^
+-1)>>>0};Editor.writeGraphModelToPng=function(m,z,F,M,O){function Q(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function T(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(Q(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(m,4),"IHDR"!=Q(m,4))null!=
+O&&O();else{Q(m,17);O=m.substring(0,W);do{var X=S(m);if("IDAT"==Q(m,4)){O=m.substring(0,W-8);"pHYs"==z&&"dpi"==F?(F=Math.round(M/.0254),F=T(F)+T(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,z,0,4);M=Editor.updateCRC(M,F,0,F.length);O+=T(F.length)+z+F+T(M^4294967295);O+=m.substring(W-8,m.length);break}O+=m.substring(W-8,W-4+X);Q(m,X);Q(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,
+!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var t=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){t.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
+function(m,z){var F=null;null!=m.editor.graph.getModel().getParent(z)?F=z.getId():null!=m.currentPage&&(F=m.currentPage.getId());return F});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var B=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?B.apply(this,arguments):
+this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=d.apply(this,arguments);var z=this.editorUi,F=z.editor.graph;if(F.isEnabled()){var M=z.getCurrentFile();null!=M&&M.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},
+function(Q){z.editor.setAutosave(Q);z.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(Q){this.listener=function(){Q(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&F.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return F.mathEnabled},function(Q){z.actions.get("mathematicalTypesetting").funct()},
+{install:function(Q){this.listener=function(){Q(F.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(O);(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&O.appendChild(z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
-type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(n){return"0"==mxUtils.getValue(n.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(n){return"1"==mxUtils.getValue(n.style,
-"fixedSize","0")}}];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,isVisible:function(n){return"0"==mxUtils.getValue(n.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(n){return"1"==mxUtils.getValue(n.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=
+type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,
+"fixedSize","0")}}];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,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];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:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{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",
@@ -12895,90 +12893,90 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
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;var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=n.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),n.customProperties,n))};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){var z=
-this.editorUi.getSelectionState();1==z.cells.length?this.addActions(n,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(n,["pasteStyle","pasteData"]);k.apply(this,arguments);return n};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(n,z,G,M){function N(sa,oa,la,Ea,va){if(null!=la.valueChanged)la.valueChanged(oa,va);else{ba.getModel().beginUpdate();try{va=[];var Ca=[];if(null!=la.index){for(var xa=[],Da=la.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==
+StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments);null!=m.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),m.customProperties,m))};var k=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var z=
+this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);k.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,F,M){function O(sa,oa,la,Ea,va){if(null!=la.valueChanged)la.valueChanged(oa,va);else{ba.getModel().beginUpdate();try{va=[];var Ca=[];if(null!=la.index){for(var xa=[],Da=la.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==
sa;)xa.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;la.index<xa.length?null!=Ea?xa.splice(Ea,1):xa[la.index]=oa:xa.push(oa);null!=la.size&&xa.length>la.size&&(xa=xa.slice(0,la.size));oa=xa.join(",");null!=la.countProperty&&(ba.setCellStyles(la.countProperty,xa.length,ba.getSelectionCells()),va.push(la.countProperty),Ca.push(xa.length))}ba.setCellStyles(sa,oa,ba.getSelectionCells());va.push(sa);Ca.push(oa);if(null!=la.dependentProps)for(sa=0;sa<la.dependentProps.length;sa++){var Ba=la.dependentPropsDefVal[sa],
-Ka=la.dependentPropsVals[sa];if(Ka.length>oa)Ka=Ka.slice(0,oa);else for(var Ja=Ka.length;Ja<oa;Ja++)Ka.push(Ba);Ka=Ka.join(",");ba.setCellStyles(la.dependentProps[sa],Ka,ba.getSelectionCells());va.push(la.dependentProps[sa]);Ca.push(Ka)}if("function"==typeof la.onChange)la.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",va,"values",Ca,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function Q(sa,oa,la){var Ea=mxUtils.getOffset(n,!0),va=mxUtils.getOffset(sa,
+Ka=la.dependentPropsVals[sa];if(Ka.length>oa)Ka=Ka.slice(0,oa);else for(var Ja=Ka.length;Ja<oa;Ja++)Ka.push(Ba);Ka=Ka.join(",");ba.setCellStyles(la.dependentProps[sa],Ka,ba.getSelectionCells());va.push(la.dependentProps[sa]);Ca.push(Ka)}if("function"==typeof la.onChange)la.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",va,"values",Ca,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function Q(sa,oa,la){var Ea=mxUtils.getOffset(m,!0),va=mxUtils.getOffset(sa,
!0);oa.style.position="absolute";oa.style.left=va.x-Ea.x+"px";oa.style.top=va.y-Ea.y+"px";oa.style.width=sa.offsetWidth+"px";oa.style.height=sa.offsetHeight-(la?4:0)+"px";oa.style.zIndex=5}function S(sa,oa,la){function Ea(Ca){if(null==Ca||Ca==mxConstants.NONE)va.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ca)va.style.background="";else{var xa=mxUtils.getLightDarkColor(Ca);mxUtils.isLightDarkColor(Ca)&&xa.light!=xa.dark?va.style.background="linear-gradient(to right bottom, "+
-xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":va.style.background=Ca}}var va=document.createElement("div");va.style.width="32px";va.style.height="8px";va.style.margin="2px";va.style.borderStyle="solid";va.style.borderWidth="1px";Ea(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ca){this.editorUi.pickColor(oa,function(xa){N(sa,xa,la);Ea(xa)});mxEvent.consume(Ca)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className=
-"geColorBtn";btn.appendChild(va);return btn}function T(sa,oa,la,Ea,va,Ca,xa){null!=oa&&(oa=oa.split(","),da.push({name:sa,values:oa,type:la,defVal:Ea,countProperty:va,parentRow:Ca,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Da){for(var Ba=Ca,Ka=0;null!=Ba.nextSibling;)if(Ba.nextSibling.getAttribute("data-pName")==sa)Ba=Ba.nextSibling,Ka++;else break;var Ja={type:la,parentRow:Ca,index:Ka,isDeletable:!0,defVal:Ea,countProperty:va};Ka=Z(sa,"",Ja,0==Ka%2,xa);N(sa,Ea,Ja);
+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":va.style.background=Ca}}var va=document.createElement("div");va.style.width="32px";va.style.height="8px";va.style.margin="2px";va.style.borderStyle="solid";va.style.borderWidth="1px";Ea(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ca){this.editorUi.pickColor(oa,function(xa){O(sa,xa,la);Ea(xa)});mxEvent.consume(Ca)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className=
+"geColorBtn";btn.appendChild(va);return btn}function T(sa,oa,la,Ea,va,Ca,xa){null!=oa&&(oa=oa.split(","),da.push({name:sa,values:oa,type:la,defVal:Ea,countProperty:va,parentRow:Ca,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Da){for(var Ba=Ca,Ka=0;null!=Ba.nextSibling;)if(Ba.nextSibling.getAttribute("data-pName")==sa)Ba=Ba.nextSibling,Ka++;else break;var Ja={type:la,parentRow:Ca,index:Ka,isDeletable:!0,defVal:Ea,countProperty:va};Ka=Z(sa,"",Ja,0==Ka%2,xa);O(sa,Ea,Ja);
Ba.parentNode.insertBefore(Ka,Ba.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(sa,oa,la,Ea,va,Ca,xa){if(0<va){var Da=Array(va);oa=null!=oa?oa.split(","):[];for(var Ba=0;Ba<va;Ba++)Da[Ba]=null!=oa[Ba]?oa[Ba]:null!=Ea?Ea:"";da.push({name:sa,values:Da,type:la,defVal:Ea,parentRow:Ca,flipBkg:xa,size:va})}return document.createElement("div")}function X(sa,oa,la){var Ea=document.createElement("input");Ea.type="checkbox";
-Ea.checked="1"==oa;mxEvent.addListener(Ea,"change",function(){N(sa,Ea.checked?"1":"0",la)});return Ea}function Z(sa,oa,la,Ea,va){var Ca=la.dispName,xa=la.type,Da=document.createElement("tr");Da.className="gePropRow"+(va?"Dark":"")+(Ea?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",sa);Da.setAttribute("data-pValue",oa);Ea=!1;null!=la.index&&(Da.setAttribute("data-index",la.index),Ca=(null!=Ca?Ca:"")+"["+la.index+"]",Ea=!0);var Ba=document.createElement("td");Ba.className="gePropRowCell";
+Ea.checked="1"==oa;mxEvent.addListener(Ea,"change",function(){O(sa,Ea.checked?"1":"0",la)});return Ea}function Z(sa,oa,la,Ea,va){var Ca=la.dispName,xa=la.type,Da=document.createElement("tr");Da.className="gePropRow"+(va?"Dark":"")+(Ea?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",sa);Da.setAttribute("data-pValue",oa);Ea=!1;null!=la.index&&(Da.setAttribute("data-index",la.index),Ca=(null!=Ca?Ca:"")+"["+la.index+"]",Ea=!0);var Ba=document.createElement("td");Ba.className="gePropRowCell";
Ca=mxResources.get(Ca,null,Ca);mxUtils.write(Ba,Ca);Ba.setAttribute("title",Ca);Ea&&(Ba.style.textAlign="right");Da.appendChild(Ba);Ba=document.createElement("td");Ba.className="gePropRowCell";Ba.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Ba.appendChild(S(sa,oa,la));else if("bool"==xa||"boolean"==xa)Ba.appendChild(X(sa,oa,la));else if("enum"==xa){var Ka=la.enumList;for(va=0;va<Ka.length;va++)if(Ca=Ka[va],Ca.val==oa){mxUtils.write(Ba,mxResources.get(Ca.dispName,null,Ca.dispName));
-break}mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(){var Ja=document.createElement("select"),Ga=null;Q(Ba,Ja);for(var Aa=0;Aa<Ka.length;Aa++){var Ma=Ka[Aa],Va=document.createElement("option");Va.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Va,mxResources.get(Ma.dispName,null,Ma.dispName));Ja.appendChild(Va);null==Ma.val&&(Va.value="null",Ga=Va)}Ja.value=null==oa&&null!=Ga?"null":oa;n.appendChild(Ja);mxEvent.addListener(Ja,"change",function(){var Ua=mxUtils.htmlEntities(Ja.value);if(Ja[Ja.selectedIndex]==
-Ga||"null"==Ua.value)Ua=null;N(sa,Ua,la)});Ja.focus();mxEvent.addListener(Ja,"blur",function(){n.removeChild(Ja)})}))}else"dynamicArr"==xa?Ba.appendChild(T(sa,oa,la.subType,la.subDefVal,la.countProperty,Da,va)):"staticArr"==xa?Ba.appendChild(W(sa,oa,la.subType,la.subDefVal,la.size,Da,va)):"readOnly"==xa?(va=document.createElement("input"),va.setAttribute("readonly",""),va.value=oa,va.style.borderWidth="0px","id"==sa?(va.style.width="190px",va.style.position="relative",va.style.right="6px",va.style.float=
+break}mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(){var Ja=document.createElement("select"),Ga=null;Q(Ba,Ja);for(var Aa=0;Aa<Ka.length;Aa++){var Ma=Ka[Aa],Va=document.createElement("option");Va.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Va,mxResources.get(Ma.dispName,null,Ma.dispName));Ja.appendChild(Va);null==Ma.val&&(Va.value="null",Ga=Va)}Ja.value=null==oa&&null!=Ga?"null":oa;m.appendChild(Ja);mxEvent.addListener(Ja,"change",function(){var Ua=mxUtils.htmlEntities(Ja.value);if(Ja[Ja.selectedIndex]==
+Ga||"null"==Ua.value)Ua=null;O(sa,Ua,la)});Ja.focus();mxEvent.addListener(Ja,"blur",function(){m.removeChild(Ja)})}))}else"dynamicArr"==xa?Ba.appendChild(T(sa,oa,la.subType,la.subDefVal,la.countProperty,Da,va)):"staticArr"==xa?Ba.appendChild(W(sa,oa,la.subType,la.subDefVal,la.size,Da,va)):"readOnly"==xa?(va=document.createElement("input"),va.setAttribute("readonly",""),va.value=oa,va.style.borderWidth="0px","id"==sa?(va.style.width="190px",va.style.position="relative",va.style.right="6px",va.style.float=
"right",va.style.background="none",va.style.textAlign="right",Da.firstChild.setAttribute("colspan","2"),va.setAttribute("title",oa),Da.firstChild.appendChild(va)):(va.style.width="96px",Ba.appendChild(va))):(Ba.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Ba,"click",mxUtils.bind(Y,function(){function Ja(){var Aa=Ga.value;Aa=0==Aa.length&&"string"!=xa&&"numbers"!=xa?0:Aa;la.allowAuto&&(null!=Aa.trim&&"auto"==Aa.trim().toLowerCase()?(Aa="auto",xa="string"):(Aa=parseFloat(Aa),
-Aa=isNaN(Aa)?0:Aa));null!=la.min&&Aa<la.min?Aa=la.min:null!=la.max&&Aa>la.max&&(Aa=la.max);var Ma=null;try{Ma="numbers"==xa?Aa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Aa):Aa)+"")}catch(Va){}N(sa,Ma,la,null,Ga)}var Ga=document.createElement("input");Q(Ba,Ga,!0);Ga.value=decodeURIComponent(oa);Ga.className="gePropEditor";"int"!=xa&&"float"!=xa||la.allowAuto||(Ga.type="number",Ga.step="int"==xa?"1":"any",null!=la.min&&(Ga.min=parseFloat(la.min)),null!=la.max&&(Ga.max=
-parseFloat(la.max)));n.appendChild(Ga);mxEvent.addListener(Ga,"keypress",function(Aa){13==Aa.keyCode&&Ja()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ja()})})));la.isDeletable&&(va=mxUtils.button("-",mxUtils.bind(Y,function(Ja){N(sa,"",la,la.index);mxEvent.consume(Ja)})),va.style.height="16px",va.style.width="25px",va.style.float="right",va.className="geColorBtn",Ba.appendChild(va));Da.appendChild(Ba);return Da}var Y=this,ba=this.editorUi.editor.graph,da=[],ia=document.createElement("table");
+Aa=isNaN(Aa)?0:Aa));null!=la.min&&Aa<la.min?Aa=la.min:null!=la.max&&Aa>la.max&&(Aa=la.max);var Ma=null;try{Ma="numbers"==xa?Aa.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Aa):Aa)+"")}catch(Va){}O(sa,Ma,la,null,Ga)}var Ga=document.createElement("input");Q(Ba,Ga,!0);Ga.value=decodeURIComponent(oa);Ga.className="gePropEditor";"int"!=xa&&"float"!=xa||la.allowAuto||(Ga.type="number",Ga.step="int"==xa?"1":"any",null!=la.min&&(Ga.min=parseFloat(la.min)),null!=la.max&&(Ga.max=
+parseFloat(la.max)));m.appendChild(Ga);mxEvent.addListener(Ga,"keypress",function(Aa){13==Aa.keyCode&&Ja()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ja()})})));la.isDeletable&&(va=mxUtils.button("-",mxUtils.bind(Y,function(Ja){O(sa,"",la,la.index);mxEvent.consume(Ja)})),va.style.height="16px",va.style.width="25px",va.style.float="right",va.className="geColorBtn",Ba.appendChild(va));Da.appendChild(Ba);return Da}var Y=this,ba=this.editorUi.editor.graph,da=[],ia=document.createElement("table");
ia.className="geProperties geFullWidthElement";var ca=document.createElement("tr");ca.className="gePropHeader";var fa=document.createElement("th");fa.className="gePropHeaderCell";fa.style.paddingLeft="16px";fa.style.backgroundRepeat="no-repeat";fa.style.backgroundPosition="-2px 50%";fa.style.backgroundSize="20px";mxUtils.write(fa,mxResources.get("property"));ca.style.cursor="pointer";var aa=function(){var sa=ia.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){fa.style.backgroundImage=
-"url('"+Editor.arrowRightImage+"')";var oa="none";for(var la=n.childNodes.length-1;0<=la;la--)try{var Ea=n.childNodes[la],va=Ea.nodeName.toUpperCase();"INPUT"!=va&&"SELECT"!=va||n.removeChild(Ea)}catch(Ca){}}else fa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(la=0;la<sa.length;la++)sa[la].style.display=oa};mxEvent.addListener(ca,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;aa()});ca.appendChild(fa);var ja=document.createElement("th");ja.className=
-"gePropHeaderCell";ja.style.paddingLeft="4px";mxUtils.write(ja,mxResources.get("value"));ca.appendChild(ja);ia.appendChild(ca);var ha=ja=!1;ca=null;1==G.vertices.length&&0==G.edges.length?ca=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(ca=G.edges[0].id);null==ca||M||ia.appendChild(Z("id",mxUtils.htmlEntities(ca),{dispName:"id",type:"readOnly"},!0,!1));for(var ea in z)if(M=z[ea],!M.primary&&("function"!=typeof M.isVisible||M.isVisible(G,this))){var ya=null!=M.getValue?M.getValue():null!=
-G.style[ea]?mxUtils.htmlEntities(G.style[ea]+""):null!=M.getDefaultValue?M.getDefaultValue(G,this):M.defVal;if("separator"==M.type)ha=!ha;else{if("staticArr"==M.type)M.size=parseInt(G.style[M.sizeProperty]||z[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var ua=M.dependentProps,na=[],za=[];for(ca=0;ca<ua.length;ca++){var ma=G.style[ua[ca]];za.push(z[ua[ca]].subDefVal);na.push(null!=ma?ma.split(","):[])}M.dependentPropsDefVal=za;M.dependentPropsVals=na}ia.appendChild(Z(ea,ya,M,ja,ha));
-ja=!ja}}for(ca=0;ca<da.length;ca++)for(M=da[ca],z=M.parentRow,G=0;G<M.values.length;G++)ea=Z(M.name,M.values[G],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:G,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==G%2,M.flipBkg),z.parentNode.insertBefore(ea,z.nextSibling),z=ea;n.appendChild(ia);aa();return n};StyleFormatPanel.prototype.addStyles=function(n){if(null!=this.defaultColorSchemes){var z=this.editorUi,G=z.editor.graph,M=document.createElement("div");M.style.padding=
-"6px 20px 0 24px";n.appendChild(M);var N=document.createElement("div");N.className="geSwitcher";N.style.padding="4px 18px 6px 0px";for(var Q=[],S=0;S<this.defaultColorSchemes.length;S++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(ba){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){W(ba)}))})(S);Q.push(T);N.appendChild(T)}var W=mxUtils.bind(this,function(ba){null!=Q[ba]&&(null!=this.format.currentScheme&&null!=Q[this.format.currentScheme]&&
-(Q[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ba,X(this.defaultColorSchemes[this.format.currentScheme]),Q[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(ba){var da=mxUtils.clone(G.defaultVertexStyle);da[mxConstants.STYLE_STROKECOLOR]=null!=da[mxConstants.STYLE_STROKECOLOR]?da[mxConstants.STYLE_STROKECOLOR]:"default";da[mxConstants.STYLE_FILLCOLOR]=null!=da[mxConstants.STYLE_FILLCOLOR]?da[mxConstants.STYLE_FILLCOLOR]:
-"default";da[mxConstants.STYLE_FONTCOLOR]=null!=da[mxConstants.STYLE_FONTCOLOR]?da[mxConstants.STYLE_FONTCOLOR]:"default";G.replaceDefaultColors(new mxCell,da);var ia=mxUtils.bind(this,function(fa){var aa=mxUtils.button("",mxUtils.bind(this,function(ea){G.getModel().beginUpdate();try{for(var ya=z.getSelectionState().cells,ua=0;ua<ya.length;ua++){var na=G.getModel().getStyle(ya[ua]);null!=fa?(mxEvent.isShiftDown(ea)||(na=""==fa.fill||null==fa.fill?mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null):
-mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,fa.fill),na=""==fa.gradient||null==fa.gradient?mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,fa.gradient),mxEvent.isControlDown(ea)||mxClient.IS_MAC&&mxEvent.isMetaDown(ea)||!G.getModel().isVertex(ya[ua])||(na=""==fa.font||null==fa.font?mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,fa.font))),mxEvent.isAltDown(ea)||(na=""==fa.stroke||
-null==fa.fill?mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,fa.stroke))):(na=mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null),G.getModel().isVertex(ya[ua])&&(na=mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null)));G.getModel().setStyle(ya[ua],na)}}finally{G.getModel().endUpdate()}}));aa.className="geStyleButton";
+"url('"+Editor.arrowRightImage+"')";var oa="none";for(var la=m.childNodes.length-1;0<=la;la--)try{var Ea=m.childNodes[la],va=Ea.nodeName.toUpperCase();"INPUT"!=va&&"SELECT"!=va||m.removeChild(Ea)}catch(Ca){}}else fa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(la=0;la<sa.length;la++)sa[la].style.display=oa};mxEvent.addListener(ca,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;aa()});ca.appendChild(fa);var ja=document.createElement("th");ja.className=
+"gePropHeaderCell";ja.style.paddingLeft="4px";mxUtils.write(ja,mxResources.get("value"));ca.appendChild(ja);ia.appendChild(ca);var ha=ja=!1;ca=null;1==F.vertices.length&&0==F.edges.length?ca=F.vertices[0].id:0==F.vertices.length&&1==F.edges.length&&(ca=F.edges[0].id);null==ca||M||ia.appendChild(Z("id",mxUtils.htmlEntities(ca),{dispName:"id",type:"readOnly"},!0,!1));for(var ea in z)if(M=z[ea],!M.primary&&("function"!=typeof M.isVisible||M.isVisible(F,this))){var ya=null!=M.getValue?M.getValue():null!=
+F.style[ea]?mxUtils.htmlEntities(F.style[ea]+""):null!=M.getDefaultValue?M.getDefaultValue(F,this):M.defVal;if("separator"==M.type)ha=!ha;else{if("staticArr"==M.type)M.size=parseInt(F.style[M.sizeProperty]||z[M.sizeProperty].defVal)||0;else if(null!=M.dependentProps){var ua=M.dependentProps,na=[],za=[];for(ca=0;ca<ua.length;ca++){var ma=F.style[ua[ca]];za.push(z[ua[ca]].subDefVal);na.push(null!=ma?ma.split(","):[])}M.dependentPropsDefVal=za;M.dependentPropsVals=na}ia.appendChild(Z(ea,ya,M,ja,ha));
+ja=!ja}}for(ca=0;ca<da.length;ca++)for(M=da[ca],z=M.parentRow,F=0;F<M.values.length;F++)ea=Z(M.name,M.values[F],{type:M.type,parentRow:M.parentRow,isDeletable:M.isDeletable,index:F,defVal:M.defVal,countProperty:M.countProperty,size:M.size},0==F%2,M.flipBkg),z.parentNode.insertBefore(ea,z.nextSibling),z=ea;m.appendChild(ia);aa();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=this.editorUi,F=z.editor.graph,M=document.createElement("div");M.style.padding=
+"6px 20px 0 24px";m.appendChild(M);var O=document.createElement("div");O.className="geSwitcher";O.style.padding="4px 18px 6px 0px";for(var Q=[],S=0;S<this.defaultColorSchemes.length;S++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(ba){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){W(ba)}))})(S);Q.push(T);O.appendChild(T)}var W=mxUtils.bind(this,function(ba){null!=Q[ba]&&(null!=this.format.currentScheme&&null!=Q[this.format.currentScheme]&&
+(Q[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ba,X(this.defaultColorSchemes[this.format.currentScheme]),Q[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(ba){var da=mxUtils.clone(F.defaultVertexStyle);da[mxConstants.STYLE_STROKECOLOR]=null!=da[mxConstants.STYLE_STROKECOLOR]?da[mxConstants.STYLE_STROKECOLOR]:"default";da[mxConstants.STYLE_FILLCOLOR]=null!=da[mxConstants.STYLE_FILLCOLOR]?da[mxConstants.STYLE_FILLCOLOR]:
+"default";da[mxConstants.STYLE_FONTCOLOR]=null!=da[mxConstants.STYLE_FONTCOLOR]?da[mxConstants.STYLE_FONTCOLOR]:"default";F.replaceDefaultColors(new mxCell,da);var ia=mxUtils.bind(this,function(fa){var aa=mxUtils.button("",mxUtils.bind(this,function(ea){F.getModel().beginUpdate();try{for(var ya=z.getSelectionState().cells,ua=0;ua<ya.length;ua++){var na=F.getModel().getStyle(ya[ua]);null!=fa?(mxEvent.isShiftDown(ea)||(na=""==fa.fill||null==fa.fill?mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null):
+mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,fa.fill),na=""==fa.gradient||null==fa.gradient?mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,fa.gradient),mxEvent.isControlDown(ea)||mxClient.IS_MAC&&mxEvent.isMetaDown(ea)||!F.getModel().isVertex(ya[ua])||(na=""==fa.font||null==fa.font?mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,fa.font))),mxEvent.isAltDown(ea)||(na=""==fa.stroke||
+null==fa.fill?mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,fa.stroke))):(na=mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null),F.getModel().isVertex(ya[ua])&&(na=mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null)));F.getModel().setStyle(ya[ua],na)}}finally{F.getModel().endUpdate()}}));aa.className="geStyleButton";
aa.style.width="36px";aa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";aa.style.margin="0px 6px 6px 0px";if(null!=fa){var ja="1px solid";null!=fa.border&&(ja=fa.border);if(null!=fa.gradient)aa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(fa.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(fa.gradient).cssText+" 100%)";else if(fa.fill==mxConstants.NONE)aa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==fa.fill||""==fa.fill)aa.style.backgroundColor=
mxUtils.getLightDarkColor(mxUtils.getValue(da,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var ha=mxUtils.getLightDarkColor(fa.fill);aa.style.backgroundImage="linear-gradient(to right bottom, "+ha.cssText+" 50%, "+ha.light+" 50.3%)"}null==fa.stroke||fa.stroke==mxConstants.NONE?aa.style.border=ja+" transparent":""==fa.stroke?aa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(da,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(ha=mxUtils.getLightDarkColor(fa.stroke),aa.style.border=
ja+" "+ha.cssText,aa.style.borderRightColor=ha.light,aa.style.borderBottomColor=aa.style.borderRightColor);null!=fa.title&&aa.setAttribute("title",fa.title)}else ja=mxUtils.getValue(da,mxConstants.STYLE_FILLCOLOR,"#ffffff"),ha=mxUtils.getValue(da,mxConstants.STYLE_STROKECOLOR,"#000000"),aa.style.backgroundColor=ja,aa.style.border="1px solid "+ha;aa.style.borderRadius="0";M.appendChild(aa);null!=fa&&null!=fa.gradient&&(ja=aa.cloneNode(!1),ja.style.backgroundImage="linear-gradient(light-dark(transparent, "+
mxUtils.getLightDarkColor(fa.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(fa.gradient).light+") 100%)",ja.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ja.style.backgroundColor="transparent",M.appendChild(ja),ja.style.marginLeft="-42px",mxEvent.addListener(ja,"click",function(){aa.click()}))});M.innerText="";if(null!=ba)for(var ca=0;ca<ba.length;ca++)0<ca&&0==mxUtils.mod(ca,4)&&mxUtils.br(M),ia(ba[ca])});null==this.format.currentScheme?W(Math.min(Q.length-1,Editor.isDarkMode()?
1:"1"==urlParams.sketch?5:0)):W(this.format.currentScheme);S=10>=this.defaultColorSchemes.length?43:23;var Z=document.createElement("div");Z.className="geButton";Z.style.cssText="position:absolute;left:0px;bottom:"+S+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){W(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
-S+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(n.appendChild(Z),n.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){W(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(N)}return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
-STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||n.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.rewriteGoogleFontUrl=function(n){null!=n&&n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(n=Editor.GOOGLE_FONTS_CSS2+n.substring(Editor.GOOGLE_FONTS.length)+
-":wght@400;500");return n};Graph.createFontElement=function(n,z){var G=Graph.fontMapping[z];null==G&&Graph.isCssFontUrl(z)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==G&&(G='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+z+'");\n}'),n=document.createElement("style"),mxUtils.write(n,G));return n};Graph.addRecentCustomFont=function(n,z){};Graph.addFont=
-function(n,z,G){if(null!=n&&0<n.length&&null!=z&&0<z.length){var M=n.toLowerCase();if("helvetica"!=M&&"arial"!=n&&"sans-serif"!=M){var N=Graph.customFontElements[M];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:n,url:z,elt:Graph.createFontElement(n,N)},Graph.customFontElements[M]=N,z=document.getElementsByTagName("head")[0],null!=G&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=G,N.elt.onerror=
-G):G()),null!=z&&z.appendChild(N.elt)):null!=G&&G()}else null!=G&&G()}else null!=G&&G();return n};Graph.getFontUrl=function(n,z){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(z=n.url);return z};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var z=0;z<n.length;z++){var G=n[z].getAttribute("data-font-src");if(null!=G){var M="FONT"==n[z].nodeName?n[z].getAttribute("face"):n[z].style.fontFamily;null!=M&&Graph.addFont(M,G)}}};Graph.processFontStyle=function(n){if(null!=
-n){var z=mxUtils.getValue(n,"fontSource",null);if(null!=z){var G=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,null);if(null!=G)try{Graph.addFont(G,decodeURIComponent(z))}catch(M){}}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";
-Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var m=Graph.prototype.init;Graph.prototype.init=function(){function n(N){z=N}m.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",
-function(N){z=null});this.isMouseInsertPoint=function(){return null!=z};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):G.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
-S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,z){return Graph.processFontStyle(u.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;
-mxSvgCanvas2D.prototype.updateTextNodes=function(n,z,G,M,N,Q,S,T,W,X,Z,Y){x.apply(this,arguments);Graph.processFontAttributes(Y)};var A=mxText.prototype.redraw;mxText.prototype.redraw=function(){A.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,z,G,M){function N(){for(var ca=T.getSelectionCells(),fa=[],aa=0;aa<ca.length;aa++)T.isCellVisible(ca[aa])&&fa.push(ca[aa]);T.setSelectionCells(fa)}function Q(ca){T.setHiddenTags(ca?
-[]:W.slice());N();T.refresh()}function S(ca,fa){Z.innerText="";if(0<ca.length){var aa=document.createElement("table");aa.setAttribute("cellpadding","2");aa.style.boxSizing="border-box";aa.style.tableLayout="fixed";aa.style.width="100%";var ja=document.createElement("tbody");if(null!=ca&&0<ca.length)for(var ha=0;ha<ca.length;ha++)(function(ea){function ya(){var oa=T.getCellsForTags([ea],null,null,!0);T.isEnabled()?T.setSelectionCells(oa):T.highlightCells(oa,null,null,70)}var ua=0>mxUtils.indexOf(T.hiddenTags,
+S+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(m.appendChild(Z),m.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){W(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(O)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+
+":wght@400;500");return m};Graph.createFontElement=function(m,z){var F=Graph.fontMapping[z];null==F&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==F&&(F='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,F));return m};Graph.addRecentCustomFont=function(m,z){};Graph.addFont=
+function(m,z,F){if(null!=m&&0<m.length&&null!=z&&0<z.length){var M=m.toLowerCase();if("helvetica"!=M&&"arial"!=m&&"sans-serif"!=M){var O=Graph.customFontElements[M];null!=O&&O.url!=z&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=z,"http:"==z.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(z)),O={name:m,url:z,elt:Graph.createFontElement(m,O)},Graph.customFontElements[M]=O,z=document.getElementsByTagName("head")[0],null!=F&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=F,O.elt.onerror=
+F):F()),null!=z&&z.appendChild(O.elt)):null!=F&&F()}else null!=F&&F()}else null!=F&&F();return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var F=m[z].getAttribute("data-font-src");if(null!=F){var M="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=M&&Graph.addFont(M,F)}}};Graph.processFontStyle=function(m){if(null!=
+m){var z=mxUtils.getValue(m,"fontSource",null);if(null!=z){var F=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=F)try{Graph.addFont(F,decodeURIComponent(z))}catch(M){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";
+Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var n=Graph.prototype.init;Graph.prototype.init=function(){function m(O){z=O}n.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",
+function(O){z=null});this.isMouseInsertPoint=function(){return null!=z};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):F.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
+S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return M.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(u.apply(this,arguments))};var x=mxSvgCanvas2D.prototype.updateTextNodes;
+mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,F,M,O,Q,S,T,W,X,Z,Y){x.apply(this,arguments);Graph.processFontAttributes(Y)};var A=mxText.prototype.redraw;mxText.prototype.redraw=function(){A.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,F,M){function O(){for(var ca=T.getSelectionCells(),fa=[],aa=0;aa<ca.length;aa++)T.isCellVisible(ca[aa])&&fa.push(ca[aa]);T.setSelectionCells(fa)}function Q(ca){T.setHiddenTags(ca?
+[]:W.slice());O();T.refresh()}function S(ca,fa){Z.innerText="";if(0<ca.length){var aa=document.createElement("table");aa.setAttribute("cellpadding","2");aa.style.boxSizing="border-box";aa.style.tableLayout="fixed";aa.style.width="100%";var ja=document.createElement("tbody");if(null!=ca&&0<ca.length)for(var ha=0;ha<ca.length;ha++)(function(ea){function ya(){var oa=T.getCellsForTags([ea],null,null,!0);T.isEnabled()?T.setSelectionCells(oa):T.highlightCells(oa,null,null,70)}var ua=0>mxUtils.indexOf(T.hiddenTags,
ea),na=document.createElement("tr"),za=document.createElement("td");za.style.align="center";za.style.width="16px";var ma=document.createElement("img");ma.setAttribute("src",ua?Editor.visibleImage:Editor.hiddenImage);ma.setAttribute("title",mxResources.get(ua?"hideIt":"show",[ea]));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(z||Editor.isDarkMode())ma.style.filter="invert(100%)";za.appendChild(ma);
-mxEvent.addListener(ma,"click",function(oa){mxEvent.isShiftDown(oa)?Q(0<=mxUtils.indexOf(T.hiddenTags,ea)):(T.toggleHiddenTag(ea),N(),T.refresh());mxEvent.consume(oa)});na.appendChild(za);za=document.createElement("td");za.style.align="center";za.style.width="16px";ma=document.createElement("img");ma.setAttribute("src",Editor.selectImage);ma.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor=
+mxEvent.addListener(ma,"click",function(oa){mxEvent.isShiftDown(oa)?Q(0<=mxUtils.indexOf(T.hiddenTags,ea)):(T.toggleHiddenTag(ea),O(),T.refresh());mxEvent.consume(oa)});na.appendChild(za);za=document.createElement("td");za.style.align="center";za.style.width="16px";ma=document.createElement("img");ma.setAttribute("src",Editor.selectImage);ma.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor=
"pointer";ma.style.width="16px";if(z||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(oa){Q(!0);ya();mxEvent.consume(oa)});za.appendChild(ma);na.appendChild(za);za=document.createElement("td");za.style.overflow="hidden";za.style.whiteSpace="nowrap";za.style.textOverflow="ellipsis";za.style.verticalAlign="middle";za.style.cursor="pointer";za.setAttribute("title",ea);a=document.createElement("a");mxUtils.write(a,ea);a.style.textOverflow="ellipsis";a.style.position=
-"relative";mxUtils.setOpacity(a,ua?100:40);za.appendChild(a);mxEvent.addListener(za,"click",function(oa){if(mxEvent.isShiftDown(oa))Q(!0),ya();else if(ua&&0<T.hiddenTags.length)Q(!0);else{var la=W.slice(),Ea=mxUtils.indexOf(la,ea);la.splice(Ea,1);T.setHiddenTags(la);N();T.refresh()}mxEvent.consume(oa)});na.appendChild(za);if(T.isEnabled()){za=document.createElement("td");za.style.verticalAlign="middle";za.style.textAlign="center";za.style.width="18px";if(null==fa){za.style.align="center";za.style.width=
+"relative";mxUtils.setOpacity(a,ua?100:40);za.appendChild(a);mxEvent.addListener(za,"click",function(oa){if(mxEvent.isShiftDown(oa))Q(!0),ya();else if(ua&&0<T.hiddenTags.length)Q(!0);else{var la=W.slice(),Ea=mxUtils.indexOf(la,ea);la.splice(Ea,1);T.setHiddenTags(la);O();T.refresh()}mxEvent.consume(oa)});na.appendChild(za);if(T.isEnabled()){za=document.createElement("td");za.style.verticalAlign="middle";za.style.textAlign="center";za.style.width="18px";if(null==fa){za.style.align="center";za.style.width=
"16px";ma=document.createElement("img");ma.setAttribute("src",Editor.trashImage);ma.setAttribute("title",mxResources.get("removeIt",[ea]));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(z||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(oa){var la=mxUtils.indexOf(W,ea);0<=la&&W.splice(la,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[ea]);
T.refresh();mxEvent.consume(oa)});za.appendChild(ma)}else{var sa=document.createElement("input");sa.setAttribute("type","checkbox");sa.style.margin="0px";sa.defaultChecked=null!=fa&&0<=mxUtils.indexOf(fa,ea);sa.checked=sa.defaultChecked;sa.style.background="transparent";sa.setAttribute("title",mxResources.get(sa.defaultChecked?"removeIt":"add",[ea]));mxEvent.addListener(sa,"change",function(oa){sa.checked?T.addTagsForCells(T.getSelectionCells(),[ea]):T.removeTagsForCells(T.getSelectionCells(),[ea]);
mxEvent.consume(oa)});za.appendChild(sa)}na.appendChild(za)}ja.appendChild(na)})(ca[ha]);aa.appendChild(ja);Z.appendChild(aa)}}var T=this,W=T.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top=
-"0px";Z.style.bottom="0px";X.appendChild(Z);T.addListener(mxEvent.ROOT,function(){W=T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ca,fa){if(n()){ca=T.getAllTags();for(fa=0;fa<ca.length;fa++)0>mxUtils.indexOf(W,ca[fa])&&W.push(ca[fa]);W.sort();T.isSelectionEmpty()?S(W):S(W,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className=
+"0px";Z.style.bottom="0px";X.appendChild(Z);T.addListener(mxEvent.ROOT,function(){W=T.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ca,fa){if(m()){ca=T.getAllTags();for(fa=0;fa<ca.length;fa++)0>mxUtils.indexOf(W,ca[fa])&&W.push(ca[fa]);W.sort();T.isSelectionEmpty()?S(W):S(W,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,Y);T.model.addListener(mxEvent.CHANGE,Y);T.addListener(mxEvent.REFRESH,Y);var ba=document.createElement("div");ba.className=
"geToolbarContainer geDialogToolbar";ba.style.position="absolute";ba.style.display="flex";ba.style.bottom="0px";ba.style.left="0px";ba.style.right="0px";ba.style.height="32px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(T.isEnabled()){Z.style.bottom="32px";var da=document.createElement("a");da.className="geButton";var ia=da.cloneNode(!1);ia.style.backgroundImage="url("+Editor.visibleImage+
-")";ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ia,"click",function(ca){T.setHiddenTags([]);mxEvent.isShiftDown(ca)||(W=T.hiddenTags.slice());N();T.refresh();mxEvent.consume(ca)});ba.appendChild(ia);null!=G&&(da=da.cloneNode(!1),da.style.backgroundImage="url("+Editor.plusImage+")",da.setAttribute("title",mxResources.get("add")),mxEvent.addListener(da,"click",function(ca){G(W,function(fa){W=fa;Y()});mxEvent.consume(ca)}),ba.appendChild(da));X.appendChild(ba)}null!=M&&ba.appendChild(M);
-return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var z in Graph.customFontElements){var G=Graph.customFontElements[z];n.push({name:G.name,url:G.url})}return n};Graph.prototype.setFont=function(n,z){Graph.addFont(n,z);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),N=!1,Q=0;Q<M.length;Q++)M[Q].getAttribute("face")==G&&(N=!0,M[Q].setAttribute("face",n),null!=z?M[Q].setAttribute("data-font-src",
-z):M[Q].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,n)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.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 n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var z in n)this.globalVars[z]=
-n[z]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var F=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var z=F.apply(this,arguments);null==z&&null!=this.globalVars&&(z=this.globalVars[n]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,z,G,M,N,Q,S,T,W,X,Z,Y,ba,da,ia,ca){var fa=C.apply(this,arguments);if(null!=Y){var aa=fa.getAttribute("style");null==aa&&(aa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;fa.setAttribute("style",aa+(" color-scheme: "+Y+";"))}var ja=this.getCustomFonts();
+")";ia.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ia,"click",function(ca){T.setHiddenTags([]);mxEvent.isShiftDown(ca)||(W=T.hiddenTags.slice());O();T.refresh();mxEvent.consume(ca)});ba.appendChild(ia);null!=F&&(da=da.cloneNode(!1),da.style.backgroundImage="url("+Editor.plusImage+")",da.setAttribute("title",mxResources.get("add")),mxEvent.addListener(da,"click",function(ca){F(W,function(fa){W=fa;Y()});mxEvent.consume(ca)}),ba.appendChild(da));X.appendChild(ba)}null!=M&&ba.appendChild(M);
+return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var F=Graph.customFontElements[z];m.push({name:F.name,url:F.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var F=Editor.guid();document.execCommand("fontname",!1,F);for(var M=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,Q=0;Q<M.length;Q++)M[Q].getAttribute("face")==F&&(O=!0,M[Q].setAttribute("face",m),null!=z?M[Q].setAttribute("data-font-src",
+z):M[Q].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,m)};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=
+m[z]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var G=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=G.apply(this,arguments);null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,F,M,O,Q,S,T,W,X,Z,Y,ba,da,ia,ca){var fa=C.apply(this,arguments);if(null!=Y){var aa=fa.getAttribute("style");null==aa&&(aa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;fa.setAttribute("style",aa+(" color-scheme: "+Y+";"))}var ja=this.getCustomFonts();
if(Z&&0<ja.length){var ha=fa.ownerDocument;aa=null!=ha.createElementNS?ha.createElementNS(mxConstants.NS_SVG,"style"):ha.createElement("style");null!=ha.setAttributeNS?aa.setAttributeNS("type","text/css"):aa.setAttribute("type","text/css");for(var ea="",ya="",ua=0;ua<ja.length;ua++){var na=ja[ua].name,za=ja[ua].url;Graph.isCssFontUrl(za)?ea+="@import url("+Graph.rewriteGoogleFontUrl(za)+");\n":ya+='@font-face {\nfont-family: "'+na+'";\nsrc: url("'+za+'");\n}\n'}aa.appendChild(ha.createTextNode(ea+
-ya));fa.getElementsByTagName("defs")[0].appendChild(aa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(fa);this.mathEnabled&&(document.body.appendChild(fa),Editor.MathJaxRender(fa),fa.parentNode.removeChild(fa),aa=fa.ownerDocument.getElementById("MJX-SVG-styles"),null!=aa&&fa.getElementsByTagName("defs")[0].appendChild(aa.cloneNode(!0)));return fa};var P=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(n){P.apply(this,
-arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);return U.apply(this,arguments)};
-mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var z="1"==mxUtils.getValue(n.style,"enumerate",0);z&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):z||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);z=n.secondLabel;if(null!=z){var G=n.view.scale,M=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*G,n.y+4*G,0,0):mxRectangle.fromPoint(n.view.getPoint(n));z.bounds.equals(n)&&z.value==M&&z.scale==G||(z.bounds=n,z.value=M,z.scale=
-G,z.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var V=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){V.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=
-function(n,z){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=n.actions&&this.executeCustomActions(n.actions,null,z))};Graph.prototype.executeCustomActions=function(n,z,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=
-!0;var M=!1,N=0,Q=0,S=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,function(){M&&(M=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(Q<n.length){var Z=this.stoppingCustomActions,Y=n[Q++],ba=[];if(null!=Y.open)if(T(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
-this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),T());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,
+ya));fa.getElementsByTagName("defs")[0].appendChild(aa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(fa);this.mathEnabled&&(document.body.appendChild(fa),Editor.MathJaxRender(fa),fa.parentNode.removeChild(fa),aa=fa.ownerDocument.getElementById("MJX-SVG-styles"),null!=aa&&fa.getElementsByTagName("defs")[0].appendChild(aa.cloneNode(!0)));return fa};var P=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){P.apply(this,
+arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return U.apply(this,arguments)};
+mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
+m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var F=m.view.scale,M=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*F,m.y+4*F,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==M&&z.scale==F||(z.bounds=m,z.value=M,z.scale=
+F,z.redraw())}};var N=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();N.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var V=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){V.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=
+function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,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 M=!1,O=0,Q=0,S=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,function(){M&&(M=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<O&&O--;0==O&&X()}),X=mxUtils.bind(this,function(){if(Q<m.length){var Z=this.stoppingCustomActions,Y=m[Q++],ba=[];if(null!=Y.open)if(T(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,F))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
+this.pendingExecuteNextAction=null;W()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),T());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,
!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var da=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(da),1);this.setCellsVisible(da,!0)}null!=Y.hide&&(S(),da=this.getCellsForAction(Y.hide,
!0),Graph.setOpacityForNodes(this.getNodesForCells(da),0),this.setCellsVisible(da,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));da=[];null!=Y.select&&this.isEnabled()&&(da=this.getCellsForAction(Y.select),this.setSelectionCells(da));
-null!=Y.highlight&&(da=this.getCellsForAction(Y.highlight),this.highlightCells(da,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(da=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<da.length&&this.scrollCellToVisible(da[0]);null!=G&&null!=Y.explore&&Graph.exploreFromCell(this,G,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ia=Y.tags.toggle;0==ia.length&&(ia=this.getAllTags());for(da=0;da<ia.length;da++)this.toggleHiddenTag(ia[da])}ia=
-null;null!=Y.tags.hidden&&(null==ia&&(ia=[]),ia=ia.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ia&&(ia=[]);var ca=this.getAllTags();for(da=0;da<ca.length;da++)0>mxUtils.indexOf(Y.tags.visible,ca[da])&&0>mxUtils.indexOf(ia,ca[da])&&ia.push(ca[da])}null!=ia&&this.setHiddenTags(ia);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=
-function(n,z){var G=this.getLinkForCell(z);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(n,G));if(this.isHtmlLabel(z)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=M.getElementsByTagName("a"),Q=!1,S=0;S<N.length;S++)G=N[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(N[S].setAttribute("href",this.updateCustomLink(n,G)),Q=!0);Q&&this.labelChanged(z,M.innerHTML)}};Graph.prototype.updateCustomLink=
-function(n,z){if("data:action/json,"==z.substring(0,17))try{var G=JSON.parse(z.substring(17));null!=G.actions&&(this.updateCustomLinkActions(n,G.actions),z="data:action/json,"+JSON.stringify(G))}catch(M){}return z};Graph.prototype.updateCustomLinkActions=function(n,z){for(var G=0;G<z.length;G++){var M=z[G],N;for(N in M)this.updateCustomLinkAction(n,M[N],"cells"),this.updateCustomLinkAction(n,M[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,z,G){if(null!=z&&null!=z[G]){for(var M=
-[],N=0;N<z[G].length;N++)if("*"==z[G][N])M.push(z[G][N]);else{var Q=n[z[G][N]];null!=Q?""!=Q&&M.push(Q):M.push(z[G][N])}z[G]=M}};Graph.prototype.getCellsForAction=function(n,z){z=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,z));if(null!=n.excludeCells){for(var G=[],M=0;M<z.length;M++)0>n.excludeCells.indexOf(z[M].id)&&G.push(z[M]);z=G}return z};Graph.prototype.getCellsById=function(n){var z=[];if(null!=n)for(var G=0;G<n.length;G++)if("*"==n[G]){var M=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(Q){return Q!=
-M},M))}else{var N=this.model.getCell(n[G]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};Graph.prototype.setHiddenTags=function(n){this.hiddenTags=n;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(n){var z=mxUtils.indexOf(this.hiddenTags,n);0>z?this.hiddenTags.push(n):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var z=0;z<n.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,n[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,z,G,M){var N=[];if(null!=n){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},T=0;T<n.length;T++)0<n[T].length&&(S[n[T]]=!0,Q++);for(T=0;T<z.length;T++)if(G&&this.model.getParent(z[T])==
-this.model.root||this.model.isVertex(z[T])||this.model.isEdge(z[T])){var W=this.getTagsForCell(z[T]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=n.length)){for(var Z=X=0;Z<W.length&&X<Q;Z++)null!=S[W[Z]]&&X++;X=X==Q}X&&(1!=M||this.isCellVisible(z[T]))&&N.push(z[T])}}return N};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var z=null,G=[],M=0;M<n.length;M++){var N=this.getTagsForCell(n[M]);
-G=[];if(0<N.length){N=N.split(" ");for(var Q={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])Q[N[S]]=!0,G.push(N[S]);z=Q}else return[]}return G};Graph.prototype.getTagsForCells=function(n){for(var z=[],G={},M=0;M<n.length;M++){var N=this.getTagsForCell(n[M]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==G[N[Q]]&&(G[N[Q]]=!0,z.push(N[Q]))}}return z};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,z){if(0<
-n.length&&0<z.length){this.model.beginUpdate();try{for(var G=0;G<n.length;G++){for(var M=this.getTagsForCell(n[G]),N=M.split(" "),Q=!1,S=0;S<z.length;S++){var T=mxUtils.trim(z[S]);""!=T&&0>mxUtils.indexOf(N,T)&&(M=0<M.length?M+" "+T:T,Q=!0)}Q&&this.setAttributeForCell(n[G],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,z){if(0<n.length&&0<z.length){this.model.beginUpdate();try{for(var G=0;G<n.length;G++){var M=this.getTagsForCell(n[G]);if(0<M.length){for(var N=
-M.split(" "),Q=!1,S=0;S<z.length;S++){var T=mxUtils.indexOf(N,z[S]);0<=T&&(N.splice(T,1),Q=!0)}Q&&this.setAttributeForCell(n[G],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var z=0;z<n.length;z++)this.model.setVisible(n[z],!this.model.isVisible(n[z]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,z){this.model.beginUpdate();try{for(var G=0;G<n.length;G++)this.model.setVisible(n[G],z)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(n,z,G,M){for(var N=0;N<n.length;N++)this.highlightCell(n[N],z,G,M)};Graph.prototype.highlightCell=function(n,z,G,M,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;n=this.view.getState(n);var Q=null;null!=n&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+N),Q=new mxCellHighlight(this,z,N,!1),null!=M&&(Q.opacity=M),Q.highlight(n),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,
-"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},G));return Q};Graph.prototype.addSvgShadow=function(n,z,G,M){G=null!=G?G:!1;M=null!=M?M:!0;var N=n.ownerDocument,Q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in",
-"SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",
-this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in",
-"SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=n.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=n.firstChild?n.insertBefore(N,n.firstChild):n.appendChild(N)):N=S[0];N.appendChild(Q);G||(z=null!=z?z:n.getElementsByTagName("g")[0],null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&M&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+
-6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),z=n.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,n.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(n,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=null!=z?z:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),z=0;do var G=this.model.getChildAt(this.model.root,z);while(z++<n&&"1"==mxUtils.getValue(this.getCellStyle(G),"locked","0"));null!=G&&this.setDefaultParent(G)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+
+null!=Y.highlight&&(da=this.getCellsForAction(Y.highlight),this.highlightCells(da,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(da=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<da.length&&this.scrollCellToVisible(da[0]);null!=F&&null!=Y.explore&&Graph.exploreFromCell(this,F,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ia=Y.tags.toggle;0==ia.length&&(ia=this.getAllTags());for(da=0;da<ia.length;da++)this.toggleHiddenTag(ia[da])}ia=
+null;null!=Y.tags.hidden&&(null==ia&&(ia=[]),ia=ia.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ia&&(ia=[]);var ca=this.getAllTags();for(da=0;da<ca.length;da++)0>mxUtils.indexOf(Y.tags.visible,ca[da])&&0>mxUtils.indexOf(ia,ca[da])&&ia.push(ca[da])}null!=ia&&this.setHiddenTags(ia);this.refresh()}0<ba.length&&(O++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==O?X():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=
+function(m,z){var F=this.getLinkForCell(z);null!=F&&"data:action/json,"==F.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,F));if(this.isHtmlLabel(z)){var M=document.createElement("div");M.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var O=M.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)F=O[S].getAttribute("href"),null!=F&&"data:action/json,"==F.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(m,F)),Q=!0);Q&&this.labelChanged(z,M.innerHTML)}};Graph.prototype.updateCustomLink=
+function(m,z){if("data:action/json,"==z.substring(0,17))try{var F=JSON.parse(z.substring(17));null!=F.actions&&(this.updateCustomLinkActions(m,F.actions),z="data:action/json,"+JSON.stringify(F))}catch(M){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var F=0;F<z.length;F++){var M=z[F],O;for(O in M)this.updateCustomLinkAction(m,M[O],"cells"),this.updateCustomLinkAction(m,M[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,F){if(null!=z&&null!=z[F]){for(var M=
+[],O=0;O<z[F].length;O++)if("*"==z[F][O])M.push(z[F][O]);else{var Q=m[z[F][O]];null!=Q?""!=Q&&M.push(Q):M.push(z[F][O])}z[F]=M}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var F=[],M=0;M<z.length;M++)0>m.excludeCells.indexOf(z[M].id)&&F.push(z[M]);z=F}return z};Graph.prototype.getCellsById=function(m){var z=[];if(null!=m)for(var F=0;F<m.length;F++)if("*"==m[F]){var M=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(Q){return Q!=
+M},M))}else{var O=this.model.getCell(m[F]);null!=O&&z.push(O)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,F,M){var O=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},T=0;T<m.length;T++)0<m[T].length&&(S[m[T]]=!0,Q++);for(T=0;T<z.length;T++)if(F&&this.model.getParent(z[T])==
+this.model.root||this.model.isVertex(z[T])||this.model.isEdge(z[T])){var W=this.getTagsForCell(z[T]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<Q;Z++)null!=S[W[Z]]&&X++;X=X==Q}X&&(1!=M||this.isCellVisible(z[T]))&&O.push(z[T])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,F=[],M=0;M<m.length;M++){var O=this.getTagsForCell(m[M]);
+F=[];if(0<O.length){O=O.split(" ");for(var Q={},S=0;S<O.length;S++)if(null==z||null!=z[O[S]])Q[O[S]]=!0,F.push(O[S]);z=Q}else return[]}return F};Graph.prototype.getTagsForCells=function(m){for(var z=[],F={},M=0;M<m.length;M++){var O=this.getTagsForCell(m[M]);if(0<O.length){O=O.split(" ");for(var Q=0;Q<O.length;Q++)null==F[O[Q]]&&(F[O[Q]]=!0,z.push(O[Q]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<
+m.length&&0<z.length){this.model.beginUpdate();try{for(var F=0;F<m.length;F++){for(var M=this.getTagsForCell(m[F]),O=M.split(" "),Q=!1,S=0;S<z.length;S++){var T=mxUtils.trim(z[S]);""!=T&&0>mxUtils.indexOf(O,T)&&(M=0<M.length?M+" "+T:T,Q=!0)}Q&&this.setAttributeForCell(m[F],"tags",M)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var F=0;F<m.length;F++){var M=this.getTagsForCell(m[F]);if(0<M.length){for(var O=
+M.split(" "),Q=!1,S=0;S<z.length;S++){var T=mxUtils.indexOf(O,z[S]);0<=T&&(O.splice(T,1),Q=!0)}Q&&this.setAttributeForCell(m[F],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var F=0;F<m.length;F++)this.model.setVisible(m[F],z)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(m,z,F,M){for(var O=0;O<m.length;O++)this.highlightCell(m[O],z,F,M)};Graph.prototype.highlightCell=function(m,z,F,M,O){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;F=null!=F?F:1E3;m=this.view.getState(m);var Q=null;null!=m&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+O),Q=new mxCellHighlight(this,z,O,!1),null!=M&&(Q.opacity=M),Q.highlight(m),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,
+"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},F));return Q};Graph.prototype.addSvgShadow=function(m,z,F,M){F=null!=F?F:!1;M=null!=M?M:!0;var O=m.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in",
+"SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",
+this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in",
+"SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=m.firstChild?m.insertBefore(O,m.firstChild):m.appendChild(O)):O=S[0];O.appendChild(Q);F||(z=null!=z?z:m.getElementsByTagName("g")[0],null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&M&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+
+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),z=0;do var F=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(F),"locked","0"));null!=F&&this.setDefaultParent(F)}};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",STENCIL_PATH+"/kubernetes2.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+
@@ -12990,364 +12988,365 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/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.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
-STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(n){var z=null;null!=n&&0<n.length&&("ER"==n.substring(0,
-2)?z="mxgraph.er":"sysML"==n.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(n,z,G,M,N,Q,S,T,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var D=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,z,G,M,N,Q){"1"==mxUtils.getValue(z.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,
-this.stroke));return D.apply(this,arguments)};PrintDialog.prototype.create=function(n,z,G,M){function N(){ia.value=Math.max(1,Math.min(Z,Math.max(parseInt(ia.value),parseInt(da.value))));da.value=Math.max(1,Math.min(Z,Math.min(parseInt(ia.value),parseInt(da.value))))}function Q(Ga){n.lastPrintPagesRadioChecked=ba.checked;n.lastPrintSelectionOnlyChecked=fa.checked;n.lastPrintCropRadioChecked=ja.checked;n.lastPrintFitRadioChecked=ha.checked;ba.checked&&da.value<ia.value?(n.lastPrintPagesFromInput=da.value,
-n.lastPrintPagesToInput=ia.value):(n.lastPrintPagesFromInput=null,n.lastPrintPagesToInput=null);Ca.value=Math.max(1,Math.min(1600,parseInt(Ca.value)))+"%";n.lastPrintZoom=Ca.value;n.lastPrintBorder=va.value;n.lastPrintGrid=xa.checked;n.lastPrintTransparent=Da.checked;n.lastPrintInclude=Ba.checked;n.lastPrintSheetsAcross=la.value;n.lastPrintSheetsDown=Ea.value;var Aa={};Aa.border=parseInt(va.value);Aa.scale=parseInt(Ca.value)/100;Aa.grid=xa.checked;Aa.transparent=Da.checked;Aa.includeCopy=Ba.checked;
-Aa.sheetsAcross=parseInt(la.value);Aa.sheetsDown=parseInt(Ea.value);Aa.pagesFrom=parseInt(da.value);Aa.pagesTo=parseInt(ia.value);Aa.allPages=Y.checked;Aa.selection=fa.checked;Aa.pageView=aa.checked;Aa.crop=ja.checked;Aa.fit=ha.checked;return null!=G?G(!Ga,Aa):n.print(!Ga,Aa)}var S=n.editor.graph,T=document.createElement("div"),W=document.createElement("h3");W.style.width="100%";W.style.textAlign="center";W.style.marginTop="0px";mxUtils.write(W,z||mxResources.get("print"));T.appendChild(W);var X=
+STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,
+2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,F,M,O,Q,S,T,W,X){if(null!=F&&null==mxMarker.markers[F]){var Z=this.getPackageForType(F);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var D=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,z,F,M,O,Q){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke));return D.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,F,M){function O(){ia.value=Math.max(1,Math.min(Z,Math.max(parseInt(ia.value),parseInt(da.value))));da.value=Math.max(1,Math.min(Z,Math.min(parseInt(ia.value),parseInt(da.value))))}function Q(Ga){m.lastPrintPagesRadioChecked=ba.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=ja.checked;m.lastPrintFitRadioChecked=ha.checked;ba.checked&&da.value<ia.value?(m.lastPrintPagesFromInput=da.value,
+m.lastPrintPagesToInput=ia.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);Ca.value=Math.max(1,Math.min(1600,parseInt(Ca.value)))+"%";m.lastPrintZoom=Ca.value;m.lastPrintBorder=va.value;m.lastPrintGrid=xa.checked;m.lastPrintTransparent=Da.checked;m.lastPrintInclude=Ba.checked;m.lastPrintSheetsAcross=la.value;m.lastPrintSheetsDown=Ea.value;var Aa={};Aa.border=parseInt(va.value);Aa.scale=parseInt(Ca.value)/100;Aa.grid=xa.checked;Aa.transparent=Da.checked;Aa.includeCopy=Ba.checked;
+Aa.sheetsAcross=parseInt(la.value);Aa.sheetsDown=parseInt(Ea.value);Aa.pagesFrom=parseInt(da.value);Aa.pagesTo=parseInt(ia.value);Aa.allPages=Y.checked;Aa.selection=fa.checked;Aa.pageView=aa.checked;Aa.crop=ja.checked;Aa.fit=ha.checked;return null!=F?F(!Ga,Aa):m.print(!Ga,Aa)}var S=m.editor.graph,T=document.createElement("div"),W=document.createElement("h3");W.style.width="100%";W.style.textAlign="center";W.style.marginTop="0px";mxUtils.write(W,z||mxResources.get("print"));T.appendChild(W);var X=
1,Z=1;W=document.createElement("div");W.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");W.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Y.checked=!0});W.appendChild(z);mxUtils.br(W);var ba=Y.cloneNode(!0);W.appendChild(ba);z=document.createElement("span");mxUtils.write(z,
mxResources.get("pages")+":");W.appendChild(z);mxEvent.addListener(z,"click",function(){ba.checked=!0});var da=document.createElement("input");da.style.margin="0 4px";da.setAttribute("value","1");da.setAttribute("type","number");da.setAttribute("min","1");da.style.width="40px";W.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));W.appendChild(z);var ia=da.cloneNode(!0);W.appendChild(ia);mxEvent.addListener(da,"focus",function(){ba.checked=!0});mxEvent.addListener(ia,
-"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",N);mxEvent.addListener(ia,"change",N);if(null!=n.pages&&(Z=n.pages.length,null!=n.currentPage))for(var ca=0;ca<Z;ca++)if(n.currentPage==n.pages[ca]){X=ca+1;break}null!=n.lastPrintPagesFromInput&&null!=n.lastPrintPagesToInput?(da.value=Math.min(Z,Math.max(1,n.lastPrintPagesFromInput)),ia.value=Math.min(Z,Math.max(1,n.lastPrintPagesToInput))):(da.value=X,ia.value=X);da.setAttribute("max",Z);ia.setAttribute("max",Z);ca=mxUtils.button(mxResources.get("currentPage"),
+"focus",function(){ba.checked=!0});mxEvent.addListener(da,"change",O);mxEvent.addListener(ia,"change",O);if(null!=m.pages&&(Z=m.pages.length,null!=m.currentPage))for(var ca=0;ca<Z;ca++)if(m.currentPage==m.pages[ca]){X=ca+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(da.value=Math.min(Z,Math.max(1,m.lastPrintPagesFromInput)),ia.value=Math.min(Z,Math.max(1,m.lastPrintPagesToInput))):(da.value=X,ia.value=X);da.setAttribute("max",Z);ia.setAttribute("max",Z);ca=mxUtils.button(mxResources.get("currentPage"),
function(Ga){da.value=X;ia.value=X;ba.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";W.appendChild(ca);1<Z&&T.appendChild(W);W=document.createElement("div");W.style.borderBottom="1px solid lightGray";W.style.paddingBottom="12px";W.style.marginBottom="12px";W.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name",
-"pages-printdialog");fa.setAttribute("type",1==Z?"checkbox":"radio");fa.style.marginRight="8px";S.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");S.isEnabled()&&(W.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),W.appendChild(z));(S.isEnabled()||1<Z)&&T.appendChild(W);!n.isPagesEnabled()||n.lastPrintPagesRadioChecked?ba.checked=!0:!S.isSelectionEmpty()&&n.lastPrintSelectionOnlyChecked?fa.checked=!0:Y.checked=!0;S.isSelectionEmpty()||mxEvent.addListener(z,
+"pages-printdialog");fa.setAttribute("type",1==Z?"checkbox":"radio");fa.style.marginRight="8px";S.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");S.isEnabled()&&(W.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),W.appendChild(z));(S.isEnabled()||1<Z)&&T.appendChild(W);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?ba.checked=!0:!S.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Y.checked=!0;S.isSelectionEmpty()||mxEvent.addListener(z,
"click",function(){fa.checked=!fa.checked});S=document.createElement("div");S.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");S.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));S.appendChild(z);mxEvent.addListener(S,"click",function(){aa.checked=!0});T.appendChild(S);S=document.createElement("div");S.style.whiteSpace=
"nowrap";var ja=document.createElement("input");ja.style.marginBottom="8px";ja.style.marginRight="8px";ja.setAttribute("type","radio");ja.setAttribute("name","printSize");S.appendChild(ja);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));S.appendChild(z);mxEvent.addListener(S,"click",function(){ja.checked=!0});T.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight=
"8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ha);S.appendChild(z);W=document.createElement("table");W.style.display="inline-block";W.style.borderSpacing="0";ca=document.createElement("tbody");var ea=document.createElement("tr"),ya=ea.cloneNode(!0),ua=document.createElement("td"),na=ua.cloneNode(!0),za=ua.cloneNode(!0),ma=ua.cloneNode(!0),sa=
-ua.cloneNode(!0),oa=ua.cloneNode(!0);ua.style.textAlign="right";ma.style.textAlign="right";mxUtils.write(ua,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(Ga){mxEvent.getSource(Ga)!=ha&&(ha.checked=!ha.checked)});var la=document.createElement("input");la.style.margin="0 2px";la.style.boxSizing="border-box";la.setAttribute("value",n.lastPrintSheetsAcross||"1");la.setAttribute("min","1");la.setAttribute("type","number");la.style.width="40px";na.appendChild(la);z=document.createElement("span");
-mxUtils.write(z,mxResources.get("fitToSheetsAcross"));za.appendChild(z);mxUtils.write(ma,mxResources.get("fitToBy"));var Ea=la.cloneNode(!0);Ea.setAttribute("value",n.lastPrintSheetsDown||"1");sa.appendChild(Ea);mxEvent.addListener(la,"click",function(Ga){ha.checked=!0;mxEvent.consume(Ga)});mxEvent.addListener(Ea,"click",function(Ga){ha.checked=!0;mxEvent.consume(Ga)});n.lastPrintCropRadioChecked?ja.checked=!0:n.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;z=document.createElement("span");
+ua.cloneNode(!0),oa=ua.cloneNode(!0);ua.style.textAlign="right";ma.style.textAlign="right";mxUtils.write(ua,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(Ga){mxEvent.getSource(Ga)!=ha&&(ha.checked=!ha.checked)});var la=document.createElement("input");la.style.margin="0 2px";la.style.boxSizing="border-box";la.setAttribute("value",m.lastPrintSheetsAcross||"1");la.setAttribute("min","1");la.setAttribute("type","number");la.style.width="40px";na.appendChild(la);z=document.createElement("span");
+mxUtils.write(z,mxResources.get("fitToSheetsAcross"));za.appendChild(z);mxUtils.write(ma,mxResources.get("fitToBy"));var Ea=la.cloneNode(!0);Ea.setAttribute("value",m.lastPrintSheetsDown||"1");sa.appendChild(Ea);mxEvent.addListener(la,"click",function(Ga){ha.checked=!0;mxEvent.consume(Ga)});mxEvent.addListener(Ea,"click",function(Ga){ha.checked=!0;mxEvent.consume(Ga)});m.lastPrintCropRadioChecked?ja.checked=!0:m.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;z=document.createElement("span");
mxUtils.write(z,mxResources.get("fitToSheetsDown"));oa.appendChild(z);ea.appendChild(ua);ea.appendChild(na);ea.appendChild(za);ya.appendChild(ma);ya.appendChild(sa);ya.appendChild(oa);ca.appendChild(ea);ca.appendChild(ya);W.appendChild(ca);S.appendChild(W);T.appendChild(S);S=document.createElement("div");S.style.borderTop="1px solid lightGray";S.style.whiteSpace="nowrap";S.style.paddingTop="12px";S.style.marginTop="12px";S.style.paddingLeft="8px";mxUtils.write(S,mxResources.get("borderWidth")+":");
-var va=document.createElement("input");va.setAttribute("type","number");va.setAttribute("min","0");va.style.width="40px";va.style.marginLeft="4px";va.value=null!=n.lastPrintBorder?n.lastPrintBorder:mxPrintPreview.prototype.pageMargin;S.appendChild(va);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");S.appendChild(z);var Ca=document.createElement("input");Ca.style.width="60px";Ca.style.marginLeft="4px";Ca.value=null!=n.lastPrintZoom?n.lastPrintZoom:
-"100%";S.appendChild(Ca);mxUtils.br(S);var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="12px";xa.checked=null!=n.lastPrintGrid?n.lastPrintGrid:!1;S.appendChild(xa);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));S.appendChild(z);mxEvent.addListener(z,"click",function(Ga){xa.checked=!0;mxEvent.consume(Ga)});var Da=document.createElement("input");Da.setAttribute("type","checkbox");
-Da.style.marginTop="10px";Da.checked=null!=n.lastPrintTransparent?n.lastPrintTransparent:!1;null!=G&&(S.appendChild(Da),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),S.appendChild(z),mxEvent.addListener(z,"click",function(Ga){Da.checked=!0;mxEvent.consume(Ga)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=n.lastPrintInclude?n.lastPrintInclude:Editor.defaultIncludeDiagram;
-null==G||mxClient.IS_CHROMEAPP||"draw.io"!=n.getServiceName()||(mxUtils.br(S),S.appendChild(Ba),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),S.appendChild(z),mxEvent.addListener(z,"click",function(Ga){Ba.checked=!0;mxEvent.consume(Ga)}));T.appendChild(S);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign="right";z.style.whiteSpace="nowrap";n.isOffline()||null!=G||z.appendChild(n.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
-S=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});S.className="geBtn";n.editor.cancelFirst&&z.appendChild(S);PrintDialog.previewEnabled&&null==G&&(W=mxUtils.button(mxResources.get("preview"),function(){try{n.hideDialog(),Q(!1)}catch(Ga){n.handleError(Ga)}}),W.className="geBtn",z.appendChild(W));M=null!=M?M:null!=G?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{n.hideDialog(),Q(!0)}catch(Ga){n.handleError(Ga)}});M.className=
-"geBtn gePrimaryBtn";z.appendChild(M);n.editor.cancelFirst||z.appendChild(S);T.appendChild(z);if(n.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(T.classList.add("geDarkMode"),T.style.colorScheme="dark"):(T.classList.remove("geDarkMode"),T.style.colorScheme="light")};n.addListener("darkModeChanged",Ka);Ka();var Ja=function(Ga,Aa){Ga=Aa.getProperty("dialog");T.parentNode==Ga.container&&(n.editor.removeListener(Ja),n.removeListener(Ka))};n.editor.addListener("hideDialog",Ja)}this.container=
-T};var J=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 n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
-this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else J.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(n=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),
-this.adaptiveColors=null!=n?n:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var L=document.createElement("canvas"),K=new Image;K.onload=function(){try{L.getContext("2d").drawImage(K,0,0);var n=L.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(z){}};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(n){}Editor.prototype.useCanvasForExport=!1})();
+var va=document.createElement("input");va.setAttribute("type","number");va.setAttribute("min","0");va.style.width="40px";va.style.marginLeft="4px";va.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;S.appendChild(va);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");S.appendChild(z);var Ca=document.createElement("input");Ca.style.width="60px";Ca.style.marginLeft="4px";Ca.value=null!=m.lastPrintZoom?m.lastPrintZoom:
+"100%";S.appendChild(Ca);mxUtils.br(S);var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="12px";xa.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;S.appendChild(xa);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));S.appendChild(z);mxEvent.addListener(z,"click",function(Ga){xa.checked=!0;mxEvent.consume(Ga)});var Da=document.createElement("input");Da.setAttribute("type","checkbox");
+Da.style.marginTop="10px";Da.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=F&&(S.appendChild(Da),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),S.appendChild(z),mxEvent.addListener(z,"click",function(Ga){Da.checked=!0;mxEvent.consume(Ga)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");Ba.style.marginTop="10px";Ba.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;
+null==F||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(S),S.appendChild(Ba),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),S.appendChild(z),mxEvent.addListener(z,"click",function(Ga){Ba.checked=!0;mxEvent.consume(Ga)}));T.appendChild(S);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign="right";z.style.whiteSpace="nowrap";m.isOffline()||null!=F||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
+S=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});S.className="geBtn";m.editor.cancelFirst&&z.appendChild(S);PrintDialog.previewEnabled&&null==F&&(W=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),Q(!1)}catch(Ga){m.handleError(Ga)}}),W.className="geBtn",z.appendChild(W));M=null!=M?M:null!=F?"export":PrintDialog.previewEnabled?"print":"ok";M=mxUtils.button(mxResources.get(M),function(){try{m.hideDialog(),Q(!0)}catch(Ga){m.handleError(Ga)}});M.className=
+"geBtn gePrimaryBtn";z.appendChild(M);m.editor.cancelFirst||z.appendChild(S);T.appendChild(z);if(m.editor.isChromelessView()){var Ka=function(){Editor.isDarkMode()?(T.classList.add("geDarkMode"),T.style.colorScheme="dark"):(T.classList.remove("geDarkMode"),T.style.colorScheme="light")};m.addListener("darkModeChanged",Ka);Ka();var Ja=function(Ga,Aa){Ga=Aa.getProperty("dialog");T.parentNode==Ga.container&&(m.editor.removeListener(Ja),m.removeListener(Ka))};m.editor.addListener("hideDialog",Ja)}this.container=
+T};var J=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
+this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else J.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),
+this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var L=document.createElement("canvas"),K=new Image;K.onload=function(){try{L.getContext("2d").drawImage(K,0,0);var m=L.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};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(m){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousAdaptiveColors=c.adaptiveColors;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.5";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
-EditorUi.logError=function(d,g,k,m,u,x,A){if(null!=d){u=null!=u?u:Error(d);u.stack=null!=u.stack?u.stack:"";x=null!=x?x:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>u.stack.indexOf("extension:")&&0>u.stack.indexOf("<anonymous>:")&&
-0>u.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=m?":colno:"+encodeURIComponent(m):"")+(""!=u.stack?"&stack="+encodeURIComponent(u.stack):""))}catch(I){}try{A||null==window.console||console.error(x,d,g,k,m,u)}catch(I){}}};EditorUi.logEvent=
+EditorUi.logError=function(d,g,k,n,u,x,A){if(null!=d){u=null!=u?u:Error(d);u.stack=null!=u.stack?u.stack:"";x=null!=x?x:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>d.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>u.stack.indexOf("extension:")&&0>u.stack.indexOf("<anonymous>:")&&
+0>u.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+x+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=n?":colno:"+encodeURIComponent(n):"")+(""!=u.stack?"&stack="+encodeURIComponent(u.stack):""))}catch(I){}try{A||null==window.console||console.error(x,d,g,k,n,u)}catch(I){}}};EditorUi.logEvent=
function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(k){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email",
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");
for(var g=[],k=0;k<d.length;k++)g.push(d[k]);for(k=0;k<g.length;k++)EditorUi.replaceSvgImage(g[k])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(g);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",d.getAttribute("x"));k.setAttribute("y",d.getAttribute("y"));k.setAttribute("width",d.getAttribute("width"));k.setAttribute("height",d.getAttribute("height"));k.style.fontFamily=
-"initial";var m=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");m.appendChild(k);d.hasAttribute("transform")&&m.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(m,d)}}catch(u){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var m=document.implementation.createHTMLDocument(""),
-u=document.createElement("style"),x=0;x<g.length;x++){u.textContent=g[x].textContent;m.body.appendChild(u);for(var A="",I=0;I<u.sheet.cssRules.length;I++){var F=u.sheet.cssRules[I];if(null!=F.selectorText){for(var C=F.selectorText.split(","),P=0;P<C.length;P++)C[P]="#"+k+" "+C[P];F.selectorText=C.join(",")}A+=F.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+"initial";var n=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");n.appendChild(k);d.hasAttribute("transform")&&n.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(n,d)}}catch(u){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var n=document.implementation.createHTMLDocument(""),
+u=document.createElement("style"),x=0;x<g.length;x++){u.textContent=g[x].textContent;n.body.appendChild(u);for(var A="",I=0;I<u.sheet.cssRules.length;I++){var G=u.sheet.cssRules[I];if(null!=G.selectorText){for(var C=G.selectorText.split(","),P=0;P<C.length;P++)C[P]="#"+k+" "+C[P];G.selectorText=C.join(",")}A+=G.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(u){}try{var g=document.createElement("canvas"),
k=new Image;k.onload=function(){try{g.getContext("2d").drawImage(k,0,0);var u=g.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=u&&6<u.length}catch(x){}};k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{g=
-document.createElement("canvas");g.width=g.height=1;var m=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg");m=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==m.match("image/webp")}catch(u){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};
+document.createElement("canvas");g.width=g.height=1;var n=g.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==n.match("image/jpeg");n=g.toDataURL("image/webp");EditorUi.prototype.webpSupported=null!==n.match("image/webp")}catch(u){}})();EditorUi.prototype.createButtonContainer=function(){var d=document.createElement("div");d.className="geButtonContainer";return d};EditorUi.prototype.openLink=function(d,g,k){return this.editor.graph.openLink(d,g,k)};EditorUi.prototype.showSplash=function(d){};
EditorUi.prototype.getLocalData=function(d,g){g(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,g,k){localStorage.setItem(d,g);null!=k&&k()};EditorUi.prototype.isLocked=function(){var d=this.getCurrentFile();return null!=d&&d.isLocked()};EditorUi.prototype.removeLocalData=function(d,g){localStorage.removeItem(d);g()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=
function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=
d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};
-EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var m=null==d||null==g;k=null!=k?k:24;var u=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
-hwaccel:!1,zIndex:2E9}),x=this.timeout,A=u.spin,I=null,F=null,C=mxUtils.bind(this,function(U){null!=U&&U()}),P=this;u.spin=function(U,O,V,q){q=null!=q?q:x;var y=!1;if(!this.active){var D=Date.now();null!=V&&(I=window.setTimeout(function(){u.stop();I=null;V({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:F})},q));m&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);U==document.body&&"1"==urlParams.embedInline&&(U=
-P.diagramContainer,d=U.scrollLeft+U.clientWidth/2,g=U.scrollTop+U.clientHeight/2);A.call(this,U);"1"==urlParams.embedInline&&null!=u.el&&(u.el.style.marginTop=U.scrollTop+"px",u.el.style.marginLeft=U.scrollLeft+"px");this.active=!0;null!=O&&(y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft=
-"10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),y.innerText=O,U.appendChild(y),u.status=y);this.pause=mxUtils.bind(this,function(){var J=
-C;this.active&&(q=Math.max(0,q-(Date.now()-D)),J=mxUtils.bind(this,function(L){this.spin(U,O,V,q);if(null!=L)try{L(),F=mxUtils.bind(this,function(){this.spin(U,O,V,q);try{L()}catch(K){null!=V&&V(K)}})}catch(K){null!=V&&V(K)}}));this.stop();return J});y=!0}return y};var R=u.stop;u.stop=function(){R.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=u.status&&null!=u.status.parentNode&&u.status.parentNode.removeChild(u.status),u.status=null)};u.pause=function(){return C};
-return u};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&
+EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var n=null==d||null==g;k=null!=k?k:24;var u=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
+hwaccel:!1,zIndex:2E9}),x=this.timeout,A=u.spin,I=null,G=null,C=mxUtils.bind(this,function(U){null!=U&&U()}),P=this;u.spin=function(U,N,V,q){q=null!=q?q:x;var y=!1;if(!this.active){var D=Date.now();null!=V&&(I=window.setTimeout(function(){u.stop();I=null;V({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})},q));n&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2);U==document.body&&"1"==urlParams.embedInline&&(U=
+P.diagramContainer,d=U.scrollLeft+U.clientWidth/2,g=U.scrollTop+U.clientHeight/2);A.call(this,U);"1"==urlParams.embedInline&&null!=u.el&&(u.el.style.marginTop=U.scrollTop+"px",u.el.style.marginLeft=U.scrollLeft+"px");this.active=!0;null!=N&&(y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft=
+"10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),y.innerText=N,U.appendChild(y),u.status=y);this.pause=mxUtils.bind(this,function(){var J=
+C;this.active&&(q=Math.max(0,q-(Date.now()-D)),J=mxUtils.bind(this,function(L){this.spin(U,N,V,q);if(null!=L)try{L(),G=mxUtils.bind(this,function(){this.spin(U,N,V,q);try{L()}catch(K){null!=V&&V(K)}})}catch(K){null!=V&&V(K)}}));this.stop();return J});y=!0}return y};var R=u.stop;u.stop=function(){R.call(this);this.active&&(this.active=!1,null!=I&&(window.clearTimeout(I),I=null),null!=u.status&&null!=u.status.parentNode&&u.status.parentNode.removeChild(u.status),u.status=null)};u.pause=function(){return C};
+return u};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&
177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&
-120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,m=this.editor.graph,u=this;g.getFunction=function(x){if(m.isSelectionEmpty()&&null!=u.pages&&0<u.pages.length){var A=u.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&u.movePage(A,A-1)};if(38==x.keyCode)return function(){0<
+120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,n=this.editor.graph,u=this;g.getFunction=function(x){if(n.isSelectionEmpty()&&null!=u.pages&&0<u.pages.length){var A=u.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&u.movePage(A,A-1)};if(38==x.keyCode)return function(){0<
A&&u.movePage(A,0)};if(39==x.keyCode)return function(){A<u.pages.length-1&&u.movePage(A,A+1)};if(40==x.keyCode)return function(){A<u.pages.length-1&&u.movePage(A,u.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)){if(37==x.keyCode)return function(){0<A&&u.selectNextPage(!1)};if(38==x.keyCode)return function(){0<A&&u.selectPage(u.pages[0])};if(39==x.keyCode)return function(){A<u.pages.length-1&&u.selectNextPage(!0)};if(40==x.keyCode)return function(){A<u.pages.length-
-1&&u.selectPage(u.pages[u.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||m.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("&lt;mxfile ");if(0<=k){var m=d.lastIndexOf("&lt;/mxfile&gt;");m>k&&(g=d.substring(k,
-m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var u=mxUtils.parseXml(d),x=this.editor.extractGraphModel(u.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};
-EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var m=null!=this.pages?this.pages.slice():null,u=d.getElementsByTagName("diagram");if(1<u.length||1==u.length&&u[0].hasAttribute("name")){this.fileNode=d;this.pages=
+1&&u.selectPage(u.pages[u.pages.length-1])}}}return!(65<=x.keyCode&&90>=x.keyCode)||n.isSelectionEmpty()||mxEvent.isAltDown(x)||mxEvent.isShiftDown(x)||mxEvent.isControlDown(x)||mxClient.IS_MAC&&mxEvent.isMetaDown(x)?k.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var g=e.apply(this,arguments);if(null==g)try{var k=d.indexOf("&lt;mxfile ");if(0<=k){var n=d.lastIndexOf("&lt;/mxfile&gt;");n>k&&(g=d.substring(k,
+n+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var u=mxUtils.parseXml(d),x=this.editor.extractGraphModel(u.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);g=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};
+EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var n=null!=this.pages?this.pages.slice():null,u=d.getElementsByTagName("diagram");if(1<u.length||1==u.length&&u[0].hasAttribute("name")){this.fileNode=d;this.pages=
null!=this.pages?this.pages:[];for(var x=u.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(u[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,
-this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=m)for(x=0;x<m.length;x++)k.model.execute(new ChangePage(this,m[x],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,m,u,x,A,I,F,C,P,R,U){g=null!=g?g:this.editor.graph;u=null!=u?u:!1;F=null!=F?F:!0;P=null!=
-P?P:!Editor.defaultCompressed;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var V="_blank";else O=V=m;if(null==d)return"";var q=d;if("mxfile"!=q.nodeName.toLowerCase()){if(P){var y=d.ownerDocument.createElement("diagram");y.setAttribute("name",mxResources.get("pageWithNumber",[1]));y.setAttribute("id",Editor.guid());y.appendChild(d)}else{y=Graph.zapGremlins(mxUtils.getXml(d));q=Graph.compress(y);if(Graph.decompress(q)!=y)return y;y=d.ownerDocument.createElement("diagram");
+this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(x=0;x<n.length;x++)k.model.execute(new ChangePage(this,n[x],null));var I=this.getCurrentFile();null!=I&&I.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,n,u,x,A,I,G,C,P,R,U){g=null!=g?g:this.editor.graph;u=null!=u?u:!1;G=null!=G?G:!0;P=null!=
+P?P:!Editor.defaultCompressed;var N=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var V="_blank";else N=V=n;if(null==d)return"";var q=d;if("mxfile"!=q.nodeName.toLowerCase()){if(P){var y=d.ownerDocument.createElement("diagram");y.setAttribute("name",mxResources.get("pageWithNumber",[1]));y.setAttribute("id",Editor.guid());y.appendChild(d)}else{y=Graph.zapGremlins(mxUtils.getXml(d));q=Graph.compress(y);if(Graph.decompress(q)!=y)return y;y=d.ownerDocument.createElement("diagram");
y.setAttribute("name",mxResources.get("pageWithNumber",[1]));y.setAttribute("id",Editor.guid());mxUtils.setTextContent(y,q)}q=d.ownerDocument.createElement("mxfile");q.appendChild(y)}C?(q=q.cloneNode(!0),q.removeAttribute("modified"),q.removeAttribute("host"),q.removeAttribute("agent"),q.removeAttribute("etag"),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.removeAttribute("userAgent"),q.removeAttribute("modified"),q.removeAttribute("version"),
q.removeAttribute("editor"),q.removeAttribute("pages"),q.removeAttribute("type"),q.removeAttribute("etag"),mxClient.IS_CHROMEAPP?q.setAttribute("host","Chrome"):EditorUi.isElectronApp?q.setAttribute("host","Electron"):q.setAttribute("host",window.location.hostname),q.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),q.setAttribute("version",EditorUi.VERSION),1<q.getElementsByTagName("diagram").length&&null!=this.pages&&q.setAttribute("pages",this.pages.length));
-null!=R&&(q=q.cloneNode(!0),q.setAttribute("scale",R));null!=U&&(q=q.cloneNode(!0),q.setAttribute("border",U));d=P?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!x&&!u&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(q),g,null!=k?k.getTitle():null,V,O);else if(x||!u&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(m=null),k=this.getSvgFileProperties(q),d=this.getEmbeddedSvg(d,g,m,null,I,F,O,null,null,k.scale,
-k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,m){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var u=this.editor.getGraphXml(d,m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(F){var C=F.getElementsByTagName("mxGraphModel"),P=0<C.length?C[0]:null;C=F;null==P&&k?(P=mxUtils.getNodeValue(F),0<P.length&&(P=Graph.decompress(P),null!=P&&0<P.length&&(C=F.cloneNode(!1),C.appendChild(mxUtils.parseXml(P).documentElement)))):
-null==P||k?C=F.cloneNode(!0):(C=F.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(P)));u.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(u),u=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,I,null,
-m);EditorUi.removeChildNodes(A);A.appendChild(I);delete x.needsUpdate}else m&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&
-(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,I,null,m),A=A.cloneNode(!1),A.appendChild(I)));d(A)}return u};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],m=0;m<d.length;m++){var u=d.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(u)?k.push(u):isNaN(parseInt(u))?u.toLowerCase()!=u?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):u.toUpperCase()!=u?k.push(String.fromCharCode(97+Math.round(25*
+null!=R&&(q=q.cloneNode(!0),q.setAttribute("scale",R));null!=U&&(q=q.cloneNode(!0),q.setAttribute("border",U));d=P?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!x&&!u&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(q),g,null!=k?k.getTitle():null,V,N);else if(x||!u&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(n=null),k=this.getSvgFileProperties(q),d=this.getEmbeddedSvg(d,g,n,null,I,G,N,null,null,k.scale,
+k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,n){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var u=this.editor.getGraphXml(d,n);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(G){var C=G.getElementsByTagName("mxGraphModel"),P=0<C.length?C[0]:null;C=G;null==P&&k?(P=mxUtils.getNodeValue(G),0<P.length&&(P=Graph.decompress(P),null!=P&&0<P.length&&(C=G.cloneNode(!1),C.appendChild(mxUtils.parseXml(P).documentElement)))):
+null==P||k?C=G.cloneNode(!0):(C=G.cloneNode(!1),mxUtils.setTextContent(C,Graph.compressNode(P)));u.appendChild(C)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(u),u=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var I=new mxCodec(mxUtils.createXmlDocument());I=I.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,I,null,
+n);EditorUi.removeChildNodes(A);A.appendChild(I);delete x.needsUpdate}else n&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&
+(I=new mxCodec(mxUtils.createXmlDocument()),I=I.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,I,null,n),A=A.cloneNode(!1),A.appendChild(I)));d(A)}return u};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],n=0;n<d.length;n++){var u=d.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(u)?k.push(u):isNaN(parseInt(u))?u.toLowerCase()!=u?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):u.toUpperCase()!=u?k.push(String.fromCharCode(97+Math.round(25*
Math.random()))):/\s/.test(u)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){d=mxUtils.clone(d);if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(k)}catch(x){d[EditorUi.DIFF_INSERT][g].data=
-x.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var m in d[EditorUi.DIFF_UPDATE]){var u=d[EditorUi.DIFF_UPDATE][m];null!=u.name&&(u.name=this.anonymizeString(u.name));null!=u.cells&&(g=mxUtils.bind(this,function(x){var A=u.cells[x];if(null!=A){for(var I in A)null!=A[I].value&&(A[I].value="["+A[I].value.length+"]"),null!=A[I].xmlValue&&(A[I].xmlValue="["+A[I].xmlValue.length+"]"),null!=A[I].style&&(A[I].style="["+A[I].style.length+"]"),mxUtils.isEmptyObject(A[I])&&delete A[I];mxUtils.isEmptyObject(A)&&
-delete u.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(u.cells)&&delete u.cells);mxUtils.isEmptyObject(u)&&delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=
+x.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var n in d[EditorUi.DIFF_UPDATE]){var u=d[EditorUi.DIFF_UPDATE][n];null!=u.name&&(u.name=this.anonymizeString(u.name));null!=u.cells&&(g=mxUtils.bind(this,function(x){var A=u.cells[x];if(null!=A){for(var I in A)null!=A[I].value&&(A[I].value="["+A[I].value.length+"]"),null!=A[I].xmlValue&&(A[I].xmlValue="["+A[I].xmlValue.length+"]"),null!=A[I].style&&(A[I].style="["+A[I].style.length+"]"),mxUtils.isEmptyObject(A[I])&&delete A[I];mxUtils.isEmptyObject(A)&&
+delete u.cells[x]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(u.cells)&&delete u.cells);mxUtils.isEmptyObject(u)&&delete d[EditorUi.DIFF_UPDATE][n]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=
0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=
g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),
-this.clearStatus(),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,m,u,x,A,I,F,C,P,R,U){u=null!=u?u:!0;x=null!=x?x:!1;C=null!=C?C:!Editor.defaultCompressed;var O=
-this.editor.graph;if((g||!d&&null!=F&&/(\.svg)$/i.test(F.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var V=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var q=null!=this.pages?this.pages[0]:null;null==q||this.currentPage==q?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&O.setBackgroundImage(q.viewState.backgroundImage);
-O.getGlobalVariable=function(y){return"page"==y&&null!=q?q.getName():"pagenumber"==y?1:V.apply(this,arguments)};document.body.appendChild(O.container);null!=q&&O.model.setRoot(q.root)}A=null!=A?A:this.getXmlFileData(u,x,C,P);F=null!=F?F:this.getCurrentFile();d=this.createFileData(A,O,F,window.location.href,d,g,k,m,u,I,C,R,U);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,m,u,x){x=null!=x?x:!0;var A=null,I=EditorUi.drawHost+
-"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var F=g.view.scale;x=Math.floor(A.x/F-g.view.translate.x);F=Math.floor(A.y/F-g.view.translate.y);A=g.background;null==u&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",x);d.setAttribute("y0",F)}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!=m&&d.setAttribute("edit",m));null!=u&&(u=u.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));return(null==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==u?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+
-(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+u+"'\"/>\n":"")+"</head>\n<body"+(null==u&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+m+"</div>\n</div>\n"+(null==u?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+u+'" target="_blank"><img border="0" src="'+
-EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,m,u){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=u&&(u=u.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==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+this.clearStatus(),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,n,u,x,A,I,G,C,P,R,U){u=null!=u?u:!0;x=null!=x?x:!1;C=null!=C?C:!Editor.defaultCompressed;var N=
+this.editor.graph;if((g||!d&&null!=G&&/(\.svg)$/i.test(G.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var V=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var q=null!=this.pages?this.pages[0]:null;null==q||this.currentPage==q?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=q.viewState&&null!=q.viewState&&N.setBackgroundImage(q.viewState.backgroundImage);
+N.getGlobalVariable=function(y){return"page"==y&&null!=q?q.getName():"pagenumber"==y?1:V.apply(this,arguments)};document.body.appendChild(N.container);null!=q&&N.model.setRoot(q.root)}A=null!=A?A:this.getXmlFileData(u,x,C,P);G=null!=G?G:this.getCurrentFile();d=this.createFileData(A,N,G,window.location.href,d,g,k,n,u,I,C,R,U);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return d};EditorUi.prototype.getHtml=function(d,g,k,n,u,x){x=null!=x?x:!0;var A=null,I=EditorUi.drawHost+
+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var G=g.view.scale;x=Math.floor(A.x/G-g.view.translate.x);G=Math.floor(A.y/G-g.view.translate.y);A=g.background;null==u&&(g=this.getBasenames().join(";"),0<g.length&&(I=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",x);d.setAttribute("y0",G)}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!=n&&d.setAttribute("edit",n));null!=u&&(u=u.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";n=Graph.compress(d);Graph.decompress(n)!=d&&(n=encodeURIComponent(d));return(null==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==u?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+
+(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+u+"'\"/>\n":"")+"</head>\n<body"+(null==u&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+n+"</div>\n</div>\n"+(null==u?'<script type="text/javascript" src="'+I+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+u+'" target="_blank"><img border="0" src="'+
+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,n,u){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=u&&(u=u.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==u?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=u?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==u?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=u?'<meta http-equiv="refresh" content="0;URL=\''+u+"'\"/>\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==u?'<script type="text/javascript" src="'+g+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+u+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",
-[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),k={},0<d.length)){var m=this.getHashObject(),u=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);
-if(null==m.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=m.pageId&&g.getId()==m.pageId)u=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=u?u:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var I=this.editor.graph.getModel(),F=I.getChildren(I.root);for(x=0;x<F.length;x++){var C=F[x];I.setVisible(C,g[C.id]||!1)}}catch(P){}};EditorUi.prototype.getBaseFilename=
+[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),k={},0<d.length)){var n=this.getHashObject(),u=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);
+if(null==n.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=n.pageId&&g.getId()==n.pageId)u=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=u?u:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var I=this.editor.graph.getModel(),G=I.getChildren(I.root);for(x=0;x<G.length;x++){var C=G[x];I.setVisible(C,g[C.id]||!1)}}catch(P){}};EditorUi.prototype.getBaseFilename=
function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=
-function(d,g,k,m,u,x,A,I,F,C,P,R,U,O,V,q){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var y=this.getBaseFilename(!u),D=y+("xml"==d||"pdf"==d&&P?".drawio":"")+"."+d;if("xml"==d){var J=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,u,null,null,null,g);this.saveData(D,d,J,"text/xml")}else if("html"==d)J=this.getHtml2(this.getFileData(!0),this.editor.graph,y),this.saveData(D,d,J,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-d?D=y+".png":"jpeg"==d&&(D=y+".jpg"),this.saveRequest(D,d,mxUtils.bind(this,function(G,M){try{return this.createDownloadRequest(G,d,m,M,A,u,I,F,C,P,R,void 0,void 0,!x,U,O,V,q)}catch(N){this.handleError(N)}}));else{var L=null,K=mxUtils.bind(this,function(G){G.length<=MAX_REQUEST_SIZE?this.saveData(D,"svg",G,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});if("svg"==d){var n=this.editor.graph.background;
-if(A||n==mxConstants.NONE)n=null;var z=this.editor.graph.getSvg(n,null,null,null,null,m);k&&this.editor.graph.addSvgShadow(z);this.editor.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(G){this.spinner.stop();K(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(G))})))}else D=y+".svg",L=this.getFileData(!1,!0,null,mxUtils.bind(this,function(G){this.spinner.stop();K(G)}),m)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,m,u,x,A,I,F,
-C,P,R,U,O,V,q,y,D){d=this.downloadRequestBuilder(d,g,k,m,u,x,A,I,F,C,P,R,U,O,V,q,y,D);g="";for(var J in d)k=d[J],null!=k&&(g+=J+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,m,u,x,A,I,F,C,P,R,U,O,V,q,y,D){var J=this.editor.graph,L=J.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var K=null,n=null,z=null;if(!EditorUi.isElectronApp&&(L.width*
-L.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=P?(K=P.from,n=P.to):0==x&&(z="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){K=x;break}x=J.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!u?u||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;u={globalVars:J.getExportVariables()};F&&(u.grid={size:J.gridSize,
-steps:J.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:J.view.gridColor});Graph.translateDiagram&&(u.diagramLanguage=Graph.diagramLanguage);return{format:g,from:K,to:n,allPages:z,bg:null!=x?x:mxConstants.NONE,base64:m,embedXml:C,xml:k,filename:null!=d?d:"",extras:JSON.stringify(u),scale:A,border:I,pageMargin:V,w:R&&isFinite(R)?R:null,h:U&&isFinite(U)?U:null,crop:null!=O&&O?"1":"0",fit:null!=q&&q?"1":"0",sheetsAcross:y,sheetsDown:D}};EditorUi.prototype.setMode=
-function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(m){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&
-null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(m){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};
-EditorUi.prototype.loadDescriptor=function(d,g,k){var m=window.location.hash,u=mxUtils.bind(this,function(A){var I=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<I.length&&(I+="\n"),I+=A);A=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return m};this.fileLoaded(A);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(U){this.editor.undoManager.clear();this.editor.setModified(!1);
-this.clearStatus()}));if(null!=d.update){var F=null!=d.interval?parseInt(d.interval):6E4,C=null,P=mxUtils.bind(this,function(){var U=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){U===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),R()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),R=
-mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(P,F)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();P()}));R();P()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){u(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else u("")};EditorUi.prototype.updateDiagram=function(d){function g(L){var K=new mxCellOverlay(L.image||u.warningImage,L.tooltip,L.align,L.valign,
-L.offset);K.addListener(mxEvent.CLICK,function(n,z){m.alert(L.tooltip)});return K}var k=null,m=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var u=this.editor.graph,x=u.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=x.getCell(d.getAttribute("id"));if(null!=I){try{var F=d.getAttribute("value");if(null!=F){var C=mxUtils.parseXml(F).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))x.setValue(I,
-C);else for(var P=C.attributes,R=0;R<P.length;R++)u.setAttributeForCell(I,P[R].nodeName,0<P[R].nodeValue.length?P[R].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+I.id+": "+L)}try{var U=d.getAttribute("style");null!=U&&u.model.setStyle(I,U)}catch(L){null!=window.console&&console.log("Error in style for "+I.id+": "+L)}try{var O=d.getAttribute("icon");if(null!=O){var V=0<O.length?JSON.parse(O):null;null!=V&&V.append||u.removeCellOverlays(I);null!=V&&u.addCellOverlay(I,
+function(d,g,k,n,u,x,A,I,G,C,P,R,U,N,V,q){try{n=null!=n?n:this.editor.graph.isSelectionEmpty();var y=this.getBaseFilename(!u),D=y+("xml"==d||"pdf"==d&&P?".drawio":"")+"."+d;if("xml"==d){var J=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,n,u,null,null,null,g);this.saveData(D,d,J,"text/xml")}else if("html"==d)J=this.getHtml2(this.getFileData(!0),this.editor.graph,y),this.saveData(D,d,J,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+d?D=y+".png":"jpeg"==d&&(D=y+".jpg"),this.saveRequest(D,d,mxUtils.bind(this,function(F,M){try{return this.createDownloadRequest(F,d,n,M,A,u,I,G,C,P,R,void 0,void 0,!x,U,N,V,q)}catch(O){this.handleError(O)}}));else{var L=null,K=mxUtils.bind(this,function(F){F.length<=MAX_REQUEST_SIZE?this.saveData(D,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});if("svg"==d){var m=this.editor.graph.background;
+if(A||m==mxConstants.NONE)m=null;var z=this.editor.graph.getSvg(m,null,null,null,null,n);k&&this.editor.graph.addSvgShadow(z);this.editor.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(F){this.spinner.stop();K(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(F))})))}else D=y+".svg",L=this.getFileData(!1,!0,null,mxUtils.bind(this,function(F){this.spinner.stop();K(F)}),n)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,n,u,x,A,I,G,
+C,P,R,U,N,V,q,y,D){d=this.downloadRequestBuilder(d,g,k,n,u,x,A,I,G,C,P,R,U,N,V,q,y,D);g="";for(var J in d)k=d[J],null!=k&&(g+=J+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,n,u,x,A,I,G,C,P,R,U,N,V,q,y,D){var J=this.editor.graph,L=J.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var K=null,m=null,z=null;if(!EditorUi.isElectronApp&&(L.width*
+L.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};C=C?"1":"0";"pdf"==g&&(null!=P?(K=P.from,m=P.to):0==x&&(z="1"));"xmlpng"==g&&(C="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){K=x;break}x=J.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!u?u||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;u={globalVars:J.getExportVariables()};G&&(u.grid={size:J.gridSize,
+steps:J.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:J.view.gridColor});Graph.translateDiagram&&(u.diagramLanguage=Graph.diagramLanguage);return{format:g,from:K,to:m,allPages:z,bg:null!=x?x:mxConstants.NONE,base64:n,embedXml:C,xml:k,filename:null!=d?d:"",extras:JSON.stringify(u),scale:A,border:I,pageMargin:V,w:R&&isFinite(R)?R:null,h:U&&isFinite(U)?U:null,crop:null!=N&&N?"1":"0",fit:null!=q&&q?"1":"0",sheetsAcross:y,sheetsDown:D}};EditorUi.prototype.setMode=
+function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(n){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&
+null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(n){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};
+EditorUi.prototype.loadDescriptor=function(d,g,k){var n=window.location.hash,u=mxUtils.bind(this,function(A){var I=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<I.length&&(I+="\n"),I+=A);A=new LocalFile(this,"csv"!=d.format&&0<I.length?I:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return n};this.fileLoaded(A);"csv"==d.format&&this.importCsv(I,mxUtils.bind(this,function(U){this.editor.undoManager.clear();this.editor.setModified(!1);
+this.clearStatus()}));if(null!=d.update){var G=null!=d.interval?parseInt(d.interval):6E4,C=null,P=mxUtils.bind(this,function(){var U=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){U===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),R()):this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),R=
+mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(P,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();P()}));R();P()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){u(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else u("")};EditorUi.prototype.updateDiagram=function(d){function g(L){var K=new mxCellOverlay(L.image||u.warningImage,L.tooltip,L.align,L.valign,
+L.offset);K.addListener(mxEvent.CLICK,function(m,z){n.alert(L.tooltip)});return K}var k=null,n=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var u=this.editor.graph,x=u.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var I=x.getCell(d.getAttribute("id"));if(null!=I){try{var G=d.getAttribute("value");if(null!=G){var C=mxUtils.parseXml(G).documentElement;if(null!=C)if("1"==C.getAttribute("replace-value"))x.setValue(I,
+C);else for(var P=C.attributes,R=0;R<P.length;R++)u.setAttributeForCell(I,P[R].nodeName,0<P[R].nodeValue.length?P[R].nodeValue:null)}}catch(L){null!=window.console&&console.log("Error in value for "+I.id+": "+L)}try{var U=d.getAttribute("style");null!=U&&u.model.setStyle(I,U)}catch(L){null!=window.console&&console.log("Error in style for "+I.id+": "+L)}try{var N=d.getAttribute("icon");if(null!=N){var V=0<N.length?JSON.parse(N):null;null!=V&&V.append||u.removeCellOverlays(I);null!=V&&u.addCellOverlay(I,
g(V))}}catch(L){null!=window.console&&console.log("Error in icon for "+I.id+": "+L)}try{var q=d.getAttribute("geometry");if(null!=q){q=JSON.parse(q);var y=u.getCellGeometry(I);if(null!=y){y=y.clone();for(key in q){var D=parseFloat(q[key]);"dx"==key?y.x+=D:"dy"==key?y.y+=D:"dw"==key?y.width+=D:"dh"==key?y.height+=D:y[key]=parseFloat(q[key])}u.model.setGeometry(I,y)}}}catch(L){null!=window.console&&console.log("Error in icon for "+I.id+": "+L)}}}else if("model"==d.nodeName){for(var J=d.firstChild;null!=
J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(d.firstChild)).decode(J,x)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(u.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))u.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{x.endUpdate()}null!=
-A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=k.lastIndexOf(".");0<=m&&(d=k.substring(m),k=k.substring(0,m));if(g){g=k;var u=new Date;k=u.getFullYear();m=u.getMonth()+1;var x=u.getDate(),A=u.getHours(),I=u.getMinutes();u=u.getSeconds();k=g+(" "+(k+"-"+m+"-"+x+"-"+A+"-"+I+"-"+u))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=
-function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var m=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=m&&(m.removeListener(this.descriptorChangedListener),this.logIfModified(m,!0),m.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=m&&
-this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||this.showSplash()});if(null!=d)try{this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();
-delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||
-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));u=!0;if(!this.isOffline()&&null!=d.getMode()){var A="1"==urlParams.sketch?"sketch":uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",
-[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(F){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=m?this.fileLoaded(m)||x():x()});g?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var F=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(F)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return u};EditorUi.prototype.getHashValueForPages=function(d,g){var k=
-0,m=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");m.root=d[x].root;var I=u.encode(m);this.editor.graph.saveViewState(d[x].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");A.appendChild(I);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+
-this.hashValue(A,function(F,C,P,R){return!R||"mxGeometry"!=F.nodeName&&"mxPoint"!=F.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?R&&"mxCell"==F.nodeName&&"previous"==C?null:P:Math.round(P)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);
-for(var u=0;u<d.attributes.length;u++){var x=d.attributes[u].name,A=null!=g?g(d,x,d.attributes[u].value,!0):d.attributes[u].value;null!=A&&(m^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(u=0;u<d.childNodes.length;u++)m=(m<<5)-m+this.hashValue(d.childNodes[u],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(u=0;u<d.length;u++)g=(g<<5)-g+d.charCodeAt(u)<<0;m^=g}return m};EditorUi.prototype.descriptorChanged=function(){};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,m,u,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d,null,2));g.appendChild(k);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),
-".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d,g){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));
-d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var m=g.previousSibling;k.insertBefore(g,d);k.insertBefore(m,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,m,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=
-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var u=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],
-this.openLibraries);break}u={file:d,images:g,title:k,expand:m};this.openLibraries.push(u)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,I=mxUtils.bind(this,function(D,J){0==D.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),J.appendChild(A)):this.addLibraryEntries(D,J)});null!=this.sidebar&&null!=
-g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var F=this.sidebar.addPalette(d.getHash(),k,null!=m?m:!0,mxUtils.bind(this,function(D){I(g,D)}));null!=u&&(u.div=F);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());m=F.parentNode.previousSibling;k=m.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&m.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var C=document.createElement("div");C.style.backgroundColor=
-"inherit";m.style.position="relative";var P=document.createElement("img");P.className="geLibraryButton";P.setAttribute("src",Editor.crossImage);P.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=d.title||this.closableScratchpad)C.appendChild(P),mxEvent.addListener(P,"click",mxUtils.bind(this,function(D){if(!mxEvent.isConsumed(D)){var J=mxUtils.bind(this,function(){null!=u&&mxUtils.remove(u,this.openLibraries);this.closeLibrary(d)});null!=R?this.confirm(mxResources.get("allChangesLost"),
-null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(D)}}));if(d.isEditable()){var U=this.editor.graph,O=null;k=mxUtils.bind(this,function(D){this.showLibraryDialog(d.getTitle(),F,g,d,d.getMode());mxEvent.consume(D)});var V=mxUtils.bind(this,function(D){d.setModified(!0);d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=P.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor=
-"default",O.style.marginRight="2px",O.style.marginTop="-2px",C.insertBefore(O,C.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==R&&(R=P.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),C.insertBefore(R,C.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-R||d.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(J)})))}),q=mxUtils.bind(this,function(D,J,L,K){D=U.cloneCells(mxUtils.sortCells(U.model.getTopmostCells(D)));for(var n=0;n<D.length;n++){var z=U.getCellGeometry(D[n]);null!=z&&z.translate(-J.x,-J.y)}F.appendChild(this.sidebar.createVertexTemplateFromCells(D,J.width,J.height,K||"",!0,null,!1));D=mxUtils.getXml(this.editor.graph.encodeCells(D));Editor.defaultCompressed&&(D=Graph.compress(D));J={xml:D,w:J.width,h:J.height};null!=
-K&&(J.title=K);g.push(J);V(L);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),y=mxUtils.bind(this,function(D){if(U.isSelectionEmpty())U.getRubberband().isActive()?(U.getRubberband().execute(D),U.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=U.getSelectionCells(),L=U.view.getBounds(J);if(null!=L&&0<L.width&&0<L.height){var K=U.view.scale;L.x/=K;L.y/=K;L.width/=K;L.height/=K;L.x-=
-U.view.translate.x;L.y-=U.view.translate.y;q(J,L)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(D)});mxEvent.addGestureListeners(F,function(){},mxUtils.bind(this,function(D){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler.first&&(U.graphHandler.suspend(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility="hidden"),F.style.backgroundColor="light-dark(#fefefe, #000000)",F.style.cursor="copy",U.panningManager.stop(),
-U.autoScroll=!1,mxEvent.consume(D))}),mxUtils.bind(this,function(D){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler&&(F.style.backgroundColor="",F.style.cursor="default",this.sidebar.showTooltips=!0,U.panningManager.stop(),U.graphHandler.reset(),U.isMouseDown=!1,U.autoScroll=!0,y(D),mxEvent.consume(D))}));mxEvent.addListener(F,"mouseleave",mxUtils.bind(this,function(D){U.isMouseDown&&null!=U.graphHandler.first&&(U.graphHandler.resume(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility=
-"visible"),F.style.backgroundColor="",F.style.cursor="",U.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(D){F.style.backgroundColor="light-dark(#fefefe, #000000)";D.dataTransfer.dropEffect="copy";F.style.cursor="copy";this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()})),mxEvent.addListener(F,"drop",mxUtils.bind(this,function(D){F.style.cursor="";F.style.backgroundColor="";0<D.dataTransfer.files.length&&this.importFiles(D.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(J,L,K,n,z,G,M,N,Q){if(null!=J&&"image/"==L.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(J),J=[new mxCell("",new mxGeometry(0,0,z,G),J)],J[0].vertex=!0,q(J,new mxRectangle(0,0,z,G),D,mxEvent.isAltDown(D)?null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var S=!1,T=mxUtils.bind(this,
-function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));I(Z,F);g=g.concat(Z);V(D);this.spinner.stop();S=!0}catch(ia){}else if("mxfile"==W.documentElement.nodeName)try{var Y=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<Y.length;Z++){var ba=this.stringToCells(Editor.getDiagramNodeXml(Y[Z])),da=
-this.editor.graph.getBoundingBoxFromGeometry(ba);null!=da&&q(ba,new mxRectangle(0,0,da.width,da.height),D)}S=!0}catch(ia){null!=window.console&&console.log("error in drop handler:",ia)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)});null!=Q&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(Q,function(W){T(W,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,
-M)&&null!=Q?this.isExternalDataComms()?this.parseFile(Q,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?T(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,L)}}));D.stopPropagation();D.preventDefault()})),mxEvent.addListener(F,"dragleave",
-function(D){F.style.cursor="";F.style.backgroundColor="";D.stopPropagation();D.preventDefault()}));P=P.cloneNode(!1);P.setAttribute("src",Editor.editImage);P.setAttribute("title",mxResources.get("edit"));C.insertBefore(P,C.firstChild);mxEvent.addListener(P,"click",k);k=P.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));C.insertBefore(k,C.firstChild);mxEvent.addListener(k,"click",y);".scratchpad"==d.title&&(this.addSelectionToScratchpad=y);this.isOffline()||
-".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",C.insertBefore(k,C.firstChild))}m.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++)try{var m=d[k],u=m.data;if(null!=u){u="data:"==u.substring(0,5)?this.convertDataUri(u):u;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==m.aspect&&(x+="aspect=fixed;");x=x+"image="+u+";";null!=m.style&&(x+=m.style);g.appendChild(this.sidebar.createVertexTemplate(x,m.w,m.h,"",m.title||"",!1,null,!0))}else if(null!=m.xml){var A=this.stringToCells("<"==m.xml.charAt(0)?m.xml:Graph.decompress(m.xml)),I=0==A.length?mxResources.get("drawingEmpty"):null!=m.title?m.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,m.w,m.h,I,!0,null,!0))}}catch(F){I=null!=F.message?mxResources.get("error")+": "+F.message:String(F),
-x=this.sidebar.createVertexTemplateFromCells(null,m.w,m.h,I,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(d,g,k,m,u,x,A){d=new ImageDialog(this,d,g,k,m,u,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,m,u,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(I){if(null!=I)try{if(null!=x&&x(I),I==A)this.hideDialog();else{if(0<I.length){var F=JSON.parse(I);localStorage.setItem(g,JSON.stringify(F))}else localStorage.removeItem(g);
-this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),null,mxResources.get("close"),null,null,null,!0,null,null,u,k,m);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,m){d=null!=d?d:mxUtils.bind(this,function(u,x,A,I){x||(u=new ChangePageSetup(this,m?A:null,u),u.ignoreColor=!m,null!=I&&m&&(u.shadowVisible=I),this.editor.graph.model.execute(u))});d=new BackgroundImageDialog(this,d,
-g,k,m);this.showDialog(d.container,400,m?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,m,u){d=new LibraryDialog(this,d,g,k,m,u);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&
-g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,m,u,x,A){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},F=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(U){}if(null!=
-F||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),P=null;g=null!=g?g:mxResources.get("error");if(null!=F){null!=F.retry&&(C=mxResources.get("cancel"),P=function(){I();F.retry()});if(404==F.code||404==F.status||403==F.code){A=403==F.code?null!=F.message?mxUtils.htmlEntities(F.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=u?u:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
-" ("+this.drive.user.email+")":""),!1);var R=null!=u?null:null!=x?x:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.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==F.code||404==F.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(g,
-A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=m&&m()}),P,mxResources.get("changeUser"),mxUtils.bind(this,function(){function U(){y.innerText="";for(var D=0;D<O.length;D++){var J=document.createElement("option");mxUtils.write(J,O[D].displayName);J.value=D;y.appendChild(J);J=document.createElement("option");J.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(J,"<"+O[D].email+">");J.setAttribute("disabled","disabled");
-y.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=O.length;y.appendChild(J)}var O=this.drive.getUsersList(),V=document.createElement("div"),q=document.createElement("div");q.style.marginBottom="6px";mxUtils.write(q,mxResources.get("changeUser")+": ");V.appendChild(q);var y=document.createElement("select");y.style.width="100%";U();mxEvent.addListener(y,"change",mxUtils.bind(this,function(){var D=y.value,J=O.length!=D;J&&this.drive.setUser(O[D]);
-this.drive.authorize(J,mxUtils.bind(this,function(){J||(O=this.drive.getUsersList(),U())}),mxUtils.bind(this,function(L){this.handleError(L)}),!0)}));V.appendChild(y);V=new CustomDialog(this,V,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(V.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=F.message?A=""==F.message&&null!=F.name?mxUtils.htmlEntities(F.name,!1):
-mxUtils.htmlEntities(F.message,!1):null!=F.response&&null!=F.response.error?A=mxUtils.htmlEntities(F.response.error,!1):"undefined"!==typeof window.App&&(F.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):F.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof F&&0<F.length&&(A=mxUtils.htmlEntities(F,!1)))}u=d=null;null!=F&&null!=F.helpLink?(d=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(F.helpLink)})):
-null!=F&&null!=F.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+F.ownerEmail+")",!1),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(F.ownerEmail))})):null!=F&&null!=F.alternateAction&&(d=F.alternateAction.label,u=F.alternateAction.funct);this.showError(g,A,C,k,P,null,null,d,u,null,null,null,m?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,
-k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,m,u,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},m,u,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,x);d.init()};EditorUi.prototype.showBanner=function(d,g,k,m,u,x,A,I,F){x=!1;if(!(this.bannerShowing||this["hideBanner"+
-d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){A=null!=A?A:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=u?500:1E3,P=document.createElement("div");P.className="geBtn gePrimaryBtn geBanner"+(u?" geSmallBanner":"");P.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(P.style,"transform",A);mxUtils.setPrefixedStyle(P.style,"transition","all "+C+"ms ease");null!=F&&mxUtils.setPrefixedStyle(P.style,"transform-origin",F);if(!u){var R=
-document.createElement("img");R.setAttribute("src",IMAGE_PATH+"/logo.png");R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";P.appendChild(R);R=document.createElement("img");R.setAttribute("src",Dialog.prototype.closeImage);R.setAttribute("title",mxResources.get(m?"doNotShowAgain":"close"));R.setAttribute("border","0");R.style.cssText=(u?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-P.appendChild(R)}mxUtils.write(P,g);document.body.appendChild(P);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var U=document.createElement("input");U.setAttribute("type","checkbox");U.setAttribute("id","geDoNotShowAgainCheckbox");U.style.marginRight="6px";if(!m){g.appendChild(U);var O=document.createElement("label");O.setAttribute("for","geDoNotShowAgainCheckbox");
-mxUtils.write(O,mxResources.get("doNotShowAgain"));g.appendChild(O);P.style.paddingBottom=u?"16px":"30px";P.appendChild(g)}var V=mxUtils.bind(this,function(){null!=P.parentNode&&(P.parentNode.removeChild(P),this.bannerShowing=!1,U.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=R&&mxEvent.addListener(R,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);V()}));var q=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,
-"transform",A);window.setTimeout(mxUtils.bind(this,function(){V()}),C)});mxEvent.addListener(P,"click",mxUtils.bind(this,function(y){var D=mxEvent.getSource(y);D!=U&&D!=O?(null!=k&&k(),V(),mxEvent.consume(y)):q()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,"transform",I)}),C/2);window.setTimeout(q,u?4E3:3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
-EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,m){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,m,u){var x="jpeg"==k?"jpg":k;m=this.getBaseFilename(m)+(null!=g?".drawio":
-"")+"."+x;d=this.createImageDataUri(d,g,k,u);this.saveData(m,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));
-this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,m,u,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==
-k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,m);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-x=65==(I?parseInt(I[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(m?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(F){}}else this.createEchoRequest(d,g,k,m,u).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,m,u,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
-d+(null!=k?"&mime="+k:"")+(null!=u?"&format="+u:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(m?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,m,u,x,A,I){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=u&&(!mxClient.IS_IOS||!navigator.standalone);var F=mxUtils.bind(this,function(P,R,U,O){try{if("_blank"==R)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,m);else if(null!=k&&"text/html"==k.substring(0,9)){var V=new EmbedDialog(this,d);this.showDialog(V.container,
-450,240,!0,!0);V.init()}else{var q=window.open("about:blank");null==q?mxUtils.popup(d,!0):(q.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),q.document.close())}else if(R==App.MODE_DEVICE||"download"==R)this.doSaveLocalFile(d,P,k,m,null,I);else if(null!=P&&0<P.length){var y=mxUtils.bind(this,function(D){try{this.exportFile(d,P,k,m,R,D)}catch(J){this.handleError(J)}});null!=O?y(O):this.pickFolder(R,y)}}catch(D){this.handleError(D)}});u=[];x||u.push(App.MODE_BROWSER);A||u.push("_blank");
-var C=new SaveDialog(this,g,mxUtils.bind(this,function(P,R,U){F(P.value,R,P,U);this.hideDialog(null,null,C.container)}),u,d,k,m);this.showDialog(C.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var m=window.open("about:blank");if(null==m||null==m.document)mxUtils.popup(d,!0);else{var u="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;
-""!=x&&(u="background: "+x+";")}u='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+u+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),m.document.write(u+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):m.document.write(u+d+"</body></html>"):m.document.write(u+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");m.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;
-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(m){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.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,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 u=g.getBoundingClientRect();this.tagsDialog.style.left=u.left+"px";
-this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=u.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();
-g.style.display=0<m.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&
-(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&
-this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(m){var u=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",u);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)u.apply(this);else{this.exportDialog=document.createElement("div");var x=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
-this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",u);this.editor.exportToCanvas(mxUtils.bind(this,function(I){A.stop();this.exportDialog.style.width=
-"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var F=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",F);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(F.substring(F.indexOf(",")+
-1),"image/png",!0);u.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,m,u){this.isLocalFileSave()?this.saveLocalFile(k,
-d,m,u,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,m,u,g,A)}),k,u,m)};EditorUi.prototype.saveRequest=function(d,g,k,m,u,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,function(C,P,R,U){if("_blank"==P||null!=C&&0<C.length){var O=k("_blank"==P?null:C,P==App.MODE_DEVICE||"download"==P||null==P||"_blank"==P?"0":"1");null!=O&&(P==App.MODE_DEVICE||"download"==P||"_blank"==P?O.simulate(document,"_blank"):(R=mxUtils.bind(this,
-function(V){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=m)try{this.exportFile(m,C,x,!0,P,V)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),C,x,!0,P,V)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}))}),
-null!=U?R(U):this.pickFolder(P,R)))}});u=[App.MODE_BROWSER];A||u.push("_blank");var F=new SaveDialog(this,d,mxUtils.bind(this,function(C,P,R){I(C.value,P,C,R);this.hideDialog(null,null,F.container)}),u,null,"application/pdf");this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,
-k,m,u,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,m,u,x,A,I,F,C,P,R,U,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(N){Editor.addRetryToError(N,mxUtils.bind(this,function(){this.exportSvg(d,g,k,m,u,x,A,I,F,C,P,R,U,O)}));this.handleError(N)})))try{var V=this.editor.graph.isSelectionEmpty();
-k=null!=k?k:V;var q=g?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&0==g&&(q=this.editor.graph.shapeBackgroundColor);var y=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var D=mxUtils.lightDarkColorSupported,J=mxUtils.preferDarkColor;if("light"==P||"dark"==P)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==P;var L=this.editor.graph.createSvgImageExport(u),K=this.editor.graph.getSvg(q,
-d,A,I,null,k,null,L,"blank"==C?"_blank":"self"==C?"_top":null,null,!U,P,R);mxUtils.lightDarkColorSupported=D;mxUtils.preferDarkColor=J;this.editor.graph.addForeignObjectWarning=y;m&&this.editor.graph.addSvgShadow(K);var n=this.getBaseFilename()+(u?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(N)}))});var z=mxUtils.bind(this,function(N){this.spinner.stop();u&&N.setAttribute("content",this.getFileData(!0,null,null,null,k,F,null,null,null,null,null,d,A));O(Graph.xmlDeclaration+"\n"+(u?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(K);var G=mxUtils.bind(this,function(N){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(N);Editor.foreignObjectImages&&U?this.replaceAlternateContent(N,
-P,z):z(N)}),M=mxUtils.bind(this,function(N){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,G,this.thumbImageCache)):G(N)});U?this.embedFonts(K,M):(this.editor.addFontCss(K),M(K))}catch(N){this.handleError(N)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function m(R,U,O,V,q){var y=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");y.setAttribute("x",U);y.setAttribute("y",O+.5);y.setAttribute("width",
-V.width);y.setAttribute("height",V.height);null==y.setAttributeNS?y.setAttribute("xlink:href",q):y.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",q);R.replaceChild(y,R.lastChild);I()}function u(){if(A<P.length)P[A++](u)}var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),F={},C={},P=[];for(A=0;A<g.length;A++)mxUtils.bind(this,function(R){var U=R.getElementsByTagName("div");
-if(0<U.length)try{var O=U[0].cloneNode(!0),V=parseInt(O.style.marginLeft),q=parseInt(O.style.paddingTop),y=O.getElementsByTagName("div")[1],D=U=!1,J=O.style.alignItems,L=O.style.justifyContent;if(null!=O.style.writingMode){var K=O.style.writingMode;D="vertical-"==K.substring(0,9);U="-rl"==K.substring(K.length-3)}var n=!D&&"1px"==O.style.width||D&&"1px"==O.style.height;if(!D&&"1px"==O.style.height||D&&"1px"==O.style.width)O.style.alignItems=D&&U?"unsafe flex-end":"unsafe flex-start";n&&(O.style.justifyContent=
-"unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var z=O.outerHTML,G=F[z];null==G&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),K=1,K="1px"==O.style.width?y.offsetWidth:parseInt(O.style.width),n=1,n="1px"==O.style.height?y.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),G=new mxRectangle(V,q,K,n),F[z]=G);"1px"==O.style.height&&("unsafe center"==J?q-=G.height/2:"unsafe flex-end"==J&&(q-=G.height));if("1px"==O.style.width)if(!D&&
-"unsafe center"==L||D&&"unsafe center"==J)V-=G.width/2;else if(!D&&"unsafe flex-end"==L||D&&(!U&&"unsafe flex-end"==J||U&&"unsafe flex-start"==J))V-=G.width;G=new mxRectangle(V,q,G.width,G.height+parseInt(y.style.fontSize)/4);P.push(mxUtils.bind(this,function(M){var N=C[z];null==N?Graph.htmlToPng(z,G.width,G.height,mxUtils.bind(this,function(Q){m(R,V,q,G,Q);C[z]=Q;M()}),x):(m(R,V,q,G,N),M())}))}catch(M){I()}else I()})(g[A]);0==counter&&k(d);A=0;u()};EditorUi.prototype.addRadiobox=function(d,g,k,m,
-u,x,A){return this.addCheckbox(d,k,m,u,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,m,u,x,A,I){x=null!=x?x:!0;var F=document.createElement("input");F.style.marginRight="8px";F.style.marginTop="16px";F.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();F.id=A;null!=I&&F.setAttribute("name",I);k&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);m&&F.setAttribute("disabled","disabled");x&&(d.appendChild(F),k=document.createElement("label"),mxUtils.write(k,g),
-k.setAttribute("for",A),d.appendChild(k),u||mxUtils.br(d));return F};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var m=this.getCurrentFile(),u="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(u=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";m=document.createElement("option");
-m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));x.appendChild(m);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var I=new FilenameDialog(this,u,mxResources.get("ok"),function(F){null!=F?(u=F,A.setAttribute("title",F)):(x.value="blank",A.removeAttribute("title"))},mxResources.get("url"),
-null,null,null,null,function(){x.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":u:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var I=document.createElement("div");
-I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(I.style.border="1px solid black",I.style.backgroundColor=x):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(I)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight=
-"10px";m.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));m.appendChild(u);u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("openInNewWindow"));m.appendChild(u);u=document.createElement("option");u.setAttribute("value","self");mxUtils.write(u,mxResources.get("openInThisWindow"));m.appendChild(u);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),
-mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(g));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(x||"none",function(F){x=F;k()});mxEvent.consume(I)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||
-mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,m,u,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=m&&0<m.length&&x.push("edit="+encodeURIComponent(m)),u&&x.push("layers=1"),this.editor.graph.foldingEnabled&&
-x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,m,u,x,A,I,F,C,P,R,U){var O=this.getCurrentFile();F=this.createUrlParameters(d,g,m,u,x,F);d=!0;null!=A?k="#U"+encodeURIComponent(A):I||null==O||""==O.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+O.getHash(),d=!1);d&&null!=O&&null!=O.getTitle()&&O.getTitle()!=this.defaultFilename&&F.push("title="+encodeURIComponent(O.getTitle()));
-C&&1<k.length&&(F.push("open="+k.substring(1)),k="");P&&null!=this.currentPage&&F.push("page-id="+this.currentPage.getId());R&&F.push("transparent=1");null!=U&&F.push("dark="+U);return(m&&(null!=A||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<F.length?"?"+F.join("&"):"")+k};EditorUi.prototype.createHtml=
-function(d,g,k,m,u,x,A,I,F,C,P,R,U){this.getBasenames();var O={};""!=u&&u!=mxConstants.NONE&&(O.highlight=u);"auto"!==m&&(O.target=m);C||(O.lightbox=!1);O.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(O.zoom=k/100);k=[];A&&(k.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),O.resize=!0);I&&k.push("layers");F&&k.push("tags");null!=U&&(O["dark-mode"]=U);0<k.length&&(C&&k.push("lightbox"),
-O.toolbar=k.join(" "));null!=P&&0<P.length&&(O.edit=P);null!=d?O.url=d:O.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";R(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,m){var u=document.createElement("div");u.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";u.appendChild(x);var A=document.createElement("div");A.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");x=I.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var F=document.createElement("span");mxUtils.write(F,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(F);mxUtils.br(A);A.appendChild(I);F=
-document.createElement("span");mxUtils.write(F,mxResources.get("publicDiagramUrl"));A.appendChild(F);var C=this.getCurrentFile();null==k&&null!=C&&C.constructor==window.DriveFile&&(F=document.createElement("a"),F.style.paddingLeft="12px",F.style.color="gray",F.style.cursor="pointer",mxUtils.write(F,mxResources.get("share")),A.appendChild(F),mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));x.setAttribute("checked","checked");null==
-k&&I.setAttribute("disabled","disabled");u.appendChild(A);A=380;var P=this.addLinkSection(u),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginTop="16px";F=document.createElement("option");F.setAttribute("value","light");mxUtils.write(F,mxResources.get("light"));R.appendChild(F);F=document.createElement("option");F.setAttribute("value","dark");mxUtils.write(F,mxResources.get("dark"));R.appendChild(F);F=document.createElement("option");F.setAttribute("value",
-"auto");mxUtils.write(F,mxResources.get("automatic"));F.setAttribute("selected","selected");R.appendChild(F);F.setAttribute("selected","selected");mxUtils.write(u,mxResources.get("appearance")+":");u.appendChild(R);mxUtils.br(u);A+=26;var U=this.addCheckbox(u,mxResources.get("zoom"),!0,null,!0);mxUtils.write(u,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value="100%";u.appendChild(O);
-var V=this.addCheckbox(u,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var q=q=this.addCheckbox(u,mxResources.get("allPages"),F,!F),y=this.addCheckbox(u,mxResources.get("layers"),!0),D=this.addCheckbox(u,mxResources.get("tags"),!0),J=this.addCheckbox(u,mxResources.get("lightbox"),!0),L=null;if(EditorUi.enableHtmlEditOption){L=this.addEditButton(u,J);var K=L.getEditInput();K.style.marginBottom="16px";A+=50;mxEvent.addListener(J,"change",function(){J.checked?K.removeAttribute("disabled"):
-K.setAttribute("disabled","disabled");K.checked&&J.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,u,mxUtils.bind(this,function(){m(I.checked?k:null,U.checked,O.value,P.getTarget(),P.getColor(),V.checked,q.checked,y.checked,D.checked,J.checked,null!=L?L.getLink():null,null!=R?R.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,m,u,
-x,A,I,F,C,P){var R=document.createElement("div");R.style.whiteSpace="nowrap";var U=document.createElement("h3");mxUtils.write(U,d||mxResources.get("publish"));U.style.width="100%";U.style.textAlign="center";U.style.marginTop="2px";U.style.marginBottom="20px";R.appendChild(U);var O=document.createElement("select");d=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";if(null==I||""==I.getHash())u=null!=u?u:"https://www.drawio.com/doc/faq/publish-diagram-as-link",
-U=document.createElement("option"),mxUtils.write(U,mxResources.get("makeCopy")),U.setAttribute("value","copy"),O.appendChild(U);U=document.createElement("option");mxUtils.write(U,mxResources.get("authorizationRequired"));U.setAttribute("value","auth");O.appendChild(U);null!=I&&""!=I.getHash()||U.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");O.appendChild(I);null!=A?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",
-A),O.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));R.appendChild(O);mxUtils.br(R);O.focus();var V=null,q=null;if(null!=g||null!=k)d+=30,mxUtils.write(R,mxResources.get("width")+":"),V=document.createElement("input"),V.setAttribute("type","text"),V.style.marginRight="16px",V.style.width="50px",V.style.marginLeft="6px",V.style.marginRight="16px",V.style.marginBottom="10px",V.value="100%",R.appendChild(V),
-mxUtils.write(R,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",R.appendChild(q),mxUtils.br(R);var y=this.addLinkSection(R,m),D=C?this.addCheckbox(R,mxResources.get("transparentBackground"),!1):null;null!=D&&(d+=20);var J=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():
-"",16<g.length&&(g=g.substring(0,16)+"..."),J=this.addCheckbox(R,mxResources.get("selectedPage")+": "+g));var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft="8px";L.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value",
-"auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");L.appendChild(g);P&&(mxUtils.write(R,mxResources.get("appearance")+":"),R.appendChild(L),mxUtils.br(R),d+=30);var K=this.addCheckbox(R,mxResources.get("lightbox"),!0,null,null,!m),n=this.addEditButton(R,K),z=n.getEditInput();m&&(z.style.marginLeft=K.style.marginLeft,K.style.display="none",d-=20);var G=this.addCheckbox(R,mxResources.get("layers"),!0);G.style.marginLeft=z.style.marginLeft;G.style.marginTop="8px";
-var M=this.addCheckbox(R,mxResources.get("tags"),!0);M.style.marginLeft=z.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(K,"change",function(){K.checked?(G.removeAttribute("disabled"),z.removeAttribute("disabled"),M.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));z.checked&&K.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled",
-"disabled")});m=new CustomDialog(this,R,mxUtils.bind(this,function(){F(y.getTarget(),y.getColor(),null==J?!1:J.checked,K.checked,n.getLink(),G.checked,null!=V?V.value:null,null!=q?q.value:null,M.checked,O.value,null!=D?D.checked:!1,L.value)}),null,mxResources.get("create"),u,x);this.showDialog(m.container,340,296+d,!0,!0);null!=V?(V.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?V.select():document.execCommand("selectAll",!1,null)):null==O.parentNode;y.focus()};EditorUi.prototype.showRemoteExportDialog=
-function(d,g,k,m,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(u?"10":"4")+"px";x.appendChild(A);if(u){mxUtils.write(x,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||
-"100%";x.appendChild(I);mxUtils.write(x,mxResources.get("borderWidth")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.value=this.lastExportBorder||"0";x.appendChild(F);mxUtils.br(x)}var C=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),P=m?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;
-var R=m?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=R&&(R.style.marginBottom="16px");d=new CustomDialog(this,x,mxUtils.bind(this,function(){var U=parseInt(I.value)/100||1,O=parseInt(F.value)||0;k(!C.checked,null!=P?P.checked:!1,null!=R?R.checked:!1,U,O)}),null,d,g);this.showDialog(d.container,300,(u?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,m,u,x,A,I,F){A=null!=A?A:Editor.defaultIncludeDiagram;
-var C=document.createElement("div");C.style.whiteSpace="nowrap";var P=this.editor.graph,R="jpeg"==I||"webp"==I?220:320,U=document.createElement("h3");mxUtils.write(U,d);U.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";C.appendChild(U);mxUtils.write(C,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%";C.appendChild(O);mxUtils.write(C,mxResources.get("borderWidth")+":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight="16px";V.style.width="60px";V.style.marginLeft="4px";V.value=this.lastExportBorder||"0";C.appendChild(V);mxUtils.br(C);var q=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,P.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled",
-"disabled");y.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(U=0;U<d.length;U++)if(!P.isSelectionEmpty()||"selectionOnly"!=d[U]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[U]));J.setAttribute("value",d[U]);D.appendChild(J)}F?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(D),mxUtils.br(C),R+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==
-D.value&&(q.checked=!0)})):x&&(C.appendChild(y),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),R+=30,mxEvent.addListener(q,"change",function(){q.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));P.isSelectionEmpty()?F&&(q.style.display="none",q.nextSibling.style.display="none",q.nextSibling.nextSibling.style.display="none",R-=30):(D.value="diagram",y.setAttribute("checked","checked"),y.defaultChecked=!0,mxEvent.addListener(q,"change",function(){D.value=q.checked?
-"selectionOnly":"diagram"}));var L=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));K.appendChild(x);F=document.createElement("option");F.setAttribute("value","dark");mxUtils.write(F,mxResources.get("dark"));K.appendChild(F);"svg"==I&&mxUtils.lightDarkColorSupported?
-(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),K.appendChild(x)):Editor.isDarkMode()?F.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(K);mxUtils.br(C);R+=26;var n=this.addCheckbox(C,mxResources.get("shadow"),P.shadowVisible),z=null;if("png"==I||"jpeg"==I||"webp"==I)z=this.addCheckbox(C,mxResources.get("grid"),
-!1,this.isOffline()||!this.canvasSupported,!1,!0),R+=30;var G=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+":",A,null,null,"jpeg"!=I&&"webp"!=I),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==I||"svg"==I?(A=function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},P=document.createElement("option"),P.setAttribute("value","allPages"),mxUtils.write(P,mxResources.get("allPages")),M.appendChild(P),P=document.createElement("option"),
-P.setAttribute("value","currentPage"),mxUtils.write(P,mxResources.get("currentPage")),M.appendChild(P),G.style.marginBottom="12px",M.style.marginBottom="16px",C.appendChild(M),mxUtils.br(C),R+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(G,"change",A),A()):G.style.marginBottom="16px";var N=document.createElement("input");N.style.marginBottom="16px";N.style.marginRight="8px";N.setAttribute("type","checkbox");var Q=document.createElement("input");Q.style.marginBottom=
-"16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");g&&(N.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,C.appendChild(N),mxUtils.write(C,mxResources.get("embedImages")),mxUtils.br(C),Q.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(Q),mxUtils.write(C,mxResources.get("embedFonts")),mxUtils.br(C),R+=50);var S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value",
-"auto");mxUtils.write(x,mxResources.get("automatic"));S.appendChild(x);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));S.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));S.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+
-":"),C.appendChild(S),C.appendChild(A),mxUtils.br(C),mxUtils.br(C),R+=50);k=new CustomDialog(this,C,mxUtils.bind(this,function(){this.lastExportBorder=V.value;this.lastExportZoom=O.value;this.lastEmbedImages=N.checked;this.lastEmbedFonts=Q.checked;this.lastEmbedInclude=M.value;u(O.value,L.checked,!q.checked,n.checked,G.checked,N.checked&&g,V.value,y.checked,("png"==I||"svg"==I)&&"currentPage"==M.value,S.value,null!=z?z.checked:null,null!=K?K.value:null,D.value,Q.checked)}),null,k,m);this.showDialog(k.container,
-340,R,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,m,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var I=document.createElement("h3");mxUtils.write(I,g);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(I)}var F=this.addCheckbox(x,mxResources.get("fit"),
-!0),C=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&m,!m),P=this.addCheckbox(x,k),R=this.addCheckbox(x,mxResources.get("lightbox"),!0),U=this.addEditButton(x,R),O=U.getEditInput(),V=1<A.model.getChildCount(A.model.getRoot()),q=this.addCheckbox(x,mxResources.get("layers"),V,!V);q.style.marginLeft=O.style.marginLeft;q.style.marginBottom="12px";q.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?(V&&q.removeAttribute("disabled"),O.removeAttribute("disabled")):
-(q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&R.checked?U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(F.checked,C.checked,P.checked,R.checked,U.getLink(),q.checked)}),null,mxResources.get("embed"),u);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,m,u,x,A,I){function F(O){var V=" ",q="";m&&(V=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=P?"&page="+P:"")+(u?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");d&&(q+="max-width:100%;");var y="";k&&(y=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');A('<img src="'+O+'"'+y+(""!=q?' style="'+q+'"':"")+V+"/>")}var C=this.editor.graph.getGraphBounds(),P=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var V=m?this.getFileData(!0):null;O=
-this.createImageDataUri(O,V,"png");F(O)}),null,null,null,mxUtils.bind(this,function(O){I({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),C.width*C.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var R="";k&&(R="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var U=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+R+"&xml="+encodeURIComponent(g));U.send(mxUtils.bind(this,function(){200<=U.getStatus()&&
-299>=U.getStatus()?F("data:image/png;base64,"+U.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,m,u,x,A){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),F=I.getElementsByTagName("a");if(null!=F)for(var C=0;C<F.length;C++){var P=F[C].getAttribute("href");null!=P&&"#"==P.charAt(0)&&"_blank"==F[C].getAttribute("target")&&F[C].removeAttribute("target")}m&&
-I.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(I);if(k){var R=" ",U="";m&&(R="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"+(u?"&edit=_blank":"")+(x?"&layers=1":
-"")+"');}})(this);\"",U+="cursor:pointer;");d&&(U+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(O){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=U?' style="'+U+'"':"")+R+"/>")}))}else U="",m&&(g=this.getSelectedPageIndex(),I.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('"+
+A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var n=k.lastIndexOf(".");0<=n&&(d=k.substring(n),k=k.substring(0,n));if(g){g=k;var u=new Date;k=u.getFullYear();n=u.getMonth()+1;var x=u.getDate(),A=u.getHours(),I=u.getMinutes();u=u.getSeconds();k=g+(" "+(k+"-"+n+"-"+x+"-"+A+"-"+I+"-"+u))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=
+function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=n&&(n.removeListener(this.descriptorChangedListener),this.logIfModified(n,!0),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var x=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=n&&
+this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();g||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=d)try{this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",
+this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?d.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=k&&k();this.editor.fireEvent(new mxEventObject("fileLoaded"));u=!0;if(!this.isOffline()&&null!=d.getMode()){var A="1"==urlParams.sketch?"sketch":
+uiTheme;if(null==A)A="default";else if("sketch"==A||"min"==A)A+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+A})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),
+title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(G){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=n?this.fileLoaded(n)||x():x()});g?d():(null!=I.fallbackFileData&&(I.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
+function(){this.hideDialog();var G=new LocalFile(this,I.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(G)})}),this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return u};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,n=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");n.root=d[x].root;
+var I=u.encode(n);this.editor.graph.saveViewState(d[x].viewState,I,!0);I.removeAttribute("pageWidth");I.removeAttribute("pageHeight");A.appendChild(I);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(A,function(G,C,P,R){return!R||"mxGeometry"!=G.nodeName&&"mxPoint"!=G.nodeName||"x"!=C&&"y"!=C&&"width"!=C&&"height"!=C?R&&"mxCell"==G.nodeName&&"previous"==C?null:P:Math.round(P)},g)<<0}return k};EditorUi.prototype.hashValue=
+function(d,g,k){var n=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(n^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var u=0;u<d.attributes.length;u++){var x=d.attributes[u].name,A=null!=g?g(d,x,d.attributes[u].value,!0):d.attributes[u].value;null!=A&&(n^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(u=0;u<d.childNodes.length;u++)n=
+(n<<5)-n+this.hashValue(d.childNodes[u],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(u=0;u<d.length;u++)g=(g<<5)-g+d.charCodeAt(u)<<0;n^=g}return n};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,n,u,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
+(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var k=g.createElement("mxlibrary");
+mxUtils.setTextContent(k,JSON.stringify(d,null,2));g.appendChild(k);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};
+EditorUi.prototype.repositionLibrary=function(d,g){var k=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=d||!g){null==d&&(g=this.sidebar.palettes["L.scratchpad"],null==g&&(g=this.sidebar.palettes.search),null!=g&&(d=g[g.length-1].nextSibling));d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var n=g.previousSibling;k.insertBefore(g,d);k.insertBefore(n,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==
+k.documentElement.nodeName){var n=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,n,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,n){if(null!=this.sidebar){d.constructor!=LocalLibrary&&
+mxSettings.addCustomLibrary(d.getHash());var u=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],this.openLibraries);break}u={file:d,images:g,title:k,expand:n};this.openLibraries.push(u)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());
+var A=null,I=mxUtils.bind(this,function(D,J){0==D.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),J.appendChild(A)):this.addLibraryEntries(D,J)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var G=this.sidebar.addPalette(d.getHash(),k,null!=n?n:!0,mxUtils.bind(this,function(D){I(g,D)}));null!=u&&
+(u.div=G);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());n=G.parentNode.previousSibling;k=n.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&n.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var C=document.createElement("div");C.style.backgroundColor="inherit";n.style.position="relative";var P=document.createElement("img");P.className="geLibraryButton";P.setAttribute("src",Editor.crossImage);P.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=
+d.title||this.closableScratchpad)C.appendChild(P),mxEvent.addListener(P,"click",mxUtils.bind(this,function(D){if(!mxEvent.isConsumed(D)){var J=mxUtils.bind(this,function(){null!=u&&mxUtils.remove(u,this.openLibraries);this.closeLibrary(d)});null!=R?this.confirm(mxResources.get("allChangesLost"),null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):J();mxEvent.consume(D)}}));if(d.isEditable()){var U=this.editor.graph,N=null;k=mxUtils.bind(this,function(D){this.showLibraryDialog(d.getTitle(),
+G,g,d,d.getMode());mxEvent.consume(D)});var V=mxUtils.bind(this,function(D){d.setModified(!0);d.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=P.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",C.insertBefore(N,C.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N)})):
+null==R&&(R=P.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),C.insertBefore(R,C.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(J){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==R||d.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(J)})))}),q=mxUtils.bind(this,function(D,J,L,K){D=U.cloneCells(mxUtils.sortCells(U.model.getTopmostCells(D)));for(var m=0;m<D.length;m++){var z=
+U.getCellGeometry(D[m]);null!=z&&z.translate(-J.x,-J.y)}G.appendChild(this.sidebar.createVertexTemplateFromCells(D,J.width,J.height,K||"",!0,null,!1));D=mxUtils.getXml(this.editor.graph.encodeCells(D));Editor.defaultCompressed&&(D=Graph.compress(D));J={xml:D,w:J.width,h:J.height};null!=K&&(J.title=K);g.push(J);V(L);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),y=mxUtils.bind(this,function(D){if(U.isSelectionEmpty())U.getRubberband().isActive()?(U.getRubberband().execute(D),
+U.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var J=U.getSelectionCells(),L=U.view.getBounds(J);if(null!=L&&0<L.width&&0<L.height){var K=U.view.scale;L.x/=K;L.y/=K;L.width/=K;L.height/=K;L.x-=U.view.translate.x;L.y-=U.view.translate.y;q(J,L)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(D)});mxEvent.addGestureListeners(G,function(){},mxUtils.bind(this,
+function(D){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler.first&&(U.graphHandler.suspend(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility="hidden"),G.style.backgroundColor="light-dark(#fefefe, #000000)",G.style.cursor="copy",U.panningManager.stop(),U.autoScroll=!1,mxEvent.consume(D))}),mxUtils.bind(this,function(D){U.isMouseDown&&null!=U.panningManager&&null!=U.graphHandler&&(G.style.backgroundColor="",G.style.cursor="default",this.sidebar.showTooltips=!0,U.panningManager.stop(),
+U.graphHandler.reset(),U.isMouseDown=!1,U.autoScroll=!0,y(D),mxEvent.consume(D))}));mxEvent.addListener(G,"mouseleave",mxUtils.bind(this,function(D){U.isMouseDown&&null!=U.graphHandler.first&&(U.graphHandler.resume(),null!=U.graphHandler.hint&&(U.graphHandler.hint.style.visibility="visible"),G.style.backgroundColor="",G.style.cursor="",U.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(D){G.style.backgroundColor="light-dark(#fefefe, #000000)";D.dataTransfer.dropEffect=
+"copy";G.style.cursor="copy";this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(D){G.style.cursor="";G.style.backgroundColor="";0<D.dataTransfer.files.length&&this.importFiles(D.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(J,L,K,m,z,F,M,O,Q){if(null!=J&&"image/"==L.substring(0,6))J="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(J),J=[new mxCell("",
+new mxGeometry(0,0,z,F),J)],J[0].vertex=!0,q(J,new mxRectangle(0,0,z,F),D,mxEvent.isAltDown(D)?null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var S=!1,T=mxUtils.bind(this,function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));
+I(Z,G);g=g.concat(Z);V(D);this.spinner.stop();S=!0}catch(ia){}else if("mxfile"==W.documentElement.nodeName)try{var Y=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<Y.length;Z++){var ba=this.stringToCells(Editor.getDiagramNodeXml(Y[Z])),da=this.editor.graph.getBoundingBoxFromGeometry(ba);null!=da&&q(ba,new mxRectangle(0,0,da.width,da.height),D)}S=!0}catch(ia){null!=window.console&&console.log("error in drop handler:",ia)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)});null!=Q&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(Q,function(W){T(W,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,M)&&null!=Q?this.isExternalDataComms()?this.parseFile(Q,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?T(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):T(J,L)}}));D.stopPropagation();D.preventDefault()})),mxEvent.addListener(G,"dragleave",function(D){G.style.cursor="";G.style.backgroundColor="";D.stopPropagation();D.preventDefault()}));P=P.cloneNode(!1);P.setAttribute("src",Editor.editImage);P.setAttribute("title",mxResources.get("edit"));C.insertBefore(P,C.firstChild);mxEvent.addListener(P,"click",k);k=P.cloneNode(!1);
+k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));C.insertBefore(k,C.firstChild);mxEvent.addListener(k,"click",y);".scratchpad"==d.title&&(this.addSelectionToScratchpad=y);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),k.className="geLibraryButton",C.insertBefore(k,C.firstChild))}n.appendChild(C);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
+function(d,g){for(var k=0;k<d.length;k++)try{var n=d[k],u=n.data;if(null!=u){u="data:"==u.substring(0,5)?this.convertDataUri(u):u;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==n.aspect&&(x+="aspect=fixed;");x=x+"image="+u+";";null!=n.style&&(x+=n.style);g.appendChild(this.sidebar.createVertexTemplate(x,n.w,n.h,"",n.title||"",!1,null,!0))}else if(null!=n.xml){var A=this.stringToCells("<"==n.xml.charAt(0)?n.xml:Graph.decompress(n.xml)),I=0==A.length?mxResources.get("drawingEmpty"):
+null!=n.title?n.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,n.w,n.h,I,!0,null,!0))}}catch(G){I=null!=G.message?mxResources.get("error")+": "+G.message:String(G),x=this.sidebar.createVertexTemplateFromCells(null,n.w,n.h,I,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||
+window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,n,u,x,A){d=new ImageDialog(this,d,g,k,n,u,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,n,u,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,
+function(I){if(null!=I)try{if(null!=x&&x(I),I==A)this.hideDialog();else{if(0<I.length){var G=JSON.parse(I);localStorage.setItem(g,JSON.stringify(G))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(C){this.handleError(C)}}),null,mxResources.get("close"),null,null,null,!0,null,null,u,k,n);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,n){d=null!=d?d:mxUtils.bind(this,function(u,
+x,A,I){x||(u=new ChangePageSetup(this,n?A:null,u),u.ignoreColor=!n,null!=I&&n&&(u.shadowVisible=I),this.editor.graph.model.execute(u))});d=new BackgroundImageDialog(this,d,g,k,n);this.showDialog(d.container,400,n?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,n,u){d=new LibraryDialog(this,d,g,k,n,u);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;
+EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,n,u,x,A){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},G=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&
+null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(U){}if(null!=G||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var C=mxResources.get("ok"),P=null;g=null!=g?g:mxResources.get("error");if(null!=G){null!=G.retry&&(C=mxResources.get("cancel"),P=function(){I();G.retry()});if(404==G.code||404==G.status||403==G.code){A=403==G.code?null!=G.message?mxUtils.htmlEntities(G.message,
+!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=u?u:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var R=null!=u?null:null!=x?x:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.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==G.code||404==G.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=n&&n()}),P,mxResources.get("changeUser"),mxUtils.bind(this,function(){function U(){y.innerText="";for(var D=0;D<N.length;D++){var J=document.createElement("option");mxUtils.write(J,
+N[D].displayName);J.value=D;y.appendChild(J);J=document.createElement("option");J.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(J,"<"+N[D].email+">");J.setAttribute("disabled","disabled");y.appendChild(J)}J=document.createElement("option");mxUtils.write(J,mxResources.get("addAccount"));J.value=N.length;y.appendChild(J)}var N=this.drive.getUsersList(),V=document.createElement("div"),q=document.createElement("div");q.style.marginBottom="6px";mxUtils.write(q,mxResources.get("changeUser")+": ");V.appendChild(q);
+var y=document.createElement("select");y.style.width="100%";U();mxEvent.addListener(y,"change",mxUtils.bind(this,function(){var D=y.value,J=N.length!=D;J&&this.drive.setUser(N[D]);this.drive.authorize(J,mxUtils.bind(this,function(){J||(N=this.drive.getUsersList(),U())}),mxUtils.bind(this,function(L){this.handleError(L)}),!0)}));V.appendChild(y);V=new CustomDialog(this,V,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(V.container,300,100,!0,!0)}),mxResources.get("cancel"),
+mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=G.message?A=""==G.message&&null!=G.name?mxUtils.htmlEntities(G.name,!1):mxUtils.htmlEntities(G.message,!1):null!=G.response&&null!=G.response.error?A=mxUtils.htmlEntities(G.response.error,!1):"undefined"!==typeof window.App&&(G.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):G.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof G&&0<G.length&&(A=
+mxUtils.htmlEntities(G,!1)))}u=d=null;null!=G&&null!=G.helpLink?(d=mxResources.get("help"),u=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+G.ownerEmail+")",!1),u=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))})):null!=G&&null!=G.alternateAction&&(d=G.alternateAction.label,u=G.alternateAction.funct);this.showError(g,A,C,
+k,P,null,null,d,u,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,n,u,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},
+n,u,null,null,null,null,I);this.showDialog(d.container,340,46+I,!0,x);d.init()};EditorUi.prototype.showBanner=function(d,g,k,n,u,x,A,I,G){x=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){A=null!=A?A:"translate(-50%,120%)";I=null!=I?I:"translate(-50%,0%)";var C=u?500:1E3,P=document.createElement("div");P.className="geBtn gePrimaryBtn geBanner"+(u?" geSmallBanner":"");P.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(P.style,
+"transform",A);mxUtils.setPrefixedStyle(P.style,"transition","all "+C+"ms ease");null!=G&&mxUtils.setPrefixedStyle(P.style,"transform-origin",G);if(!u){var R=document.createElement("img");R.setAttribute("src",IMAGE_PATH+"/logo.png");R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";P.appendChild(R);R=document.createElement("img");R.setAttribute("src",Dialog.prototype.closeImage);R.setAttribute("title",
+mxResources.get(n?"doNotShowAgain":"close"));R.setAttribute("border","0");R.style.cssText=(u?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";P.appendChild(R)}mxUtils.write(P,g);document.body.appendChild(P);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var U=document.createElement("input");
+U.setAttribute("type","checkbox");U.setAttribute("id","geDoNotShowAgainCheckbox");U.style.marginRight="6px";if(!n){g.appendChild(U);var N=document.createElement("label");N.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(N,mxResources.get("doNotShowAgain"));g.appendChild(N);P.style.paddingBottom=u?"16px":"30px";P.appendChild(g)}var V=mxUtils.bind(this,function(){null!=P.parentNode&&(P.parentNode.removeChild(P),this.bannerShowing=!1,U.checked||n)&&(this["hideBanner"+d]=!0,isLocalStorage&&
+null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=R&&mxEvent.addListener(R,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);V()}));var q=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,"transform",A);window.setTimeout(mxUtils.bind(this,function(){V()}),C)});mxEvent.addListener(P,"click",mxUtils.bind(this,function(y){var D=mxEvent.getSource(y);D!=U&&D!=N?(null!=k&&k(),V(),mxEvent.consume(y)):q()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(P.style,"transform",I)}),C/2);window.setTimeout(q,u?4E3:3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,n){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,
+"tEXt","mxfile",encodeURIComponent(g))),0<n&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",n));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,n,u){var x="jpeg"==k?"jpg":k;n=this.getBaseFilename(n)+(null!=g?".drawio":"")+"."+x;d=this.createImageDataUri(d,g,k,u);this.saveData(n,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&
+"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,n,u,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||
+/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=n?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,
+k,n);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var I=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);x=65==(I?parseInt(I[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(n?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},
+2E4),A.click(),A.parentNode.removeChild(A)}catch(G){}}else this.createEchoRequest(d,g,k,n,u).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,n,u,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=k?"&mime="+k:"")+(null!=u?"&format="+u:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(n?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,n,u,x,A,I){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=u&&(!mxClient.IS_IOS||
+!navigator.standalone);var G=mxUtils.bind(this,function(P,R,U,N){try{if("_blank"==R)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var V=new EmbedDialog(this,d);this.showDialog(V.container,450,240,!0,!0);V.init()}else{var q=window.open("about:blank");null==q?mxUtils.popup(d,!0):(q.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),q.document.close())}else if(R==App.MODE_DEVICE||"download"==R)this.doSaveLocalFile(d,P,k,n,
+null,I);else if(null!=P&&0<P.length){var y=mxUtils.bind(this,function(D){try{this.exportFile(d,P,k,n,R,D)}catch(J){this.handleError(J)}});null!=N?y(N):this.pickFolder(R,y)}}catch(D){this.handleError(D)}});u=[];x||u.push(App.MODE_BROWSER);A||u.push("_blank");var C=new SaveDialog(this,g,mxUtils.bind(this,function(P,R,U){G(P.value,R,P,U);this.hideDialog(null,null,C.container)}),u,d,k,n);this.showDialog(C.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.openInNewWindow=
+function(d,g,k){var n=window.open("about:blank");if(null==n||null==n.document)mxUtils.popup(d,!0);else{var u="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;""!=x&&(u="background: "+x+";")}u='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+u+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),n.document.write(u+
+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):n.document.write(u+d+"</body></html>"):n.document.write(u+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");n.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=
+function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(n){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.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,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 u=g.getBoundingClientRect();this.tagsDialog.style.left=u.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=u.zIndex;document.body.appendChild(this.tagsDialog);
+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(n)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var n=this.editor.graph.getAllTags();g.style.display=0<n.length?"":"none"}))}c.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var k=d(mxUtils.bind(this,function(n){var u=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",u);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)u.apply(this);else{this.exportDialog=document.createElement("div");var x=k.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
+"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=x.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=x.zIndex;var A=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",u);this.editor.exportToCanvas(mxUtils.bind(this,function(I){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var G=this.createImageDataUri(I,null,"png");I=document.createElement("img");I.style.maxWidth="140px";I.style.maxHeight="140px";
+I.style.cursor="pointer";I.style.backgroundColor="white";I.setAttribute("title",mxResources.get("openInNewWindow"));I.setAttribute("border","0");I.setAttribute("src",G);this.exportDialog.appendChild(I);mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.openInNewWindow(G.substring(G.indexOf(",")+1),"image/png",!0);u.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(I){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);this.handleError(I)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(n)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,n,u){this.isLocalFileSave()?this.saveLocalFile(k,d,n,u,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,n,u,g,A)}),k,u,n)};EditorUi.prototype.saveRequest=function(d,g,k,n,u,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var I=mxUtils.bind(this,
+function(C,P,R,U){if("_blank"==P||null!=C&&0<C.length){var N=k("_blank"==P?null:C,P==App.MODE_DEVICE||"download"==P||null==P||"_blank"==P?"0":"1");null!=N&&(P==App.MODE_DEVICE||"download"==P||"_blank"==P?N.simulate(document,"_blank"):(R=mxUtils.bind(this,function(V){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=n)try{this.exportFile(n,C,x,!0,P,V)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),C,x,!0,P,V)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}))}),null!=U?R(U):this.pickFolder(P,R)))}});u=[App.MODE_BROWSER];A||u.push("_blank");var G=new SaveDialog(this,d,mxUtils.bind(this,function(C,P,R){I(C.value,P,C,R);this.hideDialog(null,null,G.container)}),u,null,"application/pdf");this.showDialog(G.container,
+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,n,u,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,n,u,x,
+A,I,G,C,P,R,U,N){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(d,g,k,n,u,x,A,I,G,C,P,R,U,N)}));this.handleError(O)})))try{var V=this.editor.graph.isSelectionEmpty();k=null!=k?k:V;var q=g?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&0==g&&(q=this.editor.graph.shapeBackgroundColor);var y=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var D=mxUtils.lightDarkColorSupported,J=mxUtils.preferDarkColor;if("light"==P||"dark"==P)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==P;var L=this.editor.graph.createSvgImageExport(u),K=this.editor.graph.getSvg(q,d,A,I,null,k,null,L,"blank"==C?"_blank":"self"==C?"_top":null,null,!U,P,R);mxUtils.lightDarkColorSupported=D;mxUtils.preferDarkColor=J;this.editor.graph.addForeignObjectWarning=y;n&&this.editor.graph.addSvgShadow(K);
+var m=this.getBaseFilename()+(u?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(O)}))});var z=mxUtils.bind(this,function(O){this.spinner.stop();u&&O.setAttribute("content",this.getFileData(!0,null,null,null,k,G,null,null,null,null,null,d,A));N(Graph.xmlDeclaration+
+"\n"+(u?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(K);var F=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&U?this.replaceAlternateContent(O,P,z):z(O)}),M=mxUtils.bind(this,function(O){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,F,this.thumbImageCache)):F(O)});U?this.embedFonts(K,
+M):(this.editor.addFontCss(K),M(K))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function n(R,U,N,V,q){var y=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");y.setAttribute("x",U);y.setAttribute("y",N+.5);y.setAttribute("width",V.width);y.setAttribute("height",V.height);null==y.setAttributeNS?y.setAttribute("xlink:href",q):y.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",q);R.replaceChild(y,R.lastChild);I()}function u(){if(A<P.length)P[A++](u)}
+var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var I=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),G={},C={},P=[];for(A=0;A<g.length;A++)mxUtils.bind(this,function(R){var U=R.getElementsByTagName("div");if(0<U.length)try{var N=U[0].cloneNode(!0),V=parseInt(N.style.marginLeft),q=parseInt(N.style.paddingTop),y=N.getElementsByTagName("div")[1],D=U=!1,J=N.style.alignItems,L=N.style.justifyContent;
+if(null!=N.style.writingMode){var K=N.style.writingMode;D="vertical-"==K.substring(0,9);U="-rl"==K.substring(K.length-3)}var m=!D&&"1px"==N.style.width||D&&"1px"==N.style.height;if(!D&&"1px"==N.style.height||D&&"1px"==N.style.width)N.style.alignItems=D&&U?"unsafe flex-end":"unsafe flex-start";m&&(N.style.justifyContent="unsafe flex-start");N.style.paddingTop="";N.style.marginLeft="";var z=N.outerHTML,F=G[z];null==F&&(N.style.position="absolute",N.style.visibility="hidden",document.body.appendChild(N),
+K=1,K="1px"==N.style.width?y.offsetWidth:parseInt(N.style.width),m=1,m="1px"==N.style.height?y.offsetHeight:parseInt(N.style.height),document.body.removeChild(N),F=new mxRectangle(V,q,K,m),G[z]=F);"1px"==N.style.height&&("unsafe center"==J?q-=F.height/2:"unsafe flex-end"==J&&(q-=F.height));if("1px"==N.style.width)if(!D&&"unsafe center"==L||D&&"unsafe center"==J)V-=F.width/2;else if(!D&&"unsafe flex-end"==L||D&&(!U&&"unsafe flex-end"==J||U&&"unsafe flex-start"==J))V-=F.width;F=new mxRectangle(V,q,
+F.width,F.height+parseInt(y.style.fontSize)/4);P.push(mxUtils.bind(this,function(M){var O=C[z];null==O?Graph.htmlToPng(z,F.width,F.height,mxUtils.bind(this,function(Q){n(R,V,q,F,Q);C[z]=Q;M()}),x):(n(R,V,q,F,O),M())}))}catch(M){I()}else I()})(g[A]);0==counter&&k(d);A=0;u()};EditorUi.prototype.addRadiobox=function(d,g,k,n,u,x,A){return this.addCheckbox(d,k,n,u,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,n,u,x,A,I){x=null!=x?x:!0;var G=document.createElement("input");G.style.marginRight=
+"8px";G.style.marginTop="16px";G.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();G.id=A;null!=I&&G.setAttribute("name",I);k&&(G.setAttribute("checked","checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");x&&(d.appendChild(G),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),u||mxUtils.br(d));return G};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);
+k.style.marginLeft="24px";var n=this.getCurrentFile(),u="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(u=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));x.appendChild(n);var A=document.createElement("option");A.setAttribute("value",
+"custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var I=new FilenameDialog(this,u,mxResources.get("ok"),function(G){null!=G?(u=G,A.setAttribute("title",G)):(x.value="blank",A.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
+function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":u:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var I=document.createElement("div");I.style.width="100%";I.style.height="100%";I.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(I.style.border="1px solid black",
+I.style.backgroundColor=x):(I.style.backgroundPosition="center center",I.style.backgroundRepeat="no-repeat",I.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(I)}mxUtils.write(d,mxResources.get("links")+":");var n=document.createElement("select");n.style.width="100px";n.style.padding="0px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));
+n.appendChild(u);u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("openInNewWindow"));n.appendChild(u);u=document.createElement("option");u.setAttribute("value","self");mxUtils.write(u,mxResources.get("openInThisWindow"));n.appendChild(u);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),n.appendChild(g));d.appendChild(n);mxUtils.write(d,mxResources.get("borderColor")+
+":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(I){this.pickColor(x||"none",function(G){x=G;k()});mxEvent.consume(I)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return n.value},
+focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,n,u,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=n&&0<n.length&&x.push("edit="+encodeURIComponent(n)),u&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,n,u,x,A,I,G,C,P,R,U){var N=this.getCurrentFile();G=this.createUrlParameters(d,
+g,n,u,x,G);d=!0;null!=A?k="#U"+encodeURIComponent(A):I||null==N||""==N.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+N.getHash(),d=!1);d&&null!=N&&null!=N.getTitle()&&N.getTitle()!=this.defaultFilename&&G.push("title="+encodeURIComponent(N.getTitle()));C&&1<k.length&&(G.push("open="+k.substring(1)),k="");P&&null!=this.currentPage&&G.push("page-id="+this.currentPage.getId());R&&G.push("transparent=1");
+null!=U&&G.push("dark="+U);return(n&&(null!=A||null!=N&&N.getMode()!=App.MODE_GITHUB&&N.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<G.length?"?"+G.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,n,u,x,A,I,G,C,P,R,U){this.getBasenames();var N={};""!=u&&u!=mxConstants.NONE&&(N.highlight=u);"auto"!==n&&(N.target=n);C||(N.lightbox=
+!1);N.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(N.zoom=k/100);k=[];A&&(k.push("pages"),N.resize=!0,null!=this.pages&&null!=this.currentPage&&(N.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),N.resize=!0);I&&k.push("layers");G&&k.push("tags");null!=U&&(N["dark-mode"]=U);0<k.length&&(C&&k.push("lightbox"),N.toolbar=k.join(" "));null!=P&&0<P.length&&(N.edit=P);null!=d?N.url=d:N.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+
+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(N))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";R(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,n){var u=document.createElement("div");u.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";u.appendChild(x);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var I=document.createElement("input");I.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+I.setAttribute("value","url");I.setAttribute("type","radio");I.setAttribute("name","type-embedhtmldialog");x=I.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var G=document.createElement("span");mxUtils.write(G,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(G);mxUtils.br(A);A.appendChild(I);G=document.createElement("span");mxUtils.write(G,mxResources.get("publicDiagramUrl"));A.appendChild(G);var C=this.getCurrentFile();null==k&&null!=C&&C.constructor==window.DriveFile&&(G=
+document.createElement("a"),G.style.paddingLeft="12px",G.style.color="gray",G.style.cursor="pointer",mxUtils.write(G,mxResources.get("share")),A.appendChild(G),mxEvent.addListener(G,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(C.getId(),C)})));x.setAttribute("checked","checked");null==k&&I.setAttribute("disabled","disabled");u.appendChild(A);A=380;var P=this.addLinkSection(u),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";
+R.style.marginTop="16px";G=document.createElement("option");G.setAttribute("value","light");mxUtils.write(G,mxResources.get("light"));R.appendChild(G);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));R.appendChild(G);G=document.createElement("option");G.setAttribute("value","auto");mxUtils.write(G,mxResources.get("automatic"));G.setAttribute("selected","selected");R.appendChild(G);G.setAttribute("selected","selected");mxUtils.write(u,mxResources.get("appearance")+
+":");u.appendChild(R);mxUtils.br(u);A+=26;var U=this.addCheckbox(u,mxResources.get("zoom"),!0,null,!0);mxUtils.write(u,":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value="100%";u.appendChild(N);var V=this.addCheckbox(u,mxResources.get("fit"),!0);G=null!=this.pages&&1<this.pages.length;var q=q=this.addCheckbox(u,mxResources.get("allPages"),G,!G),y=this.addCheckbox(u,mxResources.get("layers"),
+!0),D=this.addCheckbox(u,mxResources.get("tags"),!0),J=this.addCheckbox(u,mxResources.get("lightbox"),!0),L=null;if(EditorUi.enableHtmlEditOption){L=this.addEditButton(u,J);var K=L.getEditInput();K.style.marginBottom="16px";A+=50;mxEvent.addListener(J,"change",function(){J.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&J.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,u,mxUtils.bind(this,
+function(){n(I.checked?k:null,U.checked,N.value,P.getTarget(),P.getColor(),V.checked,q.checked,y.checked,D.checked,J.checked,null!=L?L.getLink():null,null!=R?R.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,n,u,x,A,I,G,C,P){var R=document.createElement("div");R.style.whiteSpace="nowrap";var U=document.createElement("h3");mxUtils.write(U,d||mxResources.get("publish"));U.style.width="100%";U.style.textAlign="center";
+U.style.marginTop="2px";U.style.marginBottom="20px";R.appendChild(U);var N=document.createElement("select");d=30;N.className="geBtn";N.style.marginBottom="8px";N.style.marginLeft="0px";N.style.width="100%";N.style.boxSizing="border-box";if(null==I||""==I.getHash())u=null!=u?u:"https://www.drawio.com/doc/faq/publish-diagram-as-link",U=document.createElement("option"),mxUtils.write(U,mxResources.get("makeCopy")),U.setAttribute("value","copy"),N.appendChild(U);U=document.createElement("option");mxUtils.write(U,
+mxResources.get("authorizationRequired"));U.setAttribute("value","auth");N.appendChild(U);null!=I&&""!=I.getHash()||U.setAttribute("disabled","disabled");I=document.createElement("option");I.setAttribute("value","public");N.appendChild(I);null!=A?(mxUtils.write(I,mxResources.get("publicDiagramUrl")),I.setAttribute("title",A),N.value="public"):(mxUtils.write(I,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),I.setAttribute("disabled","disabled"));R.appendChild(N);
+mxUtils.br(R);N.focus();var V=null,q=null;if(null!=g||null!=k)d+=30,mxUtils.write(R,mxResources.get("width")+":"),V=document.createElement("input"),V.setAttribute("type","text"),V.style.marginRight="16px",V.style.width="50px",V.style.marginLeft="6px",V.style.marginRight="16px",V.style.marginBottom="10px",V.value="100%",R.appendChild(V),mxUtils.write(R,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom=
+"10px",q.value=k+"px",R.appendChild(q),mxUtils.br(R);var y=this.addLinkSection(R,n),D=C?this.addCheckbox(R,mxResources.get("transparentBackground"),!1):null;null!=D&&(d+=20);var J=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),J=this.addCheckbox(R,mxResources.get("selectedPage")+": "+g));var L=document.createElement("select");L.style.maxWidth="260px";L.style.marginLeft=
+"8px";L.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));L.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");L.appendChild(g);P&&(mxUtils.write(R,mxResources.get("appearance")+":"),R.appendChild(L),
+mxUtils.br(R),d+=30);var K=this.addCheckbox(R,mxResources.get("lightbox"),!0,null,null,!n),m=this.addEditButton(R,K),z=m.getEditInput();n&&(z.style.marginLeft=K.style.marginLeft,K.style.display="none",d-=20);var F=this.addCheckbox(R,mxResources.get("layers"),!0);F.style.marginLeft=z.style.marginLeft;F.style.marginTop="8px";var M=this.addCheckbox(R,mxResources.get("tags"),!0);M.style.marginLeft=z.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(K,"change",function(){K.checked?
+(F.removeAttribute("disabled"),z.removeAttribute("disabled"),M.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));z.checked&&K.checked?m.getEditSelect().removeAttribute("disabled"):m.getEditSelect().setAttribute("disabled","disabled")});n=new CustomDialog(this,R,mxUtils.bind(this,function(){G(y.getTarget(),y.getColor(),null==J?!1:J.checked,K.checked,m.getLink(),F.checked,null!=V?V.value:null,null!=q?q.value:
+null,M.checked,N.value,null!=D?D.checked:!1,L.value)}),null,mxResources.get("create"),u,x);this.showDialog(n.container,340,296+d,!0,!0);null!=V?(V.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?V.select():document.execCommand("selectAll",!1,null)):null==N.parentNode;y.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,n,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:"+(u?"10":"4")+"px";x.appendChild(A);if(u){mxUtils.write(x,mxResources.get("zoom")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value=this.lastExportZoom||"100%";x.appendChild(I);mxUtils.write(x,mxResources.get("borderWidth")+":");var G=document.createElement("input");G.setAttribute("type","text");G.style.marginRight=
+"16px";G.style.width="60px";G.style.marginLeft="4px";G.value=this.lastExportBorder||"0";x.appendChild(G);mxUtils.br(x)}var C=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),P=n?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var R=n?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=R&&(R.style.marginBottom="16px");
+d=new CustomDialog(this,x,mxUtils.bind(this,function(){var U=parseInt(I.value)/100||1,N=parseInt(G.value)||0;k(!C.checked,null!=P?P.checked:!1,null!=R?R.checked:!1,U,N)}),null,d,g);this.showDialog(d.container,300,(u?25:0)+(n?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,n,u,x,A,I,G){A=null!=A?A:Editor.defaultIncludeDiagram;var C=document.createElement("div");C.style.whiteSpace="nowrap";var P=this.editor.graph,R="jpeg"==I||"webp"==I?220:320,U=document.createElement("h3");mxUtils.write(U,
+d);U.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";C.appendChild(U);mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var V=document.createElement("input");V.setAttribute("type","text");V.style.marginRight=
+"16px";V.style.width="60px";V.style.marginLeft="4px";V.value=this.lastExportBorder||"0";C.appendChild(V);mxUtils.br(C);var q=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,P.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");var D=document.createElement("select");D.style.marginTop="16px";D.style.marginLeft="8px";d=["selectionOnly","diagram",
+"page"];for(U=0;U<d.length;U++)if(!P.isSelectionEmpty()||"selectionOnly"!=d[U]){var J=document.createElement("option");mxUtils.write(J,mxResources.get(d[U]));J.setAttribute("value",d[U]);D.appendChild(J)}G?(mxUtils.write(C,mxResources.get("size")+":"),C.appendChild(D),mxUtils.br(C),R+=26,mxEvent.addListener(D,"change",function(){"selectionOnly"==D.value&&(q.checked=!0)})):x&&(C.appendChild(y),mxUtils.write(C,mxResources.get("crop")),mxUtils.br(C),R+=30,mxEvent.addListener(q,"change",function(){q.checked?
+y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));P.isSelectionEmpty()?G&&(q.style.display="none",q.nextSibling.style.display="none",q.nextSibling.nextSibling.style.display="none",R-=30):(D.value="diagram",y.setAttribute("checked","checked"),y.defaultChecked=!0,mxEvent.addListener(q,"change",function(){D.value=q.checked?"selectionOnly":"diagram"}));var L=this.addCheckbox(C,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=I&&"webp"!=I),K=document.createElement("select");
+K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));K.appendChild(x);G=document.createElement("option");G.setAttribute("value","dark");mxUtils.write(G,mxResources.get("dark"));K.appendChild(G);"svg"==I&&mxUtils.lightDarkColorSupported?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected",
+"selected"),K.appendChild(x)):Editor.isDarkMode()?G.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(C,mxResources.get("appearance")+":");C.appendChild(K);mxUtils.br(C);R+=26;var m=this.addCheckbox(C,mxResources.get("shadow"),P.shadowVisible),z=null;if("png"==I||"jpeg"==I||"webp"==I)z=this.addCheckbox(C,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),R+=30;P=null!=this.pages?this.pages.length:1;var F=this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram")+
+(1<P?":":""),A,null,null,"jpeg"!=I&&"webp"!=I),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==I||"svg"==I?(A=function(){F.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},x=document.createElement("option"),x.setAttribute("value","allPages"),mxUtils.write(x,mxResources.get("allPages")),M.appendChild(x),x=document.createElement("option"),x.setAttribute("value","currentPage"),mxUtils.write(x,mxResources.get("currentPage")),M.appendChild(x),
+1<P&&(F.style.marginBottom="12px",M.style.marginBottom="16px",C.appendChild(M),mxUtils.br(C),R+=20),null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(F,"change",A),A()):F.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var Q=document.createElement("input");Q.style.marginBottom="16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");g&&(O.checked=null!=this.lastEmbedImages?
+this.lastEmbedImages:!0,C.appendChild(O),mxUtils.write(C,mxResources.get("embedImages")),mxUtils.br(C),Q.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,C.appendChild(Q),mxUtils.write(C,mxResources.get("embedFonts")),mxUtils.br(C),R+=50);var S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));S.appendChild(x);A=document.createElement("option");
+A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));S.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));S.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==I&&(mxUtils.write(C,mxResources.get("links")+":"),C.appendChild(S),C.appendChild(A),mxUtils.br(C),mxUtils.br(C),R+=50);k=new CustomDialog(this,
+C,mxUtils.bind(this,function(){this.lastExportBorder=V.value;this.lastExportZoom=N.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=Q.checked;this.lastEmbedInclude=M.value;u(N.value,L.checked,!q.checked,m.checked,F.checked,O.checked&&g,V.value,y.checked,("png"==I||"svg"==I)&&"currentPage"==M.value,S.value,null!=z?z.checked:null,null!=K?K.value:null,D.value,Q.checked)}),null,k,n);this.showDialog(k.container,340,R,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,n,u){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var I=document.createElement("h3");mxUtils.write(I,g);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(I)}var G=this.addCheckbox(x,mxResources.get("fit"),!0),C=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&n,!n),P=this.addCheckbox(x,
+k),R=this.addCheckbox(x,mxResources.get("lightbox"),!0),U=this.addEditButton(x,R),N=U.getEditInput(),V=1<A.model.getChildCount(A.model.getRoot()),q=this.addCheckbox(x,mxResources.get("layers"),V,!V);q.style.marginLeft=N.style.marginLeft;q.style.marginBottom="12px";q.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?(V&&q.removeAttribute("disabled"),N.removeAttribute("disabled")):(q.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&R.checked?
+U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(G.checked,C.checked,P.checked,R.checked,U.getLink(),q.checked)}),null,mxResources.get("embed"),u);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,n,u,x,A,I){function G(N){var V=" ",q="";n&&(V=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=P?"&page="+P:"")+(u?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");d&&(q+="max-width:100%;");var y="";k&&(y=' width="'+Math.round(C.width)+'" height="'+Math.round(C.height)+'"');A('<img src="'+N+'"'+y+(""!=q?' style="'+q+'"':"")+V+"/>")}var C=this.editor.graph.getGraphBounds(),P=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var V=n?this.getFileData(!0):null;N=
+this.createImageDataUri(N,V,"png");G(N)}),null,null,null,mxUtils.bind(this,function(N){I({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),C.width*C.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var R="";k&&(R="&w="+Math.round(2*C.width)+"&h="+Math.round(2*C.height));var U=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(n?"1":"0")+R+"&xml="+encodeURIComponent(g));U.send(mxUtils.bind(this,function(){200<=U.getStatus()&&
+299>=U.getStatus()?G("data:image/png;base64,"+U.getText()):I({message:mxResources.get("unknownError")})}))}else I({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,n,u,x,A){var I=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),G=I.getElementsByTagName("a");if(null!=G)for(var C=0;C<G.length;C++){var P=G[C].getAttribute("href");null!=P&&"#"==P.charAt(0)&&"_blank"==G[C].getAttribute("target")&&G[C].removeAttribute("target")}n&&
+I.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(I);if(k){var R=" ",U="";n&&(R="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"+(u?"&edit=_blank":"")+(x?"&layers=1":
+"")+"');}})(this);\"",U+="cursor:pointer;");d&&(U+="max-width:100%;");this.editor.convertImages(I,mxUtils.bind(this,function(N){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=U?' style="'+U+'"':"")+R+"/>")}))}else U="",n&&(g=this.getSelectedPageIndex(),I.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(u?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),U+="cursor:pointer;"),d&&(d=parseInt(I.getAttribute("width")),u=parseInt(I.getAttribute("height")),I.setAttribute("viewBox","-0.5 -0.5 "+d+" "+u),U+="max-width:100%;max-height:"+u+"px;",I.removeAttribute("height")),""!=U&&I.setAttribute("style",U),this.editor.addFontCss(I),this.editor.graph.mathEnabled&&this.editor.addMathCss(I),A(mxUtils.getXml(I))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
-d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){k=m[0];var u=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:u.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}m=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=m}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
-EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(g=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(k=m))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,m,u){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var I=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var F=this.pages[0];this.currentPage==F?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=F.viewState&&null!=F.viewState&&x.setBackgroundImage(F.viewState.backgroundImage);x.getGlobalVariable=function(C){return"page"==C?F.getName():"pagenumber"==C?1:I.apply(this,arguments)};document.body.appendChild(x.container);
-x.model.setRoot(F.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var P=C.toDataURL("image/png");P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(A));d(P.substring(P.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(R){null!=g&&g(R)}}),null,null,null,mxUtils.bind(this,function(C){null!=g&&g(C)}),null,null,m,null,x.shadowVisible,null,x,u,null,
-null,null,"diagram",null)}catch(C){null!=g&&g(C)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,m,u,x,A,I,F,C,P,R,U){I=null!=I?I:!0;P=null!=P?P:0;A=null!=F?F:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");F=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,C,P,null,null,x,null,F,null,g.shadowVisible||R,null,U,"diagram");(g.shadowVisible||R)&&g.addSvgShadow(x,null,null,0==P);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",
-k);var O=mxUtils.bind(this,function(V){V=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(V);null!=u&&u(V);return V});g.mathEnabled&&this.editor.addMathCss(x);if(null!=u)this.embedFonts(x,mxUtils.bind(this,function(V){I?this.editor.convertImages(V,mxUtils.bind(this,function(q){O(q)})):O(V)}));else return O(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(m){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,m,u,x,A,I,F,C,P,R,U){F=null!=F?F:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(V){Editor.addRetryToError(V,mxUtils.bind(this,function(){this.exportImage(d,g,k,m,u,x,A,I,F,C,P,R,U)}));this.handleError(V)}))){var O=this.editor.graph.isSelectionEmpty();
-k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(V){this.spinner.stop();try{this.saveCanvas(V,u?this.getFileData(!0,null,null,null,k,I,null,null,null,null,null,d,x):null,F,null==this.pages||0==this.pages.length,P)}catch(q){this.handleError(q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(V){this.spinner.stop();this.handleError(V)}),null,k,d||1,g,m,null,null,x,A,C,R,U)}catch(V){this.spinner.stop(),this.handleError(V)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,m,u,x,A){g=null!=g?g:0;k=null!=k?k:0;var I=[];try{var F=this.editor.graph;if(null!=d&&0<d.length){F.model.beginUpdate();try{var C=mxUtils.parseXml(d);d={};var P=this.editor.extractGraphModel(C.documentElement,
-null!=this.pages);if(null!=P&&"mxfile"==P.nodeName&&null!=this.pages){var R=P.getElementsByTagName("diagram");if(1==R.length&&!x){if(P=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(d[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var U=R[0].getAttribute("name");null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,U))}}else if(0<R.length){x=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[R[0].getAttribute("id")]=
-this.pages[0].getId(),U=R[0].getAttribute("name"),null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],U)),P=Editor.parseDiagramNode(R[0]),m=!1,O=1);for(;O<R.length;O++){var V=R[O].getAttribute("id");R[O].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(R[O]));d[V]=R[O].getAttribute("id");var y=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[y+1]));F.model.execute(new ChangePage(this,q,q,y,!0));x.push(q)}this.updatePageLinks(d,
-x)}}if(null!=P&&"mxGraphModel"===P.nodeName){I=F.importGraphModel(P,g,k,m);if(null!=I)for(this.addLocalPagesToMapping(d),O=0;O<I.length;O++)this.updatePageLinksForCell(d,I[O]);var D=F.parseBackgroundImage(P.getAttribute("backgroundImage"));if(null!=D&&null!=D.originalSrc){this.updateBackgroundPageLink(d,D);var J=new ChangePageSetup(this,null,D);J.ignoreColor=!0;F.model.execute(J)}}A&&F.pasteCellStyles(F.includeDescendants(I),F.defaultVertexStyle,F.defaultEdgeStyle)}finally{F.model.endUpdate()}}}catch(L){if(u)throw L;
-this.handleError(L)}return I};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,g){var k=document.createElement("div"),m=this.editor.graph,u=m.getLinkForCell(g);null!=u&&m.setLinkForCell(g,this.updatePageLink(d,u));if(m.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(m.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,I=0;I<x.length;I++)u=x[I].getAttribute("href"),null!=u&&(x[I].setAttribute("href",this.updatePageLink(d,u)),A=!0);A&&m.labelChanged(g,k.innerHTML)}for(I=0;I<m.model.getChildCount(g);I++)this.updatePageLinksForCell(d,m.model.getChildAt(g,I))};EditorUi.prototype.updatePageLink=
-function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var m=JSON.parse(g.substring(17));if(null!=m.actions){for(var u=0;u<m.actions.length;u++){var x=m.actions[u];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(m)}}catch(I){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,m,u){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){m=null!=m?m:d.name;var I=mxUtils.bind(this,function(C){A.clear()&&x(C)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(m);
-try{var P=m.lastIndexOf(".");if(0<=P&&P<m.length)m.substring(P+1).toUpperCase();else{var R=m.lastIndexOf("/");0<=R&&R<m.length&&(m=m.substring(R+1))}}catch(O){}if(C)if(null==VSD_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",d,m);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
-null!=u&&U.setRequestHeader("x-convert-custom",u);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState&&A.clear())if(200<=U.status&&299>=U.status)try{var O=U.response;if("text/xml"==O.type){var V=new FileReader;V.onload=mxUtils.bind(this,function(q){try{g(q.target.result)}catch(y){I({message:mxResources.get("errorLoadingFile")})}});V.readAsText(O)}else this.doImportVisio(O,g,I,m)}catch(q){I(q)}else try{""==U.responseType||"text"==U.responseType?I({message:U.responseText}):(V=new FileReader,
-V.onload=function(){try{I({message:JSON.parse(V.result).Message})}catch(q){I(q)}},V.readAsText(U.response))}catch(q){I({})}});U.send(C)}else if(A.clear())try{this.doImportVisio(d,g,I,m)}catch(O){I(O)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,I))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var m=
-mxUtils.bind(this,function(u){this.loadingExtensions=!1;null!=k?k(u):this.handleError(u)});this.createTimeout(null,mxUtils.bind(this,function(u){var x=mxUtils.bind(this,function(I){u.clear()&&m(I)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(u.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,m)}catch(I){x(I)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,
-mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),m)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(x){k.clear()&&g(x)}),u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),
-(new VsdxExport(this)).exportCurrentDiagrams(d)||m({message:mxResources.get("unknownError")})}catch(x){m(x)}else m({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(u,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",u,null,null,null,m))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(d,g,k){var m=
-mxUtils.bind(this,function(u){this.loadingExtensions=!1;null!=k?k(u):this.handleError(u)});this.createTimeout(null,mxUtils.bind(this,function(u){var x=mxUtils.bind(this,function(I){u.clear()&&m(I)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(u.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);g(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var F=[(new Date).toISOString(),"convertLucidChart",I];null!=I.state&&F.push(JSON.parse(I.state));
-if(null!=I.svgThumbs)for(var C=0;C<I.svgThumbs.length;C++)F.push(Editor.createSvgDataUri(I.svgThumbs[C]));null!=I.thumb&&F.push(I.thumb);console.log.apply(console,F)}}catch(P){}}catch(P){null!=window.console&&console.error(P),x(P)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",
-function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),m)};EditorUi.prototype.createMermaidXml=function(d,g,k,m,u,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,m,u,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var m=0,u=function(){for(var A=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),I=0;I<A.length;I++)null!=A[I].parentNode&&A[I].parentNode.removeChild(A[I])},x=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,
-function(A){var I=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),F=mxUtils.bind(this,function(C){A.clear()&&(u(),k(C))});I.send(mxUtils.bind(this,function(C){if(A.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,O,V){this.tryAndHandle(mxUtils.bind(this,function(){A.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",
-[d],"result",[R]),u(),g(R,U,O,V))}),F)}),F,mxUtils.bind(this,function(U){3>m++?A.clear()&&x():F(U)}))}),F);else{var P={message:mxResources.get("error")+" "+C.getStatus()};try{P=JSON.parse(C.getText()),P=P.error}catch(R){}F(P)}}),F)}),k)});x()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");
-d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var m=k.indexOf("-");0<m&&(k=k.substring(0,m))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");m=k.indexOf("-");0<m&&(k=k.substring(0,m));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(u){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=
-null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,m,u){var x=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=m?m(I):this.handleError(I)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme=
-"dark");var I=mxUtils.bind(this,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');F=F.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var C=mxUtils.parseXml(F).getElementsByTagName("svg");if(0<C.length&&"error"!=C[0].getAttribute("aria-roledescription")){var P=parseFloat(C[0].getAttribute("width")),R=parseFloat(C[0].getAttribute("height"));if(isNaN(P)||
-isNaN(R))try{var U=C[0].getAttribute("viewBox").split(/\s+/);P=parseFloat(U[2]);R=parseFloat(U[3])}catch(O){P=P||100,R=R||100}k(this.convertDataUri(Editor.createSvgDataUri(F)),P,R)}else null!=u?u():m({message:mxResources.get("invalidInput")})}catch(O){m(O)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d).then(function(F){I(F.svg)}).catch(function(F){null!=u?u(F):m(F)})}catch(F){m(F)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?
-window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,m){function u(I,F,C){c1=I>>2;c2=(I&3)<<4|F>>4;c3=(F&15)<<2|C>>6;c4=C&63;r="";r+=x(c1&63);r+=x(c2&
+d;else if("mxfile"==d.nodeName){var n=d.getElementsByTagName("diagram");if(0<n.length){k=n[0];var u=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:u.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}n=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=n}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
+EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var n=parseFloat(d.getAttribute("scale"));!isNaN(n)&&0<n&&(g=n)}d.hasAttribute("border")&&(n=parseInt(d.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,n,u){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
+!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var I=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&x.setBackgroundImage(G.viewState.backgroundImage);x.getGlobalVariable=function(C){return"page"==C?G.getName():"pagenumber"==C?1:I.apply(this,arguments)};document.body.appendChild(x.container);
+x.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(C){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var P=C.toDataURL("image/png");P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(A));d(P.substring(P.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(R){null!=g&&g(R)}}),null,null,null,mxUtils.bind(this,function(C){null!=g&&g(C)}),null,null,n,null,x.shadowVisible,null,x,u,null,
+null,null,"diagram",null)}catch(C){null!=g&&g(C)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,n,u,x,A,I,G,C,P,R,U){I=null!=I?I:!0;P=null!=P?P:0;A=null!=G?G:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");G=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,C,P,null,null,x,null,G,null,g.shadowVisible||R,null,U,"diagram");(g.shadowVisible||R)&&g.addSvgShadow(x,null,null,0==P);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",
+k);var N=mxUtils.bind(this,function(V){V=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(V);null!=u&&u(V);return V});g.mathEnabled&&this.editor.addMathCss(x);if(null!=u)this.embedFonts(x,mxUtils.bind(this,function(V){I?this.editor.convertImages(V,mxUtils.bind(this,function(q){N(q)})):N(V)}));else return N(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(n){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,n,u,x,A,I,G,C,P,R,U){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(V){Editor.addRetryToError(V,mxUtils.bind(this,function(){this.exportImage(d,g,k,n,u,x,A,I,G,C,P,R,U)}));this.handleError(V)}))){var N=this.editor.graph.isSelectionEmpty();
+k=null!=k?k:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(V){this.spinner.stop();try{this.saveCanvas(V,u?this.getFileData(!0,null,null,null,k,I,null,null,null,null,null,d,x):null,G,null==this.pages||0==this.pages.length,P)}catch(q){this.handleError(q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(V){this.spinner.stop();this.handleError(V)}),null,k,d||1,g,n,null,null,x,A,C,R,U)}catch(V){this.spinner.stop(),this.handleError(V)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,n,u,x,A){g=null!=g?g:0;k=null!=k?k:0;var I=[];try{var G=this.editor.graph;if(null!=d&&0<d.length){G.model.beginUpdate();try{var C=mxUtils.parseXml(d);d={};var P=this.editor.extractGraphModel(C.documentElement,
+null!=this.pages);if(null!=P&&"mxfile"==P.nodeName&&null!=this.pages){var R=P.getElementsByTagName("diagram");if(1==R.length&&!x){if(P=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(d[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var U=R[0].getAttribute("name");null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,U))}}else if(0<R.length){x=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[R[0].getAttribute("id")]=
+this.pages[0].getId(),U=R[0].getAttribute("name"),null!=U&&""!=U&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],U)),P=Editor.parseDiagramNode(R[0]),n=!1,N=1);for(;N<R.length;N++){var V=R[N].getAttribute("id");R[N].removeAttribute("id");var q=this.updatePageRoot(new DiagramPage(R[N]));d[V]=R[N].getAttribute("id");var y=this.pages.length;null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[y+1]));G.model.execute(new ChangePage(this,q,q,y,!0));x.push(q)}this.updatePageLinks(d,
+x)}}if(null!=P&&"mxGraphModel"===P.nodeName){I=G.importGraphModel(P,g,k,n);if(null!=I)for(this.addLocalPagesToMapping(d),N=0;N<I.length;N++)this.updatePageLinksForCell(d,I[N]);var D=G.parseBackgroundImage(P.getAttribute("backgroundImage"));if(null!=D&&null!=D.originalSrc){this.updateBackgroundPageLink(d,D);var J=new ChangePageSetup(this,null,D);J.ignoreColor=!0;G.model.execute(J)}}A&&G.pasteCellStyles(G.includeDescendants(I),G.defaultVertexStyle,G.defaultEdgeStyle)}finally{G.model.endUpdate()}}}catch(L){if(u)throw L;
+this.handleError(L)}return I};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(n){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,g){var k=document.createElement("div"),n=this.editor.graph,u=n.getLinkForCell(g);null!=u&&n.setLinkForCell(g,this.updatePageLink(d,u));if(n.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(n.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,I=0;I<x.length;I++)u=x[I].getAttribute("href"),null!=u&&(x[I].setAttribute("href",this.updatePageLink(d,u)),A=!0);A&&n.labelChanged(g,k.innerHTML)}for(I=0;I<n.model.getChildCount(g);I++)this.updatePageLinksForCell(d,n.model.getChildAt(g,I))};EditorUi.prototype.updatePageLink=
+function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var n=JSON.parse(g.substring(17));if(null!=n.actions){for(var u=0;u<n.actions.length;u++){var x=n.actions[u];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(n)}}catch(I){}return g};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,n,u){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){n=null!=n?n:d.name;var I=mxUtils.bind(this,function(C){A.clear()&&x(C)}),G=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var C=this.isRemoteVisioFormat(n);
+try{var P=n.lastIndexOf(".");if(0<=P&&P<n.length)n.substring(P+1).toUpperCase();else{var R=n.lastIndexOf("/");0<=R&&R<n.length&&(n=n.substring(R+1))}}catch(N){}if(C)if(null==VSD_CONVERT_URL||this.isOffline())I({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{C=new FormData;C.append("file1",d,n);var U=new XMLHttpRequest;U.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(n)?"?stencil=1":""));U.responseType="blob";this.addRemoteServiceSecurityCheck(U);
+null!=u&&U.setRequestHeader("x-convert-custom",u);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState&&A.clear())if(200<=U.status&&299>=U.status)try{var N=U.response;if("text/xml"==N.type){var V=new FileReader;V.onload=mxUtils.bind(this,function(q){try{g(q.target.result)}catch(y){I({message:mxResources.get("errorLoadingFile")})}});V.readAsText(N)}else this.doImportVisio(N,g,I,n)}catch(q){I(q)}else try{""==U.responseType||"text"==U.responseType?I({message:U.responseText}):(V=new FileReader,
+V.onload=function(){try{I({message:JSON.parse(V.result).Message})}catch(q){I(q)}},V.readAsText(U.response))}catch(q){I({})}});U.send(C)}else if(A.clear())try{this.doImportVisio(d,g,I,n)}catch(N){I(N)}}else I({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",G,null,null,null,I))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var n=
+mxUtils.bind(this,function(u){this.loadingExtensions=!1;null!=k?k(u):this.handleError(u)});this.createTimeout(null,mxUtils.bind(this,function(u){var x=mxUtils.bind(this,function(I){u.clear()&&n(I)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(u.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,n)}catch(I){x(I)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,
+mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),n)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(k){var n=mxUtils.bind(this,function(x){k.clear()&&g(x)}),u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),
+(new VsdxExport(this)).exportCurrentDiagrams(d)||n({message:mxResources.get("unknownError")})}catch(x){n(x)}else n({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(u,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",u,null,null,null,n))}),g):g({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(d,g,k){var n=
+mxUtils.bind(this,function(u){this.loadingExtensions=!1;null!=k?k(u):this.handleError(u)});this.createTimeout(null,mxUtils.bind(this,function(u){var x=mxUtils.bind(this,function(I){u.clear()&&n(I)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(u.clear())if("undefined"!==typeof window.LucidImporter)try{var I=JSON.parse(d);g(LucidImporter.importState(I));try{if(null!=window.console&&"1"==urlParams.test){var G=[(new Date).toISOString(),"convertLucidChart",I];null!=I.state&&G.push(JSON.parse(I.state));
+if(null!=I.svgThumbs)for(var C=0;C<I.svgThumbs.length;C++)G.push(Editor.createSvgDataUri(I.svgThumbs[C]));null!=I.thumb&&G.push(I.thumb);console.log.apply(console,G)}}catch(P){}}catch(P){null!=window.console&&console.error(P),x(P)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",
+function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),n)};EditorUi.prototype.createMermaidXml=function(d,g,k,n,u,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,n,u,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var n=0,u=function(){for(var A=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),I=0;I<A.length;I++)null!=A[I].parentNode&&A[I].parentNode.removeChild(A[I])},x=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,
+function(A){var I=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),G=mxUtils.bind(this,function(C){A.clear()&&(u(),k(C))});I.send(mxUtils.bind(this,function(C){if(A.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,N,V){this.tryAndHandle(mxUtils.bind(this,function(){A.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",
+[d],"result",[R]),u(),g(R,U,N,V))}),G)}),G,mxUtils.bind(this,function(U){3>n++?A.clear()&&x():G(U)}))}),G);else{var P={message:mxResources.get("error")+" "+C.getStatus()};try{P=JSON.parse(C.getText()),P=P.error}catch(R){}G(P)}}),G)}),k)});x()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");
+d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var n=k.indexOf("-");0<n&&(k=k.substring(0,n))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");n=k.indexOf("-");0<n&&(k=k.substring(0,n));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(u){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=
+null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,n,u){var x=mxUtils.bind(this,function(I){this.loadingMermaid=!1;null!=n?n(I):this.handleError(I)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;g.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme=
+"dark");var I=mxUtils.bind(this,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"');G=G.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var C=mxUtils.parseXml(G).getElementsByTagName("svg");if(0<C.length&&"error"!=C[0].getAttribute("aria-roledescription")){var P=parseFloat(C[0].getAttribute("width")),R=parseFloat(C[0].getAttribute("height"));if(isNaN(P)||
+isNaN(R))try{var U=C[0].getAttribute("viewBox").split(/\s+/);P=parseFloat(U[2]);R=parseFloat(U[3])}catch(N){P=P||100,R=R||100}k(this.convertDataUri(Editor.createSvgDataUri(G)),P,R)}else null!=u?u():n({message:mxResources.get("invalidInput")})}catch(N){n(N)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d).then(function(G){I(G.svg)}).catch(function(G){null!=u?u(G):n(G)})}catch(G){n(G)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?
+window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){this.importXml(I,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,n){function u(I,G,C){c1=I>>2;c2=(I&3)<<4|G>>4;c3=(G&15)<<2|C>>6;c4=C&63;r="";r+=x(c1&63);r+=x(c2&
63);r+=x(c3&63);return r+=x(c4&63)}function x(I){if(10>I)return String.fromCharCode(48+I);I-=10;if(26>I)return String.fromCharCode(65+I);I-=26;if(26>I)return String.fromCharCode(97+I);I-=26;return 0==I?"-":1==I?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(I){r="";for(i=0;i<I.length;i+=3)r=i+2==I.length?r+u(I.charCodeAt(i),I.charCodeAt(i+1),0):i+1==I.length?r+u(I.charCodeAt(i),0,0):r+u(I.charCodeAt(i),I.charCodeAt(i+
-1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var F=new FileReader;F.readAsDataURL(this.response);F.onloadend=function(C){var P=new Image;P.onload=function(){try{var R=P.width,U=P.height;if(0==R&&0==U){var O=F.result,V=O.indexOf(","),q=decodeURIComponent(escape(atob(O.substring(V+1)))),y=mxUtils.parseXml(q).getElementsByTagName("svg");0<
-y.length&&(R=parseFloat(y[0].getAttribute("width")),U=parseFloat(y[0].getAttribute("height")))}k(F.result,R,U)}catch(D){m(D)}};P.src=F.result};F.onerror=function(C){m(C)}}else m(I)};A.onerror=function(I){m(I)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var m=this.editor.graph,u=null;m.getModel().beginUpdate();try{u=m.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(u,!0)}finally{m.getModel().endUpdate()}return u};EditorUi.prototype.insertTextAt=
-function(d,g,k,m,u,x,A,I){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(U){4==U.readyState&&200<=U.status&&299>=U.status&&this.editor.graph.setSelectionCells(this.insertTextAt(U.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(u||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var F=
+1),I.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(I){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var P=new Image;P.onload=function(){try{var R=P.width,U=P.height;if(0==R&&0==U){var N=G.result,V=N.indexOf(","),q=decodeURIComponent(escape(atob(N.substring(V+1)))),y=mxUtils.parseXml(q).getElementsByTagName("svg");0<
+y.length&&(R=parseFloat(y[0].getAttribute("width")),U=parseFloat(y[0].getAttribute("height")))}k(G.result,R,U)}catch(D){n(D)}};P.src=G.result};G.onerror=function(C){n(C)}}else n(I)};A.onerror=function(I){n(I)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var n=this.editor.graph,u=null;n.getModel().beginUpdate();try{u=n.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(u,!0)}finally{n.getModel().endUpdate()}return u};EditorUi.prototype.insertTextAt=
+function(d,g,k,n,u,x,A,I){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(U){4==U.readyState&&200<=U.status&&299>=U.status&&this.editor.graph.setSelectionCells(this.insertTextAt(U.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(u||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var G=
this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var C=Editor.extractGraphModelFromPdf(d);if(null!=C&&0<C.length)return this.importXml(C,g,k,x,!0,I)}if(Editor.isPngDataUrl(d)&&(C=Editor.extractGraphModelFromPng(d),null!=C&&0<C.length))return this.importXml(C,g,k,x,!0,I);if("data:image/svg+xml;"==d.substring(0,19))try{C=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(C=d.substring(d.indexOf(",")+1),C=window.atob&&!mxClient.IS_SF?atob(C):Base64.decode(C,!0)):C=decodeURIComponent(d.substring(d.indexOf(",")+
-1));var P=this.importXml(C,g,k,x,!0,I);if(0<P.length)return P}catch(U){}this.loadImage(d,mxUtils.bind(this,function(U){if("data:"==d.substring(0,5))this.resizeImage(U,d,mxUtils.bind(this,function(q,y,D){F.setSelectionCell(F.insertVertex(null,null,"",F.snap(g),F.snap(k),y,D,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(q)+";"))}),A,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/U.width,
-this.maxImageSize/U.height)),V=Math.round(U.width*O);U=Math.round(U.height*O);F.setSelectionCell(F.insertVertex(null,null,"",F.snap(g),F.snap(k),V,U,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var U=null;F.getModel().beginUpdate();try{U=F.insertVertex(F.getDefaultParent(),null,d,F.snap(g),F.snap(k),1,1,"text;"+(m?"html=1;":"")),F.updateCellSize(U),F.fireEvent(new mxEventObject("textInserted",
-"cells",[U]))}finally{F.getModel().endUpdate()}F.setSelectionCell(U)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(U){this.editor.graph.setSelectionCells(this.importXml(U,g,k,x,null,I))}),mxUtils.bind(this,function(U){this.handleError(U)}));else{F=this.editor.graph;u=null;F.getModel().beginUpdate();try{u=F.insertVertex(F.getDefaultParent(),
-null,"",F.snap(g),F.snap(k),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));F.fireEvent(new mxEventObject("textInserted","cells",[u]));m&&(d=F.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");u.value=d;F.updateCellSize(u);if(0<this.maxTextWidth&&u.geometry.width>this.maxTextWidth){var R=F.getPreferredSizeForCell(u,this.maxTextWidth);u.geometry.width=R.width;u.geometry.height=R.height}Graph.isLink(u.value)&&F.setLinkForCell(u,u.value);u.geometry.width+=F.gridSize;
-u.geometry.height+=F.gridSize}finally{F.getModel().endUpdate()}return[u]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
+1));var P=this.importXml(C,g,k,x,!0,I);if(0<P.length)return P}catch(U){}this.loadImage(d,mxUtils.bind(this,function(U){if("data:"==d.substring(0,5))this.resizeImage(U,d,mxUtils.bind(this,function(q,y,D){G.setSelectionCell(G.insertVertex(null,null,"",G.snap(g),G.snap(k),y,D,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(q)+";"))}),A,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/U.width,
+this.maxImageSize/U.height)),V=Math.round(U.width*N);U=Math.round(U.height*N);G.setSelectionCell(G.insertVertex(null,null,"",G.snap(g),G.snap(k),V,U,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var U=null;G.getModel().beginUpdate();try{U=G.insertVertex(G.getDefaultParent(),null,d,G.snap(g),G.snap(k),1,1,"text;"+(n?"html=1;":"")),G.updateCellSize(U),G.fireEvent(new mxEventObject("textInserted",
+"cells",[U]))}finally{G.getModel().endUpdate()}G.setSelectionCell(U)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,I);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(U){this.editor.graph.setSelectionCells(this.importXml(U,g,k,x,null,I))}),mxUtils.bind(this,function(U){this.handleError(U)}));else{G=this.editor.graph;u=null;G.getModel().beginUpdate();try{u=G.insertVertex(G.getDefaultParent(),
+null,"",G.snap(g),G.snap(k),1,1,"text;whiteSpace=wrap;"+(n?"html=1;":""));G.fireEvent(new mxEventObject("textInserted","cells",[u]));n&&(d=G.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");u.value=d;G.updateCellSize(u);if(0<this.maxTextWidth&&u.geometry.width>this.maxTextWidth){var R=G.getPreferredSizeForCell(u,this.maxTextWidth);u.geometry.width=R.width;u.geometry.height=R.height}Graph.isLink(u.value)&&G.setLinkForCell(u,u.value);u.geometry.width+=G.gridSize;
+u.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[u]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display=
-"none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,I){StorageFile.listFiles(this,"F",A,I)});window.openBrowserFile=mxUtils.bind(this,function(A,I,F){StorageFile.getFileContent(this,A,I,F)});window.deleteBrowserFile=mxUtils.bind(this,function(A,I,F){StorageFile.deleteFile(this,A,I,F)});if(!g){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
-new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,mxUtils.bind(this,function(F){this.importXml(F,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!g){var u=this.dialog,x=u.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=m;x.apply(u,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,g,k){var m=this,u=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,I,F=!1;x.forEach(function(C,P){C=
-P.name.toLowerCase();"diagram/diagram.xml"==C?(F=!0,P.async("string").then(function(R){0==R.indexOf("<mxfile ")?g(R):k()})):0==C.indexOf("versions/")&&(C=parseInt(C.substr(9)),C>A&&(A=C,I=P))});0<A?I.async("string").then(function(C){(new XMLHttpRequest).upload&&m.isRemoteFileFormat(C,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):m.parseFileData(C,mxUtils.bind(this,function(P){4==P.readyState&&(200<=P.status&&299>=P.status?g(P.responseText):k())}),
-d.name):k()}):F||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",u,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,m,u,x,A,I,F,C,P,R){C=null!=C?C:!0;var U=!1,O=null,V=mxUtils.bind(this,function(q){var y=null;null!=q&&"<mxlibrary"==q.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,q,A)),this.showSidebar()):y=this.importXml(q,k,m,C,null,
-null!=R?mxEvent.isControlDown(R):null);null!=I&&I(y)});"image"==g.substring(0,5)?(F=!1,"image/png"==g.substring(0,9)&&(P=P?null:this.extractGraphModelFromPng(d),null!=P&&0<P.length&&(O=this.importXml(P,k,m,C,null,null!=R?mxEvent.isControlDown(R):null),F=!0)),F||(F=this.editor.graph,P=d.indexOf(";"),0<P&&(d=d.substring(0,P)+d.substring(d.indexOf(",",P+1))),C&&F.isGridEnabled()&&(k=F.snap(k),m=F.snap(m)),P="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;",
-"image/svg"==g.substring(0,9)&&(P+="editableCssRules=.*;"),O=[F.insertVertex(null,null,"",k,m,u,x,P+"image="+d+";")])):/(\.*<graphml )/.test(d)?(U=!0,this.importGraphML(d,V)):null!=F&&null!=A&&EditorUi.isVisioFilename(A)?(U=!0,this.importVisio(F,V)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(U=!0,g=mxUtils.bind(this,function(q){4==q.readyState&&(200<=q.status&&299>=q.status?V(q.responseText):
-null!=I&&(I(null),this.showError(mxResources.get("error"),413==q.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(F,g,A)):0==d.indexOf("PK")&&null!=F?(U=!0,this.importZipFile(F,V,mxUtils.bind(this,function(){O=this.insertTextAt(this.validateFileData(d),k,m,!0,null,C);I(O)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(O=this.insertTextAt(this.validateFileData(d),k,m,!0,null,C,null,null!=R?mxEvent.isControlDown(R):
-null));U||null==I||I(O);return O};EditorUi.prototype.importFiles=function(d,g,k,m,u,x,A,I,F,C,P,R,U){m=null!=m?m:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var O=null!=g&&null!=k,V=!0;g=null!=g?g:0;k=null!=k?k:0;var q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var y=P||this.resampleThreshold,D=0;D<d.length;D++)if("image/svg"!==d[D].type.substring(0,9)&&"image/"===d[D].type.substring(0,6)&&d[D].size>y){q=!0;break}var J=mxUtils.bind(this,function(){var L=this.editor.graph,K=L.gridSize;u=null!=
-u?u:mxUtils.bind(this,function(Q,S,T,W,X,Z,Y,ba,da){try{if(null!=Q&&"<mxlibrary"==Q.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Q,Y)),this.showSidebar(),null;this.isCompatibleString(Q)&&1==d.length&&null!=U&&"drop"==U.type&&this.isBlankFile()&&!this.canUndo()&&(O=!1,W=T=0);return this.importFile(Q,S,T,W,X,Z,Y,ba,da,O,R,U)}catch(ia){return this.handleError(ia),null}});x=null!=x?x:mxUtils.bind(this,function(Q){L.setSelectionCells(Q)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var n=d.length,z=n,G=[],M=mxUtils.bind(this,function(Q,S){G[Q]=S;if(0==--z){this.spinner.stop();if(null!=I)I(G);else{var T=[];L.getModel().beginUpdate();try{for(Q=0;Q<G.length;Q++){var W=G[Q]();null!=W&&(T=T.concat(W))}}finally{L.getModel().endUpdate()}}x(T)}}),N=0;N<n;N++)mxUtils.bind(this,function(Q){var S=d[Q];if(null!=S){var T=new FileReader;T.onload=mxUtils.bind(this,function(W){if(null==A||A(S))try{if("image/"==S.type.substring(0,6))if("image/svg"==S.type.substring(0,
+"none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,I){StorageFile.listFiles(this,"F",A,I)});window.openBrowserFile=mxUtils.bind(this,function(A,I,G){StorageFile.getFileContent(this,A,I,G)});window.deleteBrowserFile=mxUtils.bind(this,function(A,I,G){StorageFile.deleteFile(this,A,I,G)});if(!g){var n=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=
+new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,I){null!=I&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(I)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,I)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
+function(){window.openFile=null});if(!g){var u=this.dialog,x=u.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=n;x.apply(u,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,g,k){var n=this,u=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,I,G=!1;x.forEach(function(C,P){C=
+P.name.toLowerCase();"diagram/diagram.xml"==C?(G=!0,P.async("string").then(function(R){0==R.indexOf("<mxfile ")?g(R):k()})):0==C.indexOf("versions/")&&(C=parseInt(C.substr(9)),C>A&&(A=C,I=P))});0<A?I.async("string").then(function(C){(new XMLHttpRequest).upload&&n.isRemoteFileFormat(C,d.name)?n.isOffline()?n.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):n.parseFileData(C,mxUtils.bind(this,function(P){4==P.readyState&&(200<=P.status&&299>=P.status?g(P.responseText):k())}),
+d.name):k()}):G||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",u,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,n,u,x,A,I,G,C,P,R){C=null!=C?C:!0;var U=!1,N=null,V=mxUtils.bind(this,function(q){var y=null;null!=q&&"<mxlibrary"==q.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,q,A)),this.showSidebar()):y=this.importXml(q,k,n,C,null,
+null!=R?mxEvent.isControlDown(R):null);null!=I&&I(y)});"image"==g.substring(0,5)?(G=!1,"image/png"==g.substring(0,9)&&(P=P?null:this.extractGraphModelFromPng(d),null!=P&&0<P.length&&(N=this.importXml(P,k,n,C,null,null!=R?mxEvent.isControlDown(R):null),G=!0)),G||(G=this.editor.graph,P=d.indexOf(";"),0<P&&(d=d.substring(0,P)+d.substring(d.indexOf(",",P+1))),C&&G.isGridEnabled()&&(k=G.snap(k),n=G.snap(n)),P="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;",
+"image/svg"==g.substring(0,9)&&(P+="editableCssRules=.*;"),N=[G.insertVertex(null,null,"",k,n,u,x,P+"image="+d+";")])):/(\.*<graphml )/.test(d)?(U=!0,this.importGraphML(d,V)):null!=G&&null!=A&&EditorUi.isVisioFilename(A)?(U=!0,this.importVisio(G,V)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(U=!0,g=mxUtils.bind(this,function(q){4==q.readyState&&(200<=q.status&&299>=q.status?V(q.responseText):
+null!=I&&(I(null),this.showError(mxResources.get("error"),413==q.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(G,g,A)):0==d.indexOf("PK")&&null!=G?(U=!0,this.importZipFile(G,V,mxUtils.bind(this,function(){N=this.insertTextAt(this.validateFileData(d),k,n,!0,null,C);I(N)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(N=this.insertTextAt(this.validateFileData(d),k,n,!0,null,C,null,null!=R?mxEvent.isControlDown(R):
+null));U||null==I||I(N);return N};EditorUi.prototype.importFiles=function(d,g,k,n,u,x,A,I,G,C,P,R,U){n=null!=n?n:this.maxImageSize;C=null!=C?C:this.maxImageBytes;var N=null!=g&&null!=k,V=!0;g=null!=g?g:0;k=null!=k?k:0;var q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var y=P||this.resampleThreshold,D=0;D<d.length;D++)if("image/svg"!==d[D].type.substring(0,9)&&"image/"===d[D].type.substring(0,6)&&d[D].size>y){q=!0;break}var J=mxUtils.bind(this,function(){var L=this.editor.graph,K=L.gridSize;u=null!=
+u?u:mxUtils.bind(this,function(Q,S,T,W,X,Z,Y,ba,da){try{if(null!=Q&&"<mxlibrary"==Q.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Q,Y)),this.showSidebar(),null;this.isCompatibleString(Q)&&1==d.length&&null!=U&&"drop"==U.type&&this.isBlankFile()&&!this.canUndo()&&(N=!1,W=T=0);return this.importFile(Q,S,T,W,X,Z,Y,ba,da,N,R,U)}catch(ia){return this.handleError(ia),null}});x=null!=x?x:mxUtils.bind(this,function(Q){L.setSelectionCells(Q)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var m=d.length,z=m,F=[],M=mxUtils.bind(this,function(Q,S){F[Q]=S;if(0==--z){this.spinner.stop();if(null!=I)I(F);else{var T=[];L.getModel().beginUpdate();try{for(Q=0;Q<F.length;Q++){var W=F[Q]();null!=W&&(T=T.concat(W))}}finally{L.getModel().endUpdate()}}x(T)}}),O=0;O<m;O++)mxUtils.bind(this,function(Q){var S=d[Q];if(null!=S){var T=new FileReader;T.onload=mxUtils.bind(this,function(W){if(null==A||A(S))try{if("image/"==S.type.substring(0,6))if("image/svg"==S.type.substring(0,
9)){var X=Graph.clipSvgDataUri(W.target.result),Z=X.indexOf(","),Y=decodeURIComponent(escape(atob(X.substring(Z+1)))),ba=mxUtils.parseXml(Y),da=ba.getElementsByTagName("svg");if(0<da.length){var ia=da[0],ca=R?null:ia.getAttribute("content");null!=ca&&"<"!=ca.charAt(0)&&"%"!=ca.charAt(0)&&(ca=unescape(window.atob?atob(ca):Base64.decode(ca,!0)));null!=ca&&"%"==ca.charAt(0)&&(ca=decodeURIComponent(ca));null==ca||"<mxfile "!==ca.substring(0,8)&&"<mxGraphModel "!==ca.substring(0,14)?M(Q,mxUtils.bind(this,
function(){try{if(null!=ba){var ja=ba.getElementsByTagName("svg");if(0<ja.length){var ha=ja[0],ea=ha.getAttribute("width"),ya=ha.getAttribute("height");ea=null!=ea&&"%"!=ea.charAt(ea.length-1)?parseFloat(ea):NaN;ya=null!=ya&&"%"!=ya.charAt(ya.length-1)?parseFloat(ya):NaN;var ua=ha.getAttribute("viewBox");if(null==ua||0==ua.length)ha.setAttribute("viewBox","0 0 "+ea+" "+ya);else if(isNaN(ea)||isNaN(ya)){var na=ua.split(" ");3<na.length&&(ea=parseFloat(na[2]),ya=parseFloat(na[3]))}X=Editor.createSvgDataUri(mxUtils.getXml(ha));
-var za=Math.min(1,Math.min(m/Math.max(1,ea)),m/Math.max(1,ya)),ma=u(X,S.type,g+Q*K,k+Q*K,Math.max(1,Math.round(ea*za)),Math.max(1,Math.round(ya*za)),S.name);if(null!=ma&&(isNaN(ea)||isNaN(ya))){var sa=new Image;sa.onload=mxUtils.bind(this,function(){ea=Math.max(1,sa.width);ya=Math.max(1,sa.height);ma[0].geometry.width=ea;ma[0].geometry.height=ya;ha.setAttribute("viewBox","0 0 "+ea+" "+ya);X=Editor.createSvgDataUri(mxUtils.getXml(ha));var oa=X.indexOf(";");0<oa&&(X=X.substring(0,oa)+X.substring(X.indexOf(",",
+var za=Math.min(1,Math.min(n/Math.max(1,ea)),n/Math.max(1,ya)),ma=u(X,S.type,g+Q*K,k+Q*K,Math.max(1,Math.round(ea*za)),Math.max(1,Math.round(ya*za)),S.name);if(null!=ma&&(isNaN(ea)||isNaN(ya))){var sa=new Image;sa.onload=mxUtils.bind(this,function(){ea=Math.max(1,sa.width);ya=Math.max(1,sa.height);ma[0].geometry.width=ea;ma[0].geometry.height=ya;ha.setAttribute("viewBox","0 0 "+ea+" "+ya);X=Editor.createSvgDataUri(mxUtils.getXml(ha));var oa=X.indexOf(";");0<oa&&(X=X.substring(0,oa)+X.substring(X.indexOf(",",
oa+1)));L.setCellStyles("image",X,[ma[0]])});sa.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}return ma}}}catch(oa){}return null})):M(Q,mxUtils.bind(this,function(){return u(ca,"text/xml",g+Q*K,k+Q*K,0,0,S.name)}))}else M(Q,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==S.type){var fa=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=fa&&0<fa.length){var aa=new Image;aa.src=W.target.result;M(Q,mxUtils.bind(this,function(){return u(fa,"text/xml",g+Q*K,k+Q*K,aa.width,
aa.height,S.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,function(ja){this.resizeImage(ja,W.target.result,mxUtils.bind(this,function(ha,ea,ya){M(Q,mxUtils.bind(this,function(){if(null!=ha&&ha.length<
-C){var ua=V&&this.isResampleImageSize(S.size,P)?Math.min(1,Math.min(m/ea,m/ya)):1;return u(ha,S.type,g+Q*K,k+Q*K,Math.round(ea*ua),Math.round(ya*ua),S.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),V,m,P,S.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=W.target.result,u(X,S.type,g+Q*K,k+Q*K,240,160,S.name,function(ja){M(Q,function(){return ja})},S)}catch(ja){M(Q,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(ja,S)}else M(Q,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(S.name)?u(null,S.type,g+Q*K,k+Q*K,240,160,S.name,function(W){M(Q,function(){return W})},S):"image"==S.type.substring(0,5)||"application/pdf"==S.type?T.readAsDataURL(S):T.readAsText(S)}})(N)});if(q){q=[];for(D=0;D<d.length;D++)q.push(d[D]);d=q;this.confirmImageResize(function(L){V=L;J()},F)}else J()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
-this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,u=function(x,A){if(x||g)mxSettings.setResizeImages(x?A:null),mxSettings.save();k();d(A)};null==m||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){u(x,
-!0)},function(x){u(x,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):u(!1,m)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,g,k)});m.readAsText(d)};EditorUi.prototype.parseFileData=
-function(d,g,k){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){g(m)};m.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(u){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,m,u,x,
-A){u=null!=u?u:this.maxImageSize;var I=Math.max(1,d.width),F=Math.max(1,d.height),C=g;if(m&&this.isResampleImageSize(null!=A?A:g.length,x))try{var P=Math.max(I/u,F/u);if(1<P){var R=Math.round(I/P),U=Math.round(F/P),O=document.createElement("canvas");O.width=R;O.height=U;O.getContext("2d").drawImage(d,0,0,R,U);var V=O.toDataURL();if(V.length<g.length){var q=document.createElement("canvas");q.width=R;q.height=U;var y=q.toDataURL();V!==y&&(g=V,I=R,F=U)}}}catch(D){}m&&C!=g&&u>this.maxImageSize/2&&g.length>
-this.maxImageBytes?this.resizeImage(d,g,k,m,u/1.5,x,A):k(g,I,F)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;g(m)};null!=k&&(m.onerror=k);m.src=d}catch(u){if(null!=k)k(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
+C){var ua=V&&this.isResampleImageSize(S.size,P)?Math.min(1,Math.min(n/ea,n/ya)):1;return u(ha,S.type,g+Q*K,k+Q*K,Math.round(ea*ua),Math.round(ya*ua),S.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),V,n,P,S.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=W.target.result,u(X,S.type,g+Q*K,k+Q*K,240,160,S.name,function(ja){M(Q,function(){return ja})},S)}catch(ja){M(Q,mxUtils.bind(this,function(){return null})),
+null!=window.console&&console.error(ja,S)}else M(Q,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(S.name)?u(null,S.type,g+Q*K,k+Q*K,240,160,S.name,function(W){M(Q,function(){return W})},S):"image"==S.type.substring(0,5)||"application/pdf"==S.type?T.readAsDataURL(S):T.readAsText(S)}})(O)});if(q){q=[];for(D=0;D<d.length;D++)q.push(d[D]);d=q;this.confirmImageResize(function(L){V=L;J()},G)}else J()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,u=function(x,A){if(x||g)mxSettings.setResizeImages(x?A:null),mxSettings.save();k();d(A)};null==n||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){u(x,
+!0)},function(x){u(x,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):u(!1,n)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var n=new FileReader;n.onload=mxUtils.bind(this,function(){this.parseFileData(n.result,g,k)});n.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,g,k){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){g(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(u){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,n,u,x,
+A){u=null!=u?u:this.maxImageSize;var I=Math.max(1,d.width),G=Math.max(1,d.height),C=g;if(n&&this.isResampleImageSize(null!=A?A:g.length,x))try{var P=Math.max(I/u,G/u);if(1<P){var R=Math.round(I/P),U=Math.round(G/P),N=document.createElement("canvas");N.width=R;N.height=U;N.getContext("2d").drawImage(d,0,0,R,U);var V=N.toDataURL();if(V.length<g.length){var q=document.createElement("canvas");q.width=R;q.height=U;var y=q.toDataURL();V!==y&&(g=V,I=R,G=U)}}}catch(D){}n&&C!=g&&u>this.maxImageSize/2&&g.length>
+this.maxImageBytes?this.resizeImage(d,g,k,n,u/1.5,x,A):k(g,I,G)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var n=new Image;n.onload=function(){n.width=0<n.width?n.width:120;n.height=0<n.height?n.height:120;g(n)};null!=k&&(n.onerror=k);n.src=d}catch(u){if(null!=k)k(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var l=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());l.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=
-EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(K){var n=K.getEvent();return null==K.getState()&&!mxEvent.isMouseEvent(n)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(n)&&(null==K.getState()||mxEvent.isControlDown(n)||mxEvent.isShiftDown(n))});
-g.cellEditor.editPlantUmlData=function(K,n,z){var G=JSON.parse(z);n=new TextareaDialog(d,mxResources.get("plantUml")+":",G.data,function(M){null!=M&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(M,G.format,function(N,Q,S){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==G.format)g.labelChanged(K,"<pre>"+N+"</pre>"),g.updateCellSize(K,!0);else{g.setCellStyles("image",d.convertDataUri(N),[K]);var T=g.model.getGeometry(K);null!=T&&(T=T.clone(),T.width=Q,
-T.height=S,g.cellsResized([K],[T],!1))}g.setAttributeForCell(K,"plantUmlData",JSON.stringify({data:M,format:G.format}))}finally{g.getModel().endUpdate()}},function(N){d.handleError(N)})},null,null,400,220);d.showDialog(n.container,420,300,!0,!0);n.init()};g.cellEditor.editMermaidData=function(K,n,z){var G=JSON.parse(z);n=new TextareaDialog(d,mxResources.get("mermaid")+":",G.data,function(M){null!=M&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(M,G.config,function(N,
-Q,S){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",N,[K]);var T=g.model.getGeometry(K);null!=T&&(T=T.clone(),T.width=Math.max(T.width,Q),T.height=Math.max(T.height,S),g.cellsResized([K],[T],!1));g.setAttributeForCell(K,"mermaidData",JSON.stringify({data:M,config:G.config},null,2))}finally{g.getModel().endUpdate()}},function(N){d.handleError(N)})},null,null,400,220);d.showDialog(n.container,420,300,!0,!0);n.init()};var m=g.cellEditor.startEditing;g.cellEditor.startEditing=
-function(K,n){try{var z=this.graph.getAttributeForCell(K,"plantUmlData");if(null!=z)this.editPlantUmlData(K,n,z);else if(z=this.graph.getAttributeForCell(K,"mermaidData"),null!=z&&window.isMermaidEnabled)this.editMermaidData(K,n,z);else{var G=g.getCellStyle(K);"1"==mxUtils.getValue(G,"metaEdit","0")?d.showDataDialog(K):m.apply(this,arguments)}}catch(M){d.handleError(M)}};g.getLinkTitle=function(K){return d.getLinkTitle(K)};g.customLinkClicked=function(K,n){var z=!1;try{var G=this.getGraphBounds();
-d.handleCustomLink(K,n);z=!0;d.chromelessResize&&!G.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(n))}catch(M){d.handleError(M)}return z};var u=g.parseBackgroundImage;g.parseBackgroundImage=function(K){var n=u.apply(this,arguments);null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&(n={originalSrc:n.src});return n};var x=g.setBackgroundImage;g.setBackgroundImage=function(K){null!=K&&null!=K.originalSrc&&(K=d.createImageForPageLink(K.originalSrc,d.currentPage,this));x.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(K,n){K=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=K){var z=K.indexOf(",");if(0<z)for(K=K.substring(z+1),n=n.getProperty("patches"),z=0;z<n.length;z++)if(null!=n[z][EditorUi.DIFF_UPDATE]&&null!=n[z][EditorUi.DIFF_UPDATE][K]||
-null!=n[z][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(n[z][EditorUi.DIFF_REMOVE],K)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(K,n){var z=A.apply(this,arguments);null!=z&&null!=z.originalSrc&&(z=n?d.createImageForPageLink(z.originalSrc,null,null,!0):{src:z.originalSrc});return z};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(K){K=null!=K?K:"";"1"==urlParams.dev&&(K+=(0<K.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var F=g.addClickHandler;g.addClickHandler=function(K,n,z){var G=n;n=function(M,N,Q){if(null==N){var S=mxEvent.getSource(M);"a"==S.nodeName.toLowerCase()&&(N=S.getAttribute("href"))}null!=
-N&&g.isCustomLink(N)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&g.customLinkClicked(N,Q)&&mxEvent.consume(M);null!=G&&G(M,N,Q)};F.call(this,K,n,z)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(K,n,z){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,z);C.apply(this,arguments);
-g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,z);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(K,["-","exitGroup","home"],null,z)};var P=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,n,z){if(d.editor.graph.isSelectionEmpty())P.apply(this,arguments),d.menus.addMenuItems(K,["copyAsImage"],null,z);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,n,z):this.addPopupMenuArrangeItems(K,
-n,z),this.addMenuItems(K,"- cut copy copyAsImage duplicate -".split(" "),null,z),this.isShowCellEditItems()||this.addPopupDeleteItem(K,n,z),this.addMenuItems(K,["lockUnlock","-"],null,z),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(n)&&g.isCellEditable(n)&&(this.addSubmenu("editCell",K,null,mxResources.get("edit")),K.addSeparator(),g.getModel().isEdge(n))){this.addSubmenu("line",K);var G=g.getModel().getGeometry(n);null!=G&&null!=G.points&&0<G.points.length&&this.addMenuItems(K,
-["clearWaypoints"],null,z)}1==g.getSelectionCount()&&this.addMenuItems(K,["enterGroup"],null,z);G=d.getSelectionState();null!=G.mergeCell?this.addMenuItem(K,"mergeCells"):(1<G.style.colspan||1<G.style.rowspan)&&this.addMenuItem(K,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=g.getExportVariables;g.getExportVariables=function(){var K=R.apply(this,arguments),n=d.getCurrentFile();null!=n&&(K.filename=n.getTitle());K.pagecount=null!=d.pages?d.pages.length:1;K.page=null!=d.currentPage?d.currentPage.getName():"";K.pagenumber=null!=d.pages&&null!=
-d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return K};var U=g.getGlobalVariable;g.getGlobalVariable=function(K){var n=d.getCurrentFile();return"filename"==K&&null!=n?n.getTitle():"page"==K&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==K?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==K?null!=d.pages?d.pages.length:1:U.apply(this,arguments)};var O=null,V=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var K=
-this.getCurrentFile(),n=null!=K&&null!=K.getTitle()?K.getTitle():this.defaultFilename;O!=n&&K==V&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());O=n;V=K}));var q=g.labelLinkClicked;g.labelLinkClicked=function(K,n,z){var G=n.getAttribute("href");if(null==G||!g.isCustomLink(G)||!mxEvent.isTouchEvent(z)&&mxEvent.isPopupTrigger(z))q.apply(this,arguments);else{if(!g.isEnabled()||null!=K&&g.isCellLocked(K.cell))g.customLinkClicked(G),g.getRubberband().reset();mxEvent.consume(z)}};
-this.editor.getOrCreateFilename=function(){var K=d.defaultFilename,n=d.getCurrentFile();null!=n&&(K=null!=n.getTitle()?n.getTitle():K);return K};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
+EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(K){var m=K.getEvent();return null==K.getState()&&!mxEvent.isMouseEvent(m)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(m)&&(null==K.getState()||mxEvent.isControlDown(m)||mxEvent.isShiftDown(m))});
+g.cellEditor.editPlantUmlData=function(K,m,z){var F=JSON.parse(z);m=new TextareaDialog(d,mxResources.get("plantUml")+":",F.data,function(M){null!=M&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(M,F.format,function(O,Q,S){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==F.format)g.labelChanged(K,"<pre>"+O+"</pre>"),g.updateCellSize(K,!0);else{g.setCellStyles("image",d.convertDataUri(O),[K]);var T=g.model.getGeometry(K);null!=T&&(T=T.clone(),T.width=Q,
+T.height=S,g.cellsResized([K],[T],!1))}g.setAttributeForCell(K,"plantUmlData",JSON.stringify({data:M,format:F.format}))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(m.container,420,300,!0,!0);m.init()};g.cellEditor.editMermaidData=function(K,m,z){var F=JSON.parse(z);m=new TextareaDialog(d,mxResources.get("mermaid")+":",F.data,function(M){null!=M&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(M,F.config,function(O,
+Q,S){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",O,[K]);var T=g.model.getGeometry(K);null!=T&&(T=T.clone(),T.width=Math.max(T.width,Q),T.height=Math.max(T.height,S),g.cellsResized([K],[T],!1));g.setAttributeForCell(K,"mermaidData",JSON.stringify({data:M,config:F.config},null,2))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(m.container,420,300,!0,!0);m.init()};var n=g.cellEditor.startEditing;g.cellEditor.startEditing=
+function(K,m){try{var z=this.graph.getAttributeForCell(K,"plantUmlData");if(null!=z)this.editPlantUmlData(K,m,z);else if(z=this.graph.getAttributeForCell(K,"mermaidData"),null!=z&&window.isMermaidEnabled)this.editMermaidData(K,m,z);else{var F=g.getCellStyle(K);"1"==mxUtils.getValue(F,"metaEdit","0")?d.showDataDialog(K):n.apply(this,arguments)}}catch(M){d.handleError(M)}};g.getLinkTitle=function(K){return d.getLinkTitle(K)};g.customLinkClicked=function(K,m){var z=!1;try{var F=this.getGraphBounds();
+d.handleCustomLink(K,m);z=!0;d.chromelessResize&&!F.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(m))}catch(M){d.handleError(M)}return z};var u=g.parseBackgroundImage;g.parseBackgroundImage=function(K){var m=u.apply(this,arguments);null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});return m};var x=g.setBackgroundImage;g.setBackgroundImage=function(K){null!=K&&null!=K.originalSrc&&(K=d.createImageForPageLink(K.originalSrc,d.currentPage,this));x.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(K,m){K=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=K){var z=K.indexOf(",");if(0<z)for(K=K.substring(z+1),m=m.getProperty("patches"),z=0;z<m.length;z++)if(null!=m[z][EditorUi.DIFF_UPDATE]&&null!=m[z][EditorUi.DIFF_UPDATE][K]||
+null!=m[z][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(m[z][EditorUi.DIFF_REMOVE],K)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(K,m){var z=A.apply(this,arguments);null!=z&&null!=z.originalSrc&&(z=m?d.createImageForPageLink(z.originalSrc,null,null,!0):{src:z.originalSrc});return z};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var I=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(K){K=null!=K?K:"";"1"==urlParams.dev&&(K+=(0<K.length?"&":"?")+"dev=1");return I.apply(this,arguments)};var G=g.addClickHandler;g.addClickHandler=function(K,m,z){var F=m;m=function(M,O,Q){if(null==O){var S=mxEvent.getSource(M);"a"==S.nodeName.toLowerCase()&&(O=S.getAttribute("href"))}null!=
+O&&g.isCustomLink(O)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&g.customLinkClicked(O,Q)&&mxEvent.consume(M);null!=F&&F(M,O,Q)};G.call(this,K,m,z)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var C=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(K,m,z){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,z);C.apply(this,arguments);
+g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,z);g.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(K,["-","exitGroup","home"],null,z)};var P=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,m,z){if(d.editor.graph.isSelectionEmpty())P.apply(this,arguments),d.menus.addMenuItems(K,["copyAsImage"],null,z);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,m,z):this.addPopupMenuArrangeItems(K,
+m,z),this.addMenuItems(K,"- cut copy copyAsImage duplicate -".split(" "),null,z),this.isShowCellEditItems()||this.addPopupDeleteItem(K,m,z),this.addMenuItems(K,["lockUnlock","-"],null,z),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(m)&&g.isCellEditable(m)&&(this.addSubmenu("editCell",K,null,mxResources.get("edit")),K.addSeparator(),g.getModel().isEdge(m))){this.addSubmenu("line",K);var F=g.getModel().getGeometry(m);null!=F&&null!=F.points&&0<F.points.length&&this.addMenuItems(K,
+["clearWaypoints"],null,z)}1==g.getSelectionCount()&&this.addMenuItems(K,["enterGroup"],null,z);F=d.getSelectionState();null!=F.mergeCell?this.addMenuItem(K,"mergeCells"):(1<F.style.colspan||1<F.style.rowspan)&&this.addMenuItem(K,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=g.getExportVariables;g.getExportVariables=function(){var K=R.apply(this,arguments),m=d.getCurrentFile();null!=m&&(K.filename=m.getTitle());K.pagecount=null!=d.pages?d.pages.length:1;K.page=null!=d.currentPage?d.currentPage.getName():"";K.pagenumber=null!=d.pages&&null!=
+d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return K};var U=g.getGlobalVariable;g.getGlobalVariable=function(K){var m=d.getCurrentFile();return"filename"==K&&null!=m?m.getTitle():"page"==K&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==K?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==K?null!=d.pages?d.pages.length:1:U.apply(this,arguments)};var N=null,V=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var K=
+this.getCurrentFile(),m=null!=K&&null!=K.getTitle()?K.getTitle():this.defaultFilename;N!=m&&K==V&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());N=m;V=K}));var q=g.labelLinkClicked;g.labelLinkClicked=function(K,m,z){var F=m.getAttribute("href");if(null==F||!g.isCustomLink(F)||!mxEvent.isTouchEvent(z)&&mxEvent.isPopupTrigger(z))q.apply(this,arguments);else{if(!g.isEnabled()||null!=K&&g.isCellLocked(K.cell))g.customLinkClicked(F),g.getRubberband().reset();mxEvent.consume(z)}};
+this.editor.getOrCreateFilename=function(){var K=d.defaultFilename,m=d.getCurrentFile();null!=m&&(K=null!=m.getTitle()?m.getTitle():K);return K};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=
-"synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(K,n){null!=n&&g.isEnabled()&&!g.isEditing()&&null!=n.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(K){var n=g.cellEditor.text2,z=null;null!=
-n&&(mxEvent.addListener(n,"dragleave",function(G){null!=z&&(z.parentNode.removeChild(z),z=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(G){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(n));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(G){null!=z&&(z.parentNode.removeChild(z),z=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,
-0,0,this.maxImageSize,function(N,Q,S,T,W,X){g.insertImage(N,W,X)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var Q=0;Q<N.length;Q++)N[Q]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var M=G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(N){var Q=Math.max(1,N.width);N=Math.max(1,N.height);var S=this.maxImageSize;S=Math.min(1,
-Math.min(S/Math.max(1,Q)),S/Math.max(1,N));g.insertImage(decodeURIComponent(M),Q*S,N*S)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));if(Editor.isSettingsEnabled()){y=
-this.editor.graph.view;var D=mxSettings.getUnit();y.setUnit(D);Editor.pageSizeUnit=D==mxConstants.METERS?mxConstants.MILLIMETERS:D;y.addListener("unitChanged",function(K,n){K=n.getProperty("unit");mxSettings.setUnit(K);mxSettings.save();Editor.pageSizeUnit=K==mxConstants.METERS?mxConstants.MILLIMETERS:K});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,y.unit);
+"synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),g.addListener(mxEvent.ESCAPE,function(K,m){null!=m&&g.isEnabled()&&!g.isEditing()&&null!=m.getProperty("event")&&d.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(K){var m=g.cellEditor.text2,z=null;null!=
+m&&(mxEvent.addListener(m,"dragleave",function(F){null!=z&&(z.parentNode.removeChild(z),z=null);F.stopPropagation();F.preventDefault()}),mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(F){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(m));F.stopPropagation();F.preventDefault()})),mxEvent.addListener(m,"drop",mxUtils.bind(this,function(F){null!=z&&(z.parentNode.removeChild(z),z=null);if(0<F.dataTransfer.files.length)this.importFiles(F.dataTransfer.files,
+0,0,this.maxImageSize,function(O,Q,S,T,W,X){g.insertImage(O,W,X)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var Q=0;Q<O.length;Q++)O[Q]()},mxEvent.isControlDown(F));else if(0<=mxUtils.indexOf(F.dataTransfer.types,"text/uri-list")){var M=F.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(O){var Q=Math.max(1,O.width);O=Math.max(1,O.height);var S=this.maxImageSize;S=Math.min(1,
+Math.min(S/Math.max(1,Q)),S/Math.max(1,O));g.insertImage(decodeURIComponent(M),Q*S,O*S)})):document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(F.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,F.dataTransfer.getData("text/plain"));F.stopPropagation();F.preventDefault()})))}));if(Editor.isSettingsEnabled()){y=
+this.editor.graph.view;var D=mxSettings.getUnit();y.setUnit(D);Editor.pageSizeUnit=D==mxConstants.METERS?mxConstants.MILLIMETERS:D;y.addListener("unitChanged",function(K,m){K=m.getProperty("unit");mxSettings.setUnit(K);mxSettings.save();Editor.pageSizeUnit=K==mxConstants.METERS?mxConstants.MILLIMETERS:K});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,y.unit);
this.refresh()}if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
-this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(K,n){0<this.editor.graph.getSelectionCount()?(K=this.editor.graph.getSelectionCell(),K=this.editor.graph.getModel().getStyle(K),this.styleInput.value=K||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(K){return mxEvent.getSource(K)==this.styleInput?
+this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(K,m){0<this.editor.graph.getSelectionCount()?(K=this.editor.graph.getSelectionCell(),K=this.editor.graph.getModel().getStyle(K),this.styleInput.value=K||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var J=this.isSelectionAllowed;this.isSelectionAllowed=function(K){return mxEvent.getSource(K)==this.styleInput?
!0:J.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var L=null;mxEvent.addListener(g.container,"dragleave",function(K){g.isEnabled()&&(null!=L&&(L.parentNode.removeChild(L),L=null),K.stopPropagation(),K.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(K){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=this.highlightElement(g.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(K){null!=L&&(L.parentNode.removeChild(L),L=null);if(g.isEnabled()){var n=mxUtils.convertPoint(g.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),z=K.dataTransfer.files,G=g.view.translate,M=g.view.scale,N=n.x/M-G.x,Q=n.y/M-G.y;if(0<z.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(K)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(z,!0)):(mxEvent.isAltDown(K)&&(Q=N=null),this.importFiles(z,N,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(K),null,null,mxEvent.isShiftDown(K),K));else{mxEvent.isAltDown(K)&&(Q=N=0);var S=0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")?K.dataTransfer.getData("text/uri-list"):null;n=this.extractGraphModelFromEvent(K,null!=this.pages);if(null!=n)g.setSelectionCells(this.importXml(n,N,Q,!0));else if(0<=mxUtils.indexOf(K.dataTransfer.types,
-"text/html")){var T=K.dataTransfer.getData("text/html");n=document.createElement("div");n.innerHTML=Graph.sanitizeHtml(T);var W=null;z=n.getElementsByTagName("img");null!=z&&1==z.length?(T=z[0].getAttribute("src"),null==T&&(T=z[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(W=!0)):(z=n.getElementsByTagName("a"),null!=z&&1==z.length?T=z[0].getAttribute("href"):(n=n.getElementsByTagName("pre"),null!=n&&1==n.length&&(T=mxUtils.getTextContent(n[0]))));var X=!0,Z=mxUtils.bind(this,
-function(){g.setSelectionCells(this.insertTextAt(T,N,Q,!0,W,null,X,mxEvent.isControlDown(K)))});W&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(Y){X=Y;Z()},mxEvent.isControlDown(K)):Z()}else null!=S&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)?this.loadImage(decodeURIComponent(S),mxUtils.bind(this,function(Y){var ba=Math.max(1,Y.width);Y=Math.max(1,Y.height);var da=this.maxImageSize;da=Math.min(1,Math.min(da/Math.max(1,ba)),da/Math.max(1,Y));g.setSelectionCell(g.insertVertex(null,
-null,"",N,Q,ba*da,Y*da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+S+";"))}),mxUtils.bind(this,function(Y){g.setSelectionCells(this.insertTextAt(S,N,Q,!0))})):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(K.dataTransfer.getData("text/plain"),N,Q,!0))}}K.stopPropagation();K.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
+null!=this.sidebar&&this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(K){null!=L&&(L.parentNode.removeChild(L),L=null);if(g.isEnabled()){var m=mxUtils.convertPoint(g.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),z=K.dataTransfer.files,F=g.view.translate,M=g.view.scale,O=m.x/M-F.x,Q=m.y/M-F.y;if(0<z.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(K)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(z,!0)):(mxEvent.isAltDown(K)&&(Q=O=null),this.importFiles(z,O,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(K),null,null,mxEvent.isShiftDown(K),K));else{mxEvent.isAltDown(K)&&(Q=O=0);var S=0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")?K.dataTransfer.getData("text/uri-list"):null;m=this.extractGraphModelFromEvent(K,null!=this.pages);if(null!=m)g.setSelectionCells(this.importXml(m,O,Q,!0));else if(0<=mxUtils.indexOf(K.dataTransfer.types,
+"text/html")){var T=K.dataTransfer.getData("text/html");m=document.createElement("div");m.innerHTML=Graph.sanitizeHtml(T);var W=null;z=m.getElementsByTagName("img");null!=z&&1==z.length?(T=z[0].getAttribute("src"),null==T&&(T=z[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(W=!0)):(z=m.getElementsByTagName("a"),null!=z&&1==z.length?T=z[0].getAttribute("href"):(m=m.getElementsByTagName("pre"),null!=m&&1==m.length&&(T=mxUtils.getTextContent(m[0]))));var X=!0,Z=mxUtils.bind(this,
+function(){g.setSelectionCells(this.insertTextAt(T,O,Q,!0,W,null,X,mxEvent.isControlDown(K)))});W&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(Y){X=Y;Z()},mxEvent.isControlDown(K)):Z()}else null!=S&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)?this.loadImage(decodeURIComponent(S),mxUtils.bind(this,function(Y){var ba=Math.max(1,Y.width);Y=Math.max(1,Y.height);var da=this.maxImageSize;da=Math.min(1,Math.min(da/Math.max(1,ba)),da/Math.max(1,Y));g.setSelectionCell(g.insertVertex(null,
+null,"",O,Q,ba*da,Y*da,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+S+";"))}),mxUtils.bind(this,function(Y){g.setSelectionCells(this.insertTextAt(S,O,Q,!0))})):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(K.dataTransfer.getData("text/plain"),O,Q,!0))}}K.stopPropagation();K.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker();this.refresh()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
-null==d.embedViewport)mxUtils.fit(this.div);else{var K=parseInt(this.div.offsetLeft),n=parseInt(this.div.offsetWidth),z=d.embedViewport.x+d.embedViewport.width,G=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),N=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(K,z-n))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(G,N-M))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=
+null==d.embedViewport)mxUtils.fit(this.div);else{var K=parseInt(this.div.offsetLeft),m=parseInt(this.div.offsetWidth),z=d.embedViewport.x+d.embedViewport.width,F=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),O=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(K,z-m))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(F,O-M))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=
Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(y=Editor.currentTheme,"simple"==y||"sketch"==y)this.doSetCurrentTheme(y,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));y=!1;if(null!=urlParams.dark)y=urlParams.dark;else if(!this.editor.chromeless||
this.editor.editable)y="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||y&&"auto"!=mxSettings.settings.darkMode||(y=mxSettings.settings.darkMode);"auto"==y&&this.isAutoDarkModeSupported()&&(y=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof y?"1"==y:y);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(K){this.isAutoDarkMode()&&this.setDarkMode(K.matches)}))}catch(K){this.actions.get("autoMode").setEnabled(!1)}"1"==
urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",
-mxUtils.bind(this,function(K,n){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var v=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
-g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}v.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,m=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
+mxUtils.bind(this,function(K,m){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&d.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var v=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
+g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=d}v.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,n=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var u=document.createElement("div");u.style.position="absolute";u.style.width="10px";u.style.height="10px";u.style.borderRadius="5px";u.style.border="1px solid gray";u.style.background="#ffffff";u.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(u);
-this.bottomResizer=u;var x=null,A=null,I=null,F=null;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(C){F=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(C);m.popupMenuHandler.hideMenu();mxEvent.consume(C)}));u=u.cloneNode(!1);u.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(u);this.rightResizer=u;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(C);m.popupMenuHandler.hideMenu();
-mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var P=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-x)+"px",P=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,F+mxEvent.getClientY(C)-A)+"px",P=!0);P&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
+this.bottomResizer=u;var x=null,A=null,I=null,G=null;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(C){G=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(C);n.popupMenuHandler.hideMenu();mxEvent.consume(C)}));u=u.cloneNode(!1);u.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(u);this.rightResizer=u;mxEvent.addGestureListeners(u,mxUtils.bind(this,function(C){I=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(C);n.popupMenuHandler.hideMenu();
+mxEvent.consume(C)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(C){var P=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,I+mxEvent.getClientX(C)-x)+"px",P=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-A)+"px",P=!0);P&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
function(C){null==x&&null==A||mxEvent.consume(C);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(C){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",
mxUtils.bind(this,function(C){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,m=!1,u=0;u<k.types.length;u++)if("text/"===k.types[u].substring(0,5)){m=!0;break}if(!m){var x=k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(F,C,P,R,U,O){d.insertImage(F,U,O)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var C=0;C<F.length;C++)F[C]()});else{var I=
-this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],I.x,I.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(F){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
-"false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||m||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+
-10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),m=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(x){var A=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=A&&17!=A&&91!=A&&93!=A||(m=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),
+mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,n=!1,u=0;u<k.types.length;u++)if("text/"===k.types[u].substring(0,5)){n=!0;break}if(!n){var x=k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(G,C,P,R,U,N){d.insertImage(G,U,N)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var C=0;C<G.length;C++)G[C]()});else{var I=
+this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],I.x,I.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
+"false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var n=!1;this.keyHandler.bindControlKey(88,
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||n||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+
+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),n=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(x){var A=x.keyCode;window.setTimeout(mxUtils.bind(this,function(){!n||224!=A&&17!=A&&91!=A&&93!=A||(n=!1,g.isEditing()||null!=this.dialog||null==g.container||g.container.focus(),k.parentNode.removeChild(k),null==this.dialog&&mxUtils.clearSelection())}),
0)}));mxEvent.addListener(k,"copy",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"cut",mxUtils.bind(this,function(x){if(g.isEnabled())try{mxClipboard.copy(g),this.copyCells(k,!0),d()}catch(A){this.handleError(A)}}));mxEvent.addListener(k,"paste",mxUtils.bind(this,function(x){if(g.isEnabled()&&!g.isCellLocked(g.getDefaultParent()))try{if(k.innerHTML="&nbsp;",k.focus(),null!=x.clipboardData&&(Graph.removePasteFormatting(k.firstChild),
-this.pasteCells(x,k,!0,!0)),!mxEvent.isConsumed(x)){var A=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=A,g.container.scrollTop=I,Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!1,!0)}catch(F){this.handleError(F)}}),0)}}catch(F){this.handleError(F)}}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==k?!0:u.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=
+this.pasteCells(x,k,!0,!0)),!mxEvent.isConsumed(x)){var A=g.container.scrollLeft,I=g.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{g.container.scrollLeft=A,g.container.scrollTop=I,Graph.removePasteFormatting(k.firstChild),this.pasteCells(x,k,!1,!0)}catch(G){this.handleError(G)}}),0)}}catch(G){this.handleError(G)}}),!0);var u=this.isSelectionAllowed;this.isSelectionAllowed=function(x){return mxEvent.getSource(x)==k?!0:u.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=
function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,g){if(null==d||""==d)d=App.isSimpleThemePreferred()?"simple":"kennedy";var k="simple"==Editor.currentTheme&&this.isDefaultTheme(d)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==d||d==Editor.currentTheme;if(k||g)g=this.saveScrollState(),
-this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return k};EditorUi.prototype.saveScrollState=function(d){var g=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,m=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,m-=this.embedViewport.y):(k+=this.embedViewport.x,
-m+=this.embedViewport.y));g={x:k,y:m,tx:g.x,ty:g.y};d&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=d.boundingRect){var m=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-m.x;d.y-=d.boundingRect.y-m.y}this.diagramContainer.scrollLeft=d.x+(k.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(k.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=
-function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var m=null!=this.statusContainer.firstChild&&"function"===
-typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=m&&null!=m.getAttribute("class");if(!g&&null!=m){m=m.getAttribute("title");var u=this.getCurrentFile();u=null!=u?u.savingStatusKey:DrawioFile.prototype.savingStatusKey;m==mxResources.get(u)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(u))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";m=32>=d.clientWidth;d.style.visibility=
-m&&""==this.editor.getStatus()?"hidden":"";if(m||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);
+this.editor.graph.stopEditing(!1),Editor.currentTheme=d,this.switchTheme(d),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(g);return k};EditorUi.prototype.saveScrollState=function(d){var g=this.editor.graph.view.translate,k=this.diagramContainer.scrollLeft,n=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,n-=this.embedViewport.y):(k+=this.embedViewport.x,
+n+=this.embedViewport.y));g={x:k,y:n,tx:g.x,ty:g.y};d&&(g.boundingRect=this.diagramContainer.getBoundingClientRect());return g};EditorUi.prototype.restoreScrollState=function(d){var g=this.editor.graph.view.scale,k=this.editor.graph.view.translate;if(null!=d.boundingRect){var n=this.diagramContainer.getBoundingClientRect();d.x-=d.boundingRect.x-n.x;d.y-=d.boundingRect.y-n.y}this.diagramContainer.scrollLeft=d.x+(k.x-d.tx)*g;this.diagramContainer.scrollTop=d.y+(k.y-d.ty)*g};EditorUi.prototype.installStatusMinimizer=
+function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||g||(this.statusContainer.style.display="none")}));var k=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var n=null!=this.statusContainer.firstChild&&"function"===
+typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;g=null!=n&&null!=n.getAttribute("class");if(!g&&null!=n){n=n.getAttribute("title");var u=this.getCurrentFile();u=null!=u?u.savingStatusKey:DrawioFile.prototype.savingStatusKey;n==mxResources.get(u)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(u))+'..."src="'+Editor.tailSpin+'"></div>',g=!0)}this.statusContainer.style.display="none";n=32>=d.clientWidth;d.style.visibility=
+n&&""==this.editor.getStatus()?"hidden":"";if(n||g)this.statusContainer.style.display="",g=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(d){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(d);this.switchCssForTheme(d);this.createMainMenuForTheme(d);
this.createFooterMenuForTheme(d);this.createPickerMenuForTheme(d);this.createMenubarForTheme(d);"sketch"==d&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};
EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(d){null==this.sidebarWindow||d||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||d||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),
this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=
@@ -13355,31 +13354,31 @@ null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(
"simple"!=d&&"sketch"!=d);if("simple"==d||"sketch"==d){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)g.defaultEdgeLength=120;null==urlParams.grid&&(g.defaultGridEnabled=!1);null==urlParams.pv&&(g.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(d){};
EditorUi.prototype.createMainMenuForTheme=function(d){};EditorUi.prototype.createFooterMenuForTheme=function(d){};EditorUi.prototype.createPickerMenuForTheme=function(d){};EditorUi.prototype.getNetworkStatus=function(){var d=null;if(this.isOffline(!0))d=mxResources.get("offline");else{var g=this.getCurrentFile();null!=g&&(g.invalidChecksum?d=mxResources.get("error")+": "+mxResources.get("checksum"):null==g.sync||g.sync.enabled&&g.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==g.sync||
g.sync.isConnected()?g.isRealtimeEnabled()&&g.isRealtimeSupported()&&1<g.getRealtimeState()&&(d=g.getRealtimeError(),d=mxResources.get("realtimeCollaboration")+": "+(null!=d&&null!=d.message?d.message:mxResources.get("error"))):d=mxResources.get("notConnected"):d=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return d};EditorUi.prototype.createMenubarForTheme=function(d){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink=
-"",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,k,m){k=null!=k?k:"geButton";var u=this.menus.get(d);m=this.menubar.addMenu(mxResources.get(d),
-u.funct,null,m);m.className=k;m.setAttribute("title",mxResources.get(d));this.menus.menuCreated(u,m,k);null!=g&&(m.style.backgroundImage="url("+g+")",m.innerText="");return m};EditorUi.prototype.addButton=function(d,g,k,m){d=this.createToolbarButton(d,g,k);m=null!=m?m:this.container;m.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,g,k){var m=document.createElement("a");m.className="geButton";null!=d&&"data:"==d.substring(0,5)&&(m.style.backgroundImage="url("+d+")");null!=
-g&&m.setAttribute("title",g);null!=k&&mxEvent.addListener(m,"click",function(u){"disabled"!=m.getAttribute("disabled")&&k(u);mxEvent.consume(u)});mxEvent.preventDefault(m);return m};EditorUi.prototype.createMenuItem=function(d,g,k){var m=this.actions.get(d),u=null!=m?m.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=m&&null!=m.shortcut?" ("+m.shortcut+")":""),u);null==m||k||(d=function(){m.isEnabled()?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",
-d),m.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(u){u.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,m=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(m=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+m-140+"px"):(this.div.style.width=m+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-m+140)+
+"",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(d,g,k,n){k=null!=k?k:"geButton";var u=this.menus.get(d);n=this.menubar.addMenu(mxResources.get(d),
+u.funct,null,n);n.className=k;n.setAttribute("title",mxResources.get(d));this.menus.menuCreated(u,n,k);null!=g&&(n.style.backgroundImage="url("+g+")",n.innerText="");return n};EditorUi.prototype.addButton=function(d,g,k,n){d=this.createToolbarButton(d,g,k);n=null!=n?n:this.container;n.appendChild(d);return d};EditorUi.prototype.createToolbarButton=function(d,g,k){var n=document.createElement("a");n.className="geButton";null!=d&&"data:"==d.substring(0,5)&&(n.style.backgroundImage="url("+d+")");null!=
+g&&n.setAttribute("title",g);null!=k&&mxEvent.addListener(n,"click",function(u){"disabled"!=n.getAttribute("disabled")&&k(u);mxEvent.consume(u)});mxEvent.preventDefault(n);return n};EditorUi.prototype.createMenuItem=function(d,g,k){var n=this.actions.get(d),u=null!=n?n.funct:null,x=this.createToolbarButton(g,mxResources.get(d)+(null!=n&&null!=n.shortcut?" ("+n.shortcut+")":""),u);null==n||k||(d=function(){n.isEnabled()?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",
+d),n.addListener("stateChanged",d),d());return x};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),d,60,240,g,mxUtils.bind(this,function(u){u.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var k=this.formatWindow.window.toggleMinimized,n=240;this.formatWindow.window.toggleMinimized=function(){k.apply(this,arguments);this.minimized?(n=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+n-140+"px"):(this.div.style.width=n+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-n+140)+
"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(u){mxEvent.getSource(u)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,x=window.innerHeight||document.documentElement.clientHeight||
document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>u||690>x)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var t=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):t.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;
-0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,m=mxUtils.bind(this,function(){this.hsplitPosition=u;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),u=d?g:0,x=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==u?"translateX(0)":"translateX(-100%)");0!=u&&m();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==u?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transition","transform "+x+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==u&&m()}),1E3*x)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
-var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(A,I){var F=this.menus.get(A);A=this.createMenuElement(I,mxUtils.bind(this,function(){F.funct.apply(this,arguments)}));A.setAttribute("title",I);A.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
+0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,n=mxUtils.bind(this,function(){this.hsplitPosition=u;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),u=d?g:0,x=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==u?"translateX(0)":"translateX(-100%)");0!=u&&n();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==u?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+"transition","transform "+x+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==u&&n()}),1E3*x)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};
+var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(A,I){var G=this.menus.get(A);A=this.createMenuElement(I,mxUtils.bind(this,function(){G.funct.apply(this,arguments)}));A.setAttribute("title",I);A.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";
A.className="geButton";d.parentNode.appendChild(A);return A});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))g=document.createElement("div"),g.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",g.className="geButton",g.style.left="0px",g.style.right="50%",mxUtils.write(g,mxResources.get("newLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("newLibrary").funct),
-g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var k=g("newLibrary","");k.style.left="0px";k.style.right="50%";var m=document.createElement("span");k.appendChild(m);var u=g("openLibraryFrom","");u.style.borderLeftWidth="1px";u.style.left="50%";u.style.right="0px";var x=document.createElement("span");u.appendChild(x);this.dependsOnLanguage(mxUtils.bind(this,
-function(){m.innerHTML="";mxUtils.write(m,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));x.innerHTML="";mxUtils.write(x,mxResources.get("openLibraryFrom"));u.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
-650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(m){this.createShapesPanel(m)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
+g=g.cloneNode(!1),g.style.left="50%",g.style.right="0px",mxUtils.write(g,mxResources.get("openLibrary")),d.appendChild(g),mxEvent.addListener(g,"click",this.actions.get("openLibrary").funct);else{var k=g("newLibrary","");k.style.left="0px";k.style.right="50%";var n=document.createElement("span");k.appendChild(n);var u=g("openLibraryFrom","");u.style.borderLeftWidth="1px";u.style.left="50%";u.style.right="0px";var x=document.createElement("span");u.appendChild(x);this.dependsOnLanguage(mxUtils.bind(this,
+function(){n.innerHTML="";mxUtils.write(n,mxResources.get("newLibrary"));k.setAttribute("title",mxResources.get("newLibrary"));x.innerHTML="";mxUtils.write(x,mxResources.get("openLibraryFrom"));u.setAttribute("title",mxResources.get("openLibraryFrom"))}))}d.appendChild(this.sidebar.container);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var d=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),g="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
+650),k="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),k&&"1"!=urlParams.embedInline?66:10,k&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-g)/2):56,d-6,g-6,mxUtils.bind(this,function(n){this.createShapesPanel(n)}));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.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(d){var g=d;"auto"==d&&(g=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(g);mxSettings.settings.darkMode=d;mxSettings.save();d=mxSettings.getUi();null==
urlParams.ui&&"dark"==d&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(d){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(d),mxSettings.save(),mxClient.language=d,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(d,g){this.dependsOnLanguage(mxUtils.bind(this,
function(){d.setAttribute("title",mxResources.get(g))}))};EditorUi.prototype.dependsOnLanguage=function(d){d();this.addListener("languageChanged",d)};EditorUi.prototype.setAndPersistHighContrast=function(d){this.setHighContrast(d);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=d,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var d=document.getElementById("high-contrast-stylesheet");return null!=d&&window.matchMedia?(d=d.getAttribute("media"),"all"==d||"not all"!=d&&
-window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,m=g.getAttribute("media");(m="all"==m||"not all"!=m&&k)&&!d?g.setAttribute("media",k?"not all":"(forced-colors: active)"):!m&&d&&g.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
+window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(d){var g=document.getElementById("high-contrast-stylesheet");if(null!=g&&window.matchMedia){var k=window.matchMedia("(forced-colors: active)").matches,n=g.getAttribute("media");(n="all"==n||"not all"!=n&&k)&&!d?g.setAttribute("media",k?"not all":"(forced-colors: active)"):!n&&d&&g.setAttribute("media",k?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};
EditorUi.prototype.setRulerVisible=function(d){var g=this.getDiagramContainerOffset();mxSettings.setRulerOn(d);mxSettings.save();d||null==this.ruler?d&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));d=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=d.x-g.x;this.diagramContainer.scrollTop+=d.x-g.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=
window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(d){return!d&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(d){mxUtils.lightDarkColorSupported&&(Editor.darkMode=d,d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=d&&(Editor.isDarkMode()?(d.classList.add("geDarkMode"),
d.style.colorScheme="dark"):(d.classList.remove("geDarkMode"),d.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,g){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=
d,Editor.isSettingsEnabled()&&g&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:d,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=
function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)g.style.left="10px",g.style.top="10px",k.style.left="10px",k.style.top="60px",d.style.top="10px",d.style.right="12px",d.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),
-this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var m=this.diagramContainer.getAttribute("data-bounds");if(null!=m){this.diagramContainer.removeAttribute("data-bounds");var u=m.split(" ");m=mxUtils.getDocumentSize();this.diagramContainer.style.top=u[0];this.diagramContainer.style.left=u[1];var x=parseInt(u[2]);
-u=parseInt(u[3]);x=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,x):x,m.width-80);u=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,u):u,m.height-80);this.diagramContainer.style.width=x+"px";this.diagramContainer.style.height=u+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+
+this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var n=this.diagramContainer.getAttribute("data-bounds");if(null!=n){this.diagramContainer.removeAttribute("data-bounds");var u=n.split(" ");n=mxUtils.getDocumentSize();this.diagramContainer.style.top=u[0];this.diagramContainer.style.left=u[1];var x=parseInt(u[2]);
+u=parseInt(u[3]);x=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,x):x,n.width-80);u=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,u):u,n.height-80);this.diagramContainer.style.width=x+"px";this.diagramContainer.style.height=u+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}g.style.left=this.diagramContainer.offsetLeft+
"px";g.style.top=this.diagramContainer.offsetTop-g.offsetHeight-4+"px";k.style.display="";k.style.left=this.diagramContainer.offsetLeft-k.offsetWidth-4+"px";k.style.top=this.diagramContainer.offsetTop+"px";d.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-d.offsetWidth+"px";d.style.top=g.style.top;d.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=
this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;
g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||
@@ -13388,191 +13387,191 @@ g.style.visibility="";d.style.visibility=""};EditorUi.prototype.doSetSketchMode=
Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,
d.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultVertexStyle.hachureGap="4",d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);
this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var g=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var k=d.indexOf(",");0<k&&(g=this.getPageById(d.substring(k+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(g=this.getCustomLinkTitle(d));return g};EditorUi.prototype.getCustomLinkTitle=function(d){var g=mxResources.get("action");if("data:action/json,"==d.substring(0,17))try{var k=JSON.parse(d.substring(17));
-null!=k&&null!=k.title&&(g=k.title)}catch(m){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=d.indexOf(","),d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
+null!=k&&null!=k.title&&(g=k.title)}catch(n){}return g};EditorUi.prototype.handleCustomLink=function(d,g){if(Graph.isPageLink(d))if(g=d.indexOf(","),d=this.getPageById(d.substring(g+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(d,g)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var d=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(g){g.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(g){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(g,k){mxSettings.setCustomFonts(this.menus.customFonts);
mxSettings.save()}));d.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(g,k){mxSettings.setCreateTarget(d.connectionHandler.isCreateTarget());mxSettings.save()}));d.pageFormat=null!=d.defaultPageFormat?d.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(g,k){mxSettings.setPageFormat(d.pageFormat);mxSettings.save()}));
d.view.defaultDarkGridColor=mxSettings.getGridColor(!0);d.view.defaultGridColor=mxSettings.getGridColor(!1);d.view.gridColor="light-dark("+d.view.defaultGridColor+", "+d.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(g,k){mxSettings.setGridColor(d.view.defaultGridColor,!1);mxSettings.setGridColor(d.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,
function(g,k){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(g,k){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?
(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,g,k){try{null!=
-navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,u){try{this.spinner.stop();var x=this.createImageDataUri(m,g,"png"),A=parseInt(u.getAttribute("width")),I=parseInt(u.getAttribute("height"));this.writeImageToClipboard(x,A,I,mxUtils.bind(this,function(F){this.handleError(F)}))}catch(F){this.handleError(F)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();
-this.handleError(m)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),u=mxUtils.getXml(k.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(u));g?(k.removeCells(m,!1),
-k.lastPasteXml=null):(k.lastPasteXml=u,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,m,u){u=null!=u?u:!0;var x=this.editor.graph,A=null;
-x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var I=x.pasteCounter*x.gridSize;if(k||this.isCompatibleString(d))A=this.importXml(d,I,I),x.setSelectionCells(A);else if(g&&1==x.getSelectionCount()){u=x.getStartEditingCell(x.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(u)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[u]);else{x.model.beginUpdate();try{x.labelChanged(u,d),Graph.isLink(d)&&x.setLinkForCell(u,
-d)}finally{x.model.endUpdate()}}x.setSelectionCell(u)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(I=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+I,A.y+I,u),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,m){if(!mxEvent.isConsumed(d)){var u=g,x=!1;if(k&&null!=d.clipboardData&&
-d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),I=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var F=decodeURIComponent(A);this.isCompatibleString(F)&&(I=!0,A=F)}catch(V){}I=I?null:d.clipboardData.getData("text/html");null!=I&&0<I.length?(u=this.parseHtmlData(I),x="text/plain"!=u.getAttribute("data-type")):null!=A&&0<A.length&&(u=document.createElement("div"),mxUtils.setTextContent(u,I))}A=u.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===
+navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,u){try{this.spinner.stop();var x=this.createImageDataUri(n,g,"png"),A=parseInt(u.getAttribute("width")),I=parseInt(u.getAttribute("height"));this.writeImageToClipboard(x,A,I,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();
+this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(n){this.handleError(n)}};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),u=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(d,encodeURIComponent(u));g?(k.removeCells(n,!1),
+k.lastPasteXml=null):(k.lastPasteXml=u,k.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var g=this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCells(g.model.getTopmostCells(g.getSelectionCells()))),g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,n,u){u=null!=u?u:!0;var x=this.editor.graph,A=null;
+x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var I=x.pasteCounter*x.gridSize;if(k||this.isCompatibleString(d))A=this.importXml(d,I,I),x.setSelectionCells(A);else if(g&&1==x.getSelectionCount()){u=x.getStartEditingCell(x.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(u)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[u]);else{x.model.beginUpdate();try{x.labelChanged(u,d),Graph.isLink(d)&&x.setLinkForCell(u,
+d)}finally{x.model.endUpdate()}}x.setSelectionCell(u)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(I=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+I,A.y+I,u),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,n){if(!mxEvent.isConsumed(d)){var u=g,x=!1;if(k&&null!=d.clipboardData&&
+d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),I=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var G=decodeURIComponent(A);this.isCompatibleString(G)&&(I=!0,A=G)}catch(V){}I=I?null:d.clipboardData.getData("text/html");null!=I&&0<I.length?(u=this.parseHtmlData(I),x="text/plain"!=u.getAttribute("data-type")):null!=A&&0<A.length&&(u=document.createElement("div"),mxUtils.setTextContent(u,I))}A=u.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===
A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(V){var q=this.editor.graph;q.lastPasteXml==V?q.pasteCounter++:(q.lastPasteXml=V,q.pasteCounter=0);var y=q.pasteCounter*q.gridSize;q.setSelectionCells(this.importXml(V,y,y));q.scrollCellToVisible(q.getSelectionCell())}),mxUtils.bind(this,function(V){this.handleError(V)})),mxEvent.consume(d));else{var C=!1,P="";P=x?null!=u.textContent&&"<mxfile"==u.textContent.substring(0,
-7)&&"</mxfile>"==u.textContent.substring(u.textContent.length-9)||"<mxGraphModel"==u.textContent.substring(0,13)&&"</mxGraphModel>"==u.textContent.substring(u.textContent.length-15)?u.textContent.replace(/\u00a0/g," "):u.innerHTML:mxUtils.trim(null==u.innerText?mxUtils.getTextContent(u):u.innerText);try{var R=P.lastIndexOf("%3E");0<=R&&R<P.length-3&&(P=P.substring(0,R+3))}catch(V){}try{A=u.getElementsByTagName("span"),(F=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(P))&&
-(this.isCompatibleString(F)||0==F.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,P=F)}catch(V){}try{if(null!=P&&0<P.length){if(0==P.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var U=mxUtils.bind(this,function(){try{P=(new MiroImporter).importMiroJson(JSON.parse(P)),this.pasteXml(P,m,C,d)}catch(V){console.log("Miro import error:",V)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",U):U()}else this.pasteXml(P,m,C,d,x);try{mxEvent.consume(d)}catch(V){}}else if(!k){var O=
-this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(V){this.handleError(V)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(d,g,k){var m=320;this.editor.graph.isEnabled()&&(m+=40);null!=this.pages&&1<this.pages.length&&(m+=40,this.editor.graph.isEnabled()||(m+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(m+=20);this.showDialog((new PrintDialog(this,d,g,k)).container,320,m,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,m=k.graph,
-u=this.getPageIndex(this.currentPage),x=null!=u?u+1:1,A=mxUtils.bind(this,function(y,D,J,L){var K=y.useCssTransforms,n=y.currentTranslate,z=y.currentScale,G=y.view.translate,M=y.view.scale;y.useCssTransforms&&(y.useCssTransforms=!1,y.currentTranslate=new mxPoint(0,0),y.currentScale=1,y.view.translate=new mxPoint(0,0),y.view.scale=1);var N=y.getGraphBounds(),Q=0,S=0,T=mxRectangle.fromRectangle(y.pageFormat),W=g.fit||g.crop||!y.pageVisible,X=g.scale;T.width=Math.ceil(T.width*y.pageScale);T.height=Math.ceil(T.height*
-y.pageScale);var Z=1;if(g.fit){Z=g.sheetsAcross;var Y=g.sheetsDown;isNaN(X)||(T.width=Math.ceil(T.width*X),T.height=Math.ceil(T.height*X));Z=Math.min(T.height*Y/(N.height/y.view.scale),T.width*Z/(N.width/y.view.scale))}else Z=isNaN(X)?1:X;Z*=1;!W&&y.pageVisible?(X=y.getPageLayout(),Q-=X.x*T.width,S-=X.y*T.height):W=!0;g.crop&&(g.selection&&(N=m.getBoundingBox(m.getSelectionCells())),T.width=(N.width+1)*Z/y.view.scale,T.height=(N.height+1)*Z/y.view.scale);T.width=Math.ceil(1*T.width);T.height=Math.ceil(1*
+7)&&"</mxfile>"==u.textContent.substring(u.textContent.length-9)||"<mxGraphModel"==u.textContent.substring(0,13)&&"</mxGraphModel>"==u.textContent.substring(u.textContent.length-15)?u.textContent.replace(/\u00a0/g," "):u.innerHTML:mxUtils.trim(null==u.innerText?mxUtils.getTextContent(u):u.innerText);try{var R=P.lastIndexOf("%3E");0<=R&&R<P.length-3&&(P=P.substring(0,R+3))}catch(V){}try{A=u.getElementsByTagName("span"),(G=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(P))&&
+(this.isCompatibleString(G)||0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,P=G)}catch(V){}try{if(null!=P&&0<P.length){if(0==P.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var U=mxUtils.bind(this,function(){try{P=(new MiroImporter).importMiroJson(JSON.parse(P)),this.pasteXml(P,n,C,d)}catch(V){console.log("Miro import error:",V)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",U):U()}else this.pasteXml(P,n,C,d,x);try{mxEvent.consume(d)}catch(V){}}else if(!k){var N=
+this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(V){this.handleError(V)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(d,g,k){var n=320;this.editor.graph.isEnabled()&&(n+=40);null!=this.pages&&1<this.pages.length&&(n+=40,this.editor.graph.isEnabled()||(n+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(n+=20);this.showDialog((new PrintDialog(this,d,g,k)).container,320,n,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,n=k.graph,
+u=this.getPageIndex(this.currentPage),x=null!=u?u+1:1,A=mxUtils.bind(this,function(y,D,J,L){var K=y.useCssTransforms,m=y.currentTranslate,z=y.currentScale,F=y.view.translate,M=y.view.scale;y.useCssTransforms&&(y.useCssTransforms=!1,y.currentTranslate=new mxPoint(0,0),y.currentScale=1,y.view.translate=new mxPoint(0,0),y.view.scale=1);var O=y.getGraphBounds(),Q=0,S=0,T=mxRectangle.fromRectangle(y.pageFormat),W=g.fit||g.crop||!y.pageVisible,X=g.scale;T.width=Math.ceil(T.width*y.pageScale);T.height=Math.ceil(T.height*
+y.pageScale);var Z=1;if(g.fit){Z=g.sheetsAcross;var Y=g.sheetsDown;isNaN(X)||(T.width=Math.ceil(T.width*X),T.height=Math.ceil(T.height*X));Z=Math.min(T.height*Y/(O.height/y.view.scale),T.width*Z/(O.width/y.view.scale))}else Z=isNaN(X)?1:X;Z*=1;!W&&y.pageVisible?(X=y.getPageLayout(),Q-=X.x*T.width,S-=X.y*T.height):W=!0;g.crop&&(g.selection&&(O=n.getBoundingBox(n.getSelectionCells())),T.width=(O.width+1)*Z/y.view.scale,T.height=(O.height+1)*Z/y.view.scale);T.width=Math.ceil(1*T.width);T.height=Math.ceil(1*
T.height);L=null!=L?"page/id,"+L:null;if(null==D){D=PrintDialog.createPrintPreview(y,Z,null,0,Q,S,W);D.title=this.getBaseFilename(!0);D.pageSelector=!1;D.mathEnabled=!1;Q=g.border;isNaN(Q)||(D.pageMargin=Q);g.selection&&(D.isCellVisible=function(ca){return y.isCellSelected(ca)});var ba=D.writeHead;D.writeHead=function(ca){ba.apply(this,arguments);mxClient.IS_GC&&(ca.writeln('<style type="text/css">'),ca.writeln("@media print {"),ca.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ca.writeln("}"),
ca.writeln("</style>"));null!=k.fontCss&&(ca.writeln('<style type="text/css">'),ca.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,!1)),ca.writeln("</style>"));for(var fa=y.getCustomFonts(),aa=0;aa<fa.length;aa++){var ja=fa[aa].name,ha=fa[aa].url;Graph.isCssFontUrl(ha)?ca.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(ha))+'" charset="UTF-8" type="text/css">'):(ca.writeln('<style type="text/css">'),ca.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ja)+
-'";\nsrc: url("'+mxUtils.htmlEntities(ha)+'");\n}'),ca.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=D.drawBackgroundImage;D.drawBackgroundImage=function(ca){da.apply(this,arguments);null!=ca.node&&(EditorUi.embedSvgImages(ca.node),m.disableSvgLinks(ca.node,function(fa){fa.setAttribute("href","javascript:void(0)")}))}}var ia=D.addGraphFragment;D.addGraphFragment=function(ca,fa,aa,ja,ha,ea){ia.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:ha.classList.add("geDisableMathJax")};
-g.grid&&(D.gridSize=y.gridSize,D.gridSteps=y.view.gridSteps,D.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:y.view.gridColor);D.open(null,null,J,!0,L,T,g.selection?y.getSelectionCells():null)}else{N=y.background;if(null==N||""==N||N==mxConstants.NONE)N="#ffffff";D.backgroundColor=N;D.autoOrigin=W;g.grid&&(D.gridSize=y.gridSize,D.gridSteps=y.view.gridSteps,D.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:y.view.gridColor);D.appendGraph(y,Z,Q,S,J,!0,L,T,
+'";\nsrc: url("'+mxUtils.htmlEntities(ha)+'");\n}'),ca.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var da=D.drawBackgroundImage;D.drawBackgroundImage=function(ca){da.apply(this,arguments);null!=ca.node&&(EditorUi.embedSvgImages(ca.node),n.disableSvgLinks(ca.node,function(fa){fa.setAttribute("href","javascript:void(0)")}))}}var ia=D.addGraphFragment;D.addGraphFragment=function(ca,fa,aa,ja,ha,ea){ia.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:ha.classList.add("geDisableMathJax")};
+g.grid&&(D.gridSize=y.gridSize,D.gridSteps=y.view.gridSteps,D.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:y.view.gridColor);D.open(null,null,J,!0,L,T,g.selection?y.getSelectionCells():null)}else{O=y.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";D.backgroundColor=O;D.autoOrigin=W;g.grid&&(D.gridSize=y.gridSize,D.gridSteps=y.view.gridSteps,D.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:y.view.gridColor);D.appendGraph(y,Z,Q,S,J,!0,L,T,
g.selection?y.getSelectionCells():null);J=y.getCustomFonts();if(null!=D.wnd)for(T=0;T<J.length;T++)Q=J[T].name,S=J[T].url,Graph.isCssFontUrl(S)?D.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(S)+'" charset="UTF-8" type="text/css">'):(D.wnd.document.writeln('<style type="text/css">'),D.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Q)+'";\nsrc: url("'+mxUtils.htmlEntities(S)+'");\n}'),D.wnd.document.writeln("</style>"))}K&&(y.useCssTransforms=K,
-y.currentTranslate=n,y.currentScale=z,y.view.translate=G,y.view.scale=M);return D}),I=g.pagesFrom,F=g.pagesTo,C=!g.allPages;u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{C&&(C=g.selection||I==x&&F==x);if(!C&&null!=this.pages&&this.pages.length){C=0;x=this.pages.length-1;g.allPages||(C=parseInt(I)-1,x=parseInt(F)-1);for(var P=C;P<=x;P++){var R=this.pages[P];I=R==this.currentPage?m:null;if(null==I){I=this.createTemporaryGraph(m.stylesheet);I.shapeForegroundColor=m.shapeForegroundColor;
-I.shapeBackgroundColor=m.shapeBackgroundColor;F=!0;C=!1;var U=null,O=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(F=R.viewState.pageVisible,C=R.viewState.mathEnabled,U=R.viewState.background,O=R.viewState.backgroundImage,I.pageFormat=R.viewState.pageFormat,I.gridSize=R.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,R));I.background=U;I.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;I.pageVisible=
-F;I.mathEnabled=C;var V=I.getGraphBounds;I.getGraphBounds=function(){var y=V.apply(this,arguments),D=this.backgroundImage;if(null!=D&&null!=D.width&&null!=D.height){var J=this.view.translate,L=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((J.x+D.x)*L,(J.y+D.y)*L,D.width*L,D.height*L))}return y};var q=I.getGlobalVariable;I.getGlobalVariable=function(y){return"page"==y?R.getName():"pagenumber"==y?P+1:"pagecount"==y?null!=this.pages?this.pages.length:1:q.apply(this,arguments)};
-document.body.appendChild(I.container);this.updatePageRoot(R);I.model.setRoot(R.root)}u=A(I,u,P!=x,R.getId());I!=m&&I.container.parentNode.removeChild(I.container)}}else u=A(m);null==u||null==u.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(A=u.wnd.document,d||(u.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),u.closeDocument(),Graph.rewritePageLinks(u.wnd.document,!0),u.mathEnabled||d||PrintDialog.printPreview(u));
-return u}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(m){null!=g&&(g.parentNode.removeChild(g),g=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());m.stopPropagation();
-m.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(m){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var u=this.extractGraphModelFromEvent(m);if(null==u){var x=null!=m.dataTransfer?
-m.dataTransfer:m.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?u=x.getData("Text"):(u=null,u=0<=mxUtils.indexOf(x.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=u&&0<u.length?(x=document.createElement("div"),x.innerHTML=Graph.sanitizeHtml(u),x=x.getElementsByTagName("img"),0<x.length&&(u=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(u=x.getData("text/plain"))),
+y.currentTranslate=m,y.currentScale=z,y.view.translate=F,y.view.scale=M);return D}),I=g.pagesFrom,G=g.pagesTo,C=!g.allPages;u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,g);else{C&&(C=g.selection||I==x&&G==x);if(!C&&null!=this.pages&&this.pages.length){C=0;x=this.pages.length-1;g.allPages||(C=parseInt(I)-1,x=parseInt(G)-1);for(var P=C;P<=x;P++){var R=this.pages[P];I=R==this.currentPage?n:null;if(null==I){I=this.createTemporaryGraph(n.stylesheet);I.shapeForegroundColor=n.shapeForegroundColor;
+I.shapeBackgroundColor=n.shapeBackgroundColor;G=!0;C=!1;var U=null,N=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(G=R.viewState.pageVisible,C=R.viewState.mathEnabled,U=R.viewState.background,N=R.viewState.backgroundImage,I.pageFormat=R.viewState.pageFormat,I.gridSize=R.viewState.gridSize);null!=N&&null!=N.originalSrc&&(N=this.createImageForPageLink(N.originalSrc,R));I.background=U;I.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height,N.x,N.y):null;I.pageVisible=
+G;I.mathEnabled=C;var V=I.getGraphBounds;I.getGraphBounds=function(){var y=V.apply(this,arguments),D=this.backgroundImage;if(null!=D&&null!=D.width&&null!=D.height){var J=this.view.translate,L=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((J.x+D.x)*L,(J.y+D.y)*L,D.width*L,D.height*L))}return y};var q=I.getGlobalVariable;I.getGlobalVariable=function(y){return"page"==y?R.getName():"pagenumber"==y?P+1:"pagecount"==y?null!=this.pages?this.pages.length:1:q.apply(this,arguments)};
+document.body.appendChild(I.container);this.updatePageRoot(R);I.model.setRoot(R.root)}u=A(I,u,P!=x,R.getId());I!=n&&I.container.parentNode.removeChild(I.container)}}else u=A(n);null==u||null==u.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(u.mathEnabled&&(A=u.wnd.document,d||(u.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),u.closeDocument(),Graph.rewritePageLinks(u.wnd.document,!0),u.mathEnabled||d||PrintDialog.printPreview(u));
+return u}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(n){null!=g&&(g.parentNode.removeChild(g),g=null);n.stopPropagation();n.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(n){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());n.stopPropagation();
+n.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(n){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<n.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(n.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(n)&&!mxEvent.isShiftDown(n)):this.openFiles(n.dataTransfer.files,!0);else{var u=this.extractGraphModelFromEvent(n);if(null==u){var x=null!=n.dataTransfer?
+n.dataTransfer:n.clipboardData;null!=x&&(10==document.documentMode||11==document.documentMode?u=x.getData("Text"):(u=null,u=0<=mxUtils.indexOf(x.types,"text/uri-list")?n.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(x.types,"text/html")?x.getData("text/html"):null,null!=u&&0<u.length?(x=document.createElement("div"),x.innerHTML=Graph.sanitizeHtml(u),x=x.getElementsByTagName("img"),0<x.length&&(u=x[0].getAttribute("src"))):0<=mxUtils.indexOf(x.types,"text/plain")&&(u=x.getData("text/plain"))),
null!=u&&(Editor.isPngDataUrl(u)?(u=Editor.extractGraphModelFromPng(u),null!=u&&0<u.length&&this.openLocalFile(u,null,!0)):this.isRemoteFileFormat(u)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(u))).send(mxUtils.bind(this,function(A){200<=A.getStatus()&&299>=A.getStatus()?this.openLocalFile(A.getText(),null,!0):this.showError(mxResources.get("error"),413==A.getStatus()?mxResources.get("diagramTooLarge"):
-mxResources.get("unknownError"))})):/^https?:\/\//.test(u)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(u):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(u)))))}else this.openLocalFile(u,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var m=document.body;var u=document.documentElement;var x=(m.clientWidth||
-u.clientWidth)-3;m=Math.max(m.clientHeight||0,u.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,m=d.clientHeight;u=document.createElement("div");u.style.zIndex=mxPopupMenu.prototype.zIndex+2;u.style.border="3px dotted rgb(254, 137, 12)";u.style.pointerEvents="none";u.style.position="absolute";u.style.top=g+"px";u.style.left=k+"px";u.style.width=Math.max(0,x-3)+"px";u.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(u):
-document.body.appendChild(u);return u};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),m=new mxGraphModel;k.decode(g,m);g=m.getChildAt(m.getRoot(),0);for(k=0;k<m.getChildCount(g);k++)d.push(m.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,m,u,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,
-g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(F){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==F.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,F,g)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(F,g,m)});if(EditorUi.isVisioFilename(g))this.importVisio(k,
-mxUtils.bind(this,function(F){this.spinner.stop();A(F)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(F){this.spinner.stop();A(F)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(F){4==F.readyState&&(this.spinner.stop(),200<=F.status&&299>=F.status?A(F.responseText):this.handleError({message:mxResources.get(413==
-F.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(F){this.spinner.stop();this.openLocalFile(F,g,m)}),mxUtils.bind(this,function(F){this.spinner.stop();this.handleError(F)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(F){this.spinner.stop();A(F)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,m)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var I=Editor.extractGraphModelFromPdf(d);null!=
-I&&(u=null,m=!0,d=I)}this.spinner.stop();this.openLocalFile(d,g,m,u,null!=u?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(m){var u=new FileReader;u.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,m.name,m,g)}catch(A){this.handleError(A)}});u.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==
-m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?u.readAsText(m):u.readAsDataURL(m)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,m,u,x){var A=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var F=mxUtils.parseXml(d);null!=F&&(this.editor.setGraphXml(F.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,
-k,m,u,x))});if(null!=d&&0<d.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=A&&A.isModified()?
+mxResources.get("unknownError"))})):/^https?:\/\//.test(u)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(u):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(u)))))}else this.openLocalFile(u,null,!0)}n.stopPropagation();n.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var n=document.body;var u=document.documentElement;var x=(n.clientWidth||
+u.clientWidth)-3;n=Math.max(n.clientHeight||0,u.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,n=d.clientHeight;u=document.createElement("div");u.style.zIndex=mxPopupMenu.prototype.zIndex+2;u.style.border="3px dotted rgb(254, 137, 12)";u.style.pointerEvents="none";u.style.position="absolute";u.style.top=g+"px";u.style.left=k+"px";u.style.width=Math.max(0,x-3)+"px";u.style.height=Math.max(0,n-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(u):
+document.body.appendChild(u);return u};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),n=new mxGraphModel;k.decode(g,n);g=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(g);k++)d.push(n.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,n,u,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,
+g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(G){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==G.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,G,g)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(G,g,n)});if(EditorUi.isVisioFilename(g))this.importVisio(k,
+mxUtils.bind(this,function(G){this.spinner.stop();A(G)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(G){this.spinner.stop();A(G)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(G){4==G.readyState&&(this.spinner.stop(),200<=G.status&&299>=G.status?A(G.responseText):this.handleError({message:mxResources.get(413==
+G.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(G){this.spinner.stop();this.openLocalFile(G,g,n)}),mxUtils.bind(this,function(G){this.spinner.stop();this.handleError(G)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,n);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(G){this.spinner.stop();A(G)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,n)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var I=Editor.extractGraphModelFromPdf(d);null!=
+I&&(u=null,n=!0,d=I)}this.spinner.stop();this.openLocalFile(d,g,n,u,null!=u?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<d.length;k++)mxUtils.bind(this,function(n){var u=new FileReader;u.onload=mxUtils.bind(this,function(x){try{this.openFileHandle(x.target.result,n.name,n,g)}catch(A){this.handleError(A)}});u.onerror=mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x);window.openFile=null});"image"!==
+n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?u.readAsText(n):u.readAsDataURL(n)})(d[k])};EditorUi.prototype.openLocalFile=function(d,g,k,n,u,x){var A=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var G=mxUtils.parseXml(d);null!=G&&(this.editor.setGraphXml(G.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,
+k,n,u,x))});if(null!=d&&0<d.length)null==A||!A.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=A&&A.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,g),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=A&&A.isModified()?
this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var k in d)g.push(k);return g};EditorUi.prototype.addBasenamesForCell=
-function(d,g){function k(A){if(null!=A){var I=A.lastIndexOf(".");0<I&&(A=A.substring(I+1,A.length));null==g[A]&&(g[A]=!0)}}var m=this.editor.graph,u=m.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(u[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&(k(mxMarker.getPackageForType(u[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(u[mxConstants.STYLE_ENDARROW])));u=m.model.getChildCount(d);for(var x=0;x<u;x++)this.addBasenamesForCell(m.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=
+function(d,g){function k(A){if(null!=A){var I=A.lastIndexOf(".");0<I&&(A=A.substring(I+1,A.length));null==g[A]&&(g[A]=!0)}}var n=this.editor.graph,u=n.getCellStyle(d);k(mxStencilRegistry.getBasenameForStencil(u[mxConstants.STYLE_SHAPE]));n.model.isEdge(d)&&(k(mxMarker.getPackageForType(u[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(u[mxConstants.STYLE_ENDARROW])));u=n.model.getChildCount(d);for(var x=0;x<u;x++)this.addBasenamesForCell(n.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=
function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);d||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=
-function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,m,u){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(u)try{var x=this.editor.graph;x.setGridEnabled(!1);
-x.pageVisible=!1;var A=x.model.cells,I;for(I in A){var F=A[I];null!=F&&null!=F.style&&(F.style+=";sketch=1;"+(-1==F.style.indexOf("fontFamily=")||-1<F.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(C){console.log(C)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
-this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&
+function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,n,u){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(u)try{var x=this.editor.graph;x.setGridEnabled(!1);
+x.pageVisible=!1;var A=x.model.cells,I;for(I in A){var G=A[I];null!=G&&null!=G.style&&(G.style+=";sketch=1;"+(-1==G.style.indexOf("fontFamily=")||-1<G.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(C){console.log(C)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
+this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&
d.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();g(k)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||
-window.parent;if(this.editor.modified){var m=g.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(u){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(u)}),"*")}),null,null,!0,m,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
-"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(u){d||this.handleError(u)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,m=!1,u=null,x=mxUtils.bind(this,function(F,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
-function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(F){if(F.source==(window.opener||window.parent)){var C=F.data,P=null,R=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,
-26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(ja){}return aa});if("json"==urlParams.proto){var U=!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[F],"data",[C])}catch(aa){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):
-C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));return}if("prompt"==C.action){this.spinner.stop();var O=new FilenameDialog(this,C.defaultValue||"",null!=C.okKey?mxResources.get(C.okKey):C.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",
-value:aa,message:C}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")},null!=C.titleKey?mxResources.get(C.titleKey):C.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")});this.showDialog(O.container,300,80,!0,!1);O.init();return}if("draft"==C.action){var V=R(C.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),V,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));
-try{O.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var q=1==C.enableRecent,y=1==C.enableSearch,D=1==C.enableCustomTemp;O=new NewDialog(this,!1,C.templatesOnly?!1:null!=C.callback,mxUtils.bind(this,function(aa,ja,ha,ea){aa=aa||this.emptyDiagramXml;null!=C.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:ja,tempUrl:ha,libs:ea,builtIn:!0,message:C}),
-"*"):(d(aa,F,aa!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):null,y?mxUtils.bind(this,function(aa,ja){this.remoteInvoke("searchDiagrams",[aa,null],null,ja,function(){ja(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,ja,ha){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:ja,name:ha}),
-"*")}),null,null,D?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==C.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==C.action){var J=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:J,message:C}),"*");return}if("status"==C.action){this.updateStatus(mxUtils.bind(this,
+window.parent;if(this.editor.modified){var n=g.background;if(null==n||n==mxConstants.NONE)n=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(u){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(u)}),"*")}),null,null,!0,n,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
+"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(u){d||this.handleError(u)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,n=!1,u=null,x=mxUtils.bind(this,function(G,C){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(G){if(G.source==(window.opener||window.parent)){var C=G.data,P=null,R=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,
+26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(ja){}return aa});if("json"==urlParams.proto){var U=!1;try{C=JSON.parse(C),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[G],"data",[C])}catch(aa){C=null}try{if(null==C)return;if("dialog"==C.action){this.showError(null!=C.titleKey?mxResources.get(C.titleKey):
+C.title,null!=C.messageKey?mxResources.get(C.messageKey):mxUtils.htmlEntities(C.message),null!=C.buttonKey?mxResources.get(C.buttonKey):C.button);null!=C.modified&&(this.editor.modified=C.modified);return}if("layout"==C.action){this.executeLayouts(this.editor.graph.createLayouts(C.layouts));return}if("prompt"==C.action){this.spinner.stop();var N=new FilenameDialog(this,C.defaultValue||"",null!=C.okKey?mxResources.get(C.okKey):C.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",
+value:aa,message:C}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")},null!=C.titleKey?mxResources.get(C.titleKey):C.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:C}),"*")});this.showDialog(N.container,300,80,!0,!1);N.init();return}if("draft"==C.action){var V=R(C.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",[C.name||this.defaultFilename]),V,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:C}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:C}),"*")}),C.editKey?mxResources.get(C.editKey):null,C.discardKey?mxResources.get(C.discardKey):null,C.ignore?mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:C}),"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));
+try{N.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:C}),"*")}return}if("template"==C.action){this.spinner.stop();var q=1==C.enableRecent,y=1==C.enableSearch,D=1==C.enableCustomTemp;N=new NewDialog(this,!1,C.templatesOnly?!1:null!=C.callback,mxUtils.bind(this,function(aa,ja,ha,ea){aa=aa||this.emptyDiagramXml;null!=C.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:ja,tempUrl:ha,libs:ea,builtIn:!0,message:C}),
+"*"):(d(aa,G,aa!=this.emptyDiagramXml,C.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,q?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):null,y?mxUtils.bind(this,function(aa,ja){this.remoteInvoke("searchDiagrams",[aa,null],null,ja,function(){ja(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,ja,ha){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:ja,name:ha}),
+"*")}),null,null,D?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==C.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();aa&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==C.action){var J=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:J,message:C}),"*");return}if("status"==C.action){this.updateStatus(mxUtils.bind(this,
function(){null!=C.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(C.messageKey))):null!=C.message&&this.editor.setStatus(mxUtils.htmlEntities(C.message))}));null!=C.modified&&(this.editor.modified=C.modified);return}if("spinner"==C.action){var L=null!=C.messageKey?mxResources.get(C.messageKey):C.message;null==C.show||C.show?this.spinner.spin(document.body,L):this.spinner.stop();return}if("exit"==C.action){this.actions.get("exit").funct();return}if("viewport"==C.action){if(null!=
-C.viewport){var K=this.editor.graph,n=K.view.translate.x,z=K.view.translate.y;this.embedViewport=C.viewport;K.refresh();this.diagramContainer.scrollTop-=(z-K.view.translate.y)*K.view.scale;this.diagramContainer.scrollLeft-=(n-K.view.translate.x)*K.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){O=null;try{var G=this.diagramContainer.getAttribute("data-scrollState");null!=G&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(G))}catch(aa){}Editor.inlineFullscreen=
-C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var M=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);K=this.editor.graph;var N=mxUtils.bind(this,function(aa,ja){if(C.withSvg)C.withSvg=
-!1,this.getEmbeddedSvg(M,this.editor.graph,null,!0,function(ea){N(aa,ea)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=C.format;ha.message=C;ha.data=aa;ha.svg=ja;ha.xml=M;A.postMessage(JSON.stringify(ha),"*")}}),Q=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==C.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(M)));
-K!=this.editor.graph&&K.container.parentNode.removeChild(K.container);N(aa)}),S=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var T=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=S){var aa=K.getGlobalVariable;K=this.createTemporaryGraph(K.getStylesheet());for(var ja,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==S){ja=this.updatePageRoot(this.pages[ha]);break}null==ja&&(ja=this.currentPage);
+C.viewport){var K=this.editor.graph,m=K.view.translate.x,z=K.view.translate.y;this.embedViewport=C.viewport;K.refresh();this.diagramContainer.scrollTop-=(z-K.view.translate.y)*K.view.scale;this.diagramContainer.scrollLeft-=(m-K.view.translate.x)*K.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==C.action){N=null;try{var F=this.diagramContainer.getAttribute("data-scrollState");null!=F&&(this.diagramContainer.removeAttribute("data-scrollState"),N=JSON.parse(F))}catch(aa){}Editor.inlineFullscreen=
+C.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=N&&this.restoreScrollState(N);return}if("snapshot"==C.action){this.sendEmbeddedSvgExport(!0);return}if("export"==C.action){if("png"==C.format||"xmlpng"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){var M=null!=C.xml?C.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);K=this.editor.graph;var O=mxUtils.bind(this,function(aa,ja){if(C.withSvg)C.withSvg=
+!1,this.getEmbeddedSvg(M,this.editor.graph,null,!0,function(ea){O(aa,ea)},null,null,C.embedImages,this.editor.graph.background,C.scale,C.border,C.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=C.format;ha.message=C;ha.data=aa;ha.svg=ja;ha.xml=M;A.postMessage(JSON.stringify(ha),"*")}}),Q=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==C.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(M)));
+K!=this.editor.graph&&K.container.parentNode.removeChild(K.container);O(aa)}),S=C.pageId||(null!=this.pages?C.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var T=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=S){var aa=K.getGlobalVariable;K=this.createTemporaryGraph(K.getStylesheet());for(var ja,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==S){ja=this.updatePageRoot(this.pages[ha]);break}null==ja&&(ja=this.currentPage);
K.getGlobalVariable=function(na){return"page"==na?ja.getName():"pagenumber"==na?1:aa.apply(this,arguments)};document.body.appendChild(K.container);K.model.setRoot(ja.root)}if(null!=C.layerIds){var ea=K.model,ya=ea.getChildCells(ea.getRoot()),ua={};for(ha=0;ha<C.layerIds.length;ha++)ua[C.layerIds[ha]]=!0;for(ha=0;ha<ya.length;ha++)ea.setVisible(ya[ha],ua[ya[ha].id]||!1)}ha=null;C.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(na){Q(na.toDataURL("image/png"))}),
C.width,null,C.background,mxUtils.bind(this,function(){Q(null)}),null,null,C.scale,C.transparent,C.shadow,null,K,C.border,null,C.grid,ha)});null!=C.xml&&0<C.xml.length&&(k=!0,this.setFileData(M),k=!1);T()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==C.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=C.layerIds&&0<C.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:C.layerIds})):"")+(null!=C.scale?"&scale="+C.scale:"")+"&base64=1&xml="+encodeURIComponent(M))).send(mxUtils.bind(this,
-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?N("data:image/png;base64,"+aa.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(T=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();aa.xml=mxUtils.getXml(ja);aa.data=this.getFileData(null,null,!0,null,null,null,ja);aa.format=C.format}else if("html"==C.format)ja=this.editor.getGraphXml(),
+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?O("data:image/png;base64,"+aa.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(T=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=C;if("html2"==C.format||"html"==C.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();aa.xml=mxUtils.getXml(ja);aa.data=this.getFileData(null,null,!0,null,null,null,ja);aa.format=C.format}else if("html"==C.format)ja=this.editor.getGraphXml(),
aa.data=this.getHtml(ja,this.editor.graph),aa.xml=mxUtils.getXml(ja),aa.format=C.format;else{mxSvgCanvas2D.prototype.foAltText=null;ja=null!=C.background?C.background:this.editor.graph.background;ja==mxConstants.NONE&&(ja=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(ya){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=C.asText?ya:Editor.createSvgDataUri(ya);A.postMessage(JSON.stringify(aa),"*")}),ea="auto";
C.keepTheme&&(ea=Editor.isDarkMode()?"dark":"light");null!=C.theme&&(ea=C.theme);if("xmlsvg"==C.format){if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=C.spinKey?mxResources.get(C.spinKey):C.spin)){ea=null;if(this.isAutoDarkMode()||Editor.isDarkMode())ea="auto";null!=C.theme&&(ea=C.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,C.embedImages,ja,C.scale,C.border,C.shadow,ea)}}else if(null==C.spin&&null==C.spinKey||this.spinner.spin(document.body,null!=
C.spinKey?mxResources.get(C.spinKey):C.spin))this.editor.graph.setEnabled(!1),ja=this.editor.graph.getSvg(ja,C.scale,C.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||C.shadow,null,ea),(this.editor.graph.shadowVisible||C.shadow)&&this.editor.graph.addSvgShadow(ja),this.embedFonts(ja,mxUtils.bind(this,function(ya){C.embedImages||null==C.embedImages?this.editor.convertImages(ya,mxUtils.bind(this,function(ua){ha(mxUtils.getXml(ua))})):ha(mxUtils.getXml(ya))}));return}A.postMessage(JSON.stringify(aa),
-"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);T()}}k=!0;this.setFileData(C.xml);k=!1;this.editor.graph.mathEnabled||T()}else T();return}if("load"==C.action){U=C.toSketch;m=1==C.autosave;this.hideDialog();null!=C.modified&&null==urlParams.modified&&(urlParams.modified=C.modified);null!=C.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=C.saveAndExit);if("1"==urlParams.saveAndExit||
+"*")}),null!=C.xml&&0<C.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);T()}}k=!0;this.setFileData(C.xml);k=!1;this.editor.graph.mathEnabled||T()}else T();return}if("load"==C.action){U=C.toSketch;n=1==C.autosave;this.hideDialog();null!=C.modified&&null==urlParams.modified&&(urlParams.modified=C.modified);null!=C.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=C.saveAndExit);if("1"==urlParams.saveAndExit||
"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=C.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=C.noSaveBtn);if(null!=C.rough){var X=Editor.sketchMode;this.doSetSketchMode(C.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
C.dark&&this.setDarkMode(C.dark);null!=C.border&&(this.embedExportBorder=C.border);null!=C.theme&&(this.embedExportTheme=C.theme);null!=C.background&&(this.embedExportBackground=C.background);null!=C.viewport&&(this.embedViewport=C.viewport);this.embedExitPoint=null;if(null!=C.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,C.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,C.rect.top)+"px";this.minInlineWidth=C.minWidth;this.minInlineHeight=C.minHeight;
this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Y=C.maxFitScale,ba=C.rect.width+2*Z,da=C.rect.height+2*Z;P=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ba):ba,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,da):da,aa.height-80);this.diagramContainer.style.width=ba+"px";this.diagramContainer.style.height=
aa+"px";var ja=this.editor.graph;aa=ja.maxFitScale;ja.maxFitScale=Y;ja.fit(2*Z,null,null,null,null,null,da);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ja.getGraphBounds().width<this.minInlineWidth){var ha=ja.container.scrollTop;this.resetScrollbars();ja.container.scrollTop=ha}ja.maxFitScale=aa;ja.container.scrollTop-=Z;ja.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[C]));ja.container.focus();null!=this.formatWindow&&
null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ja.container.style.top);var ea=ja.getGraphBounds();ja.container.clientWidth>ea.width+2*Z&&(ja.container.scrollLeft=ea.x+(ea.width+Z-ja.container.clientWidth)/2)}),10)})}null!=C.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=C.noExitBtn);null!=C.title&&null!=this.buttonContainer&&this.setEmbedTitle(C.title);try{C.libs&&this.sidebar.showEntries(C.libs)}catch(aa){}C=null!=C.xmlpng?
-this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ia=this.getCurrentFile();null!=ia&&(V=R(C.xml),null!=V&&""!=V&&ia.mergeFile(new LocalFile(this,V),function(){A.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:C,error:aa}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,F.origin):"remoteInvokeResponse"==
-C.action?this.handleRemoteInvokeResponse(C):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,ja){k=!0;try{d(aa,ja,null,U)}catch(ha){this.handleError(ha)}k=!1;null!=urlParams.modified&&this.clearStatus();u=ca();m&&null==g&&(g=mxUtils.bind(this,
+this.extractGraphModelFromPng(C.xmlpng):null!=C.descriptor?C.descriptor:C.xml}else{if("merge"==C.action){var ia=this.getCurrentFile();null!=ia&&(V=R(C.xml),null!=V&&""!=V&&ia.mergeFile(new LocalFile(this,V),function(){A.postMessage(JSON.stringify({event:"merge",message:C}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:C,error:aa}),"*")}))}else"remoteInvokeReady"==C.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==C.action?this.handleRemoteInvoke(C,G.origin):"remoteInvokeResponse"==
+C.action?this.handleRemoteInvokeResponse(C):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(C)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,ja){k=!0;try{d(aa,ja,null,U)}catch(ha){this.handleError(ha)}k=!1;null!=urlParams.modified&&this.clearStatus();u=ca();n&&null==g&&(g=mxUtils.bind(this,
function(ha,ea){ha=ca();ha==u||k||(ea=this.createLoadMessage("autosave"),ea.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(ea),"*"));u=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",
g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ja=this.createLoadMessage("load"),ja.xml=aa,A.postMessage(JSON.stringify(ja),"*");null!=P&&P()});null!=C&&"function"===typeof C.substring&&"data:application/vnd.visio;base64,"==C.substring(0,34)?(R="0M8R4KGxGuE"==C.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(C.substring(C.indexOf(",")+
-1)),function(aa){fa(aa,F)},mxUtils.bind(this,function(aa){this.handleError(aa)}),R)):null!=C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(C,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,F):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):
-mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==C||"object"!==typeof C||null==C.format||null==C.data&&null==C.url?(C=R(C),fa(C,F)):this.loadDescriptor(C,mxUtils.bind(this,function(aa){fa(ca(),F)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;
-x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(F,C,P){I.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",href:F,target:C,allowOpener:P}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,m){var u=document.createElement("button");u.className="geEmbedBtn geBtn";u.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(u,
-d);m&&u.classList.add("gePrimaryBtn");mxEvent.addListener(u,"click",g);return u};EditorUi.prototype.setEmbedTitle=function(d){d=this.createStatusDiv(d);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(d):this.buttonContainer.appendChild(d);this.embedFilenameSpan=d};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var d=
+1)),function(aa){fa(aa,G)},mxUtils.bind(this,function(aa){this.handleError(aa)}),R)):null!=C&&"function"===typeof C.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(C,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(C,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,G):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):
+mxResources.get("unknownError")}))}),""):null!=C&&"function"===typeof C.substring&&this.isLucidChartData(C)?this.convertLucidChart(C,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==C||"object"!==typeof C||null==C.format||null==C.data&&null==C.url?(C=R(C),fa(C,G)):this.loadDescriptor(C,mxUtils.bind(this,function(aa){fa(ca(),G)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;
+x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var I=this.editor.graph.openLink;this.editor.graph.openLink=function(G,C,P){I.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",href:G,target:C,allowOpener:P}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,n){var u=document.createElement("button");u.className="geEmbedBtn geBtn";u.setAttribute("title",d+(null!=k?" ("+k+")":""));mxUtils.write(u,
+d);n&&u.classList.add("gePrimaryBtn");mxEvent.addListener(u,"click",g);return u};EditorUi.prototype.setEmbedTitle=function(d){d=this.createStatusDiv(d);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(d):this.buttonContainer.appendChild(d);this.embedFilenameSpan=d};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var d=
null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";d&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,
Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==
urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var m=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(m));this.customLayoutConfig=m;this.hideDialog()}catch(u){this.handleError(u)}}),null,null,null,null,mxUtils.bind(this,function(k,m){var u=mxUtils.button(mxResources.get("copy"),
-mxUtils.bind(this,function(){try{var x=m.value;m.value=JSON.stringify(JSON.parse(x));m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));m.value=x}catch(A){this.handleError(A)}}));u.setAttribute("title","copy");u.className="geBtn";k.appendChild(u)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};
-EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),m=mxUtils.bind(this,function(u){this.loadingOrgChart=!1;g.clear()&&this.handleError(u)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=
-!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,m)},null,null,null,m)},null,null,null,m)},null,null,null,m):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,m))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,
-g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),m=[],u=[],x=[],A={};if(0<k.length){var I={},F=this.editor.graph,C=null,P=null,R=null,U=null,O=null,V=null,q=null,y="whiteSpace=wrap;html=1;",D=null,J=null,L="",K="auto",n="auto",z=!1,G=null,M=null,N=40,Q=40,S=100,T=0,W=mxUtils.bind(this,function(){null!=g?g(Ka):(F.setSelectionCells(Ka),F.scrollCellToVisible(F.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),
-0)}),X=F.getFreeInsertPoint(),Z=X.x,Y=X.y;X=Y;var ba=null,da="auto";J=null;for(var ia=[],ca=null,fa=null,aa=0;aa<k.length&&"#"==k[aa].charAt(0);){d=k[aa].replace(/\r$/,"");for(aa++;aa<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[aa].substring(1)),aa++;if("#"!=d.charAt(1)){var ja=d.indexOf(":");if(0<ja){var ha=mxUtils.trim(d.substring(1,ja)),ea=mxUtils.trim(d.substring(ja+1));"label"==ha?ba=Graph.sanitizeHtml(ea):"labelname"==ha&&0<ea.length&&
-"-"!=ea?O=ea:"labels"==ha&&0<ea.length&&"-"!=ea?q=JSON.parse(ea):"style"==ha?P=ea:"parentstyle"==ha?y=ea:"unknownStyle"==ha&&"-"!=ea?V=ea:"stylename"==ha&&0<ea.length&&"-"!=ea?U=ea:"styles"==ha&&0<ea.length&&"-"!=ea?R=JSON.parse(ea):"vars"==ha&&0<ea.length&&"-"!=ea?C=JSON.parse(ea):"identity"==ha&&0<ea.length&&"-"!=ea?D=ea:"parent"==ha&&0<ea.length&&"-"!=ea?J=ea:"namespace"==ha&&0<ea.length&&"-"!=ea?L=ea:"width"==ha?K=ea:"height"==ha?n=ea:"collapsed"==ha&&"-"!=ea?z="true"==ea:"left"==ha&&0<ea.length?
-G=ea:"top"==ha&&0<ea.length?M=ea:"ignore"==ha?fa=ea.split(","):"connect"==ha?ia.push(JSON.parse(ea)):"link"==ha?ca=ea:"padding"==ha?T=parseFloat(ea):"edgespacing"==ha?N=parseFloat(ea):"nodespacing"==ha?Q=parseFloat(ea):"levelspacing"==ha?S=parseFloat(ea):"layout"==ha&&(da=ea)}}}if(null==k[aa])throw Error(mxResources.get("invalidOrMissingFile"));var ya=this.editor.csvToArray(k[aa].replace(/\r$/,""));ja=d=null;ha=[];for(ea=0;ea<ya.length;ea++)D==ya[ea]&&(d=ea),J==ya[ea]&&(ja=ea),ha.push(mxUtils.trim(ya[ea]).replace(/[^a-z0-9]+/ig,
-"_").replace(/^\d+/,"").replace(/_+$/,""));null==ba&&(ba="%"+ha[0]+"%");if(null!=ia)for(var ua=0;ua<ia.length;ua++)null==I[ia[ua].to]&&(I[ia[ua].to]={});D=[];for(ea=aa+1;ea<k.length;ea++){var na=this.editor.csvToArray(k[ea].replace(/\r$/,""));if(null==na){var za=40<k[ea].length?k[ea].substring(0,40)+"...":k[ea];throw Error(za+" ("+ea+"):\n"+mxResources.get("containsValidationErrors"));}0<na.length&&D.push(na)}F.model.beginUpdate();try{for(ea=0;ea<D.length;ea++){na=D[ea];var ma=null,sa=null!=d?L+na[d]:
-null;k=!1;null!=sa&&(ma=F.model.getCell(sa),k=null==ma||0<=mxUtils.indexOf(m,ma));var oa=new mxCell(ba,new mxGeometry(Z,X,0,0),P||"whiteSpace=wrap;html=1;");oa.collapsed=z;oa.vertex=!0;oa.id=sa;null==ma||k||F.model.setCollapsed(ma,z);for(var la=0;la<na.length;la++)F.setAttributeForCell(oa,ha[la],na[la]),null==ma||k||F.setAttributeForCell(ma,ha[la],na[la]);if(null!=O&&null!=q){var Ea=q[oa.getAttribute(O)];null!=Ea&&(F.labelChanged(oa,Ea),null==ma||k||F.cellLabelChanged(ma,Ea))}if(null!=U&&null!=R){var va=
-R[oa.getAttribute(U)];null!=va&&(oa.style=va)}F.setAttributeForCell(oa,"placeholders","1");oa.style=F.replacePlaceholders(oa,oa.style,C);null==ma||k?F.fireEvent(new mxEventObject("cellsInserted","cells",[oa])):(F.model.setStyle(ma,oa.style),0>mxUtils.indexOf(x,ma)&&x.push(ma),F.fireEvent(new mxEventObject("cellsInserted","cells",[ma])));k=null!=ma;ma=oa;if(!k)for(ua=0;ua<ia.length;ua++)I[ia[ua].to][ma.getAttribute(ia[ua].to)]=ma;null!=ca&&"link"!=ca&&(F.setLinkForCell(ma,ma.getAttribute(ca)),F.setAttributeForCell(ma,
-ca,null));var Ca=this.editor.graph.getPreferredSizeForCell(ma);J=null!=ja?F.model.getCell(L+na[ja]):null;if(ma.vertex){za=null!=J?0:Z;aa=null!=J?0:Y;null!=G&&null!=ma.getAttribute(G)&&(ma.geometry.x=za+parseFloat(ma.getAttribute(G)));null!=M&&null!=ma.getAttribute(M)&&(ma.geometry.y=aa+parseFloat(ma.getAttribute(M)));var xa="@"==K.charAt(0)?ma.getAttribute(K.substring(1)):null;ma.geometry.width=null!=xa&&"auto"!=xa?parseFloat(ma.getAttribute(K.substring(1))):"auto"==K||"auto"==xa?Ca.width+T:parseFloat(K);
-var Da="@"==n.charAt(0)?ma.getAttribute(n.substring(1)):null;ma.geometry.height=null!=Da&&"auto"!=Da&&"width"!=n?parseFloat(Da):"auto"==n||"auto"==Da?Ca.height+T:"width"==n?ma.geometry.width:parseFloat(n);X+=ma.geometry.height+Q}k?(null==A[sa]&&(A[sa]=[]),A[sa].push(ma)):(m.push(ma),null!=J?(J.style=F.replacePlaceholders(J,y,C),F.addCell(ma,J),u.push(J)):x.push(F.addCell(ma)))}for(ea=0;ea<u.length;ea++)xa="@"==K.charAt(0)?u[ea].getAttribute(K.substring(1)):null,Da="@"==n.charAt(0)?u[ea].getAttribute(n.substring(1)):
-null,"auto"!=K&&"auto"!=xa||"auto"!=n&&"auto"!=Da||F.updateGroupBounds([u[ea]],T,!0);var Ba=x.slice(),Ka=x.slice();for(ua=0;ua<ia.length;ua++){var Ja=ia[ua];for(ea=0;ea<m.length;ea++){ma=m[ea];var Ga=mxUtils.bind(this,function(Ra,ka,qa){var ta=ka.getAttribute(qa.from);if(null!=ta&&""!=ta){ta=ta.split(",");for(var ra=0;ra<ta.length;ra++){var pa=I[qa.to][ta[ra]];if(null==pa&&null!=V){pa=new mxCell(ta[ra],new mxGeometry(Z,Y,0,0),V);pa.style=F.replacePlaceholders(ka,pa.style,C);var wa=this.editor.graph.getPreferredSizeForCell(pa);
-pa.geometry.width=wa.width+T;pa.geometry.height=wa.height+T;I[qa.to][ta[ra]]=pa;pa.vertex=!0;pa.id=ta[ra];x.push(F.addCell(pa))}if(null!=pa){wa=qa.label;null!=qa.fromlabel&&(wa=(ka.getAttribute(qa.fromlabel)||"")+(wa||""));null!=qa.sourcelabel&&(wa=F.replacePlaceholders(ka,qa.sourcelabel,C)+(wa||""));null!=qa.tolabel&&(wa=(wa||"")+(pa.getAttribute(qa.tolabel)||""));null!=qa.targetlabel&&(wa=(wa||"")+F.replacePlaceholders(pa,qa.targetlabel,C));var Ha="target"==qa.placeholders==!qa.invert?pa:Ra;Ha=
-null!=qa.style?F.replacePlaceholders(Ha,qa.style,C):F.createCurrentEdgeStyle();wa=F.insertEdge(null,null,wa||"",qa.invert?pa:Ra,qa.invert?Ra:pa,Ha);if(null!=qa.labels)for(Ha=0;Ha<qa.labels.length;Ha++){var Fa=qa.labels[Ha],La=new mxCell(Fa.label||Ha,new mxGeometry(null!=Fa.x?Fa.x:0,null!=Fa.y?Fa.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Fa.placeholders&&(La.value=F.replacePlaceholders("target"==Fa.placeholders==!qa.invert?pa:Ra,La.value,C));if(null!=
-Fa.dx||null!=Fa.dy)La.geometry.offset=new mxPoint(null!=Fa.dx?Fa.dx:0,null!=Fa.dy?Fa.dy:0);wa.insert(La)}if(null!=qa.data)for(var Pa in qa.data)F.setAttributeForCell(wa,Pa,qa.data[Pa]);Ka.push(wa);mxUtils.remove(qa.invert?Ra:pa,Ba)}}}});Ga(ma,ma,Ja);if(null!=A[ma.id])for(la=0;la<A[ma.id].length;la++)Ga(ma,A[ma.id][la],Ja)}}if(null!=fa)for(ea=0;ea<m.length;ea++)for(ma=m[ea],la=0;la<fa.length;la++)F.setAttributeForCell(ma,mxUtils.trim(fa[la]),null);if(0<x.length){var Aa=new mxParallelEdgeLayout(F);
-Aa.spacing=N;Aa.checkOverlap=!0;var Ma=function(){0<Aa.spacing&&Aa.execute(F.getDefaultParent());for(var Ra=0;Ra<x.length;Ra++){var ka=F.getCellGeometry(x[Ra]);ka.x=Math.round(F.snap(ka.x));ka.y=Math.round(F.snap(ka.y));"auto"==K&&(ka.width=Math.round(F.snap(ka.width)));"auto"==n&&(ka.height=Math.round(F.snap(ka.height)))}};if("["==da.charAt(0)){var Va=W;F.view.validate();this.executeLayouts(F.createLayouts(JSON.parse(da)),function(){Ma();Va()});W=null}else if("circle"==da){var Ua=new mxCircleLayout(F);
-Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var fb=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Ra){return fb.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){Ua.execute(F.getDefaultParent());Ma()},!0,W);W=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&Ka.length==2*x.length-1&&1==Ba.length){F.view.validate();var cb=new mxCompactTreeLayout(F,"horizontaltree"==da);cb.levelDistance=Q;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(F.getDefaultParent(),
-0<Ba.length?Ba[0]:null)},!0,W);W=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==Ba.length){F.view.validate();var Ta=new mxHierarchicalLayout(F,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ta.intraCellSpacing=Q;Ta.parallelEdgeSpacing=N;Ta.interRankCellSpacing=S;Ta.disableEdgeStyle=!1;this.executeLayout(function(){Ta.execute(F.getDefaultParent(),Ka);F.moveCells(Ka,Z,Y)},!0,W);W=null}else if("orgchart"==da){F.view.validate();var $a=new mxOrgChartLayout(F,
-2,S,Q),Wa=$a.isVertexIgnored;$a.isVertexIgnored=function(Ra){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){$a.execute(F.getDefaultParent());Ma()},!0,W);W=null}else if("organic"==da||"auto"==da&&Ka.length>x.length){F.view.validate();var ab=new mxFastOrganicLayout(F);ab.forceConstant=3*Q;ab.disableEdgeStyle=!1;ab.resetEdges=!1;var ib=ab.isVertexIgnored;ab.isVertexIgnored=function(Ra){return ib.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){ab.execute(F.getDefaultParent());
-Ma()},!0,W);W=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=W&&W()}}catch(Ra){this.handleError(Ra)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(g+=k+m+"="+urlParams[m],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;
-if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(k,m)&&(d=0==g?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,m,u){d=new LinkDialog(this,d,g,k,!0,m,u);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var n=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(n));this.customLayoutConfig=n;this.hideDialog()}catch(u){this.handleError(u)}}),null,null,null,null,mxUtils.bind(this,function(k,n){var u=mxUtils.button(mxResources.get("copy"),
+mxUtils.bind(this,function(){try{var x=n.value;n.value=JSON.stringify(JSON.parse(x));n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));n.value=x}catch(A){this.handleError(A)}}));u.setAttribute("title","copy");u.className="geBtn";k.appendChild(u)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};
+EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),n=mxUtils.bind(this,function(u){this.loadingOrgChart=!1;g.clear()&&this.handleError(u)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=
+!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,
+g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),n=[],u=[],x=[],A={};if(0<k.length){var I={},G=this.editor.graph,C=null,P=null,R=null,U=null,N=null,V=null,q=null,y="whiteSpace=wrap;html=1;",D=null,J=null,L="",K="auto",m="auto",z=!1,F=null,M=null,O=40,Q=40,S=100,T=0,W=mxUtils.bind(this,function(){null!=g?g(Ka):(G.setSelectionCells(Ka),G.scrollCellToVisible(G.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),
+0)}),X=G.getFreeInsertPoint(),Z=X.x,Y=X.y;X=Y;var ba=null,da="auto";J=null;for(var ia=[],ca=null,fa=null,aa=0;aa<k.length&&"#"==k[aa].charAt(0);){d=k[aa].replace(/\r$/,"");for(aa++;aa<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[aa].substring(1)),aa++;if("#"!=d.charAt(1)){var ja=d.indexOf(":");if(0<ja){var ha=mxUtils.trim(d.substring(1,ja)),ea=mxUtils.trim(d.substring(ja+1));"label"==ha?ba=Graph.sanitizeHtml(ea):"labelname"==ha&&0<ea.length&&
+"-"!=ea?N=ea:"labels"==ha&&0<ea.length&&"-"!=ea?q=JSON.parse(ea):"style"==ha?P=ea:"parentstyle"==ha?y=ea:"unknownStyle"==ha&&"-"!=ea?V=ea:"stylename"==ha&&0<ea.length&&"-"!=ea?U=ea:"styles"==ha&&0<ea.length&&"-"!=ea?R=JSON.parse(ea):"vars"==ha&&0<ea.length&&"-"!=ea?C=JSON.parse(ea):"identity"==ha&&0<ea.length&&"-"!=ea?D=ea:"parent"==ha&&0<ea.length&&"-"!=ea?J=ea:"namespace"==ha&&0<ea.length&&"-"!=ea?L=ea:"width"==ha?K=ea:"height"==ha?m=ea:"collapsed"==ha&&"-"!=ea?z="true"==ea:"left"==ha&&0<ea.length?
+F=ea:"top"==ha&&0<ea.length?M=ea:"ignore"==ha?fa=ea.split(","):"connect"==ha?ia.push(JSON.parse(ea)):"link"==ha?ca=ea:"padding"==ha?T=parseFloat(ea):"edgespacing"==ha?O=parseFloat(ea):"nodespacing"==ha?Q=parseFloat(ea):"levelspacing"==ha?S=parseFloat(ea):"layout"==ha&&(da=ea)}}}if(null==k[aa])throw Error(mxResources.get("invalidOrMissingFile"));var ya=this.editor.csvToArray(k[aa].replace(/\r$/,""));ja=d=null;ha=[];for(ea=0;ea<ya.length;ea++)D==ya[ea]&&(d=ea),J==ya[ea]&&(ja=ea),ha.push(mxUtils.trim(ya[ea]).replace(/[^a-z0-9]+/ig,
+"_").replace(/^\d+/,"").replace(/_+$/,""));null==ba&&(ba="%"+ha[0]+"%");if(null!=ia)for(var ua=0;ua<ia.length;ua++)null==I[ia[ua].to]&&(I[ia[ua].to]={});D=[];for(ea=aa+1;ea<k.length;ea++){var na=this.editor.csvToArray(k[ea].replace(/\r$/,""));if(null==na){var za=40<k[ea].length?k[ea].substring(0,40)+"...":k[ea];throw Error(za+" ("+ea+"):\n"+mxResources.get("containsValidationErrors"));}0<na.length&&D.push(na)}G.model.beginUpdate();try{for(ea=0;ea<D.length;ea++){na=D[ea];var ma=null,sa=null!=d?L+na[d]:
+null;k=!1;null!=sa&&(ma=G.model.getCell(sa),k=null==ma||0<=mxUtils.indexOf(n,ma));var oa=new mxCell(ba,new mxGeometry(Z,X,0,0),P||"whiteSpace=wrap;html=1;");oa.collapsed=z;oa.vertex=!0;oa.id=sa;null==ma||k||G.model.setCollapsed(ma,z);for(var la=0;la<na.length;la++)G.setAttributeForCell(oa,ha[la],na[la]),null==ma||k||G.setAttributeForCell(ma,ha[la],na[la]);if(null!=N&&null!=q){var Ea=q[oa.getAttribute(N)];null!=Ea&&(G.labelChanged(oa,Ea),null==ma||k||G.cellLabelChanged(ma,Ea))}if(null!=U&&null!=R){var va=
+R[oa.getAttribute(U)];null!=va&&(oa.style=va)}G.setAttributeForCell(oa,"placeholders","1");oa.style=G.replacePlaceholders(oa,oa.style,C);null==ma||k?G.fireEvent(new mxEventObject("cellsInserted","cells",[oa])):(G.model.setStyle(ma,oa.style),0>mxUtils.indexOf(x,ma)&&x.push(ma),G.fireEvent(new mxEventObject("cellsInserted","cells",[ma])));k=null!=ma;ma=oa;if(!k)for(ua=0;ua<ia.length;ua++)I[ia[ua].to][ma.getAttribute(ia[ua].to)]=ma;null!=ca&&"link"!=ca&&(G.setLinkForCell(ma,ma.getAttribute(ca)),G.setAttributeForCell(ma,
+ca,null));var Ca=this.editor.graph.getPreferredSizeForCell(ma);J=null!=ja?G.model.getCell(L+na[ja]):null;if(ma.vertex){za=null!=J?0:Z;aa=null!=J?0:Y;null!=F&&null!=ma.getAttribute(F)&&(ma.geometry.x=za+parseFloat(ma.getAttribute(F)));null!=M&&null!=ma.getAttribute(M)&&(ma.geometry.y=aa+parseFloat(ma.getAttribute(M)));var xa="@"==K.charAt(0)?ma.getAttribute(K.substring(1)):null;ma.geometry.width=null!=xa&&"auto"!=xa?parseFloat(ma.getAttribute(K.substring(1))):"auto"==K||"auto"==xa?Ca.width+T:parseFloat(K);
+var Da="@"==m.charAt(0)?ma.getAttribute(m.substring(1)):null;ma.geometry.height=null!=Da&&"auto"!=Da&&"width"!=m?parseFloat(Da):"auto"==m||"auto"==Da?Ca.height+T:"width"==m?ma.geometry.width:parseFloat(m);X+=ma.geometry.height+Q}k?(null==A[sa]&&(A[sa]=[]),A[sa].push(ma)):(n.push(ma),null!=J?(J.style=G.replacePlaceholders(J,y,C),G.addCell(ma,J),u.push(J)):x.push(G.addCell(ma)))}for(ea=0;ea<u.length;ea++)xa="@"==K.charAt(0)?u[ea].getAttribute(K.substring(1)):null,Da="@"==m.charAt(0)?u[ea].getAttribute(m.substring(1)):
+null,"auto"!=K&&"auto"!=xa||"auto"!=m&&"auto"!=Da||G.updateGroupBounds([u[ea]],T,!0);var Ba=x.slice(),Ka=x.slice();for(ua=0;ua<ia.length;ua++){var Ja=ia[ua];for(ea=0;ea<n.length;ea++){ma=n[ea];var Ga=mxUtils.bind(this,function(Ra,ka,qa){var ra=ka.getAttribute(qa.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var ta=0;ta<ra.length;ta++){var pa=I[qa.to][ra[ta]];if(null==pa&&null!=V){pa=new mxCell(ra[ta],new mxGeometry(Z,Y,0,0),V);pa.style=G.replacePlaceholders(ka,pa.style,C);var wa=this.editor.graph.getPreferredSizeForCell(pa);
+pa.geometry.width=wa.width+T;pa.geometry.height=wa.height+T;I[qa.to][ra[ta]]=pa;pa.vertex=!0;pa.id=ra[ta];x.push(G.addCell(pa))}if(null!=pa){wa=qa.label;null!=qa.fromlabel&&(wa=(ka.getAttribute(qa.fromlabel)||"")+(wa||""));null!=qa.sourcelabel&&(wa=G.replacePlaceholders(ka,qa.sourcelabel,C)+(wa||""));null!=qa.tolabel&&(wa=(wa||"")+(pa.getAttribute(qa.tolabel)||""));null!=qa.targetlabel&&(wa=(wa||"")+G.replacePlaceholders(pa,qa.targetlabel,C));var Ia="target"==qa.placeholders==!qa.invert?pa:Ra;Ia=
+null!=qa.style?G.replacePlaceholders(Ia,qa.style,C):G.createCurrentEdgeStyle();wa=G.insertEdge(null,null,wa||"",qa.invert?pa:Ra,qa.invert?Ra:pa,Ia);if(null!=qa.labels)for(Ia=0;Ia<qa.labels.length;Ia++){var Fa=qa.labels[Ia],La=new mxCell(Fa.label||Ia,new mxGeometry(null!=Fa.x?Fa.x:0,null!=Fa.y?Fa.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Fa.placeholders&&(La.value=G.replacePlaceholders("target"==Fa.placeholders==!qa.invert?pa:Ra,La.value,C));if(null!=
+Fa.dx||null!=Fa.dy)La.geometry.offset=new mxPoint(null!=Fa.dx?Fa.dx:0,null!=Fa.dy?Fa.dy:0);wa.insert(La)}if(null!=qa.data)for(var Pa in qa.data)G.setAttributeForCell(wa,Pa,qa.data[Pa]);Ka.push(wa);mxUtils.remove(qa.invert?Ra:pa,Ba)}}}});Ga(ma,ma,Ja);if(null!=A[ma.id])for(la=0;la<A[ma.id].length;la++)Ga(ma,A[ma.id][la],Ja)}}if(null!=fa)for(ea=0;ea<n.length;ea++)for(ma=n[ea],la=0;la<fa.length;la++)G.setAttributeForCell(ma,mxUtils.trim(fa[la]),null);if(0<x.length){var Aa=new mxParallelEdgeLayout(G);
+Aa.spacing=O;Aa.checkOverlap=!0;var Ma=function(){0<Aa.spacing&&Aa.execute(G.getDefaultParent());for(var Ra=0;Ra<x.length;Ra++){var ka=G.getCellGeometry(x[Ra]);ka.x=Math.round(G.snap(ka.x));ka.y=Math.round(G.snap(ka.y));"auto"==K&&(ka.width=Math.round(G.snap(ka.width)));"auto"==m&&(ka.height=Math.round(G.snap(ka.height)))}};if("["==da.charAt(0)){var Va=W;G.view.validate();this.executeLayouts(G.createLayouts(JSON.parse(da)),function(){Ma();Va()});W=null}else if("circle"==da){var Ua=new mxCircleLayout(G);
+Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var fb=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Ra){return fb.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){Ua.execute(G.getDefaultParent());Ma()},!0,W);W=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&Ka.length==2*x.length-1&&1==Ba.length){G.view.validate();var cb=new mxCompactTreeLayout(G,"horizontaltree"==da);cb.levelDistance=Q;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(G.getDefaultParent(),
+0<Ba.length?Ba[0]:null)},!0,W);W=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==Ba.length){G.view.validate();var Ta=new mxHierarchicalLayout(G,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ta.intraCellSpacing=Q;Ta.parallelEdgeSpacing=O;Ta.interRankCellSpacing=S;Ta.disableEdgeStyle=!1;this.executeLayout(function(){Ta.execute(G.getDefaultParent(),Ka);G.moveCells(Ka,Z,Y)},!0,W);W=null}else if("orgchart"==da){G.view.validate();var $a=new mxOrgChartLayout(G,
+2,S,Q),Wa=$a.isVertexIgnored;$a.isVertexIgnored=function(Ra){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){$a.execute(G.getDefaultParent());Ma()},!0,W);W=null}else if("organic"==da||"auto"==da&&Ka.length>x.length){G.view.validate();var ab=new mxFastOrganicLayout(G);ab.forceConstant=3*Q;ab.disableEdgeStyle=!1;ab.resetEdges=!1;var ib=ab.isVertexIgnored;ab.isVertexIgnored=function(Ra){return ib.apply(this,arguments)||0>mxUtils.indexOf(x,Ra)};this.executeLayout(function(){ab.execute(G.getDefaultParent());
+Ma()},!0,W);W=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=W&&W()}}catch(Ra){this.handleError(Ra)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",n;for(n in urlParams)0>mxUtils.indexOf(d,n)&&null!=urlParams[n]&&(g+=k+n+"="+urlParams[n],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;
+if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),n;for(n in urlParams)0>mxUtils.indexOf(k,n)&&(d=0==g?d+"?":d+"&",null!=urlParams[n]&&(d+=n+"="+urlParams[n],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,n,u){d=new LinkDialog(this,d,g,k,!0,n,u);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&
"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);
this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));
d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);this.menus.get("edgeShape").setEnabled(d);this.menus.get("edgeStyle").setEnabled(d);
this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=
-0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var H=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){H.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),m=this.isDiagramActive(),u="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&u);this.actions.get("redo").setEnabled(this.canRedo()&&
-u);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("editConnectionPoints").setEnabled(m&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(m&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(m&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(m);this.actions.get("shadowVisible").setEnabled(m);
-this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&m&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=
-g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);
-this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&
-null!=d&&null!=d.shape&&null!=d.shape.stencil)};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,m,u,x,A,I){var F=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
-else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(F.getSvg(m,u,x)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),P=F.getGraphBounds(),R=Math.floor(P.width*u/F.view.scale),U=Math.floor(P.height*u/F.view.scale);if(C.length<=MAX_REQUEST_SIZE&&R*U<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var O={globalVars:F.getExportVariables()};I&&(O.grid={size:F.gridSize,steps:F.view.gridSteps,color:F.view.gridColor});d.saveRequest(g,k,function(V,
-q){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(q||"0")+(null!=V?"&filename="+encodeURIComponent(V):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<A?"&dpi="+A:"")+"&bg="+(null!=m?m:"none")+"&w="+R+"&h="+U+"&border="+x+"&xml="+encodeURIComponent(C))})}else"png"==k?d.exportImage(u,null==m||"none"==m,!0,!1,!1,x,!0,!1,null,I,A):d.exportImage(u,!1,!0,!1,!1,x,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var m=d;this.currentPage!=this.pages[k]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),m.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+m.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var m=
-document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var u=document.createElement("div");u.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";u.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var I=A[d];if("R"==I.substring(0,1)){var F=JSON.parse(decodeURIComponent(I.substring(1)));
-x[F[0]]={id:F[0],title:F[1],downloadUrl:F[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){u.innerText="";if(0==C.length)u.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var P=0;P<C.length;P++){var R=C[P];x[R.id]&&(g[R.id]=R);var U=this.addCheckbox(u,R.title,x[R.id]);(function(O,V){mxEvent.addListener(V,"change",function(){this.checked?g[O.id]=O:delete g[O.id]})})(R,U)}},mxUtils.bind(this,
+0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var H=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){H.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive(),u="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&u);this.actions.get("redo").setEnabled(this.canRedo()&&
+u);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(n);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("editConnectionPoints").setEnabled(n&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(n&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(n&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(n);this.actions.get("shadowVisible").setEnabled(n);
+this.actions.get("connectionArrows").setEnabled(n);this.actions.get("connectionPoints").setEnabled(n);this.actions.get("copyStyle").setEnabled(n&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&n&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(n);this.actions.get("createRevision").setEnabled(n);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=
+g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(n&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);
+this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("none"!=this.diagramContainer.style.display);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(n&&
+null!=d&&null!=d.shape&&null!=d.shape.stencil)};var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,n,u,x,A,I){var G=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
+else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(G.getSvg(n,u,x)),"image/svg+xml");else{var C=d.getFileData(!0,null,null,null,null,!0),P=G.getGraphBounds(),R=Math.floor(P.width*u/G.view.scale),U=Math.floor(P.height*u/G.view.scale);if(C.length<=MAX_REQUEST_SIZE&&R*U<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var N={globalVars:G.getExportVariables()};I&&(N.grid={size:G.gridSize,steps:G.view.gridSteps,color:G.view.gridColor});d.saveRequest(g,k,function(V,
+q){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(q||"0")+(null!=V?"&filename="+encodeURIComponent(V):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<A?"&dpi="+A:"")+"&bg="+(null!=n?n:"none")+"&w="+R+"&h="+U+"&border="+x+"&xml="+encodeURIComponent(C))})}else"png"==k?d.exportImage(u,null==n||"none"==n,!0,!1,!1,x,!0,!1,null,I,A):d.exportImage(u,!1,!0,!1,!1,x,!0,!1,"jpeg",I);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var n=d;this.currentPage!=this.pages[k]&&(n=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),n.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+n.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var n=
+document.createElement("h3");mxUtils.write(n,mxUtils.htmlEntities(d));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var u=document.createElement("div");u.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";u.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var I=A[d];if("R"==I.substring(0,1)){var G=JSON.parse(decodeURIComponent(I.substring(1)));
+x[G[0]]={id:G[0],title:G[1],downloadUrl:G[2]}}}}catch(C){}this.remoteInvoke("getCustomLibraries",null,null,function(C){u.innerText="";if(0==C.length)u.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var P=0;P<C.length;P++){var R=C[P];x[R.id]&&(g[R.id]=R);var U=this.addCheckbox(u,R.title,x[R.id]);(function(N,V){mxEvent.addListener(V,"change",function(){this.checked?g[N.id]=N:delete g[N.id]})})(R,U)}},mxUtils.bind(this,
function(C){u.innerText="";var P=document.createElement("div");P.style.padding="8px";P.style.textAlign="center";mxUtils.write(P,mxResources.get("error")+": ");mxUtils.write(P,null!=C&&null!=C.message?C.message:mxResources.get("unknownError"));u.appendChild(P)}));k.appendChild(u);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var C=0,P;for(P in g)null==x[P]&&(C++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],
-null,mxUtils.bind(this,function(U){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,U,R)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[P]));for(P in x)g[P]||this.closeLibrary(new RemoteLibrary(this,null,x[P]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
+null,mxUtils.bind(this,function(U){C--;0==C&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,U,R)),this.showSidebar()}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){C--;0==C&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[P]));for(P in x)g[P]||this.closeLibrary(new RemoteLibrary(this,null,x[P]));0==C&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,m,u){var x=
-!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;u({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(A);x&&m.apply(this,arguments)}),F=mxUtils.bind(this,function(){window.clearTimeout(A);x&&u.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:I,error:F});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(C,P){var R={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=P?R.error={errResp:P}:null!=C&&(R.resp=C);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var m=d.funtionName,u=this.remoteInvokableFns[m];if(null!=u&&"function"===typeof this[m]){if(u.allowedDomains){for(var x=!1,A=0;A<u.allowedDomains.length;A++)if(g=="https://"+u.allowedDomains[A]){x=
-!0;break}if(!x){k(null,"Invalid Call: "+m+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(u.isAsync)I.push(function(){k(Array.prototype.slice.apply(arguments))}),I.push(function(C){k(null,C||"Unkown Error")}),this[m].apply(this,I);else{var F=this[m].apply(this,I);k([F])}}else k(null,"Invalid Call: "+m+" is not found.")}catch(C){k(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||
-window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var m=k.open("database",2);m.onupgradeneeded=function(u){try{var x=m.result;1>u.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>u.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};m.onsuccess=mxUtils.bind(this,function(u){try{var x=m.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if((!A||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var F=!0,C=!1,P,R=0,U=mxUtils.bind(this,
-function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){R++;V()}),V=mxUtils.bind(this,function(){try{if(R>=P.length)U();else{var y=P[R];StorageFile.getFileContent(this,y,mxUtils.bind(this,function(D){null==D||".scratchpad"==y&&D==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[y]}),
-"*"):O()}),O)}}catch(D){console.log(D)}}),q=mxUtils.bind(this,function(y){try{this.setDatabaseItem(null,[{title:y.title,size:y.data.length,lastModified:Date.now(),type:y.isLib?"L":"F"},{title:y.title,data:y.data}],O,O,["filesInfo","files"])}catch(D){console.log(D)}});A=mxUtils.bind(this,function(y){try{if(y.source==I.contentWindow){var D={};try{D=JSON.parse(y.data)}catch(J){}"init"==D.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=D.event||C||(F?null!=D.resp&&0<D.resp.length&&null!=D.resp[0]?(P=D.resp[0],F=!1,V()):U():null!=D.resp&&0<D.resp.length&&null!=D.resp[0]?q(D.resp[0]):O())}}catch(J){console.log(J)}});window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});m.onerror=g;m.onblocked=function(){}}catch(u){null!=g?g(u):null!=window.console&&console.error(u)}else null!=
-g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,m,u){this.openDatabase(mxUtils.bind(this,function(x){try{u=u||"objects";Array.isArray(u)||(u=[u],d=[d],g=[g]);var A=x.transaction(u,"readwrite");A.oncomplete=k;A.onerror=m;for(x=0;x<u.length;x++)A.objectStore(u[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(I){null!=m&&m(I)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,m){this.openDatabase(mxUtils.bind(this,function(u){try{m=
-m||"objects";Array.isArray(m)||(m=[m],d=[d]);var x=u.transaction(m,"readwrite");x.oncomplete=g;x.onerror=k;for(u=0;u<m.length;u++)x.objectStore(m[u]).delete(d[u])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,m){this.openDatabase(mxUtils.bind(this,function(u){try{m=m||"objects";var x=u.transaction([m],"readonly").objectStore(m).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,
-function(m){try{k=k||"objects";var u=m.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];u.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),A.target.result.continue())};u.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var u=m.transaction([k],"readonly").objectStore(k).getAllKeys();u.onsuccess=function(){d(u.result)};u.onerror=
+d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,n,u){var x=
+!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;u({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),I=mxUtils.bind(this,function(){window.clearTimeout(A);x&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(A);x&&u.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:I,error:G});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?
+this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(C,P){var R={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=P?R.error={errResp:P}:null!=C&&(R.resp=C);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var n=d.funtionName,u=this.remoteInvokableFns[n];if(null!=u&&"function"===typeof this[n]){if(u.allowedDomains){for(var x=!1,A=0;A<u.allowedDomains.length;A++)if(g=="https://"+u.allowedDomains[A]){x=
+!0;break}if(!x){k(null,"Invalid Call: "+n+" is not allowed.");return}}var I=d.functionArgs;Array.isArray(I)||(I=[]);if(u.isAsync)I.push(function(){k(Array.prototype.slice.apply(arguments))}),I.push(function(C){k(null,C||"Unkown Error")}),this[n].apply(this,I);else{var G=this[n].apply(this,I);k([G])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(C){k(null,"Invalid Call: An error occurred, "+C.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||
+window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=function(u){try{var x=n.result;1>u.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>u.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};n.onsuccess=mxUtils.bind(this,function(u){try{var x=n.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if((!A||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var I=document.createElement("iframe");I.style.display="none";I.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(I);var G=!0,C=!1,P,R=0,U=mxUtils.bind(this,
+function(){C=!0;this.setDatabaseItem(".drawioMigrated3",!0);I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){R++;V()}),V=mxUtils.bind(this,function(){try{if(R>=P.length)U();else{var y=P[R];StorageFile.getFileContent(this,y,mxUtils.bind(this,function(D){null==D||".scratchpad"==y&&D==this.emptyLibraryXml?I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[y]}),
+"*"):N()}),N)}}catch(D){console.log(D)}}),q=mxUtils.bind(this,function(y){try{this.setDatabaseItem(null,[{title:y.title,size:y.data.length,lastModified:Date.now(),type:y.isLib?"L":"F"},{title:y.title,data:y.data}],N,N,["filesInfo","files"])}catch(D){console.log(D)}});A=mxUtils.bind(this,function(y){try{if(y.source==I.contentWindow){var D={};try{D=JSON.parse(y.data)}catch(J){}"init"==D.event?(I.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),I.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=D.event||C||(G?null!=D.resp&&0<D.resp.length&&null!=D.resp[0]?(P=D.resp[0],G=!1,V()):U():null!=D.resp&&0<D.resp.length&&null!=D.resp[0]?q(D.resp[0]):N())}}catch(J){console.log(J)}});window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});n.onerror=g;n.onblocked=function(){}}catch(u){null!=g?g(u):null!=window.console&&console.error(u)}else null!=
+g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,n,u){this.openDatabase(mxUtils.bind(this,function(x){try{u=u||"objects";Array.isArray(u)||(u=[u],d=[d],g=[g]);var A=x.transaction(u,"readwrite");A.oncomplete=k;A.onerror=n;for(x=0;x<u.length;x++)A.objectStore(u[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(I){null!=n&&n(I)}}),n)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(u){try{n=
+n||"objects";Array.isArray(n)||(n=[n],d=[d]);var x=u.transaction(n,"readwrite");x.oncomplete=g;x.onerror=k;for(u=0;u<n.length;u++)x.objectStore(n[u]).delete(d[u])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,n){this.openDatabase(mxUtils.bind(this,function(u){try{n=n||"objects";var x=u.transaction([n],"readonly").objectStore(n).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,
+function(n){try{k=k||"objects";var u=n.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];u.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),A.target.result.continue())};u.onerror=g}catch(A){null!=g&&g(A)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(n){try{k=k||"objects";var u=n.transaction([k],"readonly").objectStore(k).getAllKeys();u.onsuccess=function(){d(u.result)};u.onerror=
g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=
-function(d,g,k){var m=this.getCurrentFile();null!=m?m.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=
+function(d,g,k){var n=this.getCurrentFile();null!=n?n.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=
function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
-function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,m,u,x,A,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,m,u,x,A,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,m,u,x,A,I,F,C,P,R,U,O,V,q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,m,u,x,A,I,
-F,C,P,R,U,O,V,q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,m)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};
-EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,
-g,k,m,u)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),m=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<m.length){var u="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(u||m)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=
+function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,n,u,x,A,I){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,n,u,x,A,I)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
+return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,n,u,x,A,I,G,C,P,R,U,N,V,q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,n,u,x,A,I,
+G,C,P,R,U,N,V,q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,n)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};
+EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,n)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,n,u){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,
+g,k,n,u)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),n=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<n.length){var u="<mxfile "===n.substring(0,8)||"<?xml"===n.substring(0,5)||"\x3c!--[if IE]>"===n.substring(0,12);n="<mxlibrary>"===n.substring(0,11);(u||n)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=
function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,l,p){function v(){for(var q=I.getElementsByTagName("div"),y=0,D=0;D<q.length;D++)"none"!=q[D].style.display&&q[D].parentNode==I&&y++;F.style.display=0==y?"block":"none"}function t(q,y,D,J){function L(){y.removeChild(z);y.removeChild(G);n.style.display="block";K.style.display="block"}u={div:y,comment:q,saveCallback:D,deleteOnCancel:J};var K=y.querySelector(".geCommentTxt"),n=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=
-"geCommentEditTxtArea";z.style.minHeight=K.offsetHeight+"px";z.value=q.content;y.insertBefore(z,K);var G=document.createElement("div");G.className="geCommentEditBtns";var M=mxUtils.button(mxResources.get("cancel"),function(){J?(y.parentNode.removeChild(y),v()):L();u=null});M.className="geCommentEditBtn";G.appendChild(M);var N=mxUtils.button(mxResources.get("save"),function(){K.innerText="";q.content=z.value;mxUtils.write(K,q.content);L();D(q);u=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,
-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(N.click(),mxEvent.consume(Q)):27==Q.keyCode&&(M.click(),mxEvent.consume(Q)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";G.appendChild(N);y.insertBefore(G,K);n.style.display="none";K.style.display="none";z.focus()}function E(q,y){y.innerText="";q=new Date(q.modifiedDate);var D=b.timeSince(q);null==D&&(D=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",
+var CommentsWindow=function(b,e,f,c,l,p){function v(){for(var q=I.getElementsByTagName("div"),y=0,D=0;D<q.length;D++)"none"!=q[D].style.display&&q[D].parentNode==I&&y++;G.style.display=0==y?"block":"none"}function t(q,y,D,J){function L(){y.removeChild(z);y.removeChild(F);m.style.display="block";K.style.display="block"}u={div:y,comment:q,saveCallback:D,deleteOnCancel:J};var K=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=
+"geCommentEditTxtArea";z.style.minHeight=K.offsetHeight+"px";z.value=q.content;y.insertBefore(z,K);var F=document.createElement("div");F.className="geCommentEditBtns";var M=mxUtils.button(mxResources.get("cancel"),function(){J?(y.parentNode.removeChild(y),v()):L();u=null});M.className="geCommentEditBtn";F.appendChild(M);var O=mxUtils.button(mxResources.get("save"),function(){K.innerText="";q.content=z.value;mxUtils.write(K,q.content);L();D(q);u=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,
+function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(O.click(),mxEvent.consume(Q)):27==Q.keyCode&&(M.click(),mxEvent.consume(Q)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";F.appendChild(O);y.insertBefore(F,K);m.style.display="none";K.style.display="none";z.focus()}function E(q,y){y.innerText="";q=new Date(q.modifiedDate);var D=b.timeSince(q);null==D&&(D=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",
[D],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function B(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function g(q,y,D,J,L){function K(T,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
-var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,T);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function n(){function T(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,T(Z.replies[Y])}var W=[],X=G;T(q);return{pdiv:X,replies:W}}function z(T,W,X,Z,Y){function ba(){H(fa);q.addReply(ca,function(aa){ca.id=aa;q.replies.push(ca);
-d(fa);X&&X()},function(aa){da();B(fa);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function da(){t(ca,fa,function(aa){ba()},!0)}var ia=n().pdiv,ca=b.newComment(T,b.getCurrentUser());ca.pCommentId=q.id;null==q.replies&&(q.replies=[]);var fa=g(ca,q.replies,ia,J+1);W?da():ba()}if(L||!q.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",q.id);G.style.marginLeft=20*J+5+
-"px";q.isResolved&&(x.style.opacity="0.7");var M=document.createElement("div");M.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;M.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";M.appendChild(N);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));
-N.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",q.id);E(q,Q);N.appendChild(Q);G.appendChild(M);M=document.createElement("div");M.className="geCommentTxt";mxUtils.write(M,q.content||"");G.appendChild(M);q.isLocked&&(G.style.opacity="0.5");M=document.createElement("div");M.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";M.appendChild(S);k||q.isLocked||0!=J&&!m||K(mxResources.get("reply"),
-function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||k||q.isLocked||(K(mxResources.get("edit"),function(){function T(){t(q,G,function(){H(G);q.editComment(q.content,function(){d(G)},function(W){B(G);T();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},q.isResolved),K(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(G);q.deleteComment(function(T){if(!0===T){T=G.querySelector(".geCommentTxt");
-T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(T=0;T<W.length;T++)W[T].parentNode.removeChild(W[T]);d(G);G.style.opacity="0.5"}else{W=n(q).replies;for(T=0;T<W.length;T++)I.removeChild(W[T]);for(T=0;T<y.length;T++)if(y[T]==q){y.splice(T,1);break}F.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(T){B(G);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));
-k||q.isLocked||0!=J||K(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function W(){var X=T.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=n(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",da=0;da<Y.length;da++){Y[da].style.backgroundColor=ba;for(var ia=Y[da].querySelectorAll(".geCommentAction"),ca=0;ca<ia.length;ca++)ia[ca]!=
-X.parentNode&&(ia[ca].style.display=Z);U||(Y[da].style.display="none")}v()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(M);null!=D?I.insertBefore(G,D.nextSibling):I.appendChild(G);for(D=0;null!=q.replies&&D<q.replies.length;D++)M=q.replies[D],M.isResolved=q.isResolved,g(M,q.replies,null,J+1,L);null!=u&&(u.comment.id==q.id?(L=q.content,q.content=u.comment.content,t(q,G,u.saveCallback,u.deleteOnCancel),q.content=L):null==
-u.comment.id&&u.comment.pCommentId==q.id&&(I.appendChild(u.div),t(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return G}}var k=!b.canComment(),m=b.canReplyToReplies(),u=null,x=document.createElement("div");x.className="geCommentsWin";var A=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(A)+7+"px";x.appendChild(I);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,
-mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=A;C.style.padding="3px 4px 4px 4px";A=document.createElement("a");A.className="geButton";if(!k){var P=A.cloneNode();P.style.backgroundImage="url("+Editor.plusImage+")";P.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(P,"click",function(q){function y(){t(D,J,function(L){H(J);b.addComment(L,function(K){L.id=K;O.push(L);d(J)},function(K){B(J);
-y();b.handleError(K,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var D=b.newComment("",b.getCurrentUser()),J=g(D,O,null,0);y();q.preventDefault();mxEvent.consume(q)});C.appendChild(P)}var R=A.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(q){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");V();q.preventDefault();mxEvent.consume(q)});
+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,T);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function m(){function T(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,T(Z.replies[Y])}var W=[],X=F;T(q);return{pdiv:X,replies:W}}function z(T,W,X,Z,Y){function ba(){H(fa);q.addReply(ca,function(aa){ca.id=aa;q.replies.push(ca);
+d(fa);X&&X()},function(aa){da();B(fa);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function da(){t(ca,fa,function(aa){ba()},!0)}var ia=m().pdiv,ca=b.newComment(T,b.getCurrentUser());ca.pCommentId=q.id;null==q.replies&&(q.replies=[]);var fa=g(ca,q.replies,ia,J+1);W?da():ba()}if(L||!q.isResolved){G.style.display="none";var F=document.createElement("div");F.className="geCommentContainer";F.setAttribute("data-commentId",q.id);F.style.marginLeft=20*J+5+
+"px";q.isResolved&&(x.style.opacity="0.7");var M=document.createElement("div");M.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;M.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";M.appendChild(O);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));
+O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",q.id);E(q,Q);O.appendChild(Q);F.appendChild(M);M=document.createElement("div");M.className="geCommentTxt";mxUtils.write(M,q.content||"");F.appendChild(M);q.isLocked&&(F.style.opacity="0.5");M=document.createElement("div");M.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";M.appendChild(S);k||q.isLocked||0!=J&&!n||K(mxResources.get("reply"),
+function(){z("",!0)},q.isResolved);O=b.getCurrentUser();null==O||null==q.user||O.id!=q.user.id||k||q.isLocked||(K(mxResources.get("edit"),function(){function T(){t(q,F,function(){H(F);q.editComment(q.content,function(){d(F)},function(W){B(F);T();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},q.isResolved),K(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(F);q.deleteComment(function(T){if(!0===T){T=F.querySelector(".geCommentTxt");
+T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var W=F.querySelectorAll(".geCommentAction");for(T=0;T<W.length;T++)W[T].parentNode.removeChild(W[T]);d(F);F.style.opacity="0.5"}else{W=m(q).replies;for(T=0;T<W.length;T++)I.removeChild(W[T]);for(T=0;T<y.length;T++)if(y[T]==q){y.splice(T,1);break}G.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(T){B(F);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));
+k||q.isLocked||0!=J||K(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function W(){var X=T.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",da=0;da<Y.length;da++){Y[da].style.backgroundColor=ba;for(var ia=Y[da].querySelectorAll(".geCommentAction"),ca=0;ca<ia.length;ca++)ia[ca]!=
+X.parentNode&&(ia[ca].style.display=Z);U||(Y[da].style.display="none")}v()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});F.appendChild(M);null!=D?I.insertBefore(F,D.nextSibling):I.appendChild(F);for(D=0;null!=q.replies&&D<q.replies.length;D++)M=q.replies[D],M.isResolved=q.isResolved,g(M,q.replies,null,J+1,L);null!=u&&(u.comment.id==q.id?(L=q.content,q.content=u.comment.content,t(q,F,u.saveCallback,u.deleteOnCancel),q.content=L):null==
+u.comment.id&&u.comment.pCommentId==q.id&&(I.appendChild(u.div),t(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return F}}var k=!b.canComment(),n=b.canReplyToReplies(),u=null,x=document.createElement("div");x.className="geCommentsWin";var A=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.bottom=parseInt(A)+7+"px";x.appendChild(I);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,
+mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=A;C.style.padding="3px 4px 4px 4px";A=document.createElement("a");A.className="geButton";if(!k){var P=A.cloneNode();P.style.backgroundImage="url("+Editor.plusImage+")";P.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(P,"click",function(q){function y(){t(D,J,function(L){H(J);b.addComment(L,function(K){L.id=K;N.push(L);d(J)},function(K){B(J);
+y();b.handleError(K,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var D=b.newComment("",b.getCurrentUser()),J=g(D,N,null,0);y();q.preventDefault();mxEvent.consume(q)});C.appendChild(P)}var R=A.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(q){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");V();q.preventDefault();mxEvent.consume(q)});
C.appendChild(R);b.commentsRefreshNeeded()&&(P=A.cloneNode(),P.style.backgroundImage="url("+Editor.refreshImage+")",P.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(P,"click",function(q){V();q.preventDefault();mxEvent.consume(q)}),C.appendChild(P));b.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),A.className="geButton geAdaptiveAsset",mxEvent.addListener(A,
-"click",function(q){p();q.preventDefault();mxEvent.consume(q)}),C.appendChild(A));x.appendChild(C);var O=[],V=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var q=u.div.querySelector(".geCommentEditTxtArea"),y=u.div.querySelector(".geCommentEditBtns");u.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(D){b.handleError(D)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";m=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(D){function J(L){if(null!=L){L.sort(function(n,z){return new Date(n.modifiedDate)-new Date(z.modifiedDate)});for(var K=0;K<L.length;K++)J(L[K].replies)}}D.sort(function(L,K){return new Date(L.modifiedDate)-new Date(K.modifiedDate)});I.innerText="";I.appendChild(F);F.style.display="block";O=D;for(D=0;D<O.length;D++)J(O[D].replies),g(O[D],O,null,0,U);null!=u&&null==u.comment.id&&
-null==u.comment.pCommentId&&(I.appendChild(u.div),t(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(D){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(D&&D.message?": "+D.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});V();this.refreshComments=V;C=mxUtils.bind(this,function(){function q(K){var n=D[K.id];if(null!=n)for(E(K,n),n=0;null!=K.replies&&n<K.replies.length;n++)q(K.replies[n])}if(this.window.isVisible()){for(var y=
-I.querySelectorAll(".geCommentDate"),D={},J=0;J<y.length;J++){var L=y[J];D[L.getAttribute("data-commentId")]=L}for(J=0;J<O.length;J++)q(O[J])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),x,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
+"click",function(q){p();q.preventDefault();mxEvent.consume(q)}),C.appendChild(A));x.appendChild(C);var N=[],V=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var q=u.div.querySelector(".geCommentEditTxtArea"),y=u.div.querySelector(".geCommentEditBtns");u.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(D){b.handleError(D)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(D){function J(L){if(null!=L){L.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var K=0;K<L.length;K++)J(L[K].replies)}}D.sort(function(L,K){return new Date(L.modifiedDate)-new Date(K.modifiedDate)});I.innerText="";I.appendChild(G);G.style.display="block";N=D;for(D=0;D<N.length;D++)J(N[D].replies),g(N[D],N,null,0,U);null!=u&&null==u.comment.id&&
+null==u.comment.pCommentId&&(I.appendChild(u.div),t(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(D){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(D&&D.message?": "+D.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});V();this.refreshComments=V;C=mxUtils.bind(this,function(){function q(K){var m=D[K.id];if(null!=m)for(E(K,m),m=0;null!=K.replies&&m<K.replies.length;m++)q(K.replies[m])}if(this.window.isVisible()){for(var y=
+I.querySelectorAll(".geCommentDate"),D={},J=0;J<y.length;J++){var L=y[J];D[L.getAttribute("data-commentId")]=L}for(J=0;J<N.length;J++)q(N[J])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),x,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,p,v,t,E,H,B){var d=document.createElement("div");d.style.textAlign="center";B=null!=B?B:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=B+"px";g.style.lineHeight="1.2em";mxUtils.write(g,e);d.appendChild(g);null!=H&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),g.appendChild(e),
d.appendChild(g));H=document.createElement("div");H.style.textAlign="center";H.style.whiteSpace="nowrap";var k=document.createElement("input");k.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(k.checked)});p.className="geBtn";null!=t&&(p.innerHTML=t+"<br>"+p.innerHTML,p.style.display="inline-block",p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);
-var m=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(k.checked)});H.appendChild(m);null!=v?(m.innerHTML=v+"<br>"+m.innerHTML+"<br>",m.style.display="inline-block",m.style.paddingBottom="8px",m.style.paddingTop="8px",m.style.height="auto",m.className="geBtn",m.style.width="40%"):m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);d.appendChild(H);E?(H.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom=
-"0px",g.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),g.appendChild(l),d.appendChild(g),mxEvent.addListener(l,"click",function(u){k.checked=!k.checked;mxEvent.consume(u)})):H.style.marginTop="12px";this.init=function(){m.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
+var n=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(k.checked)});H.appendChild(n);null!=v?(n.innerHTML=v+"<br>"+n.innerHTML+"<br>",n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);d.appendChild(H);E?(H.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.style.marginBottom=
+"0px",g.appendChild(k),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),g.appendChild(l),d.appendChild(g),mxEvent.addListener(l,"click",function(u){k.checked=!k.checked;mxEvent.consume(u)})):H.style.marginTop="12px";this.init=function(){n.focus()};this.container=d},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var p=0;p<e.length;p++)null!=e[p]&&(b=this.patchPages(b,e[p],f,c,l));return b};
EditorUi.prototype.patchPages=function(b,e,f,c,l){var p={},v=[],t={},E={},H={},B={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var d in c[EditorUi.DIFF_UPDATE])p[d]=c[EditorUi.DIFF_UPDATE][d];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)E[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)t[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(d in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(B[c.previous]=d);if(null!=b){var g="";for(c=0;c<b.length;c++){var k=b[c].getId();H[k]=b[c];null!=B[g]||E[k]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][k]&&null!=e[EditorUi.DIFF_UPDATE][k].previous||(B[g]=k);g=k}}var m={},u=mxUtils.bind(this,function(A){var I=null!=A?A.getId():"";if(null!=A&&!m[I]){m[I]=!0;v.push(A);var F=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][I]:null;null!=F&&(this.updatePageRoot(A),null!=F.name&&A.setName(F.name),
-null!=F.view&&this.patchViewState(A,F.view),null!=F.cells&&this.patchPage(A,F.cells,p[A.getId()],l),!f||null==F.cells&&null==F.view||(A.needsUpdate=!0))}A=B[I];null!=A&&(delete B[I],u(H[A]));A=t[I];null!=A&&(delete t[I],x(A))}),x=mxUtils.bind(this,function(A){A=mxUtils.parseXml(A.data).documentElement;A=new DiagramPage(A);this.updatePageRoot(A);var I=H[A.getId()];null==I?u(A):(this.patchPage(I,this.diffPages([I],[A]),p[I.getId()],l),f&&(I.needsUpdate=!0))});u();for(d in B)u(H[B[d]]),delete B[d];for(d in t)x(t[d]),
+e[EditorUi.DIFF_UPDATE][d],null!=c.previous&&(B[c.previous]=d);if(null!=b){var g="";for(c=0;c<b.length;c++){var k=b[c].getId();H[k]=b[c];null!=B[g]||E[k]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][k]&&null!=e[EditorUi.DIFF_UPDATE][k].previous||(B[g]=k);g=k}}var n={},u=mxUtils.bind(this,function(A){var I=null!=A?A.getId():"";if(null!=A&&!n[I]){n[I]=!0;v.push(A);var G=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][I]:null;null!=G&&(this.updatePageRoot(A),null!=G.name&&A.setName(G.name),
+null!=G.view&&this.patchViewState(A,G.view),null!=G.cells&&this.patchPage(A,G.cells,p[A.getId()],l),!f||null==G.cells&&null==G.view||(A.needsUpdate=!0))}A=B[I];null!=A&&(delete B[I],u(H[A]));A=t[I];null!=A&&(delete t[I],x(A))}),x=mxUtils.bind(this,function(A){A=mxUtils.parseXml(A.data).documentElement;A=new DiagramPage(A);this.updatePageRoot(A);var I=H[A.getId()];null==I?u(A):(this.patchPage(I,this.diffPages([I],[A]),p[I.getId()],l),f&&(I.needsUpdate=!0))});u();for(d in B)u(H[B[d]]),delete B[d];for(d in t)x(t[d]),
delete t[d];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
EditorUi.prototype.createParentLookup=function(b,e){function f(H){var B=c[H];null==B&&(B={inserted:[],moved:{}},c[H]=B);return B}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var p=e[EditorUi.DIFF_INSERT][l],v=null!=p.parent?p.parent:"",t=null!=p.previous?p.previous:"";f(v).inserted[t]=p}if(null!=e[EditorUi.DIFF_UPDATE])for(var E in e[EditorUi.DIFF_UPDATE])p=e[EditorUi.DIFF_UPDATE][E],null!=p.previous&&(v=p.parent,null==v&&(l=b.getCell(E),null!=l&&(l=
b.getParent(l),null!=l&&(v=l.getId()))),null!=v&&(f(v).moved[p.previous]=E));return c};
EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),p=this.createParentLookup(l,e);l.beginUpdate();try{var v=l.updateEdgeParent,t=new mxDictionary,E=[];l.updateEdgeParent=function(x,A){!t.get(x)&&c&&(t.put(x,!0),E.push(x))};var H=p[""],B=null!=H&&null!=H.inserted?H.inserted[""]:null,d=null;null!=B&&(d=this.getCellForJson(B));if(null==d){var g=null!=H&&null!=H.moved?H.moved[""]:null;null!=g&&(d=l.getCell(g))}null!=d&&(l.setRoot(d),
-b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,l,l.root,p,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var k=0;k<e[EditorUi.DIFF_REMOVE].length;k++){g=e[EditorUi.DIFF_REMOVE][k];var m=l.getCell(g);null!=m&&l.remove(m)}if(null!=e[EditorUi.DIFF_UPDATE]){var u=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(g in e[EditorUi.DIFF_UPDATE])m=l.getCell(g),null!=m?this.patchCell(l,m,e[EditorUi.DIFF_UPDATE][g],null!=u?u[g]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-g,"diff",[e[EditorUi.DIFF_UPDATE][g]])}if(null!=e[EditorUi.DIFF_INSERT])for(k=0;k<e[EditorUi.DIFF_INSERT].length;k++)B=e[EditorUi.DIFF_INSERT][k],m=l.getCell(B.id),null!=m&&(l.setTerminal(m,l.getCell(B.source),!0),l.setTerminal(m,l.getCell(B.target),!1));l.updateEdgeParent=v;if(c&&0<E.length)for(k=0;k<E.length;k++)l.contains(E[k])&&l.updateEdgeParent(E[k])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var p=c[f.getId()],v=null!=p&&null!=p.inserted?p.inserted:{};p=null!=p&&null!=p.moved?p.moved:{};for(var t=0,E=e.getChildCount(f),H="",B=0;B<E;B++){var d=e.getChildAt(f,B).getId();null==p[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][d]||null==l[EditorUi.DIFF_UPDATE][d].previous&&null==l[EditorUi.DIFF_UPDATE][d].parent)&&(p[H]=d);H=d}E=mxUtils.bind(this,function(g,k){var m=null!=g?g.getId():"";null==m&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",g);null!=g&&k&&(k=e.getCell(m),null!=k&&k!=g&&(g=null));null!=g&&(e.getChildAt(f,t)!=g&&e.add(f,g,t),this.patchCellRecursive(b,e,g,c,l),t++);return m});for(H=[null];0<H.length;)if(B=H.shift(),B=E(null!=B?B.child:null,null!=B?B.insert:!1),d=p[B],null!=d&&(delete p[B],H.push({child:e.getCell(d)})),d=v[B],null!=d&&(delete v[B],H.push({child:this.getCellForJson(d),insert:!0})),0==H.length){for(B in p)H.push({child:e.getCell(p[B])}),delete p[B];for(B in v)H.push({child:this.getCellForJson(v[B]),
+b.root=d,EditorUi.debug("EditorUi.patchPage: Root changed",d.id));this.patchCellRecursive(b,l,l.root,p,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var k=0;k<e[EditorUi.DIFF_REMOVE].length;k++){g=e[EditorUi.DIFF_REMOVE][k];var n=l.getCell(g);null!=n&&l.remove(n)}if(null!=e[EditorUi.DIFF_UPDATE]){var u=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(g in e[EditorUi.DIFF_UPDATE])n=l.getCell(g),null!=n?this.patchCell(l,n,e[EditorUi.DIFF_UPDATE][g],null!=u?u[g]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
+g,"diff",[e[EditorUi.DIFF_UPDATE][g]])}if(null!=e[EditorUi.DIFF_INSERT])for(k=0;k<e[EditorUi.DIFF_INSERT].length;k++)B=e[EditorUi.DIFF_INSERT][k],n=l.getCell(B.id),null!=n&&(l.setTerminal(n,l.getCell(B.source),!0),l.setTerminal(n,l.getCell(B.target),!1));l.updateEdgeParent=v;if(c&&0<E.length)for(k=0;k<E.length;k++)l.contains(E[k])&&l.updateEdgeParent(E[k])}finally{l.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var p=c[f.getId()],v=null!=p&&null!=p.inserted?p.inserted:{};p=null!=p&&null!=p.moved?p.moved:{};for(var t=0,E=e.getChildCount(f),H="",B=0;B<E;B++){var d=e.getChildAt(f,B).getId();null==p[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][d]||null==l[EditorUi.DIFF_UPDATE][d].previous&&null==l[EditorUi.DIFF_UPDATE][d].parent)&&(p[H]=d);H=d}E=mxUtils.bind(this,function(g,k){var n=null!=g?g.getId():"";null==n&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",g);null!=g&&k&&(k=e.getCell(n),null!=k&&k!=g&&(g=null));null!=g&&(e.getChildAt(f,t)!=g&&e.add(f,g,t),this.patchCellRecursive(b,e,g,c,l),t++);return n});for(H=[null];0<H.length;)if(B=H.shift(),B=E(null!=B?B.child:null,null!=B?B.insert:!1),d=p[B],null!=d&&(delete p[B],H.push({child:e.getCell(d)})),d=v[B],null!=d&&(delete v[B],H.push({child:this.getCellForJson(d),insert:!0})),0==H.length){for(B in p)H.push({child:e.getCell(p[B])}),delete p[B];for(B in v)H.push({child:this.getCellForJson(v[B]),
insert:!0}),delete v[B]}}};
EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=
1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};
@@ -13661,7 +13660,7 @@ DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime
!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
DrawioFileSync.prototype.merge=function(b,e,f,c,l,p,v){try{this.file.stats.merged++;this.lastModified=new Date;var t=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var E=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(E,this.ui.pages):null,B=this.file.isRealtime()?this.ui.diffPages(E,this.file.ownPages):null;E=this.ui.applyPatches(E,b);var d=null==e?null:this.ui.getHashValueForPages(E);
EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",B,"checksum",e,"current",d,"valid",e==d,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",t,"etag",this.file.getDescriptorEtag(f),"immediate",v);if(null!=e&&e!=d){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),p,null,v);return}this.file.setShadowPages(E);null==this.patchRealtime(b,null,B,v)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
-H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(m){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(m);try{var g=this.file.getCurrentUser(),k=null!=g?g.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),k,m)}catch(u){}}};
+H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(n){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(n);try{var g=this.file.getCurrentUser(),k=null!=g?g.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),k,n)}catch(u){}}};
DrawioFileSync.prototype.fileChanged=function(b,e,f,c,l){var p=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",l,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(v){null!=f&&f()||(this.isValidState()?this.catchup(v,b,e,f,l):null!=e&&e())}),e)):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=
p};
DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var e=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var f=0;f<this.file.ownPages.length;f++)null!=e[f]&&this.ui.getHashValueForPages([this.file.ownPages[f]])!=this.ui.getHashValueForPages([e[f]])&&(this.file.ownPages[f].needsUpdate=!0);e=this.cleanupThread;window.clearTimeout(this.cleanupThread);
@@ -13670,9 +13669,9 @@ DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mx
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c,l){if(null!=b&&(null==c||!c())){var p=this.file.getCurrentRevisionId(),v=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",p,"to",v,"immediate",l,"valid",this.isValidState());if(p==v)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var t=this.file.getDescriptorChecksum(b),E=this.file.getDescriptorSecret(b);if(null!=t&&t==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=E&&"1"!=urlParams.lockdown){var H=0,B=!1,d=mxUtils.bind(this,function(){if(null==c||!c())if(p!=this.file.getCurrentRevisionId())null!=e&&
-e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(p)+"&to="+encodeURIComponent(v)+(null!=E?"&secret="+encodeURIComponent(E):""),mxUtils.bind(this,function(m){this.file.stats.bytesReceived+=m.getText().length;window.clearTimeout(k);if(g&&(null==c||!c()))if(p!=this.file.getCurrentRevisionId())null!=
-e&&e(!0);else if(this.isValidState()){var u=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[m],"status",m.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=m.getStatus()&&299>=m.getStatus()&&0<m.getText().length)try{var A=JSON.parse(m.getText());if(null!=A&&0<A.length)for(var I=0;I<A.length;I++){var F=this.stringToObject(A[I]);if(F.v>DrawioFileSync.PROTOCOL){B=!0;x=[];break}else if(F.v===DrawioFileSync.PROTOCOL&&null!=F.d)u=F.d.checksum,
-x.push(F.d.patch);else{B=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"status",B?"failed":"ok","temp",x,"checksum",u)}catch(C){x=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,u,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!B&&401!=m.getStatus()&&503!=m.getStatus()&&410!=m.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(d,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(p)+"&to="+encodeURIComponent(v)+(null!=E?"&secret="+encodeURIComponent(E):""),mxUtils.bind(this,function(n){this.file.stats.bytesReceived+=n.getText().length;window.clearTimeout(k);if(g&&(null==c||!c()))if(p!=this.file.getCurrentRevisionId())null!=
+e&&e(!0);else if(this.isValidState()){var u=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[n],"status",n.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=n.getStatus()&&299>=n.getStatus()&&0<n.getText().length)try{var A=JSON.parse(n.getText());if(null!=A&&0<A.length)for(var I=0;I<A.length;I++){var G=this.stringToObject(A[I]);if(G.v>DrawioFileSync.PROTOCOL){B=!0;x=[];break}else if(G.v===DrawioFileSync.PROTOCOL&&null!=G.d)u=G.d.checksum,
+x.push(G.d.patch);else{B=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"status",B?"failed":"ok","temp",x,"checksum",u)}catch(C){x=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,u,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!B&&401!=n.getStatus()&&503!=n.getStatus()&&410!=n.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(d,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
this.reload(e,f,c,null,l))}catch(C){null!=f&&f(C)}}else null!=f&&f()}),f)}else null!=f&&f()});window.setTimeout(d,this.cacheReadyDelay)}else this.reload(e,f,c,null,l)}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c,l){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",l);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(p){null!=e&&e(p)}),f,c,l)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
@@ -13680,8 +13679,8 @@ DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeou
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,p){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var v=this.file.getDescriptorSecret(this.file.getDescriptor()),t=this.createMessage({m:this.lastModified.getTime()}),E=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=v&&null!=l&&
"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var B=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);p=null!=p?p:this.ui.getHashValueForPages(b);var d=this.objectToString(this.createMessage({patch:B,checksum:p}));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;var g=!0,k=window.setTimeout(mxUtils.bind(this,function(){g=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(E)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(t)))+(null!=v?"&secret="+encodeURIComponent(v):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(m){window.clearTimeout(k);g&&(200<=m.getStatus()&&299>=m.getStatus()?(Editor.p2pSyncNotify&&this.notify(t),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+
-(0!=m.getStatus()?": "+m.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag(),"diff",B,d.length,"bytes","msg",t,"checksum",p)}else this.notify(t),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+"&from="+encodeURIComponent(E)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(t)))+(null!=v?"&secret="+encodeURIComponent(v):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(d.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(d):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(n){window.clearTimeout(k);g&&(200<=n.getStatus()&&299>=n.getStatus()?(Editor.p2pSyncNotify&&this.notify(t),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+
+(0!=n.getStatus()?": "+n.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag(),"diff",B,d.length,"bytes","msg",t,"checksum",p)}else this.notify(t),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",E,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
@@ -13724,9 +13723,9 @@ DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b
DriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};
DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};
-DriveFile.prototype.saveFile=function(b,e,f,c,l,p){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(v,t){var E=mxUtils.bind(this,function(H,B){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,B,mxUtils.bind(this,function(g,k,m,u){try{this.savingFile=!1,0!=g?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),
-this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=g,this.fileSaved(k,d,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(g)}),c,t,m,u)):null!=c&&c(g)}catch(x){if(this.savingFile=!1,null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(g,k){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(k,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);E(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(g)}catch(m){if(this.savingFile=!1,null!=c)c(m);else throw m;}}),l,l,H,null,v)}catch(g){if(this.savingFile=!1,null!=c)c(g);else throw g;}});E(p,e)}))):null!=f&&f()}catch(v){if(null!=c)c(v);else throw v;}};
+DriveFile.prototype.saveFile=function(b,e,f,c,l,p){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(v,t){var E=mxUtils.bind(this,function(H,B){try{var d=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,B,mxUtils.bind(this,function(g,k,n,u){try{this.savingFile=!1,0!=g?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),
+this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=g,this.fileSaved(k,d,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(g)}),c,t,n,u)):null!=c&&c(g)}catch(x){if(this.savingFile=!1,null!=c)c(x);else throw x;}}),mxUtils.bind(this,function(g,k){try{this.savingFile=!1,this.isConflict(g)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(k,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
+function(){this.updateFileData();this.setShadowModified(!1);E(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(g)}catch(n){if(this.savingFile=!1,null!=c)c(n);else throw n;}}),l,l,H,null,v)}catch(g){if(this.savingFile=!1,null!=c)c(g);else throw g;}});E(p,e)}))):null!=f&&f()}catch(v){if(null!=c)c(v);else throw v;}};
DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};
DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};
DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
@@ -13750,10 +13749,10 @@ null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedir
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var p in c)"current"!=p&&p!=l&&f.push(c[p].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();
this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(t){var E=null!=t.message?t.message:mxResources.get("cannotLogin");null!=t&&null!=t.error&&403==t.error.code&&null!=t.error.data&&0<t.error.data.length&&"domainPolicy"==t.error.data[0].reason&&(E=t.error.message);this.logout();this.ui.showError(mxResources.get("error"),
E,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),p)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var p=!0,v=null,t=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var E=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
-function(){p=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})}),this.ui.timeout);var H=null,B=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),B=!0);var d=f.fullUrl||this.GDriveBaseUrl+f.url;B&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var g=new mxXmlRequest(d,H,f.method||"GET");g.setRequestHeaders=mxUtils.bind(this,function(k,m){if(null!=f.headers)for(var u in f.headers)k.setRequestHeader(u,f.headers[u]);else null!=f.contentType?
-k.setRequestHeader("Content-Type",f.contentType):B&&k.setRequestHeader("Content-Type","application/json");k.setRequestHeader("Authorization","Bearer "+b)});g.send(mxUtils.bind(this,function(k){try{if(window.clearTimeout(v),p){try{var m=JSON.parse(k.getText())}catch(A){m=null}if(200<=k.getStatus()&&299>=k.getStatus())null!=c&&c(m);else{var u=null!=m&&null!=m.error?null!=m.error.data?m.error.data:m.error.errors:null,x=null!=u&&0<u.length?u[0].reason:null;null==l||null==m||null==m.error||-1!=m.error.code&&
-(403!=m.error.code||"domainPolicy"!=x&&"The requested mime type change is forbidden."!=m.error.message)?null!=m&&null!=m.error&&(401==m.error.code||403==m.error.code&&"rateLimitExceeded"!=x)?403==m.error.code&&this.retryAuth||401==m.error.code&&this.retryAuth&&"authError"==x?(null!=l&&l(m),this.retryAuth=!1):(this.retryAuth=!0,this.execute(E)):null!=m&&null!=m.error&&412!=m.error.code&&404!=m.error.code&&400!=m.error.code&&this.currentRequest==f&&t<this.maxRetries?(t++,this.requestThread=window.setTimeout(E,
-Math.round(Math.pow(2,t)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(m):l(m)}}}catch(A){if(null!=l)l(A);else throw A;}}))}catch(k){if(null!=l)l(k);else throw k;}});null!=b&&this.authCalled?E():this.execute(E)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+function(){p=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:E})}),this.ui.timeout);var H=null,B=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),B=!0);var d=f.fullUrl||this.GDriveBaseUrl+f.url;B&&(d+=(0<d.indexOf("?")?"&":"?")+"alt=json");var g=new mxXmlRequest(d,H,f.method||"GET");g.setRequestHeaders=mxUtils.bind(this,function(k,n){if(null!=f.headers)for(var u in f.headers)k.setRequestHeader(u,f.headers[u]);else null!=f.contentType?
+k.setRequestHeader("Content-Type",f.contentType):B&&k.setRequestHeader("Content-Type","application/json");k.setRequestHeader("Authorization","Bearer "+b)});g.send(mxUtils.bind(this,function(k){try{if(window.clearTimeout(v),p){try{var n=JSON.parse(k.getText())}catch(A){n=null}if(200<=k.getStatus()&&299>=k.getStatus())null!=c&&c(n);else{var u=null!=n&&null!=n.error?null!=n.error.data?n.error.data:n.error.errors:null,x=null!=u&&0<u.length?u[0].reason:null;null==l||null==n||null==n.error||-1!=n.error.code&&
+(403!=n.error.code||"domainPolicy"!=x&&"The requested mime type change is forbidden."!=n.error.message)?null!=n&&null!=n.error&&(401==n.error.code||403==n.error.code&&"rateLimitExceeded"!=x)?403==n.error.code&&this.retryAuth||401==n.error.code&&this.retryAuth&&"authError"==x?(null!=l&&l(n),this.retryAuth=!1):(this.retryAuth=!0,this.execute(E)):null!=n&&null!=n.error&&412!=n.error.code&&404!=n.error.code&&400!=n.error.code&&this.currentRequest==f&&t<this.maxRetries?(t++,this.requestThread=window.setTimeout(E,
+Math.round(Math.pow(2,t)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(n):l(n)}}}catch(A){if(null!=l)l(A);else throw A;}}))}catch(k){if(null!=l)l(k);else throw k;}});null!=b&&this.authCalled?E():this.execute(E)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,l,p,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(t){this.updateAuthInfo(t,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()?this.authorizeStep2(t.getText(),f,c,l,p,v):null!=l&&l(t)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,p,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var t=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var E=JSON.parse(t);this.setPersistentToken(E,!c);null!=p&&p()}),v)}else null!=p&&(this.setPersistentToken(f,!c),p())};DriveClient.prototype.authorizeStep2=function(f,c,l,p,v,t){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var E=
JSON.parse(this.getPersistentToken(!0));E&&null!=E.current&&(this.userId=E.current.userId)}if(c&&null==this.userId)null!=p&&p();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(B){try{if(200<=B.getStatus()&&299>=B.getStatus()){var d=JSON.parse(B.getText());this.updateAuthInfo(d,!0,!1,l,p)}else 0!=B.getStatus()&&this.logout(),null!=p&&p(B)}catch(g){if(null!=
@@ -13767,23 +13766,23 @@ method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClien
"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},p,v)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var p=0;p<f.length;p++)if(f[p].key==c){l=f[p].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,p,v){p=null!=p?p:!1;v=null!=v?v:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
mxUtils.bind(this,function(t){t.title=t.originalFilename;t.headRevisionId=t.id;t.id=f;this.getXmlFile(t,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(t){try{if(null!=this.user){var E=/\.png$/i.test(t.title);/\.v(dx|sdx?)$/i.test(t.title)||/\.gliffy$/i.test(t.title)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(t.downloadUrl,t.title,t.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):p||v||t.mimeType==this.libraryMimeType||t.mimeType==this.xmlMimeType?this.getXmlFile(t,
c,l,!0,v):this.getXmlFile(t,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,p,v){try{var t={Authorization:"Bearer "+b},E=f.downloadUrl;if(null==E)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,B=mxUtils.bind(this,function(){this.ui.editor.loadUrl(E,
-mxUtils.bind(this,function(d){try{if(null==d)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,d,f)):l({message:mxResources.get("notADiagramFile")});else{var g=!1;if(/\.png$/i.test(f.title)){var k=d.lastIndexOf(",");if(0<k){var m=this.ui.extractGraphModelFromPng(d);if(null!=m&&0<m.length)d=m;else try{m=d.substring(k+1);var u=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):
-atob(m),x=this.ui.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0);null==x||0<x.getElementsByTagName("parsererror").length?g=!0:d=u}catch(A){g=!0}}}else/\.pdf$/i.test(f.title)?(m=Editor.extractGraphModelFromPdf(d),null!=m&&0<m.length&&(g=!0,d=m)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(u=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,E)?this.ui.parseFileData(d,mxUtils.bind(this,
+mxUtils.bind(this,function(d){try{if(null==d)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,d,f)):l({message:mxResources.get("notADiagramFile")});else{var g=!1;if(/\.png$/i.test(f.title)){var k=d.lastIndexOf(",");if(0<k){var n=this.ui.extractGraphModelFromPng(d);if(null!=n&&0<n.length)d=n;else try{n=d.substring(k+1);var u=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):
+atob(n),x=this.ui.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0);null==x||0<x.getElementsByTagName("parsererror").length?g=!0:d=u}catch(A){g=!0}}}else/\.pdf$/i.test(f.title)?(n=Editor.extractGraphModelFromPdf(d),null!=n&&0<n.length&&(g=!0,d=n)):"data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)&&(u=d.substring(22),d=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,E)?this.ui.parseFileData(d,mxUtils.bind(this,
function(A){try{4==A.readyState&&(200<=A.status&&299>=A.status?c(new LocalFile(this.ui,A.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(I){if(null!=l)l(I);else throw I;}}),f.title):c(g?new LocalFile(this.ui,d,f.title,!0):new DriveFile(this.ui,d,f))}}catch(A){if(null!=l)l(A);else throw A;}}),mxUtils.bind(this,function(d,g){if(H<this.maxRetries&&null!=g&&403==g.getStatus())H++,window.setTimeout(B,2*H*this.coolOff*(1+.1*(Math.random()-.5)));
else if(null!=l)l(d);else throw d;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,t)});B()}}catch(d){if(null!=l)l(d);else throw d;}};DriveClient.prototype.saveFile=function(f,c,l,p,v,t,E,H,B){try{var d=0;f.saveLevel=1;var g=mxUtils.bind(this,function(U){if(null!=p)p(U);else throw U;}),k=mxUtils.bind(this,function(U){g(U);try{EditorUi.logError(U.message,null,
-null,null,U)}catch(O){}});if(f.isEditable()&&null!=f.desc){var m=Date.now(),u=f.desc.etag,x=f.desc.modifiedDate,A=f.desc.headRevisionId,I=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());t=null!=t?t:!1;var F=null,C=!1,P={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(P.mimeType))P.mimeType=this.xmlMimeType,F=f.desc,C=c=!0;else if("application/octet-stream"==P.mimeType||"1"==urlParams["override-mime"]&&P.mimeType!=this.xmlMimeType)P.mimeType=this.xmlMimeType;
-var R=mxUtils.bind(this,function(U,O,V){try{f.saveLevel=3;var q=f.getData(),y=null,D=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),B=null!=B?B:Editor.guid(32),H.push({key:"secret",value:B}),D=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(D),H.push({key:"checksum",value:B+":"+y}));V||(null!=U||t||(U=this.placeholderThumbnail,O=this.placeholderMimeType),
-null!=U&&null!=O&&(P.thumbnail={image:U,mimeType:O}));var J=mxUtils.bind(this,function(n){try{if(f.saveDelay=Date.now()-m,f.saveLevel=null,l(n,q,D,y),null!=F){this.executeRequest({url:"/files/"+F.id+"/revisions/"+F.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+F.id+"/revisions/"+F.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+
-F.id+"."+F.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){k(z)}}),L=mxUtils.bind(this,function(n,z){f.saveLevel=4;try{null!=H&&(P.properties=H);var G=E||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),M=mxUtils.bind(this,function(S){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&
-f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),P,n,c||S||T,z,S?null:G,C),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(x)).getTime():0;if(0>=Y||u==Z.etag||c&&A==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),
-u==Z.etag&&ba.push("Stale etag"),c&&A==Z.headRevisionId&&ba.push("Stale revision"),G=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(d<this.staleEtagMaxRetries)d++,ba=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(M,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;g({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",
-null,"id-"+f.desc.id+"-from-"+A+"."+x+"-"+this.ui.hashValue(u)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-m))}catch(da){}}}else J(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+
-this.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==G)if(d<this.staleEtagMaxRetries){d++;var ba=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(N,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",ba)}else{N(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?
-"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(da){}}else"1"==urlParams.test&&Y.headRevisionId==A&&EditorUi.debug("DriveClient: Remote Etag Changed","local",G,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),g(Z,Y)}catch(da){k(da)}}),mxUtils.bind(this,function(){g(Z)})):
-g(Z)}catch(Y){k(Y)}}}))}catch(Z){k(Z)}}),N=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==G)M(S);else{var T=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){T=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(T){f.saveLevel=10;try{null!=X&&X.headRevisionId==A?("1"==urlParams.test&&G!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",G,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),G=X.etag,M(S)):g({error:{code:412}},X)}catch(Z){k(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);T&&(f.saveLevel=11,g(X))}))}});if(I&&null==U){f.saveLevel=8;var Q=new Image;Q.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/Q.width,T=document.createElement("canvas");T.width=this.thumbnailWidth;T.height=Math.floor(Q.height*S);T.getContext("2d").drawImage(Q,0,0,T.width,T.height);var W=T.toDataURL();
-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");P.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){k(Z)}}});Q.src="data:image/png;base64,"+n}else N(!1)}catch(S){k(S)}});if(I){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(n){L(n,!0)}),g,this.ui.getCurrentFile()!=f?q:null,K.scale,K.border)}else L(q,!1)}catch(n){k(n)}});try{f.saveLevel=2,(t||I||f.constructor==DriveLibrary||!this.enableThumbnails||
-"0"==urlParams.thumb||null!=P.mimeType&&"application/vnd.jgraph.mxfile"!=P.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(U){try{var O=null;try{null!=U&&(O=U.toDataURL("image/png")),null!=O&&(O=O.length>this.maxThumbnailSize?null:O.substring(O.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(V){O=null}R(O,"image/png")}catch(V){k(V)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(U){k(U)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(U){k(U)}};
+null,null,U)}catch(N){}});if(f.isEditable()&&null!=f.desc){var n=Date.now(),u=f.desc.etag,x=f.desc.modifiedDate,A=f.desc.headRevisionId,I=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());t=null!=t?t:!1;var G=null,C=!1,P={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(P.mimeType))P.mimeType=this.xmlMimeType,G=f.desc,C=c=!0;else if("application/octet-stream"==P.mimeType||"1"==urlParams["override-mime"]&&P.mimeType!=this.xmlMimeType)P.mimeType=this.xmlMimeType;
+var R=mxUtils.bind(this,function(U,N,V){try{f.saveLevel=3;var q=f.getData(),y=null,D=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),B=null!=B?B:Editor.guid(32),H.push({key:"secret",value:B}),D=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(D),H.push({key:"checksum",value:B+":"+y}));V||(null!=U||t||(U=this.placeholderThumbnail,N=this.placeholderMimeType),
+null!=U&&null!=N&&(P.thumbnail={image:U,mimeType:N}));var J=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-n,f.saveLevel=null,l(m,q,D,y),null!=G){this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+G.id+"/revisions/"+G.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+
+G.id+"."+G.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){k(z)}}),L=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(P.properties=H);var F=E||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),M=mxUtils.bind(this,function(S){f.saveLevel=5;try{var T=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&
+f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;g({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),P,m,c||S||T,z,S?null:F,C),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(x)).getTime():0;if(0>=Y||u==Z.etag||c&&A==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),
+u==Z.etag&&ba.push("Stale etag"),c&&A==Z.headRevisionId&&ba.push("Stale revision"),F=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(d<this.staleEtagMaxRetries)d++,ba=Math.round(Math.pow(2,d)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(M,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",d,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;g({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",
+null,"id-"+f.desc.id+"-from-"+A+"."+x+"-"+this.ui.hashValue(u)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+d+"-delay-"+(Date.now()-n))}catch(da){}}}else J(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+
+this.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==F)if(d<this.staleEtagMaxRetries){d++;var ba=Math.round(2*d*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(O,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",d,"delay",ba)}else{O(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?
+"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(da){}}else"1"==urlParams.test&&Y.headRevisionId==A&&EditorUi.debug("DriveClient: Remote Etag Changed","local",F,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),g(Z,Y)}catch(da){k(da)}}),mxUtils.bind(this,function(){g(Z)})):
+g(Z)}catch(Y){k(Y)}}}))}catch(Z){k(Z)}}),O=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==F)M(S);else{var T=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){T=!1;g({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(T){f.saveLevel=10;try{null!=X&&X.headRevisionId==A?("1"==urlParams.test&&F!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
+"from",F,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),F=X.etag,M(S)):g({error:{code:412}},X)}catch(Z){k(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);T&&(f.saveLevel=11,g(X))}))}});if(I&&null==U){f.saveLevel=8;var Q=new Image;Q.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/Q.width,T=document.createElement("canvas");T.width=this.thumbnailWidth;T.height=Math.floor(Q.height*S);T.getContext("2d").drawImage(Q,0,0,T.width,T.height);var W=T.toDataURL();
+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");P.thumbnail={image:W,mimeType:"image/png"};O(!1)}catch(X){try{O(!1)}catch(Z){k(Z)}}});Q.src="data:image/png;base64,"+m}else O(!1)}catch(S){k(S)}});if(I){var K=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){L(m,!0)}),g,this.ui.getCurrentFile()!=f?q:null,K.scale,K.border)}else L(q,!1)}catch(m){k(m)}});try{f.saveLevel=2,(t||I||f.constructor==DriveLibrary||!this.enableThumbnails||
+"0"==urlParams.thumb||null!=P.mimeType&&"application/vnd.jgraph.mxfile"!=P.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(U){try{var N=null;try{null!=U&&(N=U.toDataURL("image/png")),null!=N&&(N=N.length>this.maxThumbnailSize?null:N.substring(N.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(V){N=null}R(N,"image/png")}catch(V){k(V)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(U){k(U)}}else this.ui.editor.graph.reset(),g({message:mxResources.get("readOnly")})}catch(U){k(U)}};
DriveClient.prototype.insertFile=function(f,c,l,p,v,t,E){t=null!=t?t:this.xmlMimeType;f={mimeType:t,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,E),mxUtils.bind(this,function(H){t==this.libraryMimeType?p(new DriveLibrary(this.ui,c,H)):0==H?null!=v&&v({message:mxResources.get("errorSavingFile")}):p(new DriveFile(this.ui,c,H))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,l,p,v,t,E){v=null!=v?v:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
null!=t&&(H["If-Match"]=t);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?v?l:!window.btoa||
mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};p||(f.fullUrl+="&newRevision=false");E&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
@@ -13862,7 +13861,7 @@ function(e,f,c){var l=mxUtils.bind(this,function(p){var v=!0,t=window.setTimeout
function(E){window.clearTimeout(t);v&&c(E)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<
c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,p){p=null!=p?p:!1;this.executeRequest(this.getItemURL(e),
mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){var t=JSON.parse(v.getText()),E=/\.png$/i.test(t.name);if(/\.v(dx|sdx?)$/i.test(t.name)||/\.gliffy$/i.test(t.name)||/\.pdf$/i.test(t.name)||!this.ui.useCanvasForExport&&E)this.ui.convertFile(t["@microsoft.graph.downloadUrl"],t.name,null!=t.file?t.file.mimeType:null,this.extension,f,c);else{var H=!0,B=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(t["@microsoft.graph.downloadUrl"],
-mxUtils.bind(this,function(d){try{if(window.clearTimeout(B),H){/\.html$/i.test(t.name)&&(d=this.removeExtraHtmlContent(d));var g=null;if(0<(E?d.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(d);null!=k&&0<k.length?d=k:g=new LocalFile(this.ui,d,t.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var m=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,t["@microsoft.graph.downloadUrl"])?
+mxUtils.bind(this,function(d){try{if(window.clearTimeout(B),H){/\.html$/i.test(t.name)&&(d=this.removeExtraHtmlContent(d));var g=null;if(0<(E?d.lastIndexOf(","):-1)){var k=this.ui.extractGraphModelFromPng(d);null!=k&&0<k.length?d=k:g=new LocalFile(this.ui,d,t.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==d.substring(0,32)){var n=d.substring(22);d=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(d,t["@microsoft.graph.downloadUrl"])?
this.ui.parseFileData(d,mxUtils.bind(this,function(u){try{4==u.readyState&&(200<=u.status&&299>=u.status?f(new LocalFile(this.ui,u.responseText,t.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=c)c(x);else throw x;}}),t.name):null!=g?f(g):p?f(new OneDriveLibrary(this.ui,d,t)):f(new OneDriveFile(this.ui,d,t))}}catch(u){if(null!=c)c(u);else throw u;}}),mxUtils.bind(this,function(d){window.clearTimeout(B);H&&c(this.parseRequestText(d))}),E||null!=
t.file&&null!=t.file.mimeType&&("image/"==t.file.mimeType.substring(0,6)&&"image/svg"!=t.file.mimeType.substring(0,9)||"application/pdf"==t.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(v))}),function(v){null!=c&&(null!=v&&null!=v.error&&"ObjectHandle is Invalid"===v.error.message&&(v.error.message=mxResources.get("fileNotFoundOrDenied")),c(v))})};OneDriveClient.prototype.renameFile=
function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(p){p?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var p=this.getItemRef(e);f.driveId!=p.driveId?l({message:mxResources.get("cannotMoveOneDrive",
@@ -13870,11 +13869,11 @@ null,"Moving a file between accounts is not supported yet.")}):this.writeFile(th
c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});t=this.baseUrl+t+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(t,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,E,l)}),l):this.writeFile(t,f,"PUT",null,E,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
c,l){var p="/me/drive/root";null!=e&&(p=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+p+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(v){404==v.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(v){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
f,c,l){try{var p=e.getData(),v=mxUtils.bind(this,function(E){var H=mxUtils.bind(this,function(d){f(d,p)}),B=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(B,E,H,c,l):this.writeFile(B+"/content/",E,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var t=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){v(this.ui.base64ToBlob(E,"image/png"))}),c,this.ui.getCurrentFile()!=e?p:null,t.scale,t.border)}else v(p)}catch(E){c(E)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,p){try{if(null!=f){var v=(new TextEncoder).encode(f).length,t=mxUtils.bind(this,function(H,B,d,g){try{g=g||0;var k=!0,m=null;m=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var u=f.substr(B,4194304),x=(new TextEncoder).encode(u).length,A=new mxXmlRequest(H,u,"PUT");A.setRequestHeaders=mxUtils.bind(this,function(I,F){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+x-1)+"/"+v)});A.send(mxUtils.bind(this,
-function(I){window.clearTimeout(m);if(k){var F=I.getStatus();200<=F&&299>=F?(F=B+u.length,F==f.length?c(JSON.parse(I.getText())):t(H,F,d+x,g)):500<=F&&599>=F&&2>g?(g++,t(H,B,d,g)):l(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(m);k&&l(this.parseRequestText(I))}))}catch(I){l(I)}}),E=mxUtils.bind(this,function(H){try{var B=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){B=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(k){}var g=new mxXmlRequest(e+
-"/createUploadSession","{}","POST");g.setRequestHeaders=mxUtils.bind(this,function(k,m){k.setRequestHeader("Content-Type","application/json");k.setRequestHeader("Authorization","Bearer "+b);null!=p&&k.setRequestHeader("If-Match",p)});g.send(mxUtils.bind(this,function(k){window.clearTimeout(d);B&&(200<=k.getStatus()&&299>=k.getStatus()?(k=JSON.parse(k.getText()),t(k.uploadUrl,0,0)):H||401!==k.getStatus()?l(this.parseRequestText(k),k):this.authenticate(function(){E(!0)},l,H))}),mxUtils.bind(this,function(k){window.clearTimeout(d);
+OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,p){try{if(null!=f){var v=(new TextEncoder).encode(f).length,t=mxUtils.bind(this,function(H,B,d,g){try{g=g||0;var k=!0,n=null;n=window.setTimeout(mxUtils.bind(this,function(){k=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var u=f.substr(B,4194304),x=(new TextEncoder).encode(u).length,A=new mxXmlRequest(H,u,"PUT");A.setRequestHeaders=mxUtils.bind(this,function(I,G){I.setRequestHeader("Content-Range","bytes "+d+"-"+(d+x-1)+"/"+v)});A.send(mxUtils.bind(this,
+function(I){window.clearTimeout(n);if(k){var G=I.getStatus();200<=G&&299>=G?(G=B+u.length,G==f.length?c(JSON.parse(I.getText())):t(H,G,d+x,g)):500<=G&&599>=G&&2>g?(g++,t(H,B,d,g)):l(this.parseRequestText(I),I)}}),mxUtils.bind(this,function(I){window.clearTimeout(n);k&&l(this.parseRequestText(I))}))}catch(I){l(I)}}),E=mxUtils.bind(this,function(H){try{var B=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){B=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(k){}var g=new mxXmlRequest(e+
+"/createUploadSession","{}","POST");g.setRequestHeaders=mxUtils.bind(this,function(k,n){k.setRequestHeader("Content-Type","application/json");k.setRequestHeader("Authorization","Bearer "+b);null!=p&&k.setRequestHeader("If-Match",p)});g.send(mxUtils.bind(this,function(k){window.clearTimeout(d);B&&(200<=k.getStatus()&&299>=k.getStatus()?(k=JSON.parse(k.getText()),t(k.uploadUrl,0,0)):H||401!==k.getStatus()?l(this.parseRequestText(k),k):this.authenticate(function(){E(!0)},l,H))}),mxUtils.bind(this,function(k){window.clearTimeout(d);
B&&l(this.parseRequestText(k))}))}catch(k){l(k)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},l):E(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,p,v,t){try{if(null!=e&&null!=f){var E=mxUtils.bind(this,function(H){try{var B=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){B=!1;v({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(k){}var g=new mxXmlRequest(e,f,c);g.setRequestHeaders=
-mxUtils.bind(this,function(k,m){k.setRequestHeader("Content-Type",l||" ");k.setRequestHeader("Authorization","Bearer "+b);null!=t&&k.setRequestHeader("If-Match",t)});g.send(mxUtils.bind(this,function(k){window.clearTimeout(d);B&&(200<=k.getStatus()&&299>=k.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),p(JSON.parse(k.getText()))):H||401!==k.getStatus()?v(this.parseRequestText(k),k):this.authenticate(function(){E(!0)},v,H))}),mxUtils.bind(this,function(k){window.clearTimeout(d);
+mxUtils.bind(this,function(k,n){k.setRequestHeader("Content-Type",l||" ");k.setRequestHeader("Authorization","Bearer "+b);null!=t&&k.setRequestHeader("If-Match",t)});g.send(mxUtils.bind(this,function(k){window.clearTimeout(d);B&&(200<=k.getStatus()&&299>=k.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),p(JSON.parse(k.getText()))):H||401!==k.getStatus()?v(this.parseRequestText(k),k):this.authenticate(function(){E(!0)},v,H))}),mxUtils.bind(this,function(k){window.clearTimeout(d);
B&&v(this.parseRequestText(k))}))}catch(k){v(k)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){E(!0)},v):E(!1)}else v({message:mxResources.get("unknownError")})}catch(H){v(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,p=document.createElement("div");p.style.position="relative";var v=new CustomDialog(this.ui,p,mxUtils.bind(this,function(){var t=l.getSelectedItem();if(null!=t)if(f&&"object"==typeof t.folder)e({value:[t]});else{if(!t.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var E=OneDriveFile.prototype.getIdOf(t);this.executeRequest(this.getItemURL(E),mxUtils.bind(this,function(H){this.ui.spinner.stop();
200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(E,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(v.container,550,500,!0,!0);p.style.width=parseInt(v.container.parentNode.style.width)-60+"px";p.style.height=parseInt(v.container.parentNode.style.height)-
@@ -13901,33 +13900,33 @@ window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind
retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),
mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,p){var v=mxUtils.bind(this,function(E){var H=!0,B=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:t})}),this.ui.timeout),d=this.authToken+" "+b;e.setRequestHeaders=function(g,k){g.setRequestHeader("Authorization",
d)};e.send(mxUtils.bind(this,function(){window.clearTimeout(B);var g=mxUtils.bind(this,function(){var u=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){u();t()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())E?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){t(!0)},
-c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var k=!1;try{var m=JSON.parse(e.getText());null!=m&&"Resource not accessible by integration"==m.message?g():(null!=m&&null!=m.errors&&0<m.errors.length&&(k="too_large"==m.errors[0].code),c({message:mxResources.get(k?"drawingTooLarge":"forbidden")}))}catch(u){c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?p?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):
+c)})}):this.authenticate(function(){v(!0)},c);else if(403===e.getStatus()){var k=!1;try{var n=JSON.parse(e.getText());null!=n&&"Resource not accessible by integration"==n.message?g():(null!=n&&null!=n.errors&&0<n.errors.length&&(k="too_large"==n.errors[0].code),c({message:mxResources.get(k?"drawingTooLarge":"forbidden")}))}catch(u){c({message:mxResources.get(k?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?p?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):
g():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(g){window.clearTimeout(B);H&&c(g)}))}),t=mxUtils.bind(this,function(E){null==this.user?this.updateUser(function(){t(!0)},c,E):v(E)});null==b?this.authenticate(function(){t(!0)},c):t(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,p,v,t){var E=
"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+E,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{p(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(B){v(B)}}),v,null,t)};GitHubClient.prototype.getFile=function(e,f,c,l,p){l=null!=l?l:!1;var v=e.split("/"),t=v[0],E=v[1],H=v[2];e=v.slice(3,v.length).join("/");v=/\.png$/i.test(e);if(!p&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&
v))if(null!=b){p=this.baseUrl+"/repos/"+t+"/"+E+"/contents/"+e+"?ref="+H;var B={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(p,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,B)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+t+"/"+E+"/contents/"+e+"?ref="+H+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(d){try{var g=JSON.parse(d.getText());if(""==g.content&&null!=g.git_url){var k=
-new mxXmlRequest(g.git_url,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(m){m=JSON.parse(m.getText());""!=m.content?(g.content=m.content,g.encoding=m.encoding,f(this.createGitHubFile(t,E,H,g,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(t,E,H,g,l))}catch(m){c(m)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,p){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;
+new mxXmlRequest(g.git_url,null,"GET");this.executeRequest(k,mxUtils.bind(this,function(n){n=JSON.parse(n.getText());""!=n.content?(g.content=n.content,g.encoding=n.encoding,f(this.createGitHubFile(t,E,H,g,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(t,E,H,g,l))}catch(n){c(n)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,p){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;
"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return p?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,l,p){this.insertFile(e,f,c,l,!0,p,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,p,v,t){p=null!=p?p:!1;v=v.split("/");
-var E=v[0],H=v[1],B=v[2],d=v.slice(3,v.length).join("/");0<d.length&&(d+="/");d+=e;this.checkExists(E+"/"+H+"/"+B+"/"+d,!0,mxUtils.bind(this,function(g,k){g?p?(t||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(m){this.writeFile(E,H,B,d,m,f,k,mxUtils.bind(this,function(u){try{var x=JSON.parse(u.getText());c(this.createGitHubFile(E,H,B,x.content,p))}catch(A){l(A)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:E,repo:H,ref:B,name:e,path:d,sha:k,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=
+var E=v[0],H=v[1],B=v[2],d=v.slice(3,v.length).join("/");0<d.length&&(d+="/");d+=e;this.checkExists(E+"/"+H+"/"+B+"/"+d,!0,mxUtils.bind(this,function(g,k){g?p?(t||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(n){this.writeFile(E,H,B,d,n,f,k,mxUtils.bind(this,function(u){try{var x=JSON.parse(u.getText());c(this.createGitHubFile(E,H,B,x.content,p))}catch(A){l(A)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:E,repo:H,ref:B,name:e,path:d,sha:k,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=
function(e,f,c,l){var p=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){p(function(){c(v)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,p,v,t,E,H){v.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+
" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:p,content:v},null!=t&&(c.sha=t),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(B){E(B)}),mxUtils.bind(this,function(B){404==B.code&&(B.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,B.code=null);H(B)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),p=l[0],v=l[1],t=l[2];e=l.slice(3,l.length).join("/");
this.getSha(p,v,e,t,mxUtils.bind(this,function(E){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,E)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(E){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,p){var v=e.meta.org,t=e.meta.repo,E=e.meta.ref,H=e.meta.path,B=mxUtils.bind(this,function(g,
-k){this.writeFile(v,t,E,H,p,k,g,mxUtils.bind(this,function(m){delete e.meta.isNew;f(JSON.parse(m.getText()).content.sha)}),mxUtils.bind(this,function(m){c(m)}))}),d=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(k){B(e.meta.sha,k)}),c,this.ui.getCurrentFile()!=e?e.getData():null,g.scale,g.border)}else B(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(v,t,
+k){this.writeFile(v,t,E,H,p,k,g,mxUtils.bind(this,function(n){delete e.meta.isNew;f(JSON.parse(n.getText()).content.sha)}),mxUtils.bind(this,function(n){c(n)}))}),d=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(k){B(e.meta.sha,k)}),c,this.ui.getCurrentFile()!=e?e.getData():null,g.scale,g.border)}else B(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(v,t,
H,E,mxUtils.bind(this,function(g){e.meta.sha=g;d()}),c):d()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,p=null,v=null,t=null,E=document.createElement("div");E.style.whiteSpace=
"nowrap";E.style.overflow="hidden";E.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";E.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){C()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";E.appendChild(H);var B=document.createElement("div");B.style.whiteSpace=
"nowrap";B.style.border="1px solid lightgray";B.style.boxSizing="border-box";B.style.padding="4px";B.style.overflow="auto";B.style.lineHeight="1.2em";B.style.height="290px";E.appendChild(B);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width="100%";var g=new CustomDialog(this.ui,E,mxUtils.bind(this,function(){f(l+"/"+p+"/"+encodeURIComponent(v)+"/"+t)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(g.container,420,370,!0,!0);e&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(P,R,U,O){var V=document.createElement("a");V.setAttribute("title",P);V.style.cursor="pointer";mxUtils.write(V,P);mxEvent.addListener(V,"click",
-R);O&&(V.style.textDecoration="underline");null!=U&&(P=d.cloneNode(),P.style.padding=U,P.appendChild(V),V=P);return V}),m=mxUtils.bind(this,function(P){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(k(l+"/"+p,mxUtils.bind(this,function(){t=null;C()}),null,!0));P||(mxUtils.write(R," / "),R.appendChild(k(decodeURIComponent(v),mxUtils.bind(this,function(){t=null;F()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(P=0;P<U.length;P++)(function(O){mxUtils.write(R,
-" / ");R.appendChild(k(U[O],mxUtils.bind(this,function(){t=U.slice(0,O+1).join("/");I()}),null,!0))})(P)}B.appendChild(R)}),u=mxUtils.bind(this,function(P){this.ui.handleError(P,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=v=p=l=null,C()):this.ui.hideDialog()}),null,{})}),x=null,A=null,I=mxUtils.bind(this,function(P){null==P&&(B.innerText="",P=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+p+"/contents/"+t+"?ref="+encodeURIComponent(v)+"&per_page=100&page="+
-P,null,"GET");this.ui.spinner.spin(B,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){I(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,
-function(){this.ui.spinner.stop();1==P&&(m(),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,C();else{var J=t.split("/");t=J.slice(0,J.length-1).join("/");I()}}),"4px")));var V=JSON.parse(O.getText());if(null==V||0==V.length)c||(mxUtils.br(B),mxUtils.write(B,mxResources.get("noFiles")));else{var q=!0,y=0,D=mxUtils.bind(this,function(J){for(var L=0;L<V.length;L++)mxUtils.bind(this,function(K,n){if(J==("dir"==K.type)){n=d.cloneNode();n.style.backgroundColor=q?Editor.isDarkMode()?
-"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==K.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(k(K.name+("dir"==K.type?"/":""),mxUtils.bind(this,function(){"dir"==K.type?(t=K.path,I()):e&&"file"==K.type&&(this.ui.hideDialog(),f(l+"/"+p+"/"+encodeURIComponent(v)+"/"+K.path))})));B.appendChild(n);y++}})(V[L],L)});D(!0);e&&D(!1)}}))}),u,!0)}),
-F=mxUtils.bind(this,function(P,R){null==P&&(B.innerText="",P=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+p+"/branches?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var O=
-mxUtils.bind(this,function(){F(P+1)});mxEvent.addListener(x,"click",O);this.executeRequest(U,mxUtils.bind(this,function(V){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(m(!0),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){t=null;C()}),"4px")));var q=JSON.parse(V.getText());if(null==q||0==q.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)v=q[0].name,t="",I();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,
-function(D,J){var L=d.cloneNode();L.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";L.appendChild(k(D.name,mxUtils.bind(this,function(){v=D.name;t="";I()})));B.appendChild(L)})(q[y],y);100==q.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&O()},mxEvent.addListener(B,"scroll",A))}}))}),u)}),C=mxUtils.bind(this,function(P){null==P&&(B.innerText="",P=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&mxEvent.removeListener(B,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){C(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var V=JSON.parse(O.getText());
-if(null==V||0==V.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else{1==P&&(B.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(D){if(null!=D){var J=D.split("/");if(1<J.length){D=J[0];var L=J[1];3>J.length?(l=D,p=L,t=v=null,F()):this.ui.spinner.spin(B,mxResources.get("loading"))&&(J=encodeURIComponent(J.slice(2,J.length).join("/")),this.getFile(D+
+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(g.container,420,370,!0,!0);e&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(P,R,U,N){var V=document.createElement("a");V.setAttribute("title",P);V.style.cursor="pointer";mxUtils.write(V,P);mxEvent.addListener(V,"click",
+R);N&&(V.style.textDecoration="underline");null!=U&&(P=d.cloneNode(),P.style.padding=U,P.appendChild(V),V=P);return V}),n=mxUtils.bind(this,function(P){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(k(l+"/"+p,mxUtils.bind(this,function(){t=null;C()}),null,!0));P||(mxUtils.write(R," / "),R.appendChild(k(decodeURIComponent(v),mxUtils.bind(this,function(){t=null;G()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(P=0;P<U.length;P++)(function(N){mxUtils.write(R,
+" / ");R.appendChild(k(U[N],mxUtils.bind(this,function(){t=U.slice(0,N+1).join("/");I()}),null,!0))})(P)}B.appendChild(R)}),u=mxUtils.bind(this,function(P){this.ui.handleError(P,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=v=p=l=null,C()):this.ui.hideDialog()}),null,{})}),x=null,A=null,I=mxUtils.bind(this,function(P){null==P&&(B.innerText="",P=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+p+"/contents/"+t+"?ref="+encodeURIComponent(v)+"&per_page=100&page="+
+P,null,"GET");this.ui.spinner.spin(B,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){I(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(N){this.ui.tryAndHandle(mxUtils.bind(this,
+function(){this.ui.spinner.stop();1==P&&(n(),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==t)t=null,C();else{var J=t.split("/");t=J.slice(0,J.length-1).join("/");I()}}),"4px")));var V=JSON.parse(N.getText());if(null==V||0==V.length)c||(mxUtils.br(B),mxUtils.write(B,mxResources.get("noFiles")));else{var q=!0,y=0,D=mxUtils.bind(this,function(J){for(var L=0;L<V.length;L++)mxUtils.bind(this,function(K,m){if(J==("dir"==K.type)){m=d.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?
+"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==K.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(k(K.name+("dir"==K.type?"/":""),mxUtils.bind(this,function(){"dir"==K.type?(t=K.path,I()):e&&"file"==K.type&&(this.ui.hideDialog(),f(l+"/"+p+"/"+encodeURIComponent(v)+"/"+K.path))})));B.appendChild(m);y++}})(V[L],L)});D(!0);e&&D(!1)}}))}),u,!0)}),
+G=mxUtils.bind(this,function(P,R){null==P&&(B.innerText="",P=1);var U=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+p+"/branches?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var N=
+mxUtils.bind(this,function(){G(P+1)});mxEvent.addListener(x,"click",N);this.executeRequest(U,mxUtils.bind(this,function(V){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(n(!0),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){t=null;C()}),"4px")));var q=JSON.parse(V.getText());if(null==q||0==q.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)v=q[0].name,t="",I();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,
+function(D,J){var L=d.cloneNode();L.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";L.appendChild(k(D.name,mxUtils.bind(this,function(){v=D.name;t="";I()})));B.appendChild(L)})(q[y],y);100==q.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&N()},mxEvent.addListener(B,"scroll",A))}}))}),u)}),C=mxUtils.bind(this,function(P){null==P&&(B.innerText="",P=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&mxEvent.removeListener(B,"scroll",A);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){C(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(N){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var V=JSON.parse(N.getText());
+if(null==V||0==V.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else{1==P&&(B.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(D){if(null!=D){var J=D.split("/");if(1<J.length){D=J[0];var L=J[1];3>J.length?(l=D,p=L,t=v=null,G()):this.ui.spinner.spin(B,mxResources.get("loading"))&&(J=encodeURIComponent(J.slice(2,J.length).join("/")),this.getFile(D+
"/"+L+"/"+J,mxUtils.bind(this,function(K){this.ui.spinner.stop();l=K.meta.org;p=K.meta.repo;v=decodeURIComponent(K.meta.ref);t="";I()}),mxUtils.bind(this,function(K){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(B),mxUtils.br(B));for(var q=0;q<V.length;q++)mxUtils.bind(this,
-function(y,D){var J=d.cloneNode();J.style.backgroundColor=0==D%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";J.appendChild(k(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;p=y.name;t="";F(null,!0)})));B.appendChild(J)})(V[q],q)}100==V.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&U()},mxEvent.addListener(B,"scroll",A))}))}),u)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+function(y,D){var J=d.cloneNode();J.style.backgroundColor=0==D%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";J.appendChild(k(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;p=y.name;t="";G(null,!0)})));B.appendChild(J)})(V[q],q)}100==V.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&U()},mxEvent.addListener(B,"scroll",A))}))}),u)});C()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(p){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(p);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -13943,12 +13942,12 @@ TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.le
b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(t),v))if(200==H.status){var B=H.response;B.compoundId=f+this.SEPARATOR+B.id;c(B)}else 401==H.status?this.authenticate(p,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(E)});this.authenticate(p,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.overflow="hidden";p.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(v);var t=document.createElement("div");t.style.whiteSpace="nowrap";t.style.overflow="auto";t.style.height=
-"194px";p.appendChild(t);p=new CustomDialog(this.ui,p);this.ui.showDialog(p.container,340,290,!0,!0);p.okButton.parentNode.removeChild(p.okButton);var E=mxUtils.bind(this,function(m,u,x){l++;var A=document.createElement("div");A.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=x){var F=document.createElement("img");
-F.src=x.url;F.width=x.width;F.height=x.height;F.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(F)}mxUtils.write(I,m);mxEvent.addListener(I,"click",u);A.appendChild(I);return A}),H=mxUtils.bind(this,function(m){this.ui.handleError(m,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),B=mxUtils.bind(this,function(){l=0;t.innerText="";this.ui.spinner.spin(t,mxResources.get("loading"));var m=mxUtils.bind(this,function(){Trello.cards.get(f+
+"194px";p.appendChild(t);p=new CustomDialog(this.ui,p);this.ui.showDialog(p.container,340,290,!0,!0);p.okButton.parentNode.removeChild(p.okButton);var E=mxUtils.bind(this,function(n,u,x){l++;var A=document.createElement("div");A.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var I=document.createElement("a");I.style.cursor="pointer";if(null!=x){var G=document.createElement("img");
+G.src=x.url;G.width=x.width;G.height=x.height;G.style="border: 1px solid black;margin:5px;vertical-align:middle";I.appendChild(G)}mxUtils.write(I,n);mxEvent.addListener(I,"click",u);A.appendChild(I);return A}),H=mxUtils.bind(this,function(n){this.ui.handleError(n,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),B=mxUtils.bind(this,function(){l=0;t.innerText="";this.ui.spinner.spin(t,mxResources.get("loading"));var n=mxUtils.bind(this,function(){Trello.cards.get(f+
"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(u){this.ui.spinner.stop();t.appendChild(E("../ [Up]",mxUtils.bind(this,function(){k()})));mxUtils.br(t);null==u||0==u.length?mxUtils.write(t,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var x=0;x<u.length;x++)mxUtils.bind(this,function(A){t.appendChild(E(A.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+A.id)}),null!=A.previews?A.previews[0]:null))})(u[x])})()}),mxUtils.bind(this,function(u){401==
-u.status?this.authenticate(m,H,!0):null!=H&&H(u)}))});m()}),d=null,g=null,k=mxUtils.bind(this,function(m){null==m&&(l=0,t.innerText="",m=1);this.ui.spinner.spin(t,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){mxEvent.removeListener(t,"scroll",g);k(m+1)});mxEvent.addListener(d,"click",u);var x=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:m-1},mxUtils.bind(this,function(A){this.ui.spinner.stop();A=null!=A?A.cards:null;if(null==A||0==A.length)mxUtils.write(t,mxResources.get("noFiles"));else{1==m&&(t.appendChild(E(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,k())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(F.container,300,80,!0,!1);F.init()}))),mxUtils.br(t));for(var I=0;I<A.length;I++)mxUtils.bind(this,function(F){t.appendChild(E(F.name,mxUtils.bind(this,function(){b?(f=F.id,B()):(this.ui.hideDialog(),e(F.id))})))})(A[I]);100==A.length&&(t.appendChild(d),g=function(){t.scrollTop>=t.scrollHeight-t.offsetHeight&&u()},mxEvent.addListener(t,"scroll",g))}}),mxUtils.bind(this,function(A){401==A.status?this.authenticate(x,H,!0):null!=H&&H({message:A.responseText})}))});x()});k()};
+u.status?this.authenticate(n,H,!0):null!=H&&H(u)}))});n()}),d=null,g=null,k=mxUtils.bind(this,function(n){null==n&&(l=0,t.innerText="",n=1);this.ui.spinner.spin(t,mxResources.get("loading"));null!=d&&null!=d.parentNode&&d.parentNode.removeChild(d);d=document.createElement("a");d.style.display="block";d.style.cursor="pointer";mxUtils.write(d,mxResources.get("more")+"...");var u=mxUtils.bind(this,function(){mxEvent.removeListener(t,"scroll",g);k(n+1)});mxEvent.addListener(d,"click",u);var x=mxUtils.bind(this,
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:n-1},mxUtils.bind(this,function(A){this.ui.spinner.stop();A=null!=A?A.cards:null;if(null==A||0==A.length)mxUtils.write(t,mxResources.get("noFiles"));else{1==n&&(t.appendChild(E(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(C){null!=C&&(c=C,k())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(G.container,300,80,!0,!1);G.init()}))),mxUtils.br(t));for(var I=0;I<A.length;I++)mxUtils.bind(this,function(G){t.appendChild(E(G.name,mxUtils.bind(this,function(){b?(f=G.id,B()):(this.ui.hideDialog(),e(G.id))})))})(A[I]);100==A.length&&(t.appendChild(d),g=function(){t.scrollTop>=t.scrollHeight-t.offsetHeight&&u()},mxEvent.addListener(t,"scroll",g))}}),mxUtils.bind(this,function(A){401==A.status?this.authenticate(x,H,!0):null!=H&&H({message:A.responseText})}))});x()});k()};
TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(e){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=
@@ -13960,55 +13959,55 @@ null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),r
e.getStatus()){var d=!1;try{var g=JSON.parse(e.getText());null!=g&&null!=g.errors&&0<g.errors.length&&(d="too_large"==g.errors[0].code)}catch(k){}c({message:mxResources.get(d?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(H);E&&c(d)}))}),v=mxUtils.bind(this,function(t){null==
this.user?this.updateUser(function(){v(!0)},c,t):p(t)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,p,v){if(null!=p)c(e,p);else{var t=e.length-2,E=mxUtils.bind(this,function(){if(2>t)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(t-1,0),B=e.slice(0,H).join("/");H=e[H];var d=e[t],g=e.slice(t+1,e.length).join("/");B=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+H)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+
d:"tree?path="+g+"&ref="+d:"files/"+encodeURIComponent(g)+"?ref="+d);var k=new mxXmlRequest(B,null,"HEAD");this.executeRequest(k,mxUtils.bind(this,function(){200==k.getStatus()?c(e,t):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==k.getStatus()?(t--,E()):l({message:mxResources.get("fileNotFound")})}))}});E()}};GitLabClient.prototype.getFile=function(e,f,c,l,p,v){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(t,E){var H=Math.max(E-1,0),
-B=t.slice(0,H).join("/"),d=t[H],g=t[E];e=t.slice(E+1,t.length).join("/");t=/\.png$/i.test(e);if(!p&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&t))if(null!=b){H="&t="+(new Date).getTime();var k=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+d)+"/repository/files/"+encodeURIComponent(e)+"?ref="+g;t=e.split("/");this.ui.convertFile(k+H,0<t.length?t[t.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(m,u,x){m=new mxXmlRequest(m,null,
-"GET");this.executeRequest(m,mxUtils.bind(this,function(A){try{u(this.getFileContent(JSON.parse(A.getText())))}catch(I){x(I)}}),x)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+d)+"/repository/files/"+encodeURIComponent(e)+"?ref="+g,t=new mxXmlRequest(k+H,null,"GET"),this.executeRequest(t,mxUtils.bind(this,function(m){try{f(this.createGitLabFile(B,d,g,JSON.parse(m.getText()),l,E))}catch(u){c(u)}}),c)}),c,
+B=t.slice(0,H).join("/"),d=t[H],g=t[E];e=t.slice(E+1,t.length).join("/");t=/\.png$/i.test(e);if(!p&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&t))if(null!=b){H="&t="+(new Date).getTime();var k=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+d)+"/repository/files/"+encodeURIComponent(e)+"?ref="+g;t=e.split("/");this.ui.convertFile(k+H,0<t.length?t[t.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(n,u,x){n=new mxXmlRequest(n,null,
+"GET");this.executeRequest(n,mxUtils.bind(this,function(A){try{u(this.getFileContent(JSON.parse(A.getText())))}catch(I){x(I)}}),x)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),k=this.baseUrl+"/projects/"+encodeURIComponent(B+"/"+d)+"/repository/files/"+encodeURIComponent(e)+"?ref="+g,t=new mxXmlRequest(k+H,null,"GET"),this.executeRequest(t,mxUtils.bind(this,function(n){try{f(this.createGitLabFile(B,d,g,JSON.parse(n.getText()),l,E))}catch(u){c(u)}}),c)}),c,
v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,p,v){var t=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,
ref:c,name:l.file_name,path:l.file_path,html_url:t+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:t+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:v};l=this.getFileContent(l);return p?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,p,v,t){p=null!=p?p:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(E,H){var B=Math.max(H-1,0),d=E.slice(0,B).join("/"),g=E[B],k=E[H];path=E.slice(H+
-1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(d+"/"+g+"/"+k+"/"+path,!0,mxUtils.bind(this,function(m,u){m?p?(t||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(x){this.writeFile(d,g,k,path,x,f,u,mxUtils.bind(this,function(A){try{var I=JSON.parse(A.getText());c(this.createGitLabFile(d,g,k,null!=I.content?I.content:I,p,H))}catch(F){l(F)}}),l)}),l)):(m=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:d,repo:g,ref:k,name:e,path:path,html_url:m+
-d+"/"+g+"/blob/"+k+"/"+path,download_url:m+d+"/"+g+"/raw/"+k+"/"+path+"?inline=false",refPos:H,last_commit_id:u,isNew:!0}))):l()}))}),l,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var p=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){p();c(!0,l.getCurrentEtag())},function(){p();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),
+1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(d+"/"+g+"/"+k+"/"+path,!0,mxUtils.bind(this,function(n,u){n?p?(t||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(x){this.writeFile(d,g,k,path,x,f,u,mxUtils.bind(this,function(A){try{var I=JSON.parse(A.getText());c(this.createGitLabFile(d,g,k,null!=I.content?I.content:I,p,H))}catch(G){l(G)}}),l)}),l)):(n=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:d,repo:g,ref:k,name:e,path:path,html_url:n+
+d+"/"+g+"/blob/"+k+"/"+path,download_url:n+d+"/"+g+"/raw/"+k+"/"+path+"?inline=false",refPos:H,last_commit_id:u,isNew:!0}))):l()}))}),l,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var p=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){p();c(!0,l.getCurrentEtag())},function(){p();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),
mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,p,v,t,E,H){if(v.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var B="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:p,content:v,encoding:"base64"};null!=t&&(c.last_commit_id=t,B="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+
-encodeURIComponent(l);B=new mxXmlRequest(e,JSON.stringify(c),B);this.executeRequest(B,mxUtils.bind(this,function(d){E(d)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,p){var v=e.meta.org,t=e.meta.repo,E=e.meta.ref,H=e.meta.path,B=mxUtils.bind(this,function(g,k){this.writeFile(v,t,E,H,p,k,g,mxUtils.bind(this,function(m){delete e.meta.isNew;this.getFile(v+"/"+t+"/"+E+"/"+H,mxUtils.bind(this,function(u){u.getData()==e.getData()?f(u.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,
+encodeURIComponent(l);B=new mxXmlRequest(e,JSON.stringify(c),B);this.executeRequest(B,mxUtils.bind(this,function(d){E(d)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,p){var v=e.meta.org,t=e.meta.repo,E=e.meta.ref,H=e.meta.path,B=mxUtils.bind(this,function(g,k){this.writeFile(v,t,E,H,p,k,g,mxUtils.bind(this,function(n){delete e.meta.isNew;this.getFile(v+"/"+t+"/"+E+"/"+H,mxUtils.bind(this,function(u){u.getData()==e.getData()?f(u.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,
null,e.meta.refPos)}),c)}),d=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var g=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(k){B(e.meta.last_commit_id,k)}),c,this.ui.getCurrentFile()!=e?e.getData():null,g.scale,g.border)}else B(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(v+"/"+t+"/"+E+"/"+H,mxUtils.bind(this,function(g){e.meta.last_commit_id=g.meta.last_commit_id;d()}),c):d()};GitLabClient.prototype.pickFolder=
function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,p=null,v=null,t=null,E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));
H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";E.appendChild(H);var B=document.createElement("div");B.style.whiteSpace="nowrap";B.style.border="1px solid lightgray";B.style.boxSizing="border-box";B.style.padding="4px";B.style.overflow="auto";B.style.lineHeight="1.2em";B.style.height="274px";E.appendChild(B);var d=document.createElement("div");d.style.textOverflow="ellipsis";d.style.boxSizing="border-box";d.style.overflow="hidden";d.style.padding="4px";d.style.width=
-"100%";var g=new CustomDialog(this.ui,E,mxUtils.bind(this,function(){f(l+"/"+p+"/"+encodeURIComponent(v)+"/"+t)}));this.ui.showDialog(g.container,420,370,!0,!0);e&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(P,R,U,O){var V=document.createElement("a");V.setAttribute("title",P);V.style.cursor="pointer";mxUtils.write(V,P);mxEvent.addListener(V,"click",R);O&&(V.style.textDecoration="underline");null!=U&&(P=d.cloneNode(),P.style.padding=U,P.appendChild(V),V=P);return V}),
-m=mxUtils.bind(this,function(P){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(k(l+"/"+p,mxUtils.bind(this,function(){t=null;C()}),null,!0));P||(mxUtils.write(R," / "),R.appendChild(k(decodeURIComponent(v),mxUtils.bind(this,function(){t=null;F()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(P=0;P<U.length;P++)(function(O){mxUtils.write(R," / ");R.appendChild(k(U[O],mxUtils.bind(this,function(){t=U.slice(0,O+1).join("/");I()}),null,!0))})(P)}B.appendChild(R)}),
+"100%";var g=new CustomDialog(this.ui,E,mxUtils.bind(this,function(){f(l+"/"+p+"/"+encodeURIComponent(v)+"/"+t)}));this.ui.showDialog(g.container,420,370,!0,!0);e&&g.okButton.parentNode.removeChild(g.okButton);var k=mxUtils.bind(this,function(P,R,U,N){var V=document.createElement("a");V.setAttribute("title",P);V.style.cursor="pointer";mxUtils.write(V,P);mxEvent.addListener(V,"click",R);N&&(V.style.textDecoration="underline");null!=U&&(P=d.cloneNode(),P.style.padding=U,P.appendChild(V),V=P);return V}),
+n=mxUtils.bind(this,function(P){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(k(l+"/"+p,mxUtils.bind(this,function(){t=null;C()}),null,!0));P||(mxUtils.write(R," / "),R.appendChild(k(decodeURIComponent(v),mxUtils.bind(this,function(){t=null;G()}),null,!0)));if(null!=t&&0<t.length){var U=t.split("/");for(P=0;P<U.length;P++)(function(N){mxUtils.write(R," / ");R.appendChild(k(U[N],mxUtils.bind(this,function(){t=U.slice(0,N+1).join("/");I()}),null,!0))})(P)}B.appendChild(R)}),
u=mxUtils.bind(this,function(P){this.ui.handleError(P,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(t=v=p=l=null,C()):this.ui.hideDialog()}))}),x=null,A=null,I=mxUtils.bind(this,function(P){null==P&&(B.innerText="",P=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/tree?path="+t+"&ref="+v+"&per_page=100&page="+P,null,"GET");this.ui.spinner.spin(B,mxResources.get("loading"));g.okButton.removeAttribute("disabled");null!=A&&
-(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){I(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(m(!v),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==
-t||null==t)t=null,C();else{var J=t.split("/");t=J.slice(0,J.length-1).join("/");I()}}),"4px")));var V=JSON.parse(O.getText());if(null==V||0==V.length)c||(mxUtils.br(B),mxUtils.write(B,mxResources.get("noFiles")));else{var q=!0,y=0,D=mxUtils.bind(this,function(J){for(var L=0;L<V.length;L++)mxUtils.bind(this,function(K){if(J==("tree"==K.type)){var n=d.cloneNode();n.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==
-K.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;n.appendChild(z);n.appendChild(k(K.name+("tree"==K.type?"/":""),mxUtils.bind(this,function(){"tree"==K.type?(t=K.path,I()):e&&"blob"==K.type&&(this.ui.hideDialog(),f(l+"/"+p+"/"+v+"/"+K.path))})));B.appendChild(n);y++}})(V[L])});D(!0);e&&D(!1);100==y&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&U()},mxEvent.addListener(B,"scroll",A))}}))}),
-u,!0)}),F=mxUtils.bind(this,function(P,R){null==P&&(B.innerText="",P=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/branches?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
-mxResources.get("more")+"...");var O=mxUtils.bind(this,function(){F(P+1)});mxEvent.addListener(x,"click",O);this.executeRequest(U,mxUtils.bind(this,function(V){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(m(!0),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){t=null;C()}),"4px")));var q=JSON.parse(V.getText());if(null==q||0==q.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)v=q[0].name,t="",I();else{for(var y=
-0;y<q.length;y++)mxUtils.bind(this,function(D,J){var L=d.cloneNode();L.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";L.appendChild(k(D.name,mxUtils.bind(this,function(){v=encodeURIComponent(D.name);t="";I()})));B.appendChild(L)})(q[y],y);100==q.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&O()},mxEvent.addListener(B,"scroll",A))}}))}),u)});g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));
-var C=mxUtils.bind(this,function(P){var R=this.ui.spinner,U=0;this.ui.spinner.stop();var O=function(){R.spin(B,mxResources.get("loading"));U+=1},V=function(){--U;0===U&&R.stop()};null==P&&(B.innerText="",P=1);null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===U&&C(P+1)});mxEvent.addListener(x,
-"click",q);var y=mxUtils.bind(this,function(J){O();var L=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(L,mxUtils.bind(this,function(K){this.ui.tryAndHandle(mxUtils.bind(this,function(){J(JSON.parse(K.getText()));V()}))}),u)}),D=mxUtils.bind(this,function(J,L){O();var K=new mxXmlRequest(this.baseUrl+"/groups/"+J.id+"/projects?per_page=100",null,"GET");this.executeRequest(K,mxUtils.bind(this,function(n){this.ui.tryAndHandle(mxUtils.bind(this,function(){L(J,JSON.parse(n.getText()));
-V()}))}),u)});y(mxUtils.bind(this,function(J){if(null==this.user)mxUtils.write(B,mxResources.get("loggedOut"));else{O();var L=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+P,null,"GET");this.executeRequest(L,mxUtils.bind(this,function(K){K=JSON.parse(K.getText());if(null!=K&&0!=K.length||null!=J&&0!=J.length){1==P&&(B.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===U){var G=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
-mxUtils.bind(this,function(M){null!=M&&(M=M.split("/"),1<M.length?(l=M.slice(0,M.length-1).join("/"),p=M[M.length-1],t="",F(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(G.container,300,80,!0,!1);G.init()}}))),mxUtils.br(B),mxUtils.br(B));for(var n=!0,z=0;z<K.length;z++)mxUtils.bind(this,function(G){var M=d.cloneNode();M.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;M.appendChild(k(G.name_with_namespace,
-mxUtils.bind(this,function(){0===U&&(l=G.owner.username,p=G.path,t="",F(null,!0))})));B.appendChild(M)})(K[z]);for(z=0;z<J.length;z++)O(),D(J[z],mxUtils.bind(this,function(G,M){V();for(var N=0;N<M.length;N++){var Q=d.cloneNode();Q.style.backgroundColor=n?Editor.isDarkMode()?"#000000":"#eeeeee":"";n=!n;mxUtils.bind(this,function(S){Q.appendChild(k(S.name_with_namespace,mxUtils.bind(this,function(){0===U&&(l=G.full_path,p=S.path,t="",F(null,!0))})));B.appendChild(Q)})(M[N])}}));V()}else V(),mxUtils.br(B),
+(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var U=mxUtils.bind(this,function(){I(P+1)});mxEvent.addListener(x,"click",U);this.executeRequest(R,mxUtils.bind(this,function(N){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(n(!v),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){if(""==
+t||null==t)t=null,C();else{var J=t.split("/");t=J.slice(0,J.length-1).join("/");I()}}),"4px")));var V=JSON.parse(N.getText());if(null==V||0==V.length)c||(mxUtils.br(B),mxUtils.write(B,mxResources.get("noFiles")));else{var q=!0,y=0,D=mxUtils.bind(this,function(J){for(var L=0;L<V.length;L++)mxUtils.bind(this,function(K){if(J==("tree"==K.type)){var m=d.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==
+K.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(k(K.name+("tree"==K.type?"/":""),mxUtils.bind(this,function(){"tree"==K.type?(t=K.path,I()):e&&"blob"==K.type&&(this.ui.hideDialog(),f(l+"/"+p+"/"+v+"/"+K.path))})));B.appendChild(m);y++}})(V[L])});D(!0);e&&D(!1);100==y&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&U()},mxEvent.addListener(B,"scroll",A))}}))}),
+u,!0)}),G=mxUtils.bind(this,function(P,R){null==P&&(B.innerText="",P=1);var U=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/branches?per_page=100&page="+P,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,
+mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){G(P+1)});mxEvent.addListener(x,"click",N);this.executeRequest(U,mxUtils.bind(this,function(V){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==P&&(n(!0),B.appendChild(k("../ [Up]",mxUtils.bind(this,function(){t=null;C()}),"4px")));var q=JSON.parse(V.getText());if(null==q||0==q.length)mxUtils.br(B),mxUtils.write(B,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)v=q[0].name,t="",I();else{for(var y=
+0;y<q.length;y++)mxUtils.bind(this,function(D,J){var L=d.cloneNode();L.style.backgroundColor=0==J%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";L.appendChild(k(D.name,mxUtils.bind(this,function(){v=encodeURIComponent(D.name);t="";I()})));B.appendChild(L)})(q[y],y);100==q.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&N()},mxEvent.addListener(B,"scroll",A))}}))}),u)});g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(B,mxResources.get("loading"));
+var C=mxUtils.bind(this,function(P){var R=this.ui.spinner,U=0;this.ui.spinner.stop();var N=function(){R.spin(B,mxResources.get("loading"));U+=1},V=function(){--U;0===U&&R.stop()};null==P&&(B.innerText="",P=1);null!=A&&(mxEvent.removeListener(B,"scroll",A),A=null);null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x);x=document.createElement("a");x.style.display="block";x.style.cursor="pointer";mxUtils.write(x,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===U&&C(P+1)});mxEvent.addListener(x,
+"click",q);var y=mxUtils.bind(this,function(J){N();var L=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(L,mxUtils.bind(this,function(K){this.ui.tryAndHandle(mxUtils.bind(this,function(){J(JSON.parse(K.getText()));V()}))}),u)}),D=mxUtils.bind(this,function(J,L){N();var K=new mxXmlRequest(this.baseUrl+"/groups/"+J.id+"/projects?per_page=100",null,"GET");this.executeRequest(K,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){L(J,JSON.parse(m.getText()));
+V()}))}),u)});y(mxUtils.bind(this,function(J){if(null==this.user)mxUtils.write(B,mxResources.get("loggedOut"));else{N();var L=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+P,null,"GET");this.executeRequest(L,mxUtils.bind(this,function(K){K=JSON.parse(K.getText());if(null!=K&&0!=K.length||null!=J&&0!=J.length){1==P&&(B.appendChild(k(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===U){var F=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
+mxUtils.bind(this,function(M){null!=M&&(M=M.split("/"),1<M.length?(l=M.slice(0,M.length-1).join("/"),p=M[M.length-1],t="",G(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(F.container,300,80,!0,!1);F.init()}}))),mxUtils.br(B),mxUtils.br(B));for(var m=!0,z=0;z<K.length;z++)mxUtils.bind(this,function(F){var M=d.cloneNode();M.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;M.appendChild(k(F.name_with_namespace,
+mxUtils.bind(this,function(){0===U&&(l=F.owner.username,p=F.path,t="",G(null,!0))})));B.appendChild(M)})(K[z]);for(z=0;z<J.length;z++)N(),D(J[z],mxUtils.bind(this,function(F,M){V();for(var O=0;O<M.length;O++){var Q=d.cloneNode();Q.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){Q.appendChild(k(S.name_with_namespace,mxUtils.bind(this,function(){0===U&&(l=F.full_path,p=S.path,t="",G(null,!0))})));B.appendChild(Q)})(M[O])}}));V()}else V(),mxUtils.br(B),
mxUtils.write(B,mxResources.get("repositoryNotFound"));100==K.length&&(B.appendChild(x),A=function(){B.scrollTop>=B.scrollHeight-B.offsetHeight&&q()},mxEvent.addListener(B,"scroll",A))}),u)}}))});b?this.user?C():this.updateUser(function(){C()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){C()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,p,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=p;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,p,v,t){DrawioComment.call(this,b,e,f,c,l,p,v);this.pCommentId=t};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(p){e(p.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,p,v,t,E,H,B,d,g,k){function m(T,W){W=W||document;return W.querySelector(T)}function u(T,W,X){if(null==T["@microsoft.graph.downloadUrl"])if(null==T.parentReference)X();else{c(T.id,T.parentReference.driveId,function(ba){u(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",T["@microsoft.graph.downloadUrl"]);var Y=T.file?"image/png"==T.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,p,v,t,E,H,B,d,g,k){function n(T,W){W=W||document;return W.querySelector(T)}function u(T,W,X){if(null==T["@microsoft.graph.downloadUrl"])if(null==T.parentReference)X();else{c(T.id,T.parentReference.driveId,function(ba){u(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",T["@microsoft.graph.downloadUrl"]);var Y=T.file?"image/png"==T.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;
Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(T.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var da=mxUtils.parseXml(ba),ia="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=ia){W(ia.ownerDocument);return}}catch(ca){}X()}};(Y||/\.pdf$/.test(T.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
-Z.send()}function x(){d&&null!=y?q.exportToCanvas(function(T){T=EditorUi.prototype.createImageDataUri(T,null,"png");v(D,T);p(D)},400,null,null,function(T){console.log(T)},600,null,null,null,null,null,y):(v(D,void 0),p(D))}function A(T){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);V.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==T||T.folder||/\.drawiolib$/.test(T.name))W(mxResources.get("noPreview"));
-else try{null!=T.remoteItem&&(T=T.remoteItem),z=T,V.spin(N),u(T,function(X){V.stop();if(z==T)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){D=null;W(mxResources.get("notADiagramFile"))})}catch(X){D=null,W(mxResources.get("notADiagramFile"))}}function I(){var T=m(".odFilesBreadcrumb");if(null!=T){T.innerText="";for(var W=
+Z.send()}function x(){d&&null!=y?q.exportToCanvas(function(T){T=EditorUi.prototype.createImageDataUri(T,null,"png");v(D,T);p(D)},400,null,null,function(T){console.log(T)},600,null,null,null,null,null,y):(v(D,void 0),p(D))}function A(T){function W(X){O.style.background="transparent";O.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);O.appendChild(Z);V.stop()}if(null!=O)if(O.style.background="transparent",O.innerText="",null==T||T.folder||/\.drawiolib$/.test(T.name))W(mxResources.get("noPreview"));
+else try{null!=T.remoteItem&&(T=T.remoteItem),z=T,V.spin(O),u(T,function(X){V.stop();if(z==T)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(O,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){D=null;W(mxResources.get("notADiagramFile"))})}catch(X){D=null,W(mxResources.get("notADiagramFile"))}}function I(){var T=n(".odFilesBreadcrumb");if(null!=T){T.innerText="";for(var W=
0;W<K.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(K[W].name||mxResources.get("home"));T.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);K=K.slice(0,ba);C(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(K[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";T.appendChild(Z)}null!=K[K.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==K.length?mxResources.get(E?"selectFolder":
-"officeSelDiag"):K[K.length-1].name||mxResources.get("home")),T.appendChild(W))}}function F(){if(null!=D&&!L)if("sharepoint"==J)C("site",null,D.id,D.displayName);else if("site"==J)C("subsite",null,D.id,D.name);else{var T=D.folder;D=D.remoteItem?D.remoteItem:D;var W=(D.parentReference?D.parentReference.driveId:null)||J,X=D.id;T?C(W,X,null,D.name):x()}}function C(T,W,X,Z,Y){function ba(na){V.stop();var za=document.createElement("table");za.className="odFileListGrid";for(var ma=null,sa=0,oa=0;null!=
+"officeSelDiag"):K[K.length-1].name||mxResources.get("home")),T.appendChild(W))}}function G(){if(null!=D&&!L)if("sharepoint"==J)C("site",null,D.id,D.displayName);else if("site"==J)C("subsite",null,D.id,D.name);else{var T=D.folder;D=D.remoteItem?D.remoteItem:D;var W=(D.parentReference?D.parentReference.driveId:null)||J,X=D.id;T?C(W,X,null,D.name):x()}}function C(T,W,X,Z,Y){function ba(na){V.stop();var za=document.createElement("table");za.className="odFileListGrid";for(var ma=null,sa=0,oa=0;null!=
na&&oa<na.length;oa++){var la=na[oa];if(1!=ca||!la.webUrl||0<la.webUrl.indexOf("sharepoint.com/sites/")||0>la.webUrl.indexOf("sharepoint.com/")){var Ea=la.displayName||la.name,va=mxUtils.htmlEntities(la.description||Ea);ca&&(la.folder=2==ca?{isRoot:!0}:!0);var Ca=null!=la.folder;if(!E||Ca){var xa=document.createElement("tr");xa.className=sa++%2?"odOddRow":"odEvenRow";var Da=document.createElement("td");Da.style.width="36px";var Ba=document.createElement("img");Ba.src="/images/"+(Ca?"folder.png":"file.png");
-Ba.className="odFileImg";Da.appendChild(Ba);xa.appendChild(Da);Da=document.createElement("td");Ca=document.createElement("div");Ca.className="odFileTitle";Ca.innerHTML=mxUtils.htmlEntities(Ea);Ca.setAttribute("title",va);Da.appendChild(Ca);xa.appendChild(Da);za.appendChild(xa);null==ma&&(ma=xa,ma.className+=" odRowSelected",D=la,J=T,k||e(D));(function(Ka,Ja){xa.addEventListener("dblclick",F);xa.addEventListener("click",function(){ma!=Ja&&(ma.className=ma.className.replace("odRowSelected",""),ma=Ja,
+Ba.className="odFileImg";Da.appendChild(Ba);xa.appendChild(Da);Da=document.createElement("td");Ca=document.createElement("div");Ca.className="odFileTitle";Ca.innerHTML=mxUtils.htmlEntities(Ea);Ca.setAttribute("title",va);Da.appendChild(Ca);xa.appendChild(Da);za.appendChild(xa);null==ma&&(ma=xa,ma.className+=" odRowSelected",D=la,J=T,k||e(D));(function(Ka,Ja){xa.addEventListener("dblclick",G);xa.addEventListener("click",function(){ma!=Ja&&(ma.className=ma.className.replace("odRowSelected",""),ma=Ja,
ma.className+=" odRowSelected",D=Ka,J=T,k||e(D))})})(la,xa)}}}0==sa?(na=document.createElement("div"),na.className="odEmptyFolder",na.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),aa.appendChild(na)):aa.appendChild(za);I();L=!1}function da(na){f(na?na:ya,function(za){if(ia){var ma=za.value||[];if(k||ca)Array.prototype.push.apply(ua,ma);else{for(var sa=0;sa<ma.length;sa++){var oa=ma[sa],la=oa.file?oa.file.mimeType:null;(oa.folder||"text/html"==la||"text/xml"==
la||"application/xml"==la||"image/png"==la||/\.svg$/.test(oa.name)||/\.html$/.test(oa.name)||/\.xml$/.test(oa.name)||/\.png$/.test(oa.name)||/\.drawio$/.test(oa.name)||/\.drawiolib$/.test(oa.name)||/\.pdf$/.test(oa.name))&&ua.push(oa)}ua.sort(function(Ea,va){var Ca=Ea.name.toLowerCase(),xa=va.name.toLowerCase();return Ea.folder&&!va.folder?-1:!Ea.folder&&va.folder?1:Ca<xa?-1:Ca>xa?1:0})}za["@odata.nextLink"]&&1E3>ua.length?da(za["@odata.nextLink"]):(clearTimeout(fa),ba(ua))}},function(za){if(ia){clearTimeout(fa);
-var ma=null;try{ma=JSON.parse(za.responseText).error.message}catch(sa){}t(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ma?" ("+ma+")":""));L=!1;V.stop()}},null!=na)}if(!L){m(".odCatsList").style.display="block";m(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ia=L=!0,ca=0;n=arguments;var fa=setTimeout(function(){L=ia=!1;V.stop();t(mxResources.get("timeout"))},2E4),aa=m(".odFilesList");aa.innerText="";V.spin(aa);switch(T){case "recent":K=
+var ma=null;try{ma=JSON.parse(za.responseText).error.message}catch(sa){}t(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ma?" ("+ma+")":""));L=!1;V.stop()}},null!=na)}if(!L){n(".odCatsList").style.display="block";n(".odFilesSec").style.display="block";null!=O&&(O.innerText="",O.style.top="50%");var ia=L=!0,ca=0;m=arguments;var fa=setTimeout(function(){L=ia=!1;V.stop();t(mxResources.get("timeout"))},2E4),aa=n(".odFilesList");aa.innerText="";V.spin(aa);switch(T){case "recent":K=
[{name:mxResources.get("recent",null,"Recent"),driveId:T}];var ja=l()||{},ha=[],ea;for(ea in ja)ha.push(ja[ea]);clearTimeout(fa);ba(ha);return;case "shared":var ya="/me/drive/sharedWithMe";K=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:T}];break;case "sharepoint":ya="/sites?search=";K=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:T}];ca=1;break;case "site":K.push({name:Z,driveId:T,folderId:W,siteId:X});ya="/sites/"+X+"/drives";ca=2;break;case "subsite":K.push({name:Z,
driveId:T,folderId:W,siteId:X});ya="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":T=J;K=[{driveId:T,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ya=T?"/drives/"+T+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?K=[{driveId:T}]:K.push({name:Z,driveId:T,folderId:W}),ya=(T?"/drives/"+T:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}ca||(ya+=(0<ya.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
var ua=[];da()}}function P(T){Q.className=Q.className.replace("odCatSelected","");Q=T;Q.className+=" odCatSelected"}function R(T){L||(S=null,C("search",null,null,null,T))}var U="";null==e&&(e=A,U='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var T=null;try{T=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return T});null==p&&(p=function(T){if(null!=T){var W=l()||{};delete T["@microsoft.graph.downloadUrl"];W[T.id]=T;localStorage.setItem("mxODPickerRecentList",
JSON.stringify(W))}});U='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+
mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+U+(H?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(B?'<button id="odSubmitBtn" class="odSubmitBtn">'+
-mxUtils.htmlEntities(mxResources.get(E?"select":"open"))+"</button>":"");var O=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();O=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
-(O?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(O?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var V=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,D=null,J=null,L=!1,K=[],n=null,z=null;this.getSelectedItem=function(){null!=D&&p(D);return D};if(null==m("#mxODPickerCss")){var G=document.head||document.getElementsByTagName("head")[0],M=document.createElement("style");G.appendChild(M);M.type="text/css";M.id="mxODPickerCss";M.appendChild(document.createTextNode(O))}b.innerHTML=
-U;var N=m(".odPreview"),Q=m("#odFiles");b=function(T,W){W=W||document;return W.querySelectorAll(T)}(".odCatListTitle");for(U=0;U<b.length;U++)b[U].addEventListener("click",function(){D=z=null;if(!L)switch(P(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var S=null;m("#odSearchBox").addEventListener("keyup",function(T){var W=this;null!=S&&clearTimeout(S);13==T.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},
-500)});m("#refreshOD").addEventListener("click",function(){if(null!=n){e(null);var T=K.slice();C.apply(this,n);K=T}});H&&m("#odBackBtn").addEventListener("click",H);B&&m("#odSubmitBtn").addEventListener("click",x);null!=g?(H=g.pop(),"sharepoint"==g[0].driveId&&P(m("#odSharepoint")),K=g,C(H.driveId,H.folderId,H.siteId,H.name)):C()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),
+mxUtils.htmlEntities(mxResources.get(E?"select":"open"))+"</button>":"");var N=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();N=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+(N?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(N?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
+var V=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,D=null,J=null,L=!1,K=[],m=null,z=null;this.getSelectedItem=function(){null!=D&&p(D);return D};if(null==n("#mxODPickerCss")){var F=document.head||document.getElementsByTagName("head")[0],M=document.createElement("style");F.appendChild(M);M.type="text/css";M.id="mxODPickerCss";M.appendChild(document.createTextNode(N))}b.innerHTML=
+U;var O=n(".odPreview"),Q=n("#odFiles");b=function(T,W){W=W||document;return W.querySelectorAll(T)}(".odCatListTitle");for(U=0;U<b.length;U++)b[U].addEventListener("click",function(){D=z=null;if(!L)switch(P(this),this.id){case "odFiles":C();break;case "odRecent":C("recent");break;case "odShared":C("shared");break;case "odSharepoint":C("sharepoint")}});var S=null;n("#odSearchBox").addEventListener("keyup",function(T){var W=this;null!=S&&clearTimeout(S);13==T.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},
+500)});n("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var T=K.slice();C.apply(this,m);K=T}});H&&n("#odBackBtn").addEventListener("click",H);B&&n("#odSubmitBtn").addEventListener("click",x);null!=g?(H=g.pop(),"sharepoint"==g[0].driveId&&P(n("#odSharepoint")),K=g,C(H.driveId,H.folderId,H.siteId,H.name)):C()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),
null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,p){if("1"==urlParams.openInSameWin||navigator.standalone)null!=p&&p();else{var v=null;try{v=window.open(c)}catch(t){}null==v||void 0===v?this.showDialog((new PopupDialog(this,c,l,p)).container,340,140,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
@@ -14024,29 +14023,27 @@ window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https:
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};
App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};
-App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var k=parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):
-EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(u){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(u.stack)):console.error(u)}try{if(null!=Menus.prototype.defaultFonts)for(k=0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
-mxLanguage))}catch(u){document.body.innerHTML="",m=document.createElement("pre"),mxUtils.write(m,u.stack),document.body.appendChild(m)}},c=function(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,STYLE_PATH+"/default.xml"],function(m){function u(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
-"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(P){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var C=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
+App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var B=parseInt(mxSettings.settings.autosaveDelay);!isNaN(B)&&0<B?(DrawioFile.prototype.autosaveDelay=B,EditorUi.debug("Setting autosaveDelay",B)):EditorUi.debug("Invalid autosaveDelay",B)}null!=mxSettings.settings.defaultEdgeLength&&(B=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(B)&&0<B?(Graph.prototype.defaultEdgeLength=B,EditorUi.debug("Using defaultEdgeLength",B)):
+EditorUi.debug("Invalid defaultEdgeLength",B))}}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}try{if(null!=Menus.prototype.defaultFonts)for(B=0;B<Menus.prototype.defaultFonts.length;B++){var d=Menus.prototype.defaultFonts[B];"string"!==typeof d&&null!=d.fontFamily&&null!=d.fontUrl&&Graph.addFont(d.fontFamily,d.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
+mxLanguage))}catch(g){document.body.innerHTML="",d=document.createElement("pre"),mxUtils.write(d,g.stack),document.body.appendChild(d)}},c=function(B){mxUtils.getAll("1"!=urlParams.dev?[B]:[B,STYLE_PATH+"/default.xml"],function(d){function g(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
+"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(I){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var A=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&
"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
-"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,C,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(P){EditorUi.isElectronApp?
-(mxLog.show(),mxLog.debug(P.stack)):(EditorUi.logError(P.message,null,null,null,P),window.setTimeout(function(){alert(P.message)},1))}}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=x){EditorUi.debug("Setting configuration",JSON.stringify(x));if(null!=x.merge){var A=localStorage.getItem(Editor.configurationKey);if(null!=
-A)try{var I=JSON.parse(A),F;for(F in x.merge)I[F]=x.merge[F];x=I}catch(C){window.location.hash="",alert(C)}else x=x.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(x)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash="",alert(C)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?u():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],u,function(C){document.body.innerHTML="";var P=document.createElement("pre");mxUtils.write(P,C.stack);document.body.appendChild(P)}))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
+"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(A);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,A,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(I){EditorUi.isElectronApp?
+(mxLog.show(),mxLog.debug(I.stack)):(EditorUi.logError(I.message,null,null,null,I),window.setTimeout(function(){alert(I.message)},1))}}mxResources.parse(d[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var k=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=k){EditorUi.debug("Setting configuration",JSON.stringify(k));if(null!=k.merge){var n=localStorage.getItem(Editor.configurationKey);if(null!=
+n)try{var u=JSON.parse(n),x;for(x in k.merge)u[x]=k.merge[x];k=u}catch(A){window.location.hash="",alert(A)}else k=k.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(k)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(A){window.location.hash="",alert(A)}1<d.length&&(Graph.prototype.defaultThemes["default-style2"]=d[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+d[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?g():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],g,function(A){document.body.innerHTML="";var I=document.createElement("pre");mxUtils.write(I,A.stack);document.body.appendChild(I)}))},function(d){d=document.getElementById("geStatus");null!=d&&(d.innerHTML="Error loading page. <a>Please try refreshing.</a>",d.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,
-function(k){if(200<=k.getStatus()&&299>=k.getStatus()){var m=document.createElement("style");m.type="text/css";m.appendChild(document.createTextNode(k.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(m)}})),App.isMainCalled=!0,window.onerror=function(k,m,u,x,A){EditorUi.logError("Global: "+(null!=k?k:""),m,u,x,A,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",k,"\nURL:",m,"\nLine:",
-u,"\nColumn:",x,"\nError:",A)):console.error("Message:",k,"\nURL:",m,"\nLine:",u,"\nColumn:",x,"\nError:",A);window.setTimeout(function(){alert("Error: "+(null!=k?k:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");
-null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var p=document.getElementById("geBootstrap");if(null!=p){var v=mxUtils.getTextContent(p);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(v).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
-CryptoJS.MD5(v).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var t=document.getElementById("geMain");null!=t&&(v=mxUtils.getTextContent(t),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(v).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(v).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&
-"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(k){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),
-"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var E=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(E=H.plugins)}catch(k){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=E&&0<E.length&&"0"!=urlParams.plugins)for(l=0;l<E.length;l++)try{("/"==E[l].charAt(0)&&
-(E[l]=PLUGINS_BASE_PATH+E[l]),App.isSameDomain(E[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(E[l])?null==App.pluginsLoaded[E[l]]&&(App.pluginsLoaded[E[l]]=!0,App.embedModePluginsCount++,mxscript(E[l])):null!=window.console&&console.log("Unknown plugin:",E[l]):null!=window.console&&console.log("Blocked plugin:",E[l])}catch(k){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&
-isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var B=window.opener||window.parent,d=function(k){if(k.source==B)try{var m=JSON.parse(k.data);null!=m&&"configure"==m.action&&(mxEvent.removeListener(window,"message",d),Editor.configure(m.config),
-mxSettings.load(),null!=m.config.darkColor&&document.body.style.setProperty("--dark-color",m.config.darkColor),m.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(u){null!=window.console&&console.log("Error in configure message: "+u,k.data)}};mxEvent.addListener(window,"message",d);B.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
-mxSettings.load()}catch(k){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(k.stack)):console.error(k)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var g=localStorage.getItem(Editor.configurationKey);if(null!=g)try{g=JSON.parse(g),null!=g&&(EditorUi.debug("Using local configuration",g),Editor.configure(g),mxSettings.load())}catch(k){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(k.stack)):console.error(k)}}}f()}}else document.body.innerHTML=
-'<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(k){document.body.innerHTML="",E=document.createElement("pre"),mxUtils.write(E,k.stack),document.body.appendChild(E)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};
-App.pluginsLoaded={};App.embedModePluginsCount=0;
+function(B){if(200<=B.getStatus()&&299>=B.getStatus()){var d=document.createElement("style");d.type="text/css";d.appendChild(document.createTextNode(B.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(d)}})),App.isMainCalled=!0,window.onerror=function(B,d,g,k,n){EditorUi.logError("Global: "+(null!=B?B:""),d,g,k,n,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",B,"\nURL:",d,"\nLine:",
+g,"\nColumn:",k,"\nError:",n)):console.error("Message:",B,"\nURL:",d,"\nLine:",g,"\nColumn:",k,"\nError:",n);window.setTimeout(function(){alert("Error: "+(null!=B?B:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");
+null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&(!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew)&&
+navigator.serviceWorker.register("service-worker.js")}catch(B){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var p=null!=mxSettings.settings?
+mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var v=JSON.parse(localStorage.getItem(mxSettings.key));null!=v&&(p=v.plugins)}catch(B){}v=urlParams.p;App.initPluginCallback();null!=v&&App.loadPlugins(v.split(";"));if(null!=p&&0<p.length&&"0"!=urlParams.plugins)for(l=0;l<p.length;l++)try{("/"==p[l].charAt(0)&&(p[l]=PLUGINS_BASE_PATH+p[l]),App.isSameDomain(p[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(p[l])?null==App.pluginsLoaded[p[l]]&&(App.pluginsLoaded[p[l]]=
+!0,App.embedModePluginsCount++,mxscript(p[l])):null!=window.console&&console.log("Unknown plugin:",p[l]):null!=window.console&&console.log("Blocked plugin:",p[l])}catch(B){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,
+null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var t=window.opener||window.parent,E=function(B){if(B.source==t)try{var d=JSON.parse(B.data);null!=d&&"configure"==d.action&&(mxEvent.removeListener(window,"message",E),Editor.configure(d.config),mxSettings.load(),null!=d.config.darkColor&&document.body.style.setProperty("--dark-color",d.config.darkColor),d.colorSchemeMeta&&mxmeta("color-scheme","dark light"),
+f())}catch(g){null!=window.console&&console.log("Error in configure message: "+g,B.data)}};mxEvent.addListener(window,"message",E);t.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(B){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(B.stack)):console.error(B)}if(isLocalStorage&&null!=
+localStorage&&"1"!=urlParams.embed){var H=localStorage.getItem(Editor.configurationKey);if(null!=H)try{H=JSON.parse(H),null!=H&&(EditorUi.debug("Using local configuration",H),Editor.configure(H),mxSettings.load())}catch(B){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(B.stack)):console.error(B)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(B){document.body.innerHTML="",p=document.createElement("pre"),
+mxUtils.write(p,B.stack),document.body.appendChild(p)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",
b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
@@ -14085,12 +14082,12 @@ App.prototype.addRecent=function(b,e,f){if(isLocalStorage&&null!=localStorage){e
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(e){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,e=this.getCurrentFile();null==e||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),v=mxUtils.bind(this,function(O){window.clearTimeout(p);l&&e(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var t=this.editor.graph,E=t.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());t.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var B=this.pages[0];this.currentPage==B?t.setBackgroundImage(E):null!=B.viewState&&null!=B.viewState&&(E=B.viewState.backgroundImage,t.setBackgroundImage(E));t.getGlobalVariable=function(O){return"page"==O?B.getName():"pagenumber"==O?1:H.apply(this,arguments)};t.getGlobalVariable=H;document.body.appendChild(t.container);t.model.setRoot(B.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{t!=this.editor.graph&&null!=t.container.parentNode&&
-t.container.parentNode.removeChild(t.container)}catch(V){O=null}v(O)}),b,this.thumbImageCache,"#ffffff",function(){v()},null,null,null,null,null,null,t,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),g=t.getGraphBounds(),k=t.view.translate,m=t.view.scale;null!=E&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle((k.x+E.x)*m,(k.y+E.y)*m,E.width*m,E.height*m)));var u=b/g.width;u=Math.min(1,Math.min(3*b/(4*g.height),
-u));var x=Math.floor(g.x),A=Math.floor(g.y);d.setAttribute("width",Math.ceil(u*(g.width+4)));d.setAttribute("height",Math.ceil(u*(g.height+4)));var I=d.getContext("2d");I.scale(u,u);I.translate(-x,-A);var F=t.background;if(null==F||""==F||F==mxConstants.NONE)F="#ffffff";I.save();I.fillStyle=F;I.fillRect(x,A,Math.ceil(g.width+4),Math.ceil(g.height+4));I.restore();if(null!=E){var C=new Image;C.src=E.src;I.drawImage(C,E.x*u,E.y*u,E.width*u,E.height*u)}var P=new mxJsCanvas(d),R=new mxAsyncCanvas(this.thumbImageCache);
-P.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,V){O.shape instanceof mxShape&&O.shape.checkBounds()&&(V.save(),V.translate(.5,.5),O.shape.paint(V),V.translate(-.5,-.5),V.restore())};U.drawText=function(O,V){};U.drawState(t.getView().getState(t.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(t.getView().getState(t.model.root),P),t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(O){d=null}v(d)}));
-c=!0}}catch(O){c=!1,null!=t&&t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}c||window.clearTimeout(p);return c};
+App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),v=mxUtils.bind(this,function(N){window.clearTimeout(p);l&&e(N)});null==this.thumbImageCache&&(this.thumbImageCache={});var t=this.editor.graph,E=t.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=t.getGlobalVariable;t=this.createTemporaryGraph(t.getStylesheet());t.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var B=this.pages[0];this.currentPage==B?t.setBackgroundImage(E):null!=B.viewState&&null!=B.viewState&&(E=B.viewState.backgroundImage,t.setBackgroundImage(E));t.getGlobalVariable=function(N){return"page"==N?B.getName():"pagenumber"==N?1:H.apply(this,arguments)};t.getGlobalVariable=H;document.body.appendChild(t.container);t.model.setRoot(B.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(N){try{t!=this.editor.graph&&null!=t.container.parentNode&&
+t.container.parentNode.removeChild(t.container)}catch(V){N=null}v(N)}),b,this.thumbImageCache,"#ffffff",function(){v()},null,null,null,null,null,null,t,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var d=document.createElement("canvas"),g=t.getGraphBounds(),k=t.view.translate,n=t.view.scale;null!=E&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle((k.x+E.x)*n,(k.y+E.y)*n,E.width*n,E.height*n)));var u=b/g.width;u=Math.min(1,Math.min(3*b/(4*g.height),
+u));var x=Math.floor(g.x),A=Math.floor(g.y);d.setAttribute("width",Math.ceil(u*(g.width+4)));d.setAttribute("height",Math.ceil(u*(g.height+4)));var I=d.getContext("2d");I.scale(u,u);I.translate(-x,-A);var G=t.background;if(null==G||""==G||G==mxConstants.NONE)G="#ffffff";I.save();I.fillStyle=G;I.fillRect(x,A,Math.ceil(g.width+4),Math.ceil(g.height+4));I.restore();if(null!=E){var C=new Image;C.src=E.src;I.drawImage(C,E.x*u,E.y*u,E.width*u,E.height*u)}var P=new mxJsCanvas(d),R=new mxAsyncCanvas(this.thumbImageCache);
+P.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(N,V){N.shape instanceof mxShape&&N.shape.checkBounds()&&(V.save(),V.translate(.5,.5),N.shape.paint(V),V.translate(-.5,-.5),V.restore())};U.drawText=function(N,V){};U.drawState(t.getView().getState(t.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(t.getView().getState(t.model.root),P),t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}catch(N){d=null}v(d)}));
+c=!0}}catch(N){c=!1,null!=t&&t!=this.editor.graph&&null!=t.container.parentNode&&t.container.parentNode.removeChild(t.container)}c||window.clearTimeout(p);return c};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){e==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):e==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
mxResources.get("openIt",[mxResources.get("dropbox")])):e==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+
l.toUTCString()}}catch(p){}}})();
@@ -14107,26 +14104,28 @@ b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.inner
2E3)},15E3)}};
App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(E,H,B,d,g){"ResizeObserver loop limit exceeded"!=E&&(EditorUi.logError("Uncaught: "+(null!=E?E:""),H,B,d,g,null,!0),b.handleError({message:E},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(E){var H=this.getCurrentFile();EditorUi.debug("storage event",[E],
[H]);null!=H&&".draft-alive-check"==E.key&&null!=E.newValue&&null!=H.draftId&&(this.draftAliveCheck=E.newValue,H.saveDraft())}))}catch(E){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(E){try{var H=this.getDiagramId();if(H!=e){e=H;var B=this.getCurrentFile();null!=B&&B.getHash()==H||this.loadFile(H,!0)}else{var d=this.getHashObject();if(null!=d&&null!=d.pageId&&null!=this.currentPage&&d.pageId!=this.currentPage.getId()){var g=this.getPageById(d.pageId);
-null!=g&&this.selectPage(g)}}}catch(k){null!=document.body&&this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=null!=m?m.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"))}))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else if((null==
+null!=g&&this.selectPage(g)}}}catch(k){null!=document.body&&this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=null!=n?n.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"))}))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else if((null==
window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var E=mxUtils.bind(this,function(d){Editor.isPngDataUrl(d)&&(d=Editor.extractGraphModelFromPng(d));var g=urlParams.title;g=null!=g?decodeURIComponent(g):this.defaultFilename;d=new LocalFile(this,
d,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(d.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(d);this.editor.chromeless||(d.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),H=window.opener||window.parent;if(H!=window){var B=urlParams.create;null!=B?E(H[decodeURIComponent(B)]):(B=urlParams.data,null!=B?E(decodeURIComponent(B)):this.installMessageHandler(mxUtils.bind(this,function(d,
g){g.source==H&&E(d)})))}}else if(null==this.dialog)if("1"==urlParams.demo)B=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=B;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{B=!1;try{B=null!=window.opener&&null!=window.opener.openFile}catch(d){}B?this.spinner.spin(document.body,mxResources.get("loading")):(B=this.getDiagramId(),
!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=B&&0!=B.length||this.editor.isChromelessView()?null!=B&&0<B.length?this.loadFile(B,null,null,mxUtils.bind(this,function(){var d=decodeURIComponent(urlParams.viewbox||"");if(""!=d)try{var g=JSON.parse(d);this.editor.graph.fitWindow(g,g.border)}catch(k){console.error(k)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(c=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,8))&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var l=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&
(window.location.search=this.getSearch(["create","title"]))}),p=mxUtils.bind(this,function(E){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,E,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var H=urlParams.title;H=null!=H?decodeURIComponent(H):this.defaultFilename;E=this.getServiceCount(!0);isLocalStorage&&E++;var B=4>=E?2:6<E?4:3;H=new CreateDialog(this,H,mxUtils.bind(this,function(d,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;
-this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(d,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,B,null,null,null,this.editor.fileExtensions);this.showDialog(H.container,420,E>B?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));H.init()}});if("http://"!=c.substring(0,
+this.createFile(0<d.length?d:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(n){this.createFile(d,this.getFileData(!0),null,g,null,!0,n)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,B,null,null,null,this.editor.fileExtensions);this.showDialog(H.container,420,E>B?390:280,!0,!1,mxUtils.bind(this,function(d){d&&null==this.getCurrentFile()&&this.showSplash()}));H.init()}});if("http://"!=c.substring(0,
7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0)){this.spinner.stop();c=JSON.parse(c);var v=mxUtils.bind(this,function(E){this.createFile(null!=E.filename?E.filename:this.defaultFilename,E,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(E)}),!0,null,!0)}),t=c.data;c.compressed&&(t=Graph.decompress(t));
"mermaid"==c.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){E!=this.emptyDiagramXml&&v(E)})),this.generateMermaidImage(t,null,function(){},mxUtils.bind(this,function(E){for(var H=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),B=0;B<H.length;B++)H[B].parentNode.removeChild(H[B]);mxMermaidToDrawio.resetListeners();this.handleError(E)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):
-v(t)}else try{null!=window.opener&&null!=window.opener[c]?p(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(E){p(E)},mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"),l)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=
-urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(E){this.handleError(E)}};
-App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
+"generate"==c.type&&this.spinner.spin(document.body,mxResources.get("generate"))&&this.generateDiagram(t,mxUtils.bind(this,function(E){this.spinner.stop();v(E)}),mxUtils.bind(this,function(E){this.handleError(E,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[c]?p(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(E){p(E)},mxUtils.bind(this,
+function(E){this.handleError(E,mxResources.get("errorLoadingFile"),l)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=
+this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open",
+"sketch"])),window.location.hash=urlParams.open),f())}}catch(E){this.handleError(E)}};
+App.prototype.generateDiagram=function(b,e,f){var c=!1,l=null,p='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(v){v!=this.emptyDiagramXml&&(c=!0,l=v)}));this.generateOpenAiMermaidDiagram(p,function(v,t,E,H){l=c?l:this.createMermaidXml(v,EditorUi.defaultMermaidConfig,t,E,H,b);
+e(l,t)},f)};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(p){EditorUi.debug("App.filterDrafts",[this],"items",p);for(var v=0;v<p.length;v++)try{var t=p[v].key;if(null!=t&&".draft_"==t.substring(0,7)){var E=JSON.parse(p[v].data);null!=E&&"draft"==E.type&&E.aliveCheck!=e&&(null==b&&null==E.fileObject||null!=E.fileObject&&E.fileObject.path==b)&&(E.key=t,l.push(E))}}catch(H){}c()}),c)}catch(p){c()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c&&null!=e[c]?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){this.removeDatabaseItem(e[""!=c?c:0].key);null!=l&&l()}),null,null,null,1<e.length?e:null);this.showDialog(f.container,640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var e=this.getServiceCount(!0),f=mxUtils.bind(this,function(){var l=new SplashDialog(this);this.showDialog(l.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(p,v){!p&&!v||mxClient.IS_CHROMEAPP||(p=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=p)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<e?320:210,!0,!1)}}};
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&f();else{b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();f()}),b);this.showDialog(c.container,3>b?200:300,3<e?320:210,!0,!1)}}};
App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),this.setElementTitle(c,"language"),c.className="geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",c.style.bottom="20px",c.style.right=
null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();var p=new mxPopupMenu(this.menus.get("language").funct);
p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);p.destroy()});var v=mxUtils.getOffset(c);p.popup(v.x,v.y+c.offsetHeight,null,l);this.setCurrentMenu(p)})),b.appendChild(c));return c};
@@ -14152,8 +14151,8 @@ else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData
App.prototype.saveFile=function(b,e){var f=this.getCurrentFile(),c=this.mode;if(null!=f){var l=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&
null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(t,E){f.invalidFileHandle=null;f.fileHandle=t;f.title=E.name;f.desc=E;f.editable=null;this.save(E.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var p=mxUtils.bind(this,function(t,E,H,B){if(null!=t&&0<t.length)if(/(\.pdf)$/i.test(t))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
mxUtils.bind(this,function(){H.value=t.split(".").slice(0,-1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&E==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(g,k){f.fileHandle=g;f.mode=App.MODE_DEVICE;f.title=k.name;f.desc=k;this.setMode(App.MODE_DEVICE);this.save(k.name,l)}),mxUtils.bind(this,
-function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(t)):(this.setMode(App.MODE_DEVICE),this.save(t,l));else if("download"==E)(new LocalFile(this,null,t)).save();else if("_blank"==E)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=E){var d=mxUtils.bind(this,function(g){var k=this.editor.graph,m=k.getSelectionCells(),u=k.getViewState(),
-x=this.currentPage;this.createFile(t,this.getFileData(/(\.xml)$/i.test(t)||0>t.indexOf(".")||/(\.drawio)$/i.test(t),/(\.svg)$/i.test(t),/(\.html)$/i.test(t)),null,E,l,null==this.mode,g,null,null,mxUtils.bind(this,function(){this.restoreViewState(x,u,m)}))});null!=B?d(B):this.pickFolder(E,d)}else null!=E&&this.save(t,l)}),v=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(t,E,H){p(t.value,E,t,H);this.hideDialog()}),v?null:["_blank"]);this.showDialog(b.container,
+function(g){"AbortError"!=g.name&&this.handleError(g)}),this.createFileSystemOptions(t)):(this.setMode(App.MODE_DEVICE),this.save(t,l));else if("download"==E)(new LocalFile(this,null,t)).save();else if("_blank"==E)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=E){var d=mxUtils.bind(this,function(g){var k=this.editor.graph,n=k.getSelectionCells(),u=k.getViewState(),
+x=this.currentPage;this.createFile(t,this.getFileData(/(\.xml)$/i.test(t)||0>t.indexOf(".")||/(\.drawio)$/i.test(t),/(\.svg)$/i.test(t),/(\.html)$/i.test(t)),null,E,l,null==this.mode,g,null,null,mxUtils.bind(this,function(){this.restoreViewState(x,u,n)}))});null!=B?d(B):this.pickFolder(E,d)}else null!=E&&this.save(t,l)}),v=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(t,E,H){p(t.value,E,t,H);this.hideDialog()}),v?null:["_blank"]);this.showDialog(b.container,
420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),l)}};
App.prototype.loadTemplate=function(b,e,f,c,l){var p=!1,v=b,t=null!=c?c:b;c=/\.png$/i.test(t)||/\.pdf$/i.test(t);var E=EditorUi.isVisioFilename(t);this.editor.isCorsEnabledForUrl(v)||(p=c||E,v="t="+(new Date).getTime(),v=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+v+(p?"&base64=1":""));this.editor.loadUrl(v,mxUtils.bind(this,function(H){try{var B=p?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(E||this.isVisioData(B))E||(t=l?this.isRemoteVisioData(B)?"raw.vss":"raw.vssx":
this.isRemoteVisioData(B)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(d){e(d)},f,t);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(B,t))this.isExternalDataComms()?this.parseFileData(B,mxUtils.bind(this,function(d){4==d.readyState&&200<=d.status&&299>=d.status&&"<mxGraphModel"==d.responseText.substring(0,13)&&e(d.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(B))this.convertLucidChart(B,
@@ -14164,31 +14163,31 @@ typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.
App.prototype.uncompressPages=function(b){if(null!=b)try{var e=mxUtils.parseXml(b);if("mxfile"==e.documentElement.nodeName){for(var f=e.documentElement.getElementsByTagName("diagram"),c=0;c<f.length;c++){var l=Editor.parseDiagramNode(f[c],!0);null!=l&&(mxUtils.setTextContent(f[c],""),f[c].appendChild(l))}b=mxUtils.getPrettyXml(e.documentElement)}}catch(p){}return b};
App.prototype.createFile=function(b,e,f,c,l,p,v,t,E,H){c=t?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var B=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(k){B();null==k&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=k&&this.handleError(k)});try{var g=mxUtils.bind(this,function(k){B();this.fileCreated(k,
f,p,l,E,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==v&&null!=this.stateArg&&null!=this.stateArg.folderId&&(v=this.stateArg.folderId),this.drive.insertFile(b,e,v,g,d)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,g,d,!1,v):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,g,d,!1,v):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,g,d,!1,v):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,g,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?
-this.oneDrive.insertFile(b,e,g,d,!1,v):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,g,d):!t&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(B(),this.showSaveFilePicker(mxUtils.bind(this,function(k,m){var u=new LocalFile(this,e,m.name,null,k,m);u.saveFile(m.name,!1,mxUtils.bind(this,function(){this.fileCreated(u,f,p,l,E,H)}),d,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&d(k)}),this.createFileSystemOptions(b))):(B(),this.fileCreated(new LocalFile(this,e,b,null==c),f,p,l,E,H))}catch(k){B(),
+this.oneDrive.insertFile(b,e,g,d,!1,v):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,g,d):!t&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(B(),this.showSaveFilePicker(mxUtils.bind(this,function(k,n){var u=new LocalFile(this,e,n.name,null,k,n);u.saveFile(n.name,!1,mxUtils.bind(this,function(){this.fileCreated(u,f,p,l,E,H)}),d,!0)}),mxUtils.bind(this,function(k){"AbortError"!=k.name&&d(k)}),this.createFileSystemOptions(b))):(B(),this.fileCreated(new LocalFile(this,e,b,null==c),f,p,l,E,H))}catch(k){B(),
this.handleError(k)}}};
App.prototype.fileCreated=function(b,e,f,c,l,p){var v=window.location.pathname;null!=e&&0<e.length&&(v+="?libs="+e);null!=l&&0<l.length&&(v+="?clibs="+l);v=this.getUrl(v);b.getMode()!=App.MODE_DEVICE&&(v+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var t=b.getData();t=0<t.length?this.editor.extractGraphModel(mxUtils.parseXml(t).documentElement,!0):null;var E=window.location.protocol+"//"+window.location.hostname+v,H=t,B=null;null!=t&&/\.svg$/i.test(b.getTitle())&&(B=
-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(B.container),H=this.decodeNodeIntoGraph(H,B));b.setData(this.createFileData(t,B,b,E));null!=B&&B.container.parentNode.removeChild(B.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var k=this.getCurrentFile();null==f&&null!=k&&(f=!k.isModified()&&null==k.getMode());var m=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,p);f&&this.updateStatus(mxUtils.bind(this,
-function(){b.addAllSavedStatus()}));null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var x=[],A=l.split(";"),I=0;I<A.length;I++)x.push(decodeURIComponent(A[I]));this.loadLibraries(x)}null!=c&&c()}),u=mxUtils.bind(this,function(){f||null==k||!k.isModified()?m():this.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?u():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),
+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(B.container),H=this.decodeNodeIntoGraph(H,B));b.setData(this.createFileData(t,B,b,E));null!=B&&B.container.parentNode.removeChild(B.container);var d=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){d();var k=this.getCurrentFile();null==f&&null!=k&&(f=!k.isModified()&&null==k.getMode());var n=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,p);f&&this.updateStatus(mxUtils.bind(this,
+function(){b.addAllSavedStatus()}));null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var x=[],A=l.split(";"),I=0;I<A.length;I++)x.push(decodeURIComponent(A[I]));this.loadLibraries(x)}null!=c&&c()}),u=mxUtils.bind(this,function(){f||null==k||!k.isModified()?n():this.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?u():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),
b.getTitle(),null==b.getMode())),window.geOpenWindow(v,null,u))});b.constructor==LocalFile?g():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){g()}),mxUtils.bind(this,function(k){d();null!=k&&"AbortError"==k.name||this.handleError(k)}))}};
-App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var p=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var E=mxUtils.bind(this,function(k){this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var m=this.getCurrentFile();window.location.hash=
-null!=m?m.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(k){null!=k?(this.fileLoaded(new StorageFile(this,k,b)),null!=c&&c()):E({message:mxResources.get("fileNotFound")})}),E)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f),
+App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var p=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var E=mxUtils.bind(this,function(k){this.handleError(k,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var n=this.getCurrentFile();window.location.hash=
+null!=n?n.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(k){null!=k?(this.fileLoaded(new StorageFile(this,k,b)),null!=c&&c()):E({message:mxResources.get("fileNotFound")})}),E)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();window.location.hash=null!=k?k.getHash():""}));else if(null!=f)this.spinner.stop(),this.fileLoaded(f),
null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var H=decodeURIComponent(b.substring(1));"<"!=H.charAt(0)&&(H=Graph.decompress(H));H=new LocalFile(this,H,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
-!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(k,m){this.spinner.stop();this.fileLoaded(new EmbedFile(this,k,m));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
-else if("U"==b.charAt(0)){var B=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=B.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var k=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var m=B.substring(31,B.lastIndexOf("&ex"));this.loadFile("G"+m,e,null,mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&this.editor.chromeless&&!this.editor.editable&&(u.getHash=
-function(){return"G"+m},window.location.hash="#"+u.getHash());null!=c&&c()}));return!0}return!1});!k()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",k);return!0});this.loadTemplate(B,mxUtils.bind(this,function(k){this.spinner.stop();if(null!=k&&0<k.length){var m=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var u=B,x=B.lastIndexOf("."),A=u.lastIndexOf("/");x>A&&0<A&&(u=u.substring(A+1,x),x=B.substring(x),this.useCanvasForExport||
-".png"!=x||(x=".drawio"),".svg"===x||".xml"===x||".html"===x||".png"===x||".drawio"===x)&&(m=u+x)}k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):m,!0);k.getHash=function(){return b};this.fileLoaded(k,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),
+!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(k,n){this.spinner.stop();this.fileLoaded(new EmbedFile(this,k,n));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
+else if("U"==b.charAt(0)){var B=decodeURIComponent(b.substring(1)),d=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=B.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var k=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var n=B.substring(31,B.lastIndexOf("&ex"));this.loadFile("G"+n,e,null,mxUtils.bind(this,function(){var u=this.getCurrentFile();null!=u&&this.editor.chromeless&&!this.editor.editable&&(u.getHash=
+function(){return"G"+n},window.location.hash="#"+u.getHash());null!=c&&c()}));return!0}return!1});!k()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",k);return!0});this.loadTemplate(B,mxUtils.bind(this,function(k){this.spinner.stop();if(null!=k&&0<k.length){var n=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var u=B,x=B.lastIndexOf("."),A=u.lastIndexOf("/");x>A&&0<A&&(u=u.substring(A+1,x),x=B.substring(x),this.useCanvasForExport||
+".png"!=x||(x=".drawio"),".svg"===x||".xml"===x||".html"===x||".png"===x||".drawio"===x)&&(n=u+x)}k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):n,!0);k.getHash=function(){return b};this.fileLoaded(k,!0)?null!=c&&c():d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else d()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){d()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var g=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var k=this.getServiceForName(g);if(null==k)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var u=this.getCurrentFile();window.location.hash=null!=
-u?u.getHash():""}));else{var m=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(u){this.spinner.stop();this.fileLoaded(u);var x=this.getCurrentFile();if(null==x)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){x.getHash=function(){return m+b};u="#"+x.getHash();try{var A=this.getHashObject();null==A||mxUtils.isEmptyObject(A)||(u=u+"#"+encodeURIComponent(JSON.stringify(A)))}catch(I){}window.location.replace(u)}else u==
+u?u.getHash():""}));else{var n=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(u){this.spinner.stop();this.fileLoaded(u);var x=this.getCurrentFile();if(null==x)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){x.getHash=function(){return n+b};u="#"+x.getHash();try{var A=this.getHashObject();null==A||mxUtils.isEmptyObject(A)||(u=u+"#"+encodeURIComponent(JSON.stringify(A)))}catch(I){}window.location.replace(u)}else u==
x&&null==u.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var I=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+I+'" class="geStatusAlert">'+I+"</div>")}));null!=c&&c()}),mxUtils.bind(this,function(u){null!=window.console&&null!=u&&console.log("error in loadFile:",b,u);var x=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==u||"AbortError"!=u.name?this.handleError(u,
-null!=u?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+m+b):x()}))}})()}}),v=this.getCurrentFile(),t=mxUtils.bind(this,function(){l||null==v||!v.isModified()?p():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),p,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?t():null==v||e?t():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,t)).container,340,140,!0,!0)};
+null!=u?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+n+b):x()}))}})()}}),v=this.getCurrentFile(),t=mxUtils.bind(this,function(){l||null==v||!v.isModified()?p():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=v&&(window.location.hash=v.getHash())}),p,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?t():null==v||e?t():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,t)).container,340,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,B){B||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],p=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=p);null!=e&&e()}});if(null!=b)for(var t=0;t<b.length;t++){var E=encodeURIComponent(decodeURIComponent(b[t]));
mxUtils.bind(this,function(H,B){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var d=mxUtils.bind(this,function(A){l[B]=A;c--;v()}),g=mxUtils.bind(this,function(A){f(H,A);c--;v()}),k=H.substring(0,1);if("L"==k)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var A=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,A,mxUtils.bind(this,function(I){".scratchpad"==A&&null==
-I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,A)):g()}),g)}catch(I){g()}}),0);else if("U"==k){var m=decodeURIComponent(H.substring(1));this.isOffline()?g(!0):this.loadTemplate(m,mxUtils.bind(this,function(A){null!=A&&0<A.length?d(new UrlLibrary(this,A,m)):g()}),function(){g()},null,!0)}else if("R"==k){k=decodeURIComponent(H.substring(1));try{k=JSON.parse(k);var u={id:k[0],title:k[1],downloadUrl:k[2]};this.remoteInvoke("getFileContent",[u.downloadUrl],null,mxUtils.bind(this,function(A){try{d(new RemoteLibrary(this,
+I&&(I=this.emptyLibraryXml);null!=I?d(new StorageLibrary(this,I,A)):g()}),g)}catch(I){g()}}),0);else if("U"==k){var n=decodeURIComponent(H.substring(1));this.isOffline()?g(!0):this.loadTemplate(n,mxUtils.bind(this,function(A){null!=A&&0<A.length?d(new UrlLibrary(this,A,n)):g()}),function(){g()},null,!0)}else if("R"==k){k=decodeURIComponent(H.substring(1));try{k=JSON.parse(k);var u={id:k[0],title:k[1],downloadUrl:k[2]};this.remoteInvoke("getFileContent",[u.downloadUrl],null,mxUtils.bind(this,function(A){try{d(new RemoteLibrary(this,
A,u))}catch(I){g()}}),function(){g()})}catch(A){g()}}else if("S"==k&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(A){d(A)},g)}catch(A){g()}else{var x=null;"G"==k?null!=this.drive&&null!=this.drive.user&&(x=this.drive):"H"==k?null!=this.gitHub&&null!=this.gitHub.getUser()&&(x=this.gitHub):"T"==k?null!=this.trello&&this.trello.isAuthorized()&&(x=this.trello):"D"==k?null!=this.dropbox&&null!=this.dropbox.getUser()&&(x=this.dropbox):"W"==k&&null!=this.oneDrive&&
null!=this.oneDrive.getUser()&&(x=this.oneDrive);null!=x?x.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(A){try{d(A)}catch(I){g()}}),function(A){g()}):g(!0)}}})(E,t)}v()}};
-App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
+App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var e=document.createElement("div");e.className="geButton";e.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(e);
this.dependsOnLanguage(mxUtils.bind(this,function(){e.innerHTML="";mxUtils.write(e,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
@@ -14219,9 +14218,9 @@ App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=
""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(p){try{null!=f&&f(p,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(v){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(v.message))}))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(p){null!=c&&c(p);p&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,e,f,c,l,p,v,t){var E=e;/\.svg$/i.test(E)||(E=E.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var B=new XMLHttpRequest;B.open("GET",b,!0);H||(B.responseType="blob");if(t)for(var d in t)B.setRequestHeader(d,t[d]);B.onload=mxUtils.bind(this,function(){if(200<=
-B.status&&299>=B.status){var k=null;H?(k=JSON.parse(B.responseText),k=this.base64ToBlob(k.content,"application/octet-stream")):k=new Blob([B.response],{type:"application/octet-stream"});this.importVisio(k,mxUtils.bind(this,function(m){l(new LocalFile(this,m,E,!0))}),p,e)}else null!=p&&p({message:mxResources.get("errorLoadingFile")})});B.onerror=p;B.send()}else{var g=mxUtils.bind(this,function(k){try{if(/\.pdf$/i.test(e)){var m=Editor.extractGraphModelFromPdf(k);null!=m&&0<m.length&&l(new LocalFile(this,
-m,E,!0))}else/\.png$/i.test(e)?(m=this.extractGraphModelFromPng(k),null!=m?l(new LocalFile(this,m,E,!0)):l(new LocalFile(this,k,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,b)?this.parseFileData(k,mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?l(new LocalFile(this,u.responseText,E,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,k,E,!0))}catch(u){null!=p&&p(u)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
-/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){if(null!=l){k=JSON.parse(k.getText());var m=k.content;"base64"===k.encoding&&(m=/\.png$/i.test(e)?"data:image/png;base64,"+m:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+m:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(m):atob(m));g(m)}}else null!=p&&p({code:App.ERROR_UNKNOWN})}),function(){null!=p&&p({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+B.status&&299>=B.status){var k=null;H?(k=JSON.parse(B.responseText),k=this.base64ToBlob(k.content,"application/octet-stream")):k=new Blob([B.response],{type:"application/octet-stream"});this.importVisio(k,mxUtils.bind(this,function(n){l(new LocalFile(this,n,E,!0))}),p,e)}else null!=p&&p({message:mxResources.get("errorLoadingFile")})});B.onerror=p;B.send()}else{var g=mxUtils.bind(this,function(k){try{if(/\.pdf$/i.test(e)){var n=Editor.extractGraphModelFromPdf(k);null!=n&&0<n.length&&l(new LocalFile(this,
+n,E,!0))}else/\.png$/i.test(e)?(n=this.extractGraphModelFromPng(k),null!=n?l(new LocalFile(this,n,E,!0)):l(new LocalFile(this,k,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,b)?this.parseFileData(k,mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?l(new LocalFile(this,u.responseText,E,!0)):null!=p&&p({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,k,E,!0))}catch(u){null!=p&&p(u)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
+/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(k){if(200<=k.getStatus()&&299>=k.getStatus()){if(null!=l){k=JSON.parse(k.getText());var n=k.content;"base64"===k.encoding&&(n=/\.png$/i.test(e)?"data:image/png;base64,"+n:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+n:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(n):atob(n));g(n)}}else null!=p&&p({code:App.ERROR_UNKNOWN})}),function(){null!=p&&p({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=p&&p({code:App.ERROR_TIMEOUT,retry:fn})},t):null!=v?v(b,g,p,f):this.editor.loadUrl(b,g,p,f,null,null,null,t)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(v){this.appIconClicked(v)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&(v=v.getMode(),v==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):v==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):v==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):v==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
@@ -14244,8 +14243,8 @@ mxUtils.write(B,mxResources.get("googleDrive"));H.appendChild(B);E.appendChild(H
c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(v);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(d)})));return t});e=!0;var l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width="100%";l.style.padding="10px";for(var p=0;p<f.length;p++)l.appendChild(b(f[p]));
this.userPanel.appendChild(l);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
l.className="geBtn";l.style.float="right";b.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var v=this.drive.createAuthWin();v.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(t){this.handleError(t)}),!0,v)}),mxResources.get("closingFile")+"...")}));l.className="geBtn";l.style.margin="0px";
-b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(v,t,E,H){if(null!=v){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var B=document.createElement("table");B.style.borderSpacing="0";B.style.fontSize="10pt";B.style.width="100%";B.style.padding="10px";var d=document.createElement("tbody"),g=document.createElement("tr"),k=document.createElement("td");k.setAttribute("valig","top");k.style.width="40px";if(null!=t){var m=document.createElement("img");m.setAttribute("width",
-"40");m.setAttribute("height","40");m.setAttribute("border","0");m.setAttribute("src",t);m.style.marginRight="6px";k.appendChild(m)}g.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,v.displayName);null!=v.email&&(mxUtils.br(k),t=document.createElement("small"),t.style.color="gray",mxUtils.write(t,v.email),k.appendChild(t));null!=H&&(v=document.createElement("div"),
+b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(v,t,E,H){if(null!=v){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var B=document.createElement("table");B.style.borderSpacing="0";B.style.fontSize="10pt";B.style.width="100%";B.style.padding="10px";var d=document.createElement("tbody"),g=document.createElement("tr"),k=document.createElement("td");k.setAttribute("valig","top");k.style.width="40px";if(null!=t){var n=document.createElement("img");n.setAttribute("width",
+"40");n.setAttribute("height","40");n.setAttribute("border","0");n.setAttribute("src",t);n.style.marginRight="6px";k.appendChild(n)}g.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,v.displayName);null!=v.email&&(mxUtils.br(k),t=document.createElement("small"),t.style.color="gray",mxUtils.write(t,v.email),k.appendChild(t));null!=H&&(v=document.createElement("div"),
v.style.marginTop="4px",t=document.createElement("i"),mxUtils.write(t,H),v.appendChild(t),k.appendChild(v));g.appendChild(k);d.appendChild(g);B.appendChild(d);this.userPanel.appendChild(B);v=document.createElement("div");v.style.textAlign="center";v.style.padding="10px";v.style.whiteSpace="nowrap";null!=E&&(E=mxUtils.button(mxResources.get("signOut"),E),E.className="geBtn",v.appendChild(E));this.userPanel.appendChild(v)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
mxUtils.bind(this,function(){var v=this.getCurrentFile();if(null!=v&&v.constructor==DropboxFile){var t=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});v.isModified()?this.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var v=
this.getCurrentFile();if(null!=v&&v.constructor==OneDriveFile){var t=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});v.isModified()?this.confirm(mxResources.get("allChangesLost"),null,t,mxResources.get("cancel"),mxResources.get("discardChanges")):t()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var v=this.getCurrentFile();if(null!=v&&v.constructor==GitHubFile){var t=
@@ -14257,7 +14256,7 @@ App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(f){return this.editorUi.createHelpIcon(f)};Menus.prototype.addLinkToItem=function(f,c){null!=f&&f.firstChild.nextSibling.appendChild(this.createHelpLink(c))};
Menus.prototype.removeCustomFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c){this.customFonts.splice(l,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c)return!0;for(l=0;l<this.defaultFonts.length;l++){var p=this.defaultFonts[l];
if("string"!==typeof p&&p.fontFamily==f&&p.fontUrl==c||"string"===typeof p&&p==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(q,y,D){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(J,L,K,n,z,G,M,N,Q,S,T,W,X){var Z=parseInt(J);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,L&&"png"==q,K,n,z&&"png"==q,M,!N,Q,q,T,null,W,X),null!=D&&D(J,L,K,n,z,G,M,N,Q,S,T,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,L,K,n,z){c.downloadFile(L&&"png"==q?"xmlpng":q,null,null,J,null,null,K,n,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,p=mxUtils.bind(l,
+mxUtils.bind(this,function(J,L,K,m,z,F,M,O,Q,S,T,W,X){var Z=parseInt(J);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,L&&"png"==q,K,m,z&&"png"==q,M,!O,Q,q,T,null,W,X),null!=D&&D(J,L,K,m,z,F,M,O,Q,S,T,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(J,L,K,m,z){c.downloadFile(L&&"png"==q?"xmlpng":q,null,null,J,null,null,K,m,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,p=mxUtils.bind(l,
l.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));c.actions.addAction("new...",function(){var q=c.isOffline(),y=new NewDialog(c,q,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,q?350:620,q?70:460,!0,!0,function(D){null!=c.sidebar&&c.sidebar.hideTooltip();D&&null==c.getCurrentFile()&&c.showSplash()});y.init()});var v=mxUtils.bind(this,function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
(q=new NewDialog(c,null,!1,function(y){c.hideDialog();if(null!=y){var D=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(y,Math.max(D.x,20),Math.max(D.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,q),c.showDialog(q.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()}),q.init())});Editor.enableChatGpt&&c.isExternalDataComms()&&"draw.io"==c.getServiceName()&&"undefined"!==
typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(c.actions.put("generate",new Action("generate...",function(){v(!0)})).isEnabled=p);c.actions.put("insertTemplate",new Action("template...",function(){v()})).isEnabled=p;var t=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});t.setToggleAction(!0);t.setSelectedCallback(function(){return c.isShareCursorPosition()});t=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});
@@ -14269,79 +14268,79 @@ t.setToggleAction(!0);t.setSelectedCallback(function(){return"1"==urlParams.embe
Editor.isDarkMode()});t=c.actions.put("autoMode",new Action("automatic",function(q){c.setAndPersistDarkMode("auto")}));t.setToggleAction(!0);t.setSelectedCallback(function(){return c.isAutoDarkMode(!0)});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new FilePropertiesDialog(c,q);c.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=p;window.mxFreehand&&(c.actions.put("insertFreehand",new Action("freehand...",function(){if(l.isEnabled()){if(null==
c.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,q?126:90,q)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(!0)}},null,null,"X")).isEnabled=function(){return p()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action("formatXml...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=null==c.pages||1>=c.pages.length,D=document.createElement("h3");
mxUtils.write(D,mxResources.get("formatXml"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(D);var J=c.addCheckbox(q,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),L=c.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),K=c.addCheckbox(q,mxResources.get("allPages"),!y,y);K.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")});q=
-new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!L.checked,null,!J.checked,y||!K.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,D,J,L,K,n,z,G,M,N,Q){n=[];J&&G&&n.push("tags=%7B%7D");q=new EmbedDialog(c,c.createLink(q,y,!0,J,L,K,null,!0,n,null,D,null,Q));c.showDialog(q.container,
-450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,D,J,L,K,n,z,G,M,N,Q,S){c.createHtml(y,D,J,L,K,n,z,G,M,N,Q,mxUtils.bind(this,function(T,W){var X=c.getBaseFilename(z);T='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+
+new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!L.checked,null,!J.checked,y||!K.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action("url...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,D,J,L,K,m,z,F,M,O,Q){m=[];J&&F&&m.push("tags=%7B%7D");q=new EmbedDialog(c,c.createLink(q,y,!0,J,L,K,null,!0,m,null,D,null,Q));c.showDialog(q.container,
+450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,D,J,L,K,m,z,F,M,O,Q,S){c.createHtml(y,D,J,L,K,m,z,F,M,O,Q,mxUtils.bind(this,function(T,W){var X=c.getBaseFilename(z);T='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+
T+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",T,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action("formatPdf...",function(){c.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var D=null==c.pages||1>=c.pages.length,J=c.getPageIndex(c.currentPage);J=null!=J?J+1:1;c.downloadFile("pdf",null,null,!y.selection,D||
!y.allPages&&y.pagesFrom==J&&y.pagesTo==J,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==J&&y.pagesTo==J?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)}):null,mxResources.get("export"))}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?
-c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.view.getState(q);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?
+c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.view.getState(q);null!=y&&null!=y.shape&&null!=y.shape.stencil&&(q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?
c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(q,y){c.spinner.stop();q=new RevisionDialog(c,q,y);c.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,function(q){c.handleError(null!=q?q:mxResources.get("notAvailable"))})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");t=c.actions.addAction("synchronize",
function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(t.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var q=c.getCurrentFile();null!=q&&(window.drawdata=c.getFileData(),q=null!=q.getTitle()?q.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&
(t=c.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!c.isMathEnabled();l.model.execute(q)}),t.setToggleAction(!0),t.setSelectedCallback(function(){return c.isMathEnabled()}),t.isEnabled=p);t=c.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="default";l.model.execute(q)}));t.getTitle=function(){return mxResources.get("default")+
" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};t.setToggleAction(!0);t.setSelectedCallback(function(){return null==l.adaptiveColors});t=c.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="auto";l.model.execute(q)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return"auto"==l.adaptiveColors});t=c.actions.put("simpleAdaptiveColors",new Action("simple",function(){var q=new ChangePageSetup(c);
q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="simple";l.model.execute(q)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return"simple"==l.adaptiveColors});t=c.actions.put("noAdaptiveColors",new Action("none",function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return"none"==l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,
-["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(t=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var E=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});E.setToggleAction(!0);E.setSelectedCallback(function(){return E.isEnabled()&&
-c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],D=0;D<q.length;D++)l.getModel().isVertex(q[D])&&y.push(q[D]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,!1);c.copiedStyle={};var D=[],J=[],L;for(L in y)D.push(y[L]),J.push(L);
-l.copyCellStyles([q],J,D,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,
-function(q,y,D,J,L,K,n,z,G,M,N,Q,S,T){q=parseInt(q);c.lastExportSvgEditable=L;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,D,J,L,K,n,!z,G,M,Q,S,T)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){f("png",c.lastExportPngEditable,function(q,y,D,J,L){c.lastExportPngEditable=L})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",function(){f("webp")}));t=c.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");t.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;t=c.actions.put("shadowVisible",new Action("shadow",function(){l.setShadowVisible(!l.shadowVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+
-EditorUi.VERSION,function(q,y){c.isOwnDomain()&&mxEvent.isShiftDown(y)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
-mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var q=new FeedbackDialog(c);c.showDialog(q.container,610,360,!0,!1);q.init()});c.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):
-c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});t=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):
-this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(t=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-
-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),t.setToggleAction(!0),t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));
-t=c.actions.addAction("findReplace",mxUtils.bind(this,function(q,y){var D=(q=l.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=D+"Window";if(null==this[y]){var J="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,L=q?J?330:300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(L+20),100,L,q?J?304:288:170,q);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(D))});this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(D))})}this[y].window.setVisible(!0);
-this[y].focus()}),null,null,Editor.ctrlKey+"+F");t=new Action("exportVsdx",function(){var q=null==c.pages||1>=c.pages.length;if(q)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(D);var J=c.addCheckbox(y,mxResources.get("allPages"),!q,q);J.style.marginBottom="16px";q=new CustomDialog(c,y,
-mxUtils.bind(this,function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,130,!0,!0)}});t.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",t);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;
-if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style.cssFloat="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(q);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,"click",function(J){mxEvent.getSource(J)!=q&&(q.checked=!q.checked)});header=y}y=[[mxResources.get("reset"),
-function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var D=c.actions.get("plugins");null==D||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||y.push([mxResources.get("plugins"),D.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),
-function(J,L){if(0<L.value.length)try{var K=JSON.parse(L.value),n=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),z=new EmbedDialog(c,n);c.showDialog(z.container,450,240,!0);z.init()}catch(G){c.handleError(G)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+
-":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),
-mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,y){var D=mxLanguage;null==urlParams.lang&&isLocalStorage&&(D=mxSettings.settings.language);var J=mxUtils.bind(this,function(K){var n=""==K?mxResources.get("automatic"):mxLanguageMap[K],z=null;""!=n&&(z=q.addItem(n,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(K)}),y),(K==D||""==K&&null==D)&&q.addCheckmark(z,Editor.checkmarkImage));return z});J("");q.addSeparator(y);
-for(var L in mxLanguageMap)J(L)})));c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-
-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));t=this.get("viewZoom");var H=t.funct;t.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});t=this.get("layout");var B=t.funct;t.funct=function(q,y){B.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var D=null,J=20,L=20,K=function(){"undefined"!==typeof mxOrgChartLayout&&null!=D&&c.tryAndHandle(mxUtils.bind(this,
-function(){var T=c.editor.graph,W=new mxOrgChartLayout(T,D,J,L),X=T.getDefaultParent();1<T.model.getChildCount(T.getSelectionCell())&&(X=T.getSelectionCell());W.execute(X)}))},n=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");n.appendChild(z);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";z=[mxResources.get("linear"),
-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var M=0;M<z.length;M++){var N=document.createElement("option");mxUtils.write(N,z[M]);N.value=M;2==M&&N.setAttribute("selected","selected");G.appendChild(N)}mxEvent.addListener(G,"change",function(){D=G.value});n.appendChild(G);z=document.createElement("div");z.style.marginTop="6px";z.style.display=
-"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");n.appendChild(z);var Q=document.createElement("input");Q.type="number";Q.value=J;Q.style.width="160px";Q.style.boxSizing="border-box";n.appendChild(Q);mxEvent.addListener(Q,"change",function(){J=Q.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");n.appendChild(z);var S=document.createElement("input");
-S.type="number";S.value=L;S.style.width="160px";S.style.boxSizing="border-box";n.appendChild(S);mxEvent.addListener(S,"change",function(){L=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var T=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(T,null,2))});z.className="geBtn";n=new CustomDialog(c,n,function(){null==D&&(D=2);c.loadOrgChartLayouts(K)},
-null,null,null,z);c.showDialog(n.container,355,140,!0,!0)},y,null,p());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(l);D.checkOverlap=!0;c.prompt(mxResources.get("spacing"),D.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){D.spacing=J;c.executeLayout(function(){D.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),
-y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var D=q.addItem("Search:",null,null,y,null,null,!1);D.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth="1px";J.style.marginLeft="8px";mxEvent.addListener(J,
-"keydown",mxUtils.bind(this,function(L){var K=mxUtils.trim(J.value);13==L.keyCode&&0<K.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(K)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:K}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==L.keyCode&&(J.value="")}));D.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,
-function(L){document.activeElement!=J&&J.focus();mxEvent.consume(L)},function(L){mxEvent.consume(L)},function(L){mxEvent.consume(L)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),
-c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],y),this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),y)}"1"==urlParams.test&&(q.addSeparator(y),this.addSubmenu("testDevelop",
-q,y))})));c.actions.addAction("languageCode...",function(){var q=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,l.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["languageCode",
-"-"],y);y=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;l.refresh()},y);Graph.translateDiagram||q.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");
-mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry",
-"this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(n){return null==n||null==n.boundingBox||!isNaN(n.boundingBox.x)&&!isNaN(n.boundingBox.y)&&!isNaN(n.boundingBox.width)&&!isNaN(n.boundingBox.height)}var y=l.isSelectionEmpty()?l.getGraphBounds():l.getBoundingBox(l.getSelectionCells()),D=l.view.translate,J=l.view.scale;l.insertVertex(l.getDefaultParent(),
-null,"",y.x/J-D.x,y.y/J-D.y,y.width/J,y.height/J,"fillColor=none;strokeColor=red;");var L=0,K=0;l.view.states.visit(function(n,z){n=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),n=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),n=!1);n||L++;K++});console.log("states checked",K,"invalid",L)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,
-"Paste Data:",q,function(y){if(0<y.length)try{var D=function(z){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=Q[ba]){for(;0<Q[ba].length;){var da=Q[ba].pop();G(da)}delete Q[ba]}}else mxLog.debug(M+": Visited: "+ba)}var M=z.parentNode.id,N=z.childNodes;z={};for(var Q={},S=null,T={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(M+": Multiple roots: "+X.id):S=X.id:(null==Q[Z]&&(Q[Z]=[]),Q[Z].push(X.id))}else T[X.id]=
-X.id}N=Object.keys(T);0<N.length?(N=M+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(M+": Checked");var Y={};null==S?mxLog.debug(M+": No root"):(G(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",Q)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var J=mxUtils.parseXml(y),L=c.getPagesForNode(J.documentElement,"mxGraphModel");
-if(null!=L&&0<L.length)try{var K=c.getHashValueForPages(L);mxLog.debug("Checksum: ",K)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var n=J.getElementsByTagName("root");for(y=0;y<n.length;y++)D(n[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var d=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:",
-"",function(y){var D=c.getCurrentFile();if(0<y.length&&null!=D)try{var J=JSON.parse(y);D.patch([J],null,!0,!0);c.hideDialog()}catch(L){c.handleError(L)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,D){d=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(d)}],["Diff",function(y,D){try{q.textarea.value=JSON.stringify(c.diffPages(d,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==d?
-(d=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(d)):q.textarea.value=JSON.stringify(c.diffPages(d,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();
-var D=c.getHashValueForPages(c.pages),J=q.getCurrentRevisionId(),L=c.getHashValueForPages(y.getShadowPages()),K=y.getDescriptorChecksum(y.getDescriptor()),n=y.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",D);console.log("Remote File",[y],"rev",n==J,"desc",K==L,"checksum",L);c.alert("Checksums "+(L==D?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",
-mxUtils.bind(this,function(){var q=c.getCurrentFile();console.log("editorUi",c,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",c.diffPages(q.ownPages,q.theirPages));var y=q.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),console.log("diff shadowPages/ownPages",c.diffPages(y,q.ownPages)),console.log("diff ownPages/shadowPages",
-c.diffPages(q.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(q.theirPages,y)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(q.theirPages,q.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(q.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",
-c.diffPages(q.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(q.theirPages,c.pages)))}null!=q&&console.log("Shadow pages",[c.getXmlForPages(q.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var q=c.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([c.diffPages(q.shadowPages,
-c.pages)])),q.ownPages=c.clonePages(c.pages),q.theirPages=c.clonePages(c.pages),q.shadowPages=c.clonePages(c.pages),null!=q.sync&&(q.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var q=l.model.cells,y=0,D=[],J=[],L;for(L in q){var K=q[L],n=l.getCurrentCellStyle(K)[mxConstants.STYLE_IMAGE];null!=n&&"data:"==n.substring(0,5)&&(null==D[n]&&(D[n]=(D[n]||0)+1,y++),J.push(K))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,
-J);console.log("Removed",y,"image(s) from",J.length,"cell(s): ",[J,D])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,y=l.getGraphBounds(),D=l.view.scale,J=mxUtils.createXmlDocument(),L=J.createElement("output");J.appendChild(L);J=new mxXmlCanvas2D(L);J.translate(Math.floor((1-y.x)/D),Math.floor((1-y.y)/D));J.scale(1/D);var K=
-0,n=J.save;J.save=function(){K++;n.apply(this,arguments)};var z=J.restore;J.restore=function(){K--;z.apply(this,arguments)};var G=q.drawShape;q.drawShape=function(M){mxLog.debug("entering shape",M,K);G.apply(this,arguments);mxLog.debug("leaving shape",M,K)};q.drawState(l.getView().getState(l.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(L));mxLog.debug("stateCounter",K)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
-mxPopupMenu.prototype.zIndex-2});var g=null,k=null,m=null,u=null,x=null,A=null,I=null,F=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=g?(l.view.revalidate=g,g=null):(g=l.view.revalidate,l.view.revalidate=function(){var q=Date.now(),y=g.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=k?(c.selectPage=k,k=null):(k=c.selectPage,c.selectPage=function(){var q=Date.now(),y=k.apply(this,
-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=m?(c.diffPages=m,m=null):(m=c.diffPages,c.diffPages=function(){var q=Date.now(),y=m.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=u?(c.patchPages=u,u=null):(u=c.patchPages,c.patchPages=function(){var q=Date.now(),y=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",
-[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=I?(c.getHashValueForPages=I,I=null):(I=c.getHashValueForPages,c.getHashValueForPages=function(){var q=Date.now(),y=I.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],
-"time",Date.now()-q+" ms","args",arguments);return y});null!=F?(c.resolveCrossReferences=F,F=null):(F=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=F.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=A?(c.getFileData=A,A=null):(A=c.getFileData,c.getFileData=function(){var q=Date.now(),y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",
-[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=g?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var D=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=g&&q.addCheckmark(D,
-Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action("moreShapes...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action("shape...",function(q){l.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,
-120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=p;c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,D,J,L,K,n,z,G,M,N,Q,S){c.createHtml(y,D,J,L,K,n,z,G,M,N,Q,mxUtils.bind(this,function(T,W){var X=new EmbedDialog(c,
-"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+T+"\n"+W+"\n",null,null,function(){try{var Z=window.open();if(null!=Z&&null!=Z.document){var Y=Z.document;"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(T);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");
-Y.close();if(!ba){var da=Z.document.createElement("div");da.marginLeft="26px";da.marginTop="26px";mxUtils.write(da,mxResources.get("updatingDocument"));var ia=Z.document.createElement("img");ia.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ia.style.marginLeft="6px";da.appendChild(ia);Z.document.body.insertBefore(da,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=
-/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);da.parentNode.removeChild(da)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+'"/>'),
-c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(q,y,D,J,L,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,D,J,L,K,function(n){c.spinner.stop();n=new EmbedDialog(c,n);c.showDialog(n.container,450,240,!0,!0);n.init()},function(n){c.spinner.stop();c.handleError(n)})},mxResources.get("image"),mxResources.get("retina"),
-c.isExportToCanvas())}));c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(q,y,D,J,L,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,D,J,L,K,function(n){c.spinner.stop();n=new EmbedDialog(c,n);c.showDialog(n.container,450,240,!0,!0);n.init()},function(n){c.spinner.stop();c.handleError(n)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));c.actions.put("embedIframe",
-new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(D,J,L,K,n,z,G,M,N,Q,S,T){var W=[];N&&W.push("tags=%7B%7D");D=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+G+";height:"+M+';" src="'+c.createLink(D,J,!0,K,n,z,"public"==Q?q:null,null,W,null,L,S,T)+'"'+(S?' allowtransparency="true"':"")+
-"></iframe>");c.showDialog(D.container,450,240,!0,!0);D.init()},!0,!0)})}));c.actions.put("embedNotion",new Action("notion...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));q.appendChild(y);
+["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(t=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var E=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});
+E.setToggleAction(!0);E.setSelectedCallback(function(){return E.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],D=0;D<q.length;D++)l.getModel().isVertex(q[D])&&y.push(q[D]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,
+!1);c.copiedStyle={};var D=[],J=[],L;for(L in y)D.push(y[L]),J.push(L);l.copyCellStyles([q],J,D,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action("formatSvg...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,D,J,L,K,m,z,F,M,O,Q,S,T){q=parseInt(q);c.lastExportSvgEditable=L;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,D,J,L,K,m,!z,F,M,Q,S,T)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action("formatPng...",function(){f("png",c.lastExportPngEditable,function(q,y,D,J,L){c.lastExportPngEditable=L})}));c.actions.put("exportJpg",new Action("formatJpg...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action("formatWebp...",
+function(){f("webp")}));t=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");t.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;t=c.actions.put("shadowVisible",new Action("shadow",function(){l.setShadowVisible(!l.shadowVisible)}));t.setToggleAction(!0);t.setSelectedCallback(function(){return l.shadowVisible});
+c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){c.isOwnDomain()&&mxEvent.isShiftDown(y)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",
+function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var q=new FeedbackDialog(c);c.showDialog(q.container,610,360,!0,!1);q.init()});c.actions.addAction("quickStart...",
+function(){"ac.draw.io"===window.location.hostname?c.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});t=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(c,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),
+this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||c.isOffline()||EditorUi.isElectronApp||(t=c.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==
+this.chatWindow?(this.chatWindow=new ChatWindow(c,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){c.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),t.setToggleAction(!0),t.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));t=c.actions.addAction("findReplace",mxUtils.bind(this,function(q,y){var D=(q=l.isEnabled()&&(null==y||!mxEvent.isShiftDown(y)))?"findReplace":"find";y=D+"Window";if(null==this[y]){var J="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,L=q?J?330:300:240;this[y]=new FindWindow(c,document.body.offsetWidth-(L+20),100,L,q?J?304:288:170,q);this[y].window.addListener("show",function(){c.fireEvent(new mxEventObject(D))});
+this[y].window.addListener("hide",function(){c.fireEvent(new mxEventObject(D))})}this[y].window.setVisible(!0);this[y].focus()}),null,null,Editor.ctrlKey+"+F");t=new Action("exportVsdx",function(){var q=null==c.pages||1>=c.pages.length;if(q)c.exportVisio();else{var y=document.createElement("div");y.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("formatVsdx"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(D);
+var J=c.addCheckbox(y,mxResources.get("allPages"),!q,q);J.style.marginBottom="16px";q=new CustomDialog(c,y,mxUtils.bind(this,function(){c.exportVisio(!J.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,130,!0,!0)}});t.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};c.actions.put("exportVsdx",t);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",function(){var q=document.createElement("input");q.setAttribute("type",
+"checkbox");q.style.marginRight="8px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var y=document.createElement("span");y.style.display="flex";y.style.alignItems="center";y.style.cssFloat="right";y.style.cursor="pointer";y.style.userSelect="none";y.style.marginTop="-3px";y.appendChild(q);mxUtils.write(y,mxResources.get("showStartScreen"));mxEvent.addListener(y,
+"click",function(J){mxEvent.getSource(J)!=q&&(q.checked=!q.checked)});header=y}y=[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]];if(!c.isOfflineApp()&&isLocalStorage&&c.mode!=App.MODE_ATLAS){var D=c.actions.get("plugins");null==D||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||
+y.push([mxResources.get("plugins"),D.funct])}EditorUi.isElectronApp||y.push([mxResources.get("link"),function(J,L){if(0<L.value.length)try{var K=JSON.parse(L.value),m=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),z=new EmbedDialog(c,m);c.showDialog(z.container,450,240,!0);z.init()}catch(F){c.handleError(F)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),
+function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(J){c.handleError(J)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",
+function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(q,y){var D=mxLanguage;null==urlParams.lang&&isLocalStorage&&(D=mxSettings.settings.language);var J=mxUtils.bind(this,function(K){var m=""==K?mxResources.get("automatic"):mxLanguageMap[K],z=null;""!=m&&(z=q.addItem(m,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(K)}),y),(K==D||""==K&&null==D)&&q.addCheckmark(z,
+Editor.checkmarkImage));return z});J("");q.addSeparator(y);for(var L in mxLanguageMap)J(L)})));c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=
+new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));c.adaptiveColorsWindow.window.setVisible(!0)}));t=this.get("viewZoom");var H=t.funct;t.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});t=this.get("layout");var B=t.funct;t.funct=function(q,y){B.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var D=null,J=20,L=20,K=function(){"undefined"!==
+typeof mxOrgChartLayout&&null!=D&&c.tryAndHandle(mxUtils.bind(this,function(){var T=c.editor.graph,W=new mxOrgChartLayout(T,D,J,L),X=T.getDefaultParent();1<T.model.getChildCount(T.getSelectionCell())&&(X=T.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var F=document.createElement("select");F.style.width=
+"160px";F.style.boxSizing="border-box";z=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var M=0;M<z.length;M++){var O=document.createElement("option");mxUtils.write(O,z[M]);O.value=M;2==M&&O.setAttribute("selected","selected");F.appendChild(O)}mxEvent.addListener(F,"change",function(){D=F.value});m.appendChild(F);z=
+document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var Q=document.createElement("input");Q.type="number";Q.value=J;Q.style.width="160px";Q.style.boxSizing="border-box";m.appendChild(Q);mxEvent.addListener(Q,"change",function(){J=Q.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+
+": ");m.appendChild(z);var S=document.createElement("input");S.type="number";S.value=L;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){L=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var T=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(F.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(T,null,2))});z.className="geBtn";
+m=new CustomDialog(c,m,function(){null==D&&(D=2);c.loadOrgChartLayouts(K)},null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,p());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var D=new mxParallelEdgeLayout(l);D.checkOverlap=!0;c.prompt(mxResources.get("spacing"),D.spacing,mxUtils.bind(this,function(J){c.tryAndHandle(mxUtils.bind(this,function(){D.spacing=J;c.executeLayout(function(){D.execute(l.getDefaultParent(),
+l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var D=q.addItem("Search:",null,null,y,null,null,!1);D.style.cursor="default";var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("size","25");J.style.borderWidth=
+"1px";J.style.marginLeft="8px";mxEvent.addListener(J,"keydown",mxUtils.bind(this,function(L){var K=mxUtils.trim(J.value);13==L.keyCode&&0<K.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(K)),J.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:K}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==L.keyCode&&(J.value="")}));
+D.firstChild.nextSibling.appendChild(J);mxEvent.addGestureListeners(J,function(L){document.activeElement!=J&&J.focus();mxEvent.consume(L)},function(L){mxEvent.consume(L)},function(L){mxEvent.consume(L)});window.setTimeout(function(){J.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.drawio.com")}),c.actions.addAction("check4Updates",function(){c.checkForUpdates()}),c.actions.put("desktopZoomIn",new Action("zoomIn",function(){c.desktopZoomIn()})),
+c.actions.put("desktopZoomOut",new Action("zoomOut",function(){c.desktopZoomOut()})),c.actions.put("desktopResetZoom",new Action("actualSize",function(){c.desktopResetZoom()})),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),y),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates","-"],y),this.addMenuItems(q,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),y)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),
+y)}"1"==urlParams.test&&(q.addSeparator(y),this.addSubmenu("testDevelop",q,y))})));c.actions.addAction("languageCode...",function(){var q=new FilenameDialog(c,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(y){null!=y&&(Graph.diagramLanguage=0<y.length?y:null,Graph.translateDiagram=!0,l.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");c.showDialog(q.container,340,80,!0,!0);q.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,
+function(q,y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;l.refresh()},y);Graph.translateDiagram||q.addCheckmark(y,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");
+mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,
+!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.isSelectionEmpty()?l.getGraphBounds():l.getBoundingBox(l.getSelectionCells()),
+D=l.view.translate,J=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",y.x/J-D.x,y.y/J-D.y,y.width/J,y.height/J,"fillColor=none;strokeColor=red;");var L=0,K=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||L++;K++});console.log("states checked",K,"invalid",L)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?
+c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,"Paste Data:",q,function(y){if(0<y.length)try{var D=function(z){function F(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=Q[ba]){for(;0<Q[ba].length;){var da=Q[ba].pop();F(da)}delete Q[ba]}}else mxLog.debug(M+": Visited: "+ba)}var M=z.parentNode.id,O=z.childNodes;z={};for(var Q={},S=null,T={},W=0;W<O.length;W++){var X=O[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?
+mxLog.debug(M+": Multiple roots: "+X.id):S=X.id:(null==Q[Z]&&(Q[Z]=[]),Q[Z].push(X.id))}else T[X.id]=X.id}O=Object.keys(T);0<O.length?(O=M+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(M+": Checked");var Y={};null==S?mxLog.debug(M+": No root"):(F(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(M+": Invalid tree: (see console)"),console.log(M+": Invalid tree",Q)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),
+console.log("xml",y));var J=mxUtils.parseXml(y),L=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=L&&0<L.length)try{var K=c.getHashValueForPages(L);mxLog.debug("Checksum: ",K)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=J.getElementsByTagName("root");for(y=0;y<m.length;y++)D(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var d=null;c.actions.addAction("testDiff",
+mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:","",function(y){var D=c.getCurrentFile();if(0<y.length&&null!=D)try{var J=JSON.parse(y);D.patch([J],null,!0,!0);c.hideDialog()}catch(L){c.handleError(L)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,D){d=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(d)}],["Diff",function(y,D){try{q.textarea.value=
+JSON.stringify(c.diffPages(d,c.pages),null,2)}catch(J){c.handleError(J)}}]]);null==d?(d=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(d)):q.textarea.value=JSON.stringify(c.diffPages(d,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,
+mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();var D=c.getHashValueForPages(c.pages),J=q.getCurrentRevisionId(),L=c.getHashValueForPages(y.getShadowPages()),K=y.getDescriptorChecksum(y.getDescriptor()),m=y.getCurrentRevisionId();console.log("Local File",[q],"modified",q.isModified(),"checksum",D);console.log("Remote File",[y],"rev",m==J,"desc",K==L,"checksum",L);c.alert("Checksums "+(L==D?"match":"no not match"))},function(y){console.log("Error getLatestVersion",y);c.handleError(y)}):
+console.log("Checksum: no file or pages")}));c.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var q=c.getCurrentFile();console.log("editorUi",c,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(q.theirPages));console.log("diff ownPages/theirPages",c.diffPages(q.ownPages,q.theirPages));var y=q.getShadowPages();null!=y&&(console.log("Checksum shadowPages",c.getHashValueForPages(y)),
+console.log("diff shadowPages/ownPages",c.diffPages(y,q.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(q.ownPages,y)),console.log("diff theirPages/shadowPages",c.diffPages(q.theirPages,y)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",c.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(q.theirPages,q.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",
+c.diffPages(q.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(q.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(q.theirPages,c.pages)))}null!=q&&console.log("Shadow pages",[c.getXmlForPages(q.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var q=c.getCurrentFile();null!=q&&q.isRealtime()&&
+null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([c.diffPages(q.shadowPages,c.pages)])),q.ownPages=c.clonePages(c.pages),q.theirPages=c.clonePages(c.pages),q.shadowPages=c.clonePages(c.pages),null!=q.sync&&(q.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,function(){l.model.beginUpdate();try{var q=l.model.cells,y=0,D=[],J=[],L;for(L in q){var K=q[L],m=l.getCurrentCellStyle(K)[mxConstants.STYLE_IMAGE];null!=m&&"data:"==m.substring(0,
+5)&&(null==D[m]&&(D[m]=(D[m]||0)+1,y++),J.push(K))}l.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",y,"image(s) from",J.length,"cell(s): ",[J,D])}finally{l.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,l.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var q=new mxImageExport,y=l.getGraphBounds(),D=l.view.scale,J=mxUtils.createXmlDocument(),L=J.createElement("output");J.appendChild(L);J=new mxXmlCanvas2D(L);
+J.translate(Math.floor((1-y.x)/D),Math.floor((1-y.y)/D));J.scale(1/D);var K=0,m=J.save;J.save=function(){K++;m.apply(this,arguments)};var z=J.restore;J.restore=function(){K--;z.apply(this,arguments)};var F=q.drawShape;q.drawShape=function(M){mxLog.debug("entering shape",M,K);F.apply(this,arguments);mxLog.debug("leaving shape",M,K)};q.drawState(l.getView().getState(l.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(L));mxLog.debug("stateCounter",K)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
+mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var g=null,k=null,n=null,u=null,x=null,A=null,I=null,G=null;c.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=g?(l.view.revalidate=g,g=null):(g=l.view.revalidate,l.view.revalidate=function(){var q=Date.now(),y=g.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=k?(c.selectPage=k,k=null):(k=
+c.selectPage,c.selectPage=function(){var q=Date.now(),y=k.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=n?(c.diffPages=n,n=null):(n=c.diffPages,c.diffPages=function(){var q=Date.now(),y=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=u?(c.patchPages=u,u=null):(u=c.patchPages,c.patchPages=function(){var q=Date.now(),
+y=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.clonePages=x,x=null):(x=c.clonePages,c.clonePages=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=I?(c.getHashValueForPages=I,I=null):(I=c.getHashValueForPages,c.getHashValueForPages=function(){var q=Date.now(),y=I.apply(this,
+arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=G?(c.resolveCrossReferences=G,G=null):(G=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=G.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=A?(c.getFileData=A,A=null):(A=c.getFileData,c.getFileData=function(){var q=Date.now(),
+y=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=g?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var D=q.addItem(mxResources.get("testPerformance"),
+null,function(){c.actions.get("testPerformance").funct()},y);null!=g&&q.addCheckmark(D,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action("moreShapes...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",
+new Action("shape...",function(q){l.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=p;c.actions.put("embedHtml",new Action("html...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,D,J,L,K,m,z,F,M,O,Q,S){c.createHtml(y,
+D,J,L,K,m,z,F,M,O,Q,mxUtils.bind(this,function(T,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+T+"\n"+W+"\n",null,null,function(){try{var Z=window.open();if(null!=Z&&null!=Z.document){var Y=Z.document;"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(T);var ba=mxClient.IS_IE||mxClient.IS_EDGE||
+null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var da=Z.document.createElement("div");da.marginLeft="26px";da.marginTop="26px";mxUtils.write(da,mxResources.get("updatingDocument"));var ia=Z.document.createElement("img");ia.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ia.style.marginLeft="6px";da.appendChild(ia);Z.document.body.insertBefore(da,Z.document.body.firstChild);window.setTimeout(function(){var ca=
+document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);da.parentNode.removeChild(da)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ca){c.handleError(ca)}});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=
+DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action("image...",function(){c.showEmbedImageDialog(function(q,y,D,J,L,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,D,J,L,K,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();
+c.handleError(m)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action("formatSvg...",function(){c.showEmbedImageDialog(function(q,y,D,J,L,K){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,D,J,L,K,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));
+c.actions.put("embedIframe",new Action("iframe...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(D,J,L,K,m,z,F,M,O,Q,S,T){var W=[];O&&W.push("tags=%7B%7D");D=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+M+';" src="'+c.createLink(D,J,!0,K,m,z,"public"==Q?q:null,null,W,null,L,S,T)+'"'+(S?' allowtransparency="true"':
+"")+"></iframe>");c.showDialog(D.container,450,240,!0,!0);D.init()},!0,!0)})}));c.actions.put("embedNotion",new Action("notion...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));q.appendChild(y);
mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(D){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(D)});c.getPublicUrl(c.getCurrentFile(),function(D){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,D,c.getCurrentFile(),function(J,
-L,K,n,z,G,M,N,Q,S,T,W){M=["border=0"];Q&&M.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,L,!0,n,z,G,"public"==S?D:null,null,M,null,K,null,W));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})}));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,D,J,L,K,n,z,G,M,N,Q,S){z=[];L&&M&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,D,!0,
-L,K,n,"public"==N?q:null,null,z,null,J,null,S));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",
+L,K,m,z,F,M,O,Q,S,T,W){M=["border=0"];Q&&M.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(J,L,!0,m,z,F,"public"==S?D:null,null,M,null,K,null,W));c.showDialog(J.container,450,240,!0,!0);J.init()},null,!0)})}));c.actions.put("publishLink",new Action("link...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,D,J,L,K,m,z,F,M,O,Q,S){z=[];L&&M&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,D,!0,
+L,K,m,"public"==O?q:null,null,z,null,J,null,S));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",
function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)t=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),t.setToggleAction(!0),t.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&
(t=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),t.setToggleAction(!0),t.setSelectedCallback(function(){return c.isHighContrast()}));t=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});t.label=mxResources.get("searchShapes");t.setToggleAction(!0);t.setSelectedCallback(function(){return null!=
c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var D=c.createLoadMessage("save");D.xml=y;!0!==
@@ -14349,18 +14348,18 @@ q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(D.exit=!0);y=JSON.s
"1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var q=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},
null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):c.isOffline()||
mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);!c.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(q,["publishLink"],
-y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function D(K){K.pickFile(function(n){c.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(n,function(z){var G="data:image/"==z.getData().substring(0,11)?L(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&!c.editor.isDataSvg(z.getData())&&
-(z.setData(Editor.createSvgDataUri(z.getData())),G="image/svg+xml");J(z.getData(),G,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},K==c.drive)},!0)}var J=mxUtils.bind(this,function(K,n,z){var G=l.view,M=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,M.x/G.scale-G.translate.x)+4*l.gridSize)),Q=l.snap(Math.ceil(Math.max(0,(M.y+M.height)/G.scale-G.translate.y)+4*l.gridSize));"data:image/"==K.substring(0,11)?c.loadImage(K,mxUtils.bind(this,function(S){var T=
-!0,W=mxUtils.bind(this,function(){c.resizeImage(S,K,mxUtils.bind(this,function(X,Z,Y){X=T?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(K,n,N,Q,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),T)});K.length>c.resampleThreshold?c.confirmImageResize(function(X){T=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(K,n,N,Q,0,
-0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),L=mxUtils.bind(this,function(K){var n="text/xml";/\.png$/i.test(K)?n="image/png":/\.jpe?g$/i.test(K)?n="image/jpg":/\.gif$/i.test(K)?n="image/gif":/\.pdf$/i.test(K)&&(n="application/pdf");return n});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){D(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+
+y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function D(K){K.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(m,function(z){var F="data:image/"==z.getData().substring(0,11)?L(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&!c.editor.isDataSvg(z.getData())&&
+(z.setData(Editor.createSvgDataUri(z.getData())),F="image/svg+xml");J(z.getData(),F,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},K==c.drive)},!0)}var J=mxUtils.bind(this,function(K,m,z){var F=l.view,M=l.getGraphBounds(),O=l.snap(Math.ceil(Math.max(0,M.x/F.scale-F.translate.x)+4*l.gridSize)),Q=l.snap(Math.ceil(Math.max(0,(M.y+M.height)/F.scale-F.translate.y)+4*l.gridSize));"data:image/"==K.substring(0,11)?c.loadImage(K,mxUtils.bind(this,function(S){var T=
+!0,W=mxUtils.bind(this,function(){c.resizeImage(S,K,mxUtils.bind(this,function(X,Z,Y){X=T?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(K,m,O,Q,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),T)});K.length>c.resampleThreshold?c.confirmImageResize(function(X){T=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(K,m,O,Q,0,
+0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),L=mxUtils.bind(this,function(K){var m="text/xml";/\.png$/i.test(K)?m="image/png":/\.jpe?g$/i.test(K)?m="image/jpg":/\.gif$/i.test(K)?m="image/gif":/\.pdf$/i.test(K)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){D(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){D(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){D(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){D(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){D(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){D(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(c,"",mxResources.get("import"),function(n){if(null!=n&&0<n.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var z=
-/(\.png)($|\?)/i.test(n)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(n),function(G){J(G,z,n)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==z)}},mxResources.get("url"));c.showDialog(K.container,300,80,!0,!0);K.init()},y))}))).isEnabled=p;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,y){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var z=
+/(\.png)($|\?)/i.test(m)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(m),function(F){J(F,z,m)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==z)}},mxResources.get("url"));c.showDialog(K.container,300,80,!0,!0);K.init()},y))}))).isEnabled=p;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,y){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
(750>D&&this.addSubmenu("viewZoom",q,y,mxResources.get("zoom")),460>D&&c.isPageMenuVisible()&&this.addSubmenu("pages",q,y),320>D&&this.addSubmenu("insert",q,y),360>D&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",q,y))})));this.put("appearance",new Menu(mxUtils.bind(this,function(q,y){if(c.isAutoDarkModeSupported()){var D=c.menus.addMenuItem(q,"autoMode",y);null!=D&&D.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+
")")}this.addMenuItems(q,["lightMode","darkMode","-"],y);D=c.menus.addMenuItem(q,"highContrast",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(D,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(q){l.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(q)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});
-this.put("theme",new Menu(mxUtils.bind(this,function(q,y){var D="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=q.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},y),L=q.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},y),K=!1;if("kennedy"==D||"dark"==D)q.addCheckmark(L,Editor.checkmarkImage),K=!0;for(var n=0;n<Editor.themes.length;n++)mxUtils.bind(this,function(z){L=q.addItem(mxResources.get("min"==z?"minimal":z),null,function(){c.setCurrentTheme(z)},
-y);D==z&&(q.addCheckmark(L,Editor.checkmarkImage),K=!0);"simple"==z&&q.addSeparator(y)})(Editor.themes[n]);K||q.addCheckmark(J,Editor.checkmarkImage)})));t=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(D,J){q.invalidFileHandle=null;q.fileHandle=D;q.title=J.name;q.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(q.getTitle()));
+this.put("theme",new Menu(mxUtils.bind(this,function(q,y){var D="1"==urlParams.sketch?"sketch":mxSettings.getUi(),J=q.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},y),L=q.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme("kennedy")},y),K=!1;if("kennedy"==D||"dark"==D)q.addCheckmark(L,Editor.checkmarkImage),K=!0;for(var m=0;m<Editor.themes.length;m++)mxUtils.bind(this,function(z){L=q.addItem(mxResources.get("min"==z?"minimal":z),null,function(){c.setCurrentTheme(z)},
+y);D==z&&(q.addCheckmark(L,Editor.checkmarkImage),K=!0);"simple"==z&&q.addSeparator(y)})(Editor.themes[m]);K||q.addCheckmark(J,Editor.checkmarkImage)})));t=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(D,J){q.invalidFileHandle=null;q.fileHandle=D;q.title=J.name;q.desc=J;c.save(J.name)}),null,c.createFileSystemOptions(q.getTitle()));
else{var y=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(D){null!=D&&0<D.length&&null!=q&&D!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(D,mxUtils.bind(this,function(J){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(J){this.editorUi.handleError(J,null!=J?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==
StorageFile?mxResources.get("diagramName"):null,function(D){if(null!=D&&0<D.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,100,!0,!0);y.init()}}));t.isEnabled=function(){return this.enabled&&p.apply(this,arguments)};t.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=c.getCurrentFile();
if(null!=q){var y=c.getCopyFilename(q);q.constructor==DriveFile?(y=new CreateDialog(c,y,mxUtils.bind(this,function(D,J){"_blank"==J?c.editor.editAsNew(c.getFileData(),D):("download"==J&&(J=App.MODE_GOOGLE),null!=D&&0<D.length&&(J==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(D,mxUtils.bind(this,function(L){q.desc=L;q.save(!1,mxUtils.bind(this,function(){c.spinner.stop();q.setModified(!1);c.updateStatus(mxUtils.bind(this,function(){q.addAllSavedStatus()}))}),mxUtils.bind(this,
@@ -14369,7 +14368,7 @@ t.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")
!0;break}c.pickFolder(q.getMode(),mxUtils.bind(this,function(J){c.spinner.spin(document.body,mxResources.get("moving"))&&q.move(J,mxUtils.bind(this,function(L){c.spinner.stop()}),mxUtils.bind(this,function(L){c.handleError(L)}))}),null,!0,y)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["publishLink"],y)})));c.actions.put("useOffline",new Action("useOffline...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
function(){try{var q=c.getCurrentFile();null!=q&&q.share()}catch(y){c.handleError(y)}})).isEnabled=p;this.put("embed",new Menu(mxUtils.bind(this,function(q,y){var D=c.getCurrentFile();null==D||D.getMode()!=App.MODE_GOOGLE&&D.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(D.getTitle())||this.addMenuItems(q,["liveImage","-"],y);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(q,["embedIframe"],y);"1"==urlParams.embed||c.isOffline()||
this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),y)})));c.addInsertItem=function(q,y,D,J){("plantUml"!=J||EditorUi.enablePlantUml&&!c.isOffline())&&q.addItem(D,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var L=new ParseDialog(c,D,J);c.showDialog(L.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else L=new CreateGraphDialog(c,D,J),c.showDialog(L.container,620,420,!0,!1,function(K,
-n){if(n)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=L.graph&&(null!=L.graph.container.parentNode&&L.graph.container.parentNode.removeChild(L.graph.container),L.graph.destroy(),L.graph=null)});L.init()}),y,null,p())};var C=function(q){l.getModel().beginUpdate();try{q=l.addCell(q),l.fireEvent(new mxEventObject("cellsInserted","cells",[q])),l.model.isVertex(q)&&l.isAutoSizeCell(q)&&l.updateCellSize(q)}finally{l.getModel().endUpdate()}l.scrollCellToVisible(q);l.setSelectionCell(q);
+m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=L.graph&&(null!=L.graph.container.parentNode&&L.graph.container.parentNode.removeChild(L.graph.container),L.graph.destroy(),L.graph=null)});L.init()}),y,null,p())};var C=function(q){l.getModel().beginUpdate();try{q=l.addCell(q),l.fireEvent(new mxEventObject("cellsInserted","cells",[q])),l.model.isVertex(q)&&l.isAutoSizeCell(q)&&l.updateCellSize(q)}finally{l.getModel().endUpdate()}l.scrollCellToVisible(q);l.setSelectionCell(q);
l.container.focus();l.editAfterInsert&&l.startEditing(q);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(q))},0);return q},P=function(q,y,D,J,L){q=new mxCell(q,new mxGeometry(0,0,y,D),J);q.vertex=!0;null==L&&(L=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=L.x;q.geometry.y=L.y;return C(q)};c.actions.put("insertText",new Action("text",function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(P("Text",60,
30,l.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",l.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint()))},null,null,"A")).isEnabled=p;c.actions.put("insertRectangle",new Action("rectangle",function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&P("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?
null:l.getInsertPoint())},null,null,"D")).isEnabled=p;c.actions.put("insertNote",new Action("note",function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&P("",140,160,"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;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:
@@ -14393,7 +14392,7 @@ urlParams.confLib&&q.addItem(mxResources.get("confluenceCloud")+"...",null,funct
y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+
mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var D=new FilenameDialog(c,"",mxResources.get("open"),function(J){if(null!=J&&
-0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var L=J;c.editor.isCorsEnabledForUrl(J)||(L=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(L,function(K){if(200<=K.getStatus()&&299>=K.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(c,K.getText(),J)),c.showSidebar()}catch(n){c.handleError(n,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
+0<J.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var L=J;c.editor.isCorsEnabledForUrl(J)||(L=PROXY_URL+"?url="+encodeURIComponent(J));mxUtils.get(L,function(K){if(200<=K.getStatus()&&299>=K.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(c,K.getText(),J)),c.showSidebar()}catch(m){c.handleError(m,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},
mxResources.get("url"));c.showDialog(D.container,300,80,!0,!0);D.init()},y));"1"==urlParams.confLib&&(q.addSeparator(y),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},y))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
t=c.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(c,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));t.setToggleAction(!0);t.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));c.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(q,y){var D=
@@ -14403,9 +14402,9 @@ y);null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(q,
this.addMenuItems(q,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",q,y);q.addSeparator(y);c.isPageMenuVisible()&&c.menus.addMenuItems(q,["pageTabs"],y);this.addMenuItems(q,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),y);"1"!=urlParams.sketch&&this.addMenuItems(q,["-","fullscreen"],y)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
y)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(q,y){var D=c.currentPage;null!=D&&(q.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){c.renamePage(D,D.getName())}),y),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removePage(D)}),y),1<c.pages.length&&(c.menus.addSubmenu("movePage",q,y,mxResources.get("move")),q.addSeparator(y)),q.addSeparator(y),q.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){c.duplicatePage(D,
mxResources.get("copyOf",[D.getName()]))}),y),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||q.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,y){var D=c.currentPage;c.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(L){c.handleError(L)}}),
-y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(L){var K=null;K=c.pages[L]==D&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(D)):q.addItem(c.getShortPageName(c.pages[L]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[L])}),y);var n=c.pages[L].getId();K.setAttribute("title",c.pages[L].getName()+" ("+(L+1)+"/"+c.pages.length+")"+(null!=n?" ["+
-n+"]":""));c.pages[L]==D&&q.addCheckmark(K,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;t=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;t=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});t.setToggleAction(!0);t.setSelectedCallback(function(){return U});
-var O="1"==urlParams.isGoogleFontsEnabled;t=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();O=!O;c.alert(mxResources.get("restartForChangeRequired"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return O});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=
+y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var J=0;J<c.pages.length;J++)mxUtils.bind(this,function(L){var K=null;K=c.pages[L]==D&&!c.editor.graph.isLightboxView()&&c.editor.graph.isEnabled()?c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(D)):q.addItem(c.getShortPageName(c.pages[L]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[L])}),y);var m=c.pages[L].getId();K.setAttribute("title",c.pages[L].getName()+" ("+(L+1)+"/"+c.pages.length+")"+(null!=m?" ["+
+m+"]":""));c.pages[L]==D&&q.addCheckmark(K,Editor.checkmarkImage)})(J)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;t=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;t=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();U=!U});t.setToggleAction(!0);t.setSelectedCallback(function(){return U});
+var N="1"==urlParams.isGoogleFontsEnabled;t=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();N=!N;c.alert(mxResources.get("restartForChangeRequired"))});t.setToggleAction(!0);t.setSelectedCallback(function(){return N});c.actions.addAction("openDevTools",function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=
1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var V=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==V||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
"1"==urlParams.embedInline||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);c.menus.addSubmenu("units",q,y);c.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var D=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y),c.menus.addMenuItems(q,["ruler","-"],
y));EditorUi.isElectronApp&&c.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",q,y);q.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(q,"configuration",y);q.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||c.menus.addSubmenu("appearance",q,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
@@ -14428,14 +14427,14 @@ c.menus.addMenuItems(q,["-","autosave"],y)}else D=this.editorUi.getCurrentFile()
q,y),null!=D&&D.constructor==DriveFile?this.addMenuItems(q,"new - rename makeCopy openFolder moveToFolder".split(" "),y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==D||D.constructor==LocalFile&&null==D.fileHandle||(q.addSeparator(y),J=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(J,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==D||this.addMenuItems(q,["share","-"],y),null!=D&&D.isRenamable()&&this.addMenuItems(q,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(this.addMenuItems(q,["makeCopy"],y),null!=D&&(D.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],y),null!=D.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y)))),q.addSeparator(y),this.addSubmenu("importFrom",
q,y),this.addSubmenu("exportAs",q,y),q.addSeparator(y),this.addSubmenu("embed",q,y),this.addSubmenu("publish",q,y),q.addSeparator(y),this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),null!=D&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(J=null!=D.getTitle()?D.getTitle():c.defaultFilename,(D.constructor==DriveFile&&null!=D.sync&&D.sync.isConnected()||!/(\.html)$/i.test(J))&&this.addMenuItems(q,["-",
-"properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function D(N){var Q=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!L[Q]){for(var S=N.name,T=0;null!=G[S.toLowerCase()];)S=N.name+" ("+ ++T+")";null==z[Q]&&(M.push({name:N.name,url:N.url,label:S,title:N.url}),G[S.toLowerCase()]=N,z[Q]=N)}}for(var J=
-mxUtils.bind(this,function(N,Q,S,T,W){var X=c.editor.graph,Z=this.styleChange(q,null!=T?T:N,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[N,null!=Q?encodeURIComponent(Q):null,null],null,y,function(){X.setFont(N,Q);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");
+"properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function D(O){var Q=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!L[Q]){for(var S=O.name,T=0;null!=F[S.toLowerCase()];)S=O.name+" ("+ ++T+")";null==z[Q]&&(M.push({name:O.name,url:O.url,label:S,title:O.url}),F[S.toLowerCase()]=O,z[Q]=O)}}for(var J=
+mxUtils.bind(this,function(O,Q,S,T,W){var X=c.editor.graph,Z=this.styleChange(q,null!=T?T:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,y,function(){X.setFont(O,Q);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");
Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?
-"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Y)})));Graph.addFont(N,Q);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=T?T:N;null!=Q&&(W+=" ("+Q+")");Z.setAttribute("title",W)}),L={},K=0;K<this.defaultFonts.length;K++){var n=this.defaultFonts[K];"string"===typeof n?J(n):null!=n.fontFamily&&null!=n.fontUrl&&(L[encodeURIComponent(n.fontFamily)+"@"+encodeURIComponent(n.fontUrl)]=!0,J(n.fontFamily,n.fontUrl))}q.addSeparator(y);
-var z={},G={},M=[];for(K=0;K<this.customFonts.length;K++)D(this.customFonts[K]);M.sort(function(N,Q){return N.label<Q.label?-1:N.label>Q.label?1:0});if(0<M.length){for(K=0;K<M.length;K++)J(M[K].name,M[K].url,!0,M[K].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,
-Q=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",T=null;if(N.isEditing()){var W=N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());T=null!=X?X.style.fontSource:null;for(null!=T&&(T=decodeURIComponent(T));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){T=W.getAttribute("data-font-src");
-break}else if(W.getAttribute("face")==Q){T=null;break}W=W.parentNode}null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",T=W)));null!=T&&T.substring(0,PROXY_URL.length)==PROXY_URL&&(T=decodeURIComponent(T.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&
-(Z=N.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,T,S,mxUtils.bind(this,function(Y,ba,da){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,
+"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Y)})));Graph.addFont(O,Q);Z.firstChild.nextSibling.style.fontFamily=O;W=null!=T?T:O;null!=Q&&(W+=" ("+Q+")");Z.setAttribute("title",W)}),L={},K=0;K<this.defaultFonts.length;K++){var m=this.defaultFonts[K];"string"===typeof m?J(m):null!=m.fontFamily&&null!=m.fontUrl&&(L[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,J(m.fontFamily,m.fontUrl))}q.addSeparator(y);
+var z={},F={},M=[];for(K=0;K<this.customFonts.length;K++)D(this.customFonts[K]);M.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<M.length){for(K=0;K<M.length;K++)J(M[K].name,M[K].url,!0,M[K].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,
+Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",T=null;if(O.isEditing()){var W=O.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=O.getView().getState(O.cellEditor.getEditingCell());T=null!=X?X.style.fontSource:null;for(null!=T&&(T=decodeURIComponent(T));null!=W&&W!=O.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){T=W.getAttribute("data-font-src");
+break}else if(W.getAttribute("face")==Q){T=null;break}W=W.parentNode}null!=T&&(Graph.isGoogleFontUrl(T)?(T=null,S="g"):S="w")}}}else X=O.getView().getState(O.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",T=W)));null!=T&&T.substring(0,PROXY_URL.length)==PROXY_URL&&(T=decodeURIComponent(T.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==O.cellEditor.textarea&&
+(Z=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,T,S,mxUtils.bind(this,function(Y,ba,da){null!=Z&&(O.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),O.isEditing())O.setFont(Y,ba);else{O.getModel().beginUpdate();try{O.stopEditing(!1),O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),O.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,
380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),y,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}
@@ -14508,31 +14507,31 @@ b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAtt
l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var p=l.getAttribute("id");null==e.lookup(p)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,p,v,t){l=null!=l?l:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var E=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(c,p[H]);p=E;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var p=
[];this.traverse(l,!0,mxUtils.bind(this,function(t,E){var H=null!=E&&this.isTreeEdge(E);H&&p.push(E);t==l||null!=E&&!H||p.push(t);return(null==E||H)&&(t==l||!this.model.isCollapsed(t))}));this.model.setCollapsed(l,c);for(var v=0;v<p.length;v++)this.model.setVisible(p[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,p,v,t,E){return this.model.filterCells(this.getEdges(c,l,p,v,t,E),mxUtils.bind(this,
function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(J){return u.isVertex(J)&&p(J)}function l(J){var L=!1;null!=J&&(L="1"==
-m.getCurrentCellStyle(J).treeMoving);return L}function p(J){var L=!1;null!=J&&(J=u.getParent(J),L=m.view.getState(J),L="tree"==(null!=L?L.style:m.getCellStyle(J)).containerType);return L}function v(J){var L=!1;null!=J&&(J=u.getParent(J),L=m.view.getState(J),m.view.getState(J),L=null!=(null!=L?L.style:m.getCellStyle(J)).childLayout);return L}function t(J){J=m.view.getState(J);if(null!=J){var L=m.getIncomingTreeEdges(J.cell);if(0<L.length&&(L=m.view.getState(L[0]),null!=L&&(L=L.absolutePoints,null!=
-L&&0<L.length&&(L=L[L.length-1],null!=L)))){if(L.y==J.y&&Math.abs(L.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(L.y==J.y+J.height&&Math.abs(L.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(L.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(J,L){L=null!=L?L:!0;m.model.beginUpdate();try{var K=m.model.getParent(J),n=m.getIncomingTreeEdges(J),z=m.cloneCells([n[0],J]);m.model.setTerminal(z[0],m.model.getTerminal(n[0],
-!0),!0);var G=t(J),M=K.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=L?J.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=L?J.geometry.height+10:-z[1].geometry.height-10;m.view.currentRoot!=K&&(z[1].geometry.x-=M.x,z[1].geometry.y-=M.y);var N=m.view.getState(J),Q=m.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(L?J.geometry.width+10:-z[1].geometry.width-10)*Q:S.y+=(L?
-J.geometry.height+10:-z[1].geometry.height-10)*Q;var T=m.getOutgoingTreeEdges(m.model.getTerminal(n[0],!0));if(null!=T){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=M=n=0;X<T.length;X++){var Z=m.model.getTerminal(T[X],!1);if(G==t(Z)){var Y=m.view.getState(Z);Z!=J&&null!=Y&&(W&&L!=Y.getCenterX()<N.getCenterX()||!W&&L!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(n=10+Math.max(n,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/Q),M=10+Math.max(M,(Math.min(S.y+
-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/Q))}}W?M=0:n=0;for(X=0;X<T.length;X++)if(Z=m.model.getTerminal(T[X],!1),G==t(Z)&&(Y=m.view.getState(Z),Z!=J&&null!=Y&&(W&&L!=Y.getCenterX()<N.getCenterX()||!W&&L!=Y.getCenterY()<N.getCenterY()))){var ba=[];m.traverse(Y.cell,!0,function(da,ia){var ca=null!=ia&&m.isTreeEdge(ia);ca&&ba.push(ia);(null==ia||ca)&&ba.push(da);return null==ia||ca});m.moveCells(ba,(L?1:-1)*n,(L?1:-1)*M)}}}return m.addCells(z,K)}finally{m.model.endUpdate()}}function H(J){m.model.beginUpdate();
-try{var L=t(J),K=m.getIncomingTreeEdges(J),n=m.cloneCells([K[0],J]);m.model.setTerminal(K[0],n[1],!1);m.model.setTerminal(n[0],n[1],!0);m.model.setTerminal(n[0],J,!1);var z=m.model.getParent(J),G=z.geometry,M=[];m.view.currentRoot!=z&&(n[1].geometry.x-=G.x,n[1].geometry.y-=G.y);m.traverse(J,!0,function(S,T){var W=null!=T&&m.isTreeEdge(T);W&&M.push(T);(null==T||W)&&M.push(S);return null==T||W});var N=J.geometry.width+40,Q=J.geometry.height+40;L==mxConstants.DIRECTION_SOUTH?N=0:L==mxConstants.DIRECTION_NORTH?
-(N=0,Q=-Q):L==mxConstants.DIRECTION_WEST?(N=-N,Q=0):L==mxConstants.DIRECTION_EAST&&(Q=0);m.moveCells(M,N,Q);return m.addCells(n,z)}finally{m.model.endUpdate()}}function B(J,L){m.model.beginUpdate();try{var K=m.model.getParent(J),n=m.getIncomingTreeEdges(J),z=t(J);0==n.length&&(n=[m.createEdge(K,null,"",null,null,m.createCurrentEdgeStyle())],z=L);var G=m.cloneCells([n[0],J]);m.model.setTerminal(G[0],J,!0);null==m.model.getTerminal(G[0],!1)&&(m.model.setTerminal(G[0],G[1],!1),m.applyNewEdgeStyle(G[1],
-[G[0]],z));n=m.getOutgoingTreeEdges(J);var M=K.geometry;L=[];m.view.currentRoot==K&&(M=new mxRectangle);for(var N=0;N<n.length;N++){var Q=m.model.getTerminal(n[N],!1);null!=Q&&L.push(Q)}var S=m.view.getBounds(L),T=m.view.translate,W=m.view.scale;z==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?J.geometry.x+(J.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-T.x-M.x+10,G[1].geometry.y+=G[1].geometry.height-M.y+40):z==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?J.geometry.x+(J.geometry.width-
-G[1].geometry.width)/2:(S.x+S.width)/W-T.x+-M.x+10,G[1].geometry.y-=G[1].geometry.height+M.y+40):(G[1].geometry.x=z==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+M.x+40):G[1].geometry.x+(G[1].geometry.width-M.x+40),G[1].geometry.y=null==S?J.geometry.y+(J.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-T.y+-M.y+10);return m.addCells(G,K)}finally{m.model.endUpdate()}}function d(J,L,K){J=m.getOutgoingTreeEdges(J);K=m.view.getState(K);var n=[];if(null!=K&&null!=J){for(var z=
-0;z<J.length;z++){var G=m.view.getState(m.model.getTerminal(J[z],!1));null!=G&&(!L&&Math.min(G.x+G.width,K.x+K.width)>=Math.max(G.x,K.x)||L&&Math.min(G.y+G.height,K.y+K.height)>=Math.max(G.y,K.y))&&n.push(G)}n.sort(function(M,N){return L?M.x+M.width-N.x-N.width:M.y+M.height-N.y-N.height})}return n}function g(J,L){var K=t(J),n=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;(K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST)==n&&K!=L?k.actions.get("selectParent").funct():K==
-L?(L=m.getOutgoingTreeEdges(J),null!=L&&0<L.length&&m.setSelectionCell(m.model.getTerminal(L[0],!1))):(K=m.getIncomingTreeEdges(J),null!=K&&0<K.length&&(n=d(m.model.getTerminal(K[0],!0),n,J),J=m.view.getState(J),null!=J&&(J=mxUtils.indexOf(n,J),0<=J&&(J+=L==mxConstants.DIRECTION_NORTH||L==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=n.length-1&&m.setSelectionCell(n[J].cell)))))}var k=this,m=k.editor.graph,u=m.getModel(),x=k.menus.createPopupMenu;k.menus.createPopupMenu=function(J,L,K){x.apply(this,arguments);
-if(1==m.getSelectionCount()){L=m.getSelectionCell();var n=m.getOutgoingTreeEdges(L);J.addSeparator();0<n.length&&(c(m.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,K),this.addMenuItems(J,["selectDescendants"],null,K));c(m.getSelectionCell())?(J.addSeparator(),0<m.getIncomingTreeEdges(L).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,K)):0<m.model.getEdgeCount(L)&&this.addMenuItems(J,["selectConnections"],null,K)}};k.actions.addAction("selectChildren",function(J){if(m.isEnabled()&&
-1==m.getSelectionCount()){var L=m.getSelectionCell();J=mxEvent.isControlDown(J)?null:m.getOutgoingTreeEdges(L);if(null!=J&&0<J.length){L=[];for(var K=0;K<J.length;K++)L.push(m.model.getTerminal(J[K],!1));m.setSelectionCells(L)}else m.setSelectionCells(m.model.getChildren(L))}},null,null,"Alt+Shift+C");k.actions.addAction("selectDescendants",function(J){var L=m.getSelectionCell();if(m.isEnabled()&&null!=L){var K=[];mxEvent.isControlDown(J)||m.traverse(L,!0,function(n,z){var G=null!=z&&m.isTreeEdge(z);
-G&&mxEvent.isControlDown(J)&&K.push(z);(null==z||G)&&K.push(n);return null==z||G});if(0==K.length||1==K.length&&K[0]==L)K=m.model.getDescendants(L);m.setSelectionCells(K)}},null,null,"Alt+Shift+X");k.actions.addAction("selectParent",function(J){var L=m.getSelectionCell();m.isEnabled()&&null!=L&&(J=mxEvent.isControlDown(J)?null:m.getIncomingTreeEdges(L),null!=J&&0<J.length?m.setSelectionCell(m.model.getTerminal(J[0],!0)):m.selectParentCell())},null,null,"Alt+Shift+P");k.actions.addAction("selectSiblings",
-function(J){if(m.isEnabled()&&1==m.getSelectionCount()){var L=m.getSelectionCell(),K=mxEvent.isControlDown(J)?null:m.getIncomingTreeEdges(L);J=[];if(null!=K&&0<K.length&&(K=m.getOutgoingTreeEdges(m.model.getTerminal(K[0],!0)),null!=K))for(var n=0;n<K.length;n++)J.push(m.model.getTerminal(K[n],!1));0==J.length&&(J=m.model.getChildren(m.model.getParent(L)));m.setSelectionCells(J)}},null,null,"Alt+Shift+S");var A=m.removeCells;m.removeCells=function(J,L){L=null!=L?L:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));
-L&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var K=[],n=0;n<J.length;n++){var z=J[n];u.isEdge(z)&&p(z)&&(K.push(z),z=u.getTerminal(z,!1));if(c(z)){var G=[];m.traverse(z,!0,function(M,N){var Q=null!=N&&m.isTreeEdge(N);Q&&G.push(N);(null==N||Q)&&G.push(M);return null==N||Q});0<G.length&&(K=K.concat(G),z=m.getIncomingTreeEdges(J[n]),J=J.concat(z))}else null!=z&&K.push(J[n])}J=K;return A.apply(this,arguments)};k.hoverIcons.getStateAt=function(J,L,K){return c(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(L,
-K))};var I=m.duplicateCells;m.duplicateCells=function(J,L){J=null!=J?J:this.getSelectionCells();for(var K=J.slice(0),n=0;n<K.length;n++){var z=m.view.getState(K[n]);if(null!=z&&c(z.cell)){var G=m.getIncomingTreeEdges(z.cell);for(z=0;z<G.length;z++)mxUtils.remove(G[z],J)}}this.model.beginUpdate();try{var M=I.call(this,J,L);if(M.length==J.length)for(n=0;n<J.length;n++)if(c(J[n])){var N=m.getIncomingTreeEdges(M[n]);G=m.getIncomingTreeEdges(J[n]);if(0==N.length&&0<G.length){var Q=this.cloneCell(G[0]);
-this.addEdge(Q,m.getDefaultParent(),this.model.getTerminal(G[0],!0),M[n])}}}finally{this.model.endUpdate()}return M};var F=m.moveCells;m.moveCells=function(J,L,K,n,z,G,M){for(var N=null,Q=[],S=0;S<J.length;S++)(l(J[S])||c(J[S]))&&!v(J[S])&&this.isCellCollapsed(J[S])?Q=Q.concat(this.getSubtree(J[S])):Q.push(J[S]);J=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=z;var T=this.getCurrentCellStyle(z);if(null!=J&&c(z)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(S=0;S<J.length;S++)if(c(J[S])||
-m.model.isEdge(J[S])&&null==m.model.getTerminal(J[S],!0)){z=m.model.getParent(J[S]);break}if(null!=Q&&z!=Q&&null!=this.view.getState(J[0])){var W=m.getIncomingTreeEdges(J[0]);if(0<W.length){var X=m.view.getState(m.model.getTerminal(W[0],!0));if(null!=X){var Z=m.view.getState(Q);null!=Z&&(L=(Z.getCenterX()-X.getCenterX())/m.view.scale,K=(Z.getCenterY()-X.getCenterY())/m.view.scale)}}}}N=F.apply(this,arguments);if(null!=N&&null!=J&&N.length==J.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(Q)&&
-0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],Q,!0);else if(c(J[S])&&(W=m.getIncomingTreeEdges(J[S]),0<W.length))if(!n)c(Q)&&0>mxUtils.indexOf(J,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==m.getIncomingTreeEdges(N[S]).length){T=Q;if(null==T||T==m.model.getParent(J[S]))T=m.model.getTerminal(W[0],!0);n=this.cloneCell(W[0]);this.addEdge(n,m.getDefaultParent(),T,N[S])}}finally{this.model.endUpdate()}return N};if(null!=k.sidebar){var C=
-k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(J,L,K,n){var z=m.model,G=null;z.beginUpdate();try{if(G=C.apply(this,arguments),c(J))for(var M=0;M<G.length;M++)if(z.isEdge(G[M])&&null==z.getTerminal(G[M],!0)){z.setTerminal(G[M],J,!0);var N=m.getCellGeometry(G[M]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return G}}var P={67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},
-R={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},U=k.onKeyDown;k.onKeyDown=function(J){try{var L=m.getSelectionCell();if(m.isEnabled()&&!m.isEditing()&&null!=L){var K=mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)?P[J.keyCode]:mxEvent.isAltDown(J)?R[J.keyCode]:null;null!=K?(K.funct(J),mxEvent.consume(J)):c(L)&&(K=null,0<m.getIncomingTreeEdges(L).length&&(9==J.which?K=mxEvent.isShiftDown(J)?H(L):B(L):13==J.which&&(K=E(L,!mxEvent.isShiftDown(J)))),null!=K&&0<K.length?(1==K.length&&m.model.isEdge(K[0])?
-m.setSelectionCell(m.model.getTerminal(K[0],!1)):m.setSelectionCell(K[K.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(m.view.getState(L)),m.startEditingAtCell(L),mxEvent.consume(J)):37==J.keyCode?(g(L,mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(g(L,mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(g(L,mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(g(L,mxConstants.DIRECTION_SOUTH),mxEvent.consume(J)))}}catch(n){k.handleError(n)}mxEvent.isConsumed(J)||
-U.apply(this,arguments)};var O=m.connectVertex;m.connectVertex=function(J,L,K,n,z,G,M){var N=m.getIncomingTreeEdges(J);if(c(J)){var Q=t(J),S=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,T=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;return Q==L||0==N.length?B(J,L):S==T?H(J):E(J,L!=mxConstants.DIRECTION_NORTH&&L!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};m.getSubtree=function(J){var L=[J];!l(J)&&!c(J)||v(J)||m.traverse(J,!0,function(K,n){var z=null!=
-n&&m.isTreeEdge(n);z&&0>mxUtils.indexOf(L,n)&&L.push(n);(null==n||z)&&0>mxUtils.indexOf(L,K)&&L.push(K);return null==n||z});return L};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+n.getCurrentCellStyle(J).treeMoving);return L}function p(J){var L=!1;null!=J&&(J=u.getParent(J),L=n.view.getState(J),L="tree"==(null!=L?L.style:n.getCellStyle(J)).containerType);return L}function v(J){var L=!1;null!=J&&(J=u.getParent(J),L=n.view.getState(J),n.view.getState(J),L=null!=(null!=L?L.style:n.getCellStyle(J)).childLayout);return L}function t(J){J=n.view.getState(J);if(null!=J){var L=n.getIncomingTreeEdges(J.cell);if(0<L.length&&(L=n.view.getState(L[0]),null!=L&&(L=L.absolutePoints,null!=
+L&&0<L.length&&(L=L[L.length-1],null!=L)))){if(L.y==J.y&&Math.abs(L.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(L.y==J.y+J.height&&Math.abs(L.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(L.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(J,L){L=null!=L?L:!0;n.model.beginUpdate();try{var K=n.model.getParent(J),m=n.getIncomingTreeEdges(J),z=n.cloneCells([m[0],J]);n.model.setTerminal(z[0],n.model.getTerminal(m[0],
+!0),!0);var F=t(J),M=K.geometry;F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=L?J.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=L?J.geometry.height+10:-z[1].geometry.height-10;n.view.currentRoot!=K&&(z[1].geometry.x-=M.x,z[1].geometry.y-=M.y);var O=n.view.getState(J),Q=n.view.scale;if(null!=O){var S=mxRectangle.fromRectangle(O);F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH?S.x+=(L?J.geometry.width+10:-z[1].geometry.width-10)*Q:S.y+=(L?
+J.geometry.height+10:-z[1].geometry.height-10)*Q;var T=n.getOutgoingTreeEdges(n.model.getTerminal(m[0],!0));if(null!=T){for(var W=F==mxConstants.DIRECTION_SOUTH||F==mxConstants.DIRECTION_NORTH,X=M=m=0;X<T.length;X++){var Z=n.model.getTerminal(T[X],!1);if(F==t(Z)){var Y=n.view.getState(Z);Z!=J&&null!=Y&&(W&&L!=Y.getCenterX()<O.getCenterX()||!W&&L!=Y.getCenterY()<O.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/Q),M=10+Math.max(M,(Math.min(S.y+
+S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/Q))}}W?M=0:m=0;for(X=0;X<T.length;X++)if(Z=n.model.getTerminal(T[X],!1),F==t(Z)&&(Y=n.view.getState(Z),Z!=J&&null!=Y&&(W&&L!=Y.getCenterX()<O.getCenterX()||!W&&L!=Y.getCenterY()<O.getCenterY()))){var ba=[];n.traverse(Y.cell,!0,function(da,ia){var ca=null!=ia&&n.isTreeEdge(ia);ca&&ba.push(ia);(null==ia||ca)&&ba.push(da);return null==ia||ca});n.moveCells(ba,(L?1:-1)*m,(L?1:-1)*M)}}}return n.addCells(z,K)}finally{n.model.endUpdate()}}function H(J){n.model.beginUpdate();
+try{var L=t(J),K=n.getIncomingTreeEdges(J),m=n.cloneCells([K[0],J]);n.model.setTerminal(K[0],m[1],!1);n.model.setTerminal(m[0],m[1],!0);n.model.setTerminal(m[0],J,!1);var z=n.model.getParent(J),F=z.geometry,M=[];n.view.currentRoot!=z&&(m[1].geometry.x-=F.x,m[1].geometry.y-=F.y);n.traverse(J,!0,function(S,T){var W=null!=T&&n.isTreeEdge(T);W&&M.push(T);(null==T||W)&&M.push(S);return null==T||W});var O=J.geometry.width+40,Q=J.geometry.height+40;L==mxConstants.DIRECTION_SOUTH?O=0:L==mxConstants.DIRECTION_NORTH?
+(O=0,Q=-Q):L==mxConstants.DIRECTION_WEST?(O=-O,Q=0):L==mxConstants.DIRECTION_EAST&&(Q=0);n.moveCells(M,O,Q);return n.addCells(m,z)}finally{n.model.endUpdate()}}function B(J,L){n.model.beginUpdate();try{var K=n.model.getParent(J),m=n.getIncomingTreeEdges(J),z=t(J);0==m.length&&(m=[n.createEdge(K,null,"",null,null,n.createCurrentEdgeStyle())],z=L);var F=n.cloneCells([m[0],J]);n.model.setTerminal(F[0],J,!0);null==n.model.getTerminal(F[0],!1)&&(n.model.setTerminal(F[0],F[1],!1),n.applyNewEdgeStyle(F[1],
+[F[0]],z));m=n.getOutgoingTreeEdges(J);var M=K.geometry;L=[];n.view.currentRoot==K&&(M=new mxRectangle);for(var O=0;O<m.length;O++){var Q=n.model.getTerminal(m[O],!1);null!=Q&&L.push(Q)}var S=n.view.getBounds(L),T=n.view.translate,W=n.view.scale;z==mxConstants.DIRECTION_SOUTH?(F[1].geometry.x=null==S?J.geometry.x+(J.geometry.width-F[1].geometry.width)/2:(S.x+S.width)/W-T.x-M.x+10,F[1].geometry.y+=F[1].geometry.height-M.y+40):z==mxConstants.DIRECTION_NORTH?(F[1].geometry.x=null==S?J.geometry.x+(J.geometry.width-
+F[1].geometry.width)/2:(S.x+S.width)/W-T.x+-M.x+10,F[1].geometry.y-=F[1].geometry.height+M.y+40):(F[1].geometry.x=z==mxConstants.DIRECTION_WEST?F[1].geometry.x-(F[1].geometry.width+M.x+40):F[1].geometry.x+(F[1].geometry.width-M.x+40),F[1].geometry.y=null==S?J.geometry.y+(J.geometry.height-F[1].geometry.height)/2:(S.y+S.height)/W-T.y+-M.y+10);return n.addCells(F,K)}finally{n.model.endUpdate()}}function d(J,L,K){J=n.getOutgoingTreeEdges(J);K=n.view.getState(K);var m=[];if(null!=K&&null!=J){for(var z=
+0;z<J.length;z++){var F=n.view.getState(n.model.getTerminal(J[z],!1));null!=F&&(!L&&Math.min(F.x+F.width,K.x+K.width)>=Math.max(F.x,K.x)||L&&Math.min(F.y+F.height,K.y+K.height)>=Math.max(F.y,K.y))&&m.push(F)}m.sort(function(M,O){return L?M.x+M.width-O.x-O.width:M.y+M.height-O.y-O.height})}return m}function g(J,L){var K=t(J),m=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;(K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST)==m&&K!=L?k.actions.get("selectParent").funct():K==
+L?(L=n.getOutgoingTreeEdges(J),null!=L&&0<L.length&&n.setSelectionCell(n.model.getTerminal(L[0],!1))):(K=n.getIncomingTreeEdges(J),null!=K&&0<K.length&&(m=d(n.model.getTerminal(K[0],!0),m,J),J=n.view.getState(J),null!=J&&(J=mxUtils.indexOf(m,J),0<=J&&(J+=L==mxConstants.DIRECTION_NORTH||L==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=m.length-1&&n.setSelectionCell(m[J].cell)))))}var k=this,n=k.editor.graph,u=n.getModel(),x=k.menus.createPopupMenu;k.menus.createPopupMenu=function(J,L,K){x.apply(this,arguments);
+if(1==n.getSelectionCount()){L=n.getSelectionCell();var m=n.getOutgoingTreeEdges(L);J.addSeparator();0<m.length&&(c(n.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,K),this.addMenuItems(J,["selectDescendants"],null,K));c(n.getSelectionCell())?(J.addSeparator(),0<n.getIncomingTreeEdges(L).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,K)):0<n.model.getEdgeCount(L)&&this.addMenuItems(J,["selectConnections"],null,K)}};k.actions.addAction("selectChildren",function(J){if(n.isEnabled()&&
+1==n.getSelectionCount()){var L=n.getSelectionCell();J=mxEvent.isControlDown(J)?null:n.getOutgoingTreeEdges(L);if(null!=J&&0<J.length){L=[];for(var K=0;K<J.length;K++)L.push(n.model.getTerminal(J[K],!1));n.setSelectionCells(L)}else n.setSelectionCells(n.model.getChildren(L))}},null,null,"Alt+Shift+C");k.actions.addAction("selectDescendants",function(J){var L=n.getSelectionCell();if(n.isEnabled()&&null!=L){var K=[];mxEvent.isControlDown(J)||n.traverse(L,!0,function(m,z){var F=null!=z&&n.isTreeEdge(z);
+F&&mxEvent.isControlDown(J)&&K.push(z);(null==z||F)&&K.push(m);return null==z||F});if(0==K.length||1==K.length&&K[0]==L)K=n.model.getDescendants(L);n.setSelectionCells(K)}},null,null,"Alt+Shift+X");k.actions.addAction("selectParent",function(J){var L=n.getSelectionCell();n.isEnabled()&&null!=L&&(J=mxEvent.isControlDown(J)?null:n.getIncomingTreeEdges(L),null!=J&&0<J.length?n.setSelectionCell(n.model.getTerminal(J[0],!0)):n.selectParentCell())},null,null,"Alt+Shift+P");k.actions.addAction("selectSiblings",
+function(J){if(n.isEnabled()&&1==n.getSelectionCount()){var L=n.getSelectionCell(),K=mxEvent.isControlDown(J)?null:n.getIncomingTreeEdges(L);J=[];if(null!=K&&0<K.length&&(K=n.getOutgoingTreeEdges(n.model.getTerminal(K[0],!0)),null!=K))for(var m=0;m<K.length;m++)J.push(n.model.getTerminal(K[m],!1));0==J.length&&(J=n.model.getChildren(n.model.getParent(L)));n.setSelectionCells(J)}},null,null,"Alt+Shift+S");var A=n.removeCells;n.removeCells=function(J,L){L=null!=L?L:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));
+L&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var K=[],m=0;m<J.length;m++){var z=J[m];u.isEdge(z)&&p(z)&&(K.push(z),z=u.getTerminal(z,!1));if(c(z)){var F=[];n.traverse(z,!0,function(M,O){var Q=null!=O&&n.isTreeEdge(O);Q&&F.push(O);(null==O||Q)&&F.push(M);return null==O||Q});0<F.length&&(K=K.concat(F),z=n.getIncomingTreeEdges(J[m]),J=J.concat(z))}else null!=z&&K.push(J[m])}J=K;return A.apply(this,arguments)};k.hoverIcons.getStateAt=function(J,L,K){return c(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(L,
+K))};var I=n.duplicateCells;n.duplicateCells=function(J,L){J=null!=J?J:this.getSelectionCells();for(var K=J.slice(0),m=0;m<K.length;m++){var z=n.view.getState(K[m]);if(null!=z&&c(z.cell)){var F=n.getIncomingTreeEdges(z.cell);for(z=0;z<F.length;z++)mxUtils.remove(F[z],J)}}this.model.beginUpdate();try{var M=I.call(this,J,L);if(M.length==J.length)for(m=0;m<J.length;m++)if(c(J[m])){var O=n.getIncomingTreeEdges(M[m]);F=n.getIncomingTreeEdges(J[m]);if(0==O.length&&0<F.length){var Q=this.cloneCell(F[0]);
+this.addEdge(Q,n.getDefaultParent(),this.model.getTerminal(F[0],!0),M[m])}}}finally{this.model.endUpdate()}return M};var G=n.moveCells;n.moveCells=function(J,L,K,m,z,F,M){for(var O=null,Q=[],S=0;S<J.length;S++)(l(J[S])||c(J[S]))&&!v(J[S])&&this.isCellCollapsed(J[S])?Q=Q.concat(this.getSubtree(J[S])):Q.push(J[S]);J=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=z;var T=this.getCurrentCellStyle(z);if(null!=J&&c(z)&&"1"==mxUtils.getValue(T,"treeFolding","0")){for(S=0;S<J.length;S++)if(c(J[S])||
+n.model.isEdge(J[S])&&null==n.model.getTerminal(J[S],!0)){z=n.model.getParent(J[S]);break}if(null!=Q&&z!=Q&&null!=this.view.getState(J[0])){var W=n.getIncomingTreeEdges(J[0]);if(0<W.length){var X=n.view.getState(n.model.getTerminal(W[0],!0));if(null!=X){var Z=n.view.getState(Q);null!=Z&&(L=(Z.getCenterX()-X.getCenterX())/n.view.scale,K=(Z.getCenterY()-X.getCenterY())/n.view.scale)}}}}O=G.apply(this,arguments);if(null!=O&&null!=J&&O.length==J.length)for(S=0;S<O.length;S++)if(this.model.isEdge(O[S]))c(Q)&&
+0>mxUtils.indexOf(O,this.model.getTerminal(O[S],!0))&&this.model.setTerminal(O[S],Q,!0);else if(c(J[S])&&(W=n.getIncomingTreeEdges(J[S]),0<W.length))if(!m)c(Q)&&0>mxUtils.indexOf(J,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==n.getIncomingTreeEdges(O[S]).length){T=Q;if(null==T||T==n.model.getParent(J[S]))T=n.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,n.getDefaultParent(),T,O[S])}}finally{this.model.endUpdate()}return O};if(null!=k.sidebar){var C=
+k.sidebar.dropAndConnect;k.sidebar.dropAndConnect=function(J,L,K,m){var z=n.model,F=null;z.beginUpdate();try{if(F=C.apply(this,arguments),c(J))for(var M=0;M<F.length;M++)if(z.isEdge(F[M])&&null==z.getTerminal(F[M],!0)){z.setTerminal(F[M],J,!0);var O=n.getCellGeometry(F[M]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return F}}var P={67:k.actions.get("selectChildren"),88:k.actions.get("selectDescendants"),80:k.actions.get("selectParent"),83:k.actions.get("selectSiblings")},
+R={67:k.actions.get("copyStyle"),86:k.actions.get("pasteStyle")},U=k.onKeyDown;k.onKeyDown=function(J){try{var L=n.getSelectionCell();if(n.isEnabled()&&!n.isEditing()&&null!=L){var K=mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)?P[J.keyCode]:mxEvent.isAltDown(J)?R[J.keyCode]:null;null!=K?(K.funct(J),mxEvent.consume(J)):c(L)&&(K=null,0<n.getIncomingTreeEdges(L).length&&(9==J.which?K=mxEvent.isShiftDown(J)?H(L):B(L):13==J.which&&(K=E(L,!mxEvent.isShiftDown(J)))),null!=K&&0<K.length?(1==K.length&&n.model.isEdge(K[0])?
+n.setSelectionCell(n.model.getTerminal(K[0],!1)):n.setSelectionCell(K[K.length-1]),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(L)),n.startEditingAtCell(L),mxEvent.consume(J)):37==J.keyCode?(g(L,mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(g(L,mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(g(L,mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(g(L,mxConstants.DIRECTION_SOUTH),mxEvent.consume(J)))}}catch(m){k.handleError(m)}mxEvent.isConsumed(J)||
+U.apply(this,arguments)};var N=n.connectVertex;n.connectVertex=function(J,L,K,m,z,F,M){var O=n.getIncomingTreeEdges(J);if(c(J)){var Q=t(J),S=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,T=L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST;return Q==L||0==O.length?B(J,L):S==T?H(J):E(J,L!=mxConstants.DIRECTION_NORTH&&L!=mxConstants.DIRECTION_WEST)}return N.apply(this,arguments)};n.getSubtree=function(J){var L=[J];!l(J)&&!c(J)||v(J)||n.traverse(J,!0,function(K,m){var z=null!=
+m&&n.isTreeEdge(m);z&&0>mxUtils.indexOf(L,m)&&L.push(m);(null==m||z)&&0>mxUtils.indexOf(L,K)&&L.push(K);return null==m||z});return L};var V=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){V.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=
mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;k.hoverIcons.reset();mxEvent.consume(J)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:
0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var D=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,L){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=
@@ -14542,8 +14541,8 @@ return p.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.
t.vertex=!0;var E=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');E.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
H.geometry.relative=!0;H.edge=!0;t.insertEdge(H,!0);E.insertEdge(H,!1);var B=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
B.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),H.style);d.geometry.relative=!0;d.edge=!0;t.insertEdge(d,!0);B.insertEdge(d,!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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),H.style);k.geometry.relative=!0;k.edge=!0;t.insertEdge(k,!0);g.insertEdge(k,!1);var m=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-m.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),H.style);u.geometry.relative=!0;u.edge=!0;t.insertEdge(u,!0);m.insertEdge(u,!1);v.insert(H);v.insert(d);v.insert(k);v.insert(u);v.insert(t);v.insert(E);v.insert(B);v.insert(g);v.insert(m);return p.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var v=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),H.style);k.geometry.relative=!0;k.edge=!0;t.insertEdge(k,!0);g.insertEdge(k,!1);var n=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+n.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),H.style);u.geometry.relative=!0;u.edge=!0;t.insertEdge(u,!0);n.insertEdge(u,!1);v.insert(H);v.insert(d);v.insert(k);v.insert(u);v.insert(t);v.insert(E);v.insert(B);v.insert(g);v.insert(n);return p.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var v=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
v.vertex=!0;return p.createVertexTemplateFromCells([v],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var v=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
v.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");t.geometry.setTerminalPoint(new mxPoint(-40,40),!0);t.geometry.relative=!0;t.edge=!0;v.insertEdge(t,!1);return p.createVertexTemplateFromCells([v,t],v.geometry.width,v.geometry.height,v.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var v=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');v.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
@@ -14565,76 +14564,76 @@ function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var c=E
function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var p=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();p.apply(this,arguments)};var v=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){v.apply(this,
arguments);if(B){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=d&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=d&&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 t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,
arguments);var B=this.editorUi;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action("plantUml...",function(){var k=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(k.container,620,420,!0,!1);k.init()}));B.actions.put("mermaid",new Action("mermaid...",function(){var k=new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(k.container,620,420,!0,!1);k.init()}));var d="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-g=function(k,m,u,x){k.addItem(u,null,mxUtils.bind(this,function(){var A=new CreateGraphDialog(B,u,x);B.showDialog(A.container,620,420,!0,!1);A.init()}),m)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,m){for(var u=0;u<d.length;u++)"-"==d[u]?k.addSeparator(m):g(k,m,mxResources.get(d[u])+"...",d[u])})))};EditorUi.prototype.installFormatToolbar=function(B){var d=this.editor.graph,g=document.createElement("div");g.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%;";
-d.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,m){0<d.getSelectionCount()?(B.appendChild(g),g.innerHTML="Selected: "+d.getSelectionCount()):null!=g.parentNode&&g.parentNode.removeChild(g)}))};var E=!1;EditorUi.prototype.initFormatWindow=function(){if(!E&&null!=this.formatWindow){E=!0;var B=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width=
+g=function(k,n,u,x){k.addItem(u,null,mxUtils.bind(this,function(){var A=new CreateGraphDialog(B,u,x);B.showDialog(A.container,620,420,!0,!1);A.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,n){for(var u=0;u<d.length;u++)"-"==d[u]?k.addSeparator(n):g(k,n,mxResources.get(d[u])+"...",d[u])})))};EditorUi.prototype.installFormatToolbar=function(B){var d=this.editor.graph,g=document.createElement("div");g.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%;";
+d.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,n){0<d.getSelectionCount()?(B.appendChild(g),g.innerHTML="Selected: "+d.getSelectionCount()):null!=g.parentNode&&g.parentNode.removeChild(g)}))};var E=!1;EditorUi.prototype.initFormatWindow=function(){if(!E&&null!=this.formatWindow){E=!0;var B=this.formatWindow.window.toggleMinimized,d=240;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(d=parseInt(this.div.style.width),this.div.style.width=
"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+d-140+"px"):(this.div.style.width=d+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-d+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(g){mxEvent.getSource(g)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var H=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function B(z,G,M){var N=u.menus.get(z);G=I.addMenu(mxResources.get(z),mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));G.className="geButton";G.setAttribute("title",mxResources.get(z));u.menus.menuCreated(N,G,"geButton");null!=M&&(G.style.backgroundImage="url("+M+")",G.innerText="");return G}function d(z,G,M,N,Q,S){var T=document.createElement("a");T.className="geButton";A.appendChild(T);null!=S?T.style.backgroundImage="url("+S+")":mxUtils.write(T,z);mxEvent.addListener(T,
-"click",function(W){"disabled"!=T.getAttribute("disabled")&&G(W);mxEvent.consume(W)});mxEvent.preventDefault(T);null!=N&&T.setAttribute("title",N);null!=Q&&(z=function(){Q.isEnabled()?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")},Q.addListener("stateChanged",z),x.addListener("enabledChanged",z),z());return T}function g(z,G,M){G=document.createElement("div");G.className="geButtonGroup";for(M=0;M<z.length;M++)null!=z[M]&&G.appendChild(z[M]);A.appendChild(G);return G}function k(){f=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.innerHTML="";var z=1E3>f,G=B("diagram",null,z?Editor.menuImage:null);g([G,d(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),z?Editor.shapesImage:null),d(mxResources.get("format"),u.actions.get("format").funct,null,mxResources.get("format")+" ("+u.actions.get("format").shortcut+")",u.actions.get("image"),z?Editor.formatImage:null)]);G=B("insert",!0,
-z?U:null);g([G,d(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),z?Editor.trashImage:null)]);x.isEnabled()||G.setAttribute("disabled","disabled");L.setAttribute("title",mxResources.get("undo")+" ("+D.shortcut+")");K.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");n.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=f&&(g([L,K]),520<=f&&g([n,640<=f?d("",q.funct,!0,mxResources.get("zoomIn")+" ("+
-Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=f?d("",y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",y,Editor.zoomOutImage):null]));A.appendChild(u.statusContainer);A.appendChild(u.buttonContainer)}H.apply(this,arguments);var m=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=m&&(m.classList.add("geSimple"),m.classList.add("geMinimal"),m.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
+function(){function B(z,F,M){var O=u.menus.get(z);F=I.addMenu(mxResources.get(z),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));F.className="geButton";F.setAttribute("title",mxResources.get(z));u.menus.menuCreated(O,F,"geButton");null!=M&&(F.style.backgroundImage="url("+M+")",F.innerText="");return F}function d(z,F,M,O,Q,S){var T=document.createElement("a");T.className="geButton";A.appendChild(T);null!=S?T.style.backgroundImage="url("+S+")":mxUtils.write(T,z);mxEvent.addListener(T,
+"click",function(W){"disabled"!=T.getAttribute("disabled")&&F(W);mxEvent.consume(W)});mxEvent.preventDefault(T);null!=O&&T.setAttribute("title",O);null!=Q&&(z=function(){Q.isEnabled()?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")},Q.addListener("stateChanged",z),x.addListener("enabledChanged",z),z());return T}function g(z,F,M){F=document.createElement("div");F.className="geButtonGroup";for(M=0;M<z.length;M++)null!=z[M]&&F.appendChild(z[M]);A.appendChild(F);return F}function k(){f=
+window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;A.innerHTML="";var z=1E3>f,F=B("diagram",null,z?Editor.menuImage:null);g([F,d(mxResources.get("shapes"),u.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),u.actions.get("image"),z?Editor.shapesImage:null),d(mxResources.get("format"),u.actions.get("format").funct,null,mxResources.get("format")+" ("+u.actions.get("format").shortcut+")",u.actions.get("image"),z?Editor.formatImage:null)]);F=B("insert",!0,
+z?U:null);g([F,d(mxResources.get("delete"),u.actions.get("delete").funct,null,mxResources.get("delete"),u.actions.get("delete"),z?Editor.trashImage:null)]);x.isEnabled()||F.setAttribute("disabled","disabled");L.setAttribute("title",mxResources.get("undo")+" ("+D.shortcut+")");K.setAttribute("title",mxResources.get("redo")+" ("+J.shortcut+")");m.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=f&&(g([L,K]),520<=f&&g([m,640<=f?d("",q.funct,!0,mxResources.get("zoomIn")+" ("+
+Editor.ctrlKey+" +)",q,Editor.zoomInImage):null,640<=f?d("",y.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",y,Editor.zoomOutImage):null]));A.appendChild(u.statusContainer);A.appendChild(u.buttonContainer)}H.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),n.classList.add("geMinimal"),n.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
if(1E3<=f||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=f&&(b(this,!0),this.formatWindow.window.setVisible(!0));var u=this,x=u.editor.graph;u.toolbar=this.createToolbar(u.createDiv("geToolbar"));var A=document.createElement("div");A.className="geMenubarContainer";
-var I=new Menubar(u,A),F=u.hideCurrentMenu;u.hideCurrentMenu=function(){F.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var C=u.descriptorChanged;u.descriptorChanged=function(){C.apply(this,arguments);var z=u.getCurrentFile();if(null!=z&&null!=z.getTitle()){var G=z.getMode();"google"==G?G="googleDrive":"github"==G?G="gitHub":"gitlab"==G?G="gitLab":"onedrive"==G&&(G="oneDrive");G=mxResources.get(G);A.setAttribute("title",z.getTitle()+(null!=G?" ("+G+")":""))}else A.removeAttribute("title")};
-u.setStatusText(u.editor.getStatus());A.appendChild(u.statusContainer);u.buttonContainer=this.createButtonContainer();A.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=this.createTabContainer();var P=this.createZoomInput(!0),R=u.updateTabContainer;u.updateTabContainer=function(){R.apply(this,arguments);u.tabContainer.appendChild(P)};var U=Editor.addBoxImage;if(null!=u.hoverIcons){var O=u.hoverIcons.update;u.hoverIcons.update=function(){x.freehand.isDrawing()||O.apply(this,
-arguments)}}if(null!=x.freehand){var V=x.freehand.createStyle;x.freehand.createStyle=function(z){return V.apply(this,arguments)+"sketch=0;"}}u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));u.setStatusText(u.editor.getStatus());var q=u.actions.get("zoomIn"),y=u.actions.get("zoomOut");m=u.actions.get("resetView");var D=u.actions.get("undo"),J=u.actions.get("redo"),L=d("",D.funct,null,"",D,Editor.undoImage),K=d("",J.funct,null,"",J,Editor.redoImage),
-n=d("",function(z){mxEvent.isAltDown(z)?(u.hideCurrentMenu(),u.actions.get("customZoom").funct()):(u.hideCurrentMenu(),u.actions.get("smartFit").funct());mxEvent.consume(z)},!0,"",m,Editor.zoomFitImage);u.container.appendChild(u.tabContainer);u.container.appendChild(A);u.updateTabContainer();!EditorUi.windowed&&1E3<=f&&b(this,!0);k();u.addListener("lockedChanged",k);u.addListener("languageChanged",k);u.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,"resize",function(){k();
+var I=new Menubar(u,A),G=u.hideCurrentMenu;u.hideCurrentMenu=function(){G.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var C=u.descriptorChanged;u.descriptorChanged=function(){C.apply(this,arguments);var z=u.getCurrentFile();if(null!=z&&null!=z.getTitle()){var F=z.getMode();"google"==F?F="googleDrive":"github"==F?F="gitHub":"gitlab"==F?F="gitLab":"onedrive"==F&&(F="oneDrive");F=mxResources.get(F);A.setAttribute("title",z.getTitle()+(null!=F?" ("+F+")":""))}else A.removeAttribute("title")};
+u.setStatusText(u.editor.getStatus());A.appendChild(u.statusContainer);u.buttonContainer=this.createButtonContainer();A.appendChild(u.buttonContainer);u.menubarContainer=u.buttonContainer;u.tabContainer=this.createTabContainer();var P=this.createZoomInput(!0),R=u.updateTabContainer;u.updateTabContainer=function(){R.apply(this,arguments);u.tabContainer.appendChild(P)};var U=Editor.addBoxImage;if(null!=u.hoverIcons){var N=u.hoverIcons.update;u.hoverIcons.update=function(){x.freehand.isDrawing()||N.apply(this,
+arguments)}}if(null!=x.freehand){var V=x.freehand.createStyle;x.freehand.createStyle=function(z){return V.apply(this,arguments)+"sketch=0;"}}u.editor.addListener("statusChanged",mxUtils.bind(this,function(){u.setStatusText(u.editor.getStatus())}));u.setStatusText(u.editor.getStatus());var q=u.actions.get("zoomIn"),y=u.actions.get("zoomOut");n=u.actions.get("resetView");var D=u.actions.get("undo"),J=u.actions.get("redo"),L=d("",D.funct,null,"",D,Editor.undoImage),K=d("",J.funct,null,"",J,Editor.redoImage),
+m=d("",function(z){mxEvent.isAltDown(z)?(u.hideCurrentMenu(),u.actions.get("customZoom").funct()):(u.hideCurrentMenu(),u.actions.get("smartFit").funct());mxEvent.consume(z)},!0,"",n,Editor.zoomFitImage);u.container.appendChild(u.tabContainer);u.container.appendChild(A);u.updateTabContainer();!EditorUi.windowed&&1E3<=f&&b(this,!0);k();u.addListener("lockedChanged",k);u.addListener("languageChanged",k);u.editor.graph.addListener("enabledChanged",k);mxEvent.addListener(window,"resize",function(){k();
null!=u.sidebarWindow&&u.sidebarWindow.window.fit();null!=u.formatWindow&&u.formatWindow.window.fit();null!=u.actions.outlineWindow&&u.actions.outlineWindow.window.fit();null!=u.actions.layersWindow&&u.actions.layersWindow.window.fit();null!=u.menus.chatWindow&&u.menus.chatWindow.window.fit();null!=u.menus.tagsWindow&&u.menus.tagsWindow.window.fit();null!=u.menus.findWindow&&u.menus.findWindow.window.fit();null!=u.menus.findReplaceWindow&&u.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,p,v){var t=l.y,E=l.x,H=!1,B=!1;if(null!=this.states&&null!=c&&null!=l){var d=this,g=new mxCellState,k=this.graph.getView().scale,m=Math.max(2,this.getGuideTolerance()/2);g.x=c.x+E;g.y=c.y+t;g.width=c.width;g.height=c.height;for(var u=[],x=[],A=0;A<this.states.length;A++){var I=this.states[A];I instanceof mxCellState&&(v||!this.graph.isCellSelected(I.cell))&&((g.x>=I.x&&g.x<=I.x+I.width||I.x>=g.x&&I.x<=g.x+g.width)&&(g.y>
-I.y+I.height+4||g.y+g.height+4<I.y)?u.push(I):(g.y>=I.y&&g.y<=I.y+I.height||I.y>=g.y&&I.y<=g.y+g.height)&&(g.x>I.x+I.width+4||g.x+g.width+4<I.x)&&x.push(I))}var F=0,C=0,P=I=0,R=0,U=0,O=0,V=0,q=5*k;if(1<u.length){u.push(g);u.sort(function(L,K){return L.y-K.y});var y=!1;A=g==u[0];k=g==u[u.length-1];if(!A&&!k)for(A=1;A<u.length-1;A++)if(g==u[A]){k=u[A-1];A=u[A+1];I=C=P=(A.y-k.y-k.height-g.height)/2;break}for(A=0;A<u.length-1;A++){k=u[A];var D=u[A+1],J=g==k||g==D;D=D.y-k.y-k.height;y|=g==k;if(0==C&&0==
-F)C=D,F=1;else if(Math.abs(C-D)<=(J||1==A&&y?m:0))F+=1;else if(1<F&&y){u=u.slice(0,A+1);break}else if(3<=u.length-A&&!y)F=0,I=C=0!=P?P:0,u.splice(0,0==A?1:A),A=-1;else break;0!=I||J||(C=I=D)}3==u.length&&u[1]==g&&(I=0)}if(1<x.length){x.push(g);x.sort(function(L,K){return L.x-K.x});y=!1;A=g==x[0];k=g==x[x.length-1];if(!A&&!k)for(A=1;A<x.length-1;A++)if(g==x[A]){k=x[A-1];A=x[A+1];O=U=V=(A.x-k.x-k.width-g.width)/2;break}for(A=0;A<x.length-1;A++){k=x[A];D=x[A+1];J=g==k||g==D;D=D.x-k.x-k.width;y|=g==k;
-if(0==U&&0==R)U=D,R=1;else if(Math.abs(U-D)<=(J||1==A&&y?m:0))R+=1;else if(1<R&&y){x=x.slice(0,A+1);break}else if(3<=x.length-A&&!y)R=0,O=U=0!=V?V:0,x.splice(0,0==A?1:A),A=-1;else break;0!=O||J||(U=O=D)}3==x.length&&x[1]==g&&(O=0)}m=function(L,K,n,z){var G=[];if(z){z=q;var M=0}else z=0,M=q;G.push(new mxPoint(L.x-z,L.y-M));G.push(new mxPoint(L.x+z,L.y+M));G.push(L);G.push(K);G.push(new mxPoint(K.x-z,K.y-M));G.push(new mxPoint(K.x+z,K.y+M));if(null!=n)return n.points=G,n;L=new mxPolyline(G,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);L.dialect=mxConstants.DIALECT_SVG;L.pointerEvents=!1;L.init(d.graph.getView().getOverlayPane());return L};U=function(L,K){if(L&&null!=d.guidesArrHor)for(L=0;L<d.guidesArrHor.length;L++)d.guidesArrHor[L].node.style.visibility="hidden";if(K&&null!=d.guidesArrVer)for(L=0;L<d.guidesArrVer.length;L++)d.guidesArrVer[L].node.style.visibility="hidden"};if(1<R&&R==x.length-1){R=[];V=d.guidesArrHor;H=[];E=0;A=x[0]==g?1:0;y=x[A].y+x[A].height;if(0<O)for(A=0;A<x.length-1;A++)k=
-x[A],D=x[A+1],g==k?(E=D.x-k.width-O,H.push(new mxPoint(E+k.width+q,y)),H.push(new mxPoint(D.x-q,y))):g==D?(H.push(new mxPoint(k.x+k.width+q,y)),E=k.x+k.width+O,H.push(new mxPoint(E-q,y))):(H.push(new mxPoint(k.x+k.width+q,y)),H.push(new mxPoint(D.x-q,y)));else k=x[0],A=x[2],E=k.x+k.width+(A.x-k.x-k.width-g.width)/2,H.push(new mxPoint(k.x+k.width+q,y)),H.push(new mxPoint(E-q,y)),H.push(new mxPoint(E+g.width+q,y)),H.push(new mxPoint(A.x-q,y));for(A=0;A<H.length;A+=2)x=H[A],O=H[A+1],x=m(x,O,null!=V?
-V[A/2]:null),x.node.style.visibility="visible",x.redraw(),R.push(x);for(A=H.length/2;null!=V&&A<V.length;A++)V[A].destroy();d.guidesArrHor=R;E-=c.x;H=!0}else U(!0);if(1<F&&F==u.length-1){R=[];V=d.guidesArrVer;B=[];t=0;A=u[0]==g?1:0;F=u[A].x+u[A].width;if(0<I)for(A=0;A<u.length-1;A++)k=u[A],D=u[A+1],g==k?(t=D.y-k.height-I,B.push(new mxPoint(F,t+k.height+q)),B.push(new mxPoint(F,D.y-q))):g==D?(B.push(new mxPoint(F,k.y+k.height+q)),t=k.y+k.height+I,B.push(new mxPoint(F,t-q))):(B.push(new mxPoint(F,k.y+
-k.height+q)),B.push(new mxPoint(F,D.y-q)));else k=u[0],A=u[2],t=k.y+k.height+(A.y-k.y-k.height-g.height)/2,B.push(new mxPoint(F,k.y+k.height+q)),B.push(new mxPoint(F,t-q)),B.push(new mxPoint(F,t+g.height+q)),B.push(new mxPoint(F,A.y-q));for(A=0;A<B.length;A+=2)x=B[A],O=B[A+1],x=m(x,O,null!=V?V[A/2]:null,!0),x.node.style.visibility="visible",x.redraw(),R.push(x);for(A=B.length/2;null!=V&&A<V.length;A++)V[A].destroy();d.guidesArrVer=R;t-=c.y;B=!0}else U(!1,!0)}if(H||B)return g=new mxPoint(E,t),u=b.call(this,
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,p,v){var t=l.y,E=l.x,H=!1,B=!1;if(null!=this.states&&null!=c&&null!=l){var d=this,g=new mxCellState,k=this.graph.getView().scale,n=Math.max(2,this.getGuideTolerance()/2);g.x=c.x+E;g.y=c.y+t;g.width=c.width;g.height=c.height;for(var u=[],x=[],A=0;A<this.states.length;A++){var I=this.states[A];I instanceof mxCellState&&(v||!this.graph.isCellSelected(I.cell))&&((g.x>=I.x&&g.x<=I.x+I.width||I.x>=g.x&&I.x<=g.x+g.width)&&(g.y>
+I.y+I.height+4||g.y+g.height+4<I.y)?u.push(I):(g.y>=I.y&&g.y<=I.y+I.height||I.y>=g.y&&I.y<=g.y+g.height)&&(g.x>I.x+I.width+4||g.x+g.width+4<I.x)&&x.push(I))}var G=0,C=0,P=I=0,R=0,U=0,N=0,V=0,q=5*k;if(1<u.length){u.push(g);u.sort(function(L,K){return L.y-K.y});var y=!1;A=g==u[0];k=g==u[u.length-1];if(!A&&!k)for(A=1;A<u.length-1;A++)if(g==u[A]){k=u[A-1];A=u[A+1];I=C=P=(A.y-k.y-k.height-g.height)/2;break}for(A=0;A<u.length-1;A++){k=u[A];var D=u[A+1],J=g==k||g==D;D=D.y-k.y-k.height;y|=g==k;if(0==C&&0==
+G)C=D,G=1;else if(Math.abs(C-D)<=(J||1==A&&y?n:0))G+=1;else if(1<G&&y){u=u.slice(0,A+1);break}else if(3<=u.length-A&&!y)G=0,I=C=0!=P?P:0,u.splice(0,0==A?1:A),A=-1;else break;0!=I||J||(C=I=D)}3==u.length&&u[1]==g&&(I=0)}if(1<x.length){x.push(g);x.sort(function(L,K){return L.x-K.x});y=!1;A=g==x[0];k=g==x[x.length-1];if(!A&&!k)for(A=1;A<x.length-1;A++)if(g==x[A]){k=x[A-1];A=x[A+1];N=U=V=(A.x-k.x-k.width-g.width)/2;break}for(A=0;A<x.length-1;A++){k=x[A];D=x[A+1];J=g==k||g==D;D=D.x-k.x-k.width;y|=g==k;
+if(0==U&&0==R)U=D,R=1;else if(Math.abs(U-D)<=(J||1==A&&y?n:0))R+=1;else if(1<R&&y){x=x.slice(0,A+1);break}else if(3<=x.length-A&&!y)R=0,N=U=0!=V?V:0,x.splice(0,0==A?1:A),A=-1;else break;0!=N||J||(U=N=D)}3==x.length&&x[1]==g&&(N=0)}n=function(L,K,m,z){var F=[];if(z){z=q;var M=0}else z=0,M=q;F.push(new mxPoint(L.x-z,L.y-M));F.push(new mxPoint(L.x+z,L.y+M));F.push(L);F.push(K);F.push(new mxPoint(K.x-z,K.y-M));F.push(new mxPoint(K.x+z,K.y+M));if(null!=m)return m.points=F,m;L=new mxPolyline(F,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);L.dialect=mxConstants.DIALECT_SVG;L.pointerEvents=!1;L.init(d.graph.getView().getOverlayPane());return L};U=function(L,K){if(L&&null!=d.guidesArrHor)for(L=0;L<d.guidesArrHor.length;L++)d.guidesArrHor[L].node.style.visibility="hidden";if(K&&null!=d.guidesArrVer)for(L=0;L<d.guidesArrVer.length;L++)d.guidesArrVer[L].node.style.visibility="hidden"};if(1<R&&R==x.length-1){R=[];V=d.guidesArrHor;H=[];E=0;A=x[0]==g?1:0;y=x[A].y+x[A].height;if(0<N)for(A=0;A<x.length-1;A++)k=
+x[A],D=x[A+1],g==k?(E=D.x-k.width-N,H.push(new mxPoint(E+k.width+q,y)),H.push(new mxPoint(D.x-q,y))):g==D?(H.push(new mxPoint(k.x+k.width+q,y)),E=k.x+k.width+N,H.push(new mxPoint(E-q,y))):(H.push(new mxPoint(k.x+k.width+q,y)),H.push(new mxPoint(D.x-q,y)));else k=x[0],A=x[2],E=k.x+k.width+(A.x-k.x-k.width-g.width)/2,H.push(new mxPoint(k.x+k.width+q,y)),H.push(new mxPoint(E-q,y)),H.push(new mxPoint(E+g.width+q,y)),H.push(new mxPoint(A.x-q,y));for(A=0;A<H.length;A+=2)x=H[A],N=H[A+1],x=n(x,N,null!=V?
+V[A/2]:null),x.node.style.visibility="visible",x.redraw(),R.push(x);for(A=H.length/2;null!=V&&A<V.length;A++)V[A].destroy();d.guidesArrHor=R;E-=c.x;H=!0}else U(!0);if(1<G&&G==u.length-1){R=[];V=d.guidesArrVer;B=[];t=0;A=u[0]==g?1:0;G=u[A].x+u[A].width;if(0<I)for(A=0;A<u.length-1;A++)k=u[A],D=u[A+1],g==k?(t=D.y-k.height-I,B.push(new mxPoint(G,t+k.height+q)),B.push(new mxPoint(G,D.y-q))):g==D?(B.push(new mxPoint(G,k.y+k.height+q)),t=k.y+k.height+I,B.push(new mxPoint(G,t-q))):(B.push(new mxPoint(G,k.y+
+k.height+q)),B.push(new mxPoint(G,D.y-q)));else k=u[0],A=u[2],t=k.y+k.height+(A.y-k.y-k.height-g.height)/2,B.push(new mxPoint(G,k.y+k.height+q)),B.push(new mxPoint(G,t-q)),B.push(new mxPoint(G,t+g.height+q)),B.push(new mxPoint(G,A.y-q));for(A=0;A<B.length;A+=2)x=B[A],N=B[A+1],x=n(x,N,null!=V?V[A/2]:null,!0),x.node.style.visibility="visible",x.redraw(),R.push(x);for(A=B.length/2;null!=V&&A<V.length;A++)V[A].destroy();d.guidesArrVer=R;t-=c.y;B=!0}else U(!1,!0)}if(H||B)return g=new mxPoint(E,t),u=b.call(this,
c,g,p,v),H&&!B?g.y=u.y:B&&!H&&(g.x=u.x),u.y!=g.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),u.x!=g.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),g;U(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,p=this.guidesArrHor;if(null!=l)for(var v=0;v<l.length;v++)l[v].node.style.visibility=c?"visible":"hidden";if(null!=
-p)for(v=0;v<p.length;v++)p[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var p=0;p<c.length;p++)c[p].destroy();this.guidesArrVer=null}if(null!=l){for(p=0;p<l.length;p++)l[p].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var F=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-F.y+"px";d.style.left=C.offsetLeft-F.x+"px";d.style.width=(f?0:C.offsetWidth)+E+"px";d.style.height=(f?C.offsetHeight:0)+E+"px"}function p(F,C,P){if(null!=v)return F;var R;return function(){var U=this,O=arguments,V=P&&!R;clearTimeout(R);R=setTimeout(function(){R=null;P||F.apply(U,O)},C);V&&F.apply(U,O)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+p)for(v=0;v<p.length;v++)p[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var p=0;p<c.length;p++)c[p].destroy();this.guidesArrVer=null}if(null!=l){for(p=0;p<l.length;p++)l[p].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var G=b.getDiagramContainerOffset(),C=b.diagramContainer;d.style.top=C.offsetTop-G.y+"px";d.style.left=C.offsetLeft-G.x+"px";d.style.width=(f?0:C.offsetWidth)+E+"px";d.style.height=(f?C.offsetHeight:0)+E+"px"}function p(G,C,P){if(null!=v)return G;var R;return function(){var U=this,N=arguments,V=P&&!R;clearTimeout(R);R=setTimeout(function(){R=null;P||G.apply(U,N)},C);V&&G.apply(U,N)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
window.msRequestAnimationFrame,t=window.cancelAnimationFrame||window.mozCancelAnimationFrame,E=this.RULER_THICKNESS,H=this;this.unit=e;var B=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},d=document.createElement("div");d.className="geRuler";d.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){B=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[f?"borderRight":"borderBottom"]="0.5px solid "+B.strokeClr;d.style.borderLeft="0.5px solid "+B.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(F){H.editorUiRefresh.apply(b,
-arguments);l()};l();var g=document.createElement("canvas");g.width=d.offsetWidth;g.height=d.offsetHeight;d.style.overflow="hidden";g.style.position="relative";d.appendChild(g);var k=g.getContext("2d");this.ui=b;var m=b.editor.graph;this.graph=m;this.container=d;this.canvas=g;var u=function(F,C,P,R,U){F=Math.round(F);C=Math.round(C);P=Math.round(P);R=Math.round(R);k.beginPath();k.moveTo(F+.5,C+.5);k.lineTo(P+.5,R+.5);k.stroke();U&&(f?(k.save(),k.translate(F,C),k.rotate(-Math.PI/2),k.fillText(U,0,0),
-k.restore()):k.fillText(U,F,C))},x=function(){k.clearRect(0,0,g.width,g.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=B.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var F=m.view.scale,C=m.view.getBackgroundPageBounds(),P=m.view.translate,R=m.pageVisible;P=R?E+(f?C.y-m.container.scrollTop:C.x-m.container.scrollLeft):E+(f?P.y*F-m.container.scrollTop:P.x*F-m.container.scrollLeft);var U=0;R&&(U=m.getPageLayout(),U=f?U.y*m.pageFormat.height:U.x*m.pageFormat.width);var O;switch(H.unit){case mxConstants.POINTS:var V=
-O=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;V=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;V=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=F||4<=F?8:16,V=mxConstants.PIXELS_PER_INCH/O,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=V;2<=F?y=V/(2*Math.floor(F/2)):.5>=F&&(y=V*Math.floor(1/F/2)*(H.unit==mxConstants.MILLIMETERS?2:1));V=null;C=R?Math.min(P+(f?C.height:C.width),f?
-g.height:g.width):f?g.height:g.width;if(R)if(k.fillStyle=B.outBkgClr,f){var D=P-E;0<D&&k.fillRect(0,E,E,D);C<g.height&&k.fillRect(0,C,E,g.height)}else D=P-E,0<D&&k.fillRect(E,0,D,E),C<g.width&&k.fillRect(C,0,g.width,E);k.fillStyle=B.fontClr;for(R=R?P:P%(y*F);R<=C;R+=y*F)if(D=Math.round((R-P)/F/y),!(R<E||D==V)){V=D;var J=null;0==D%O&&(J=H.formatText(U+D*y)+"");f?u(E-q[Math.abs(D)%O],R,E,R,J):u(R,E-q[Math.abs(D)%O],R,E,J)}k.lineWidth=1;u(f?0:E,f?E:0,E,E);k.fillStyle=B.cornerClr;k.fillRect(0,0,E,E)},
-A=-1,I=function(){null!=v?(null!=t&&t(A),A=v(x)):x()};this.drawRuler=I;this.sizeListener=e=p(function(){var F=m.container;f?(F=F.offsetHeight+E,g.height!=F&&(g.height=F,d.style.height=F+"px",I())):(F=F.offsetWidth+E,g.width!=F&&(g.width=F,d.style.width=F+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=p(function(){var F=f?m.container.scrollTop:m.container.scrollLeft;H.lastScroll!=F&&(H.lastScroll=F,I())},10);this.unitListener=function(F,C){H.setUnit(C.getProperty("unit"))};
-m.addListener(mxEvent.SIZE,e);m.container.addEventListener("scroll",c);m.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(F){B=F;d.style.background=B.bkgClr;x()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(F,C,P,R){if(f&&4<F.height||!f&&4<F.width){if(null!=H.guidePart)try{k.putImageData(H.guidePart.imgData1,
-H.guidePart.x1,H.guidePart.y1),k.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),k.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var U=H.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=B.guideClr;k.setLineDash([2]);if(f){var O=F.y+U.y+E-this.graph.container.scrollTop;var V=0;var q=O+F.height/2;var y=E/2;var D=O+F.height;var J=0;var L=k.getImageData(V,O-1,E,3);u(V,O,E,O);O--;var K=k.getImageData(y,q-1,E,3);u(y,q,E,q);q--;var n=k.getImageData(J,
-D-1,E,3);u(J,D,E,D);D--}else O=0,V=F.x+U.x+E-this.graph.container.scrollLeft,q=E/2,y=V+F.width/2,D=0,J=V+F.width,L=k.getImageData(V-1,O,3,E),u(V,O,V,E),V--,K=k.getImageData(y-1,q,3,E),u(y,q,y,E),y--,n=k.getImageData(J-1,D,3,E),u(J,D,J,E),J--;if(null==H.guidePart||H.guidePart.x1!=V||H.guidePart.y1!=O)H.guidePart={imgData1:L,x1:V,y1:O,imgData2:K,x2:y,y2:q,imgData3:n,x3:J,y3:D}}catch(z){}}else U=H.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var F=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{k.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),k.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),k.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(C){}return F}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+function(){B=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};d.style[f?"borderRight":"borderBottom"]="0.5px solid "+B.strokeClr;d.style.borderLeft="0.5px solid "+B.strokeClr});this.updateStyle();b.diagramContainer.appendChild(d);mxEvent.disableContextMenu(d);this.editorUiRefresh=b.refresh;b.refresh=function(G){H.editorUiRefresh.apply(b,
+arguments);l()};l();var g=document.createElement("canvas");g.width=d.offsetWidth;g.height=d.offsetHeight;d.style.overflow="hidden";g.style.position="relative";d.appendChild(g);var k=g.getContext("2d");this.ui=b;var n=b.editor.graph;this.graph=n;this.container=d;this.canvas=g;var u=function(G,C,P,R,U){G=Math.round(G);C=Math.round(C);P=Math.round(P);R=Math.round(R);k.beginPath();k.moveTo(G+.5,C+.5);k.lineTo(P+.5,R+.5);k.stroke();U&&(f?(k.save(),k.translate(G,C),k.rotate(-Math.PI/2),k.fillText(U,0,0),
+k.restore()):k.fillText(U,G,C))},x=function(){k.clearRect(0,0,g.width,g.height);k.beginPath();k.lineWidth=.7;k.strokeStyle=B.strokeClr;k.setLineDash([]);k.font="9px Arial";k.textAlign="center";var G=n.view.scale,C=n.view.getBackgroundPageBounds(),P=n.view.translate,R=n.pageVisible;P=R?E+(f?C.y-n.container.scrollTop:C.x-n.container.scrollLeft):E+(f?P.y*G-n.container.scrollTop:P.x*G-n.container.scrollLeft);var U=0;R&&(U=n.getPageLayout(),U=f?U.y*n.pageFormat.height:U.x*n.pageFormat.width);var N;switch(H.unit){case mxConstants.POINTS:var V=
+N=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:N=10;V=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:N=20;V=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:N=.5>=G||4<=G?8:16,V=mxConstants.PIXELS_PER_INCH/N,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=V;2<=G?y=V/(2*Math.floor(G/2)):.5>=G&&(y=V*Math.floor(1/G/2)*(H.unit==mxConstants.MILLIMETERS?2:1));V=null;C=R?Math.min(P+(f?C.height:C.width),f?
+g.height:g.width):f?g.height:g.width;if(R)if(k.fillStyle=B.outBkgClr,f){var D=P-E;0<D&&k.fillRect(0,E,E,D);C<g.height&&k.fillRect(0,C,E,g.height)}else D=P-E,0<D&&k.fillRect(E,0,D,E),C<g.width&&k.fillRect(C,0,g.width,E);k.fillStyle=B.fontClr;for(R=R?P:P%(y*G);R<=C;R+=y*G)if(D=Math.round((R-P)/G/y),!(R<E||D==V)){V=D;var J=null;0==D%N&&(J=H.formatText(U+D*y)+"");f?u(E-q[Math.abs(D)%N],R,E,R,J):u(R,E-q[Math.abs(D)%N],R,E,J)}k.lineWidth=1;u(f?0:E,f?E:0,E,E);k.fillStyle=B.cornerClr;k.fillRect(0,0,E,E)},
+A=-1,I=function(){null!=v?(null!=t&&t(A),A=v(x)):x()};this.drawRuler=I;this.sizeListener=e=p(function(){var G=n.container;f?(G=G.offsetHeight+E,g.height!=G&&(g.height=G,d.style.height=G+"px",I())):(G=G.offsetWidth+E,g.width!=G&&(g.width=G,d.style.width=G+"px",I()))},10);this.pageListener=function(){I()};this.scrollListener=c=p(function(){var G=f?n.container.scrollTop:n.container.scrollLeft;H.lastScroll!=G&&(H.lastScroll=G,I())},10);this.unitListener=function(G,C){H.setUnit(C.getProperty("unit"))};
+n.addListener(mxEvent.SIZE,e);n.container.addEventListener("scroll",c);n.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(G){B=G;d.style.background=B.bkgClr;x()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(G,C,P,R){if(f&&4<G.height||!f&&4<G.width){if(null!=H.guidePart)try{k.putImageData(H.guidePart.imgData1,
+H.guidePart.x1,H.guidePart.y1),k.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),k.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var U=H.origGuideMove.apply(this,arguments);try{k.lineWidth=.5;k.strokeStyle=B.guideClr;k.setLineDash([2]);if(f){var N=G.y+U.y+E-this.graph.container.scrollTop;var V=0;var q=N+G.height/2;var y=E/2;var D=N+G.height;var J=0;var L=k.getImageData(V,N-1,E,3);u(V,N,E,N);N--;var K=k.getImageData(y,q-1,E,3);u(y,q,E,q);q--;var m=k.getImageData(J,
+D-1,E,3);u(J,D,E,D);D--}else N=0,V=G.x+U.x+E-this.graph.container.scrollLeft,q=E/2,y=V+G.width/2,D=0,J=V+G.width,L=k.getImageData(V-1,N,3,E),u(V,N,V,E),V--,K=k.getImageData(y-1,q,3,E),u(y,q,y,E),y--,m=k.getImageData(J-1,D,3,E),u(J,D,J,E),J--;if(null==H.guidePart||H.guidePart.x1!=V||H.guidePart.y1!=N)H.guidePart={imgData1:L,x1:V,y1:N,imgData2:K,x2:y,y2:q,imgData3:m,x3:J,y3:D}}catch(z){}}else U=H.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var G=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{k.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),k.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),k.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(C){}return G}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(p){l=null!=b.currentMenu;mxEvent.consume(p)}),null,mxUtils.bind(this,function(p){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(p)||mxEvent.isPopupTrigger(p))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var v=new mxPopupMenu(mxUtils.bind(this,function(H,B){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],B)}));v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=!0;v.hideMenu=mxUtils.bind(this,
function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var t=mxEvent.getClientX(p),E=mxEvent.getClientY(p);v.popup(t,E,null,p);b.setCurrentMenu(v,c)}mxEvent.consume(p)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],p,v=[],t,E=!1,H=!0,B=!0,d=!0,g=!0,k=[],m=!1,u=!1,x=!1,A="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},F=!0;this.setClosedPath=function(q){E=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=
-function(q){B=q};this.setAutoScroll=function(q){d=q};this.setOpenFill=function(q){g=q};this.setStopClickEnabled=function(q){u=q};this.setSelectInserted=function(q){x=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){F=q};this.isPerfectFreehandMode=function(){return F};this.setBrushSize=function(q){I.size=q};this.getBrushSize=function(){return I.size};var C=function(q){m=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);
-b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return m};var P=mxUtils.bind(this,function(q){if(c){var y=t.length,D=u&&0<v.length&&null!=t&&2>t.length;D||v.push.apply(v,t);t=[];v.push(null);l.push(c);c=null;(D||B)&&this.stopDrawing();B&&(!D||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=
-A?A:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){A=q};this.createStyle=function(q){var y=";fillColor=none;";F&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(F){for(var q=[],y=0;y<v.length;y++)null!=v[y]&&q.push([v[y].x,
-v[y].y]);q=PerfectFreehand.getStroke(q,I);v=[];for(y=0;y<q.length;y++)v.push({x:q[y][0],y:q[y][1]});v.push(null)}q=v[0].x;var D=v[0].x,J=v[0].y,L=v[0].y;for(y=1;y<v.length;y++)null!=v[y]&&(q=Math.max(q,v[y].x),D=Math.min(D,v[y].x),J=Math.max(J,v[y].y),L=Math.min(L,v[y].y));q-=D;J-=L;if(0<q&&0<J){var K=100/q,n=100/J;v.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-D)*K;Q.y=(Q.y-L)*n;return Q});var z='<shape strokewidth="inherit"><foreground>',G=0;for(y=0;y<v.length;y++){var M=v[y];if(null==M){M=!1;G=
-v[G];var N=v[y-1];!E&&H&&(M=G.x-N.x,N=G.y-N.y,M=Math.sqrt(M*M+N*N)<=b.tolerance);if(E||M)z+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';z+="</path>"+(g||E||M?"<fillstroke/>":"<stroke/>");G=y+1}else z=y==G?z+('<path><move x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>'):z+('<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;G=b.view.translate;
-y=new mxCell("",new mxGeometry(D/z-G.x,L/z-G.y,q/z,J/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}x&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];v=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&
-m&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),m&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var D=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);D=Math.max(1,D*b.view.scale);var J=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");
-c.setAttribute("fill",F?J:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",J);c.setAttribute("stroke-width",D);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(J=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",J=J.split(" ").map(function(L){return parseFloat(L)*D}).join(" "),c.setAttribute("stroke-dasharray",J));k=[];q=U(q);O(q);p="M"+q.x+" "+q.y;v.push(q);t=[];c.setAttribute("d",F?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],I):p);e.appendChild(c);y.consume()}}),
-mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=U(q);O(q);var D=V(0);if(D)if(v.push(D),F){var J=[];for(D=0;D<v.length;D++)J.push([v[D].x,v[D].y]);t=[];for(var L=2;L<k.length;L+=2)D=V(L),J.push([D.x,D.y]),t.push(D);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(J,I))}else{p+=" L"+D.x+" "+D.y;J="";t=[];for(L=2;L<k.length;L+=2)D=V(L),J+=" L"+D.x+" "+D.y,t.push(D);c.setAttribute("d",p+J)}d&&(D=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-
-D.x,q.y-D.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(P(y.getEvent()),y.consume())})});var U=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},O=function(q){for(k.push(q);k.length>f;)k.shift()},V=function(q){var y=k.length;if(1===y%2||y>=f){var D=0,J=0,L,K=0;for(L=q;L<y;L++)K++,q=k[L],D+=q.x,J+=q.y;return{x:D/K,y:J/K}}return null}}}
-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(G,M){try{if(!V){var N=e.file.getCurrentUser();if(O&&null!=N&&null!=N.displayName){var Q={from:C,id:u,type:G,sessionId:e.clientId,userId:N.id,username:N.displayName,data:M,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};Q={bytes:e.objectToString(Q),data:"aes"};Q=JSON.stringify(Q);q&&"cursor"!=G&&EditorUi.debug("P2PCollab: sending to socket server",[Q]);u++;N=!q&&("cursor"==G||"selectionChange"==G);U&&!N&&L("message",Q);if(N)for(p2pId in R)R[p2pId].send(Q)}}}catch(S){null!=
-window.console&&console.error(S,G,M)}}function l(G){if(b.shareCursorPosition&&!B.isMouseDown){var M=mxUtils.getOffset(B.container),N=B.view.translate,Q=B.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((G.getX()-M.x+B.container.scrollLeft)/Q-N.x),y:Math.round((G.getY()-M.y+B.container.scrollTop)/Q-N.y)})}}function p(G,M){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=G&&null!=G.cursor&&null!=G.lastCursor)if(null!=G.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=G.lastCursor.pageId&&G.lastCursor.pageId!=N)G.cursor.style.display="none";else{N=function(){var Z=Math.max(B.container.scrollLeft,Math.min(B.container.scrollLeft+B.container.clientWidth-G.cursor.clientWidth,T)),Y=Math.max(B.container.scrollTop-22,Math.min(B.container.scrollTop+B.container.clientHeight-G.cursor.clientHeight,W));X.style.opacity=Z!=T||Y!=W?0:1;G.cursor.style.left=Z+"px";G.cursor.style.top=Y+"px";G.cursor.style.display=""};var Q=B.view.translate,S=B.view.scale,T=(Q.x+G.lastCursor.x)*
-S+8,W=(Q.y+G.lastCursor.y)*S-12,X=G.cursor.getElementsByTagName("img")[0];M?(mxUtils.setPrefixedStyle(G.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(G.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function v(G,M){try{var N=function(){if(null==m[S]){var ia=F[S];null==ia&&(ia=d%k.length,F[S]=ia,d++);var ca=k[ia];ia=11<ia?"black":"white";
-m[S]={cursor:document.createElement("div"),color:ca,selection:{}};A[M]=S;T=m[S].cursor;T.style.pointerEvents="none";T.style.position="absolute";T.style.display="none";T.style.opacity="0.9";var fa=document.createElement("img");mxUtils.setPrefixedStyle(fa.style,"transform","rotate(-45deg)translateX(-14px)");fa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ca+'" fill="'+ca+'"/>').src);fa.style.width="10px";T.appendChild(fa);fa=document.createElement("div");
-fa.style.backgroundColor=ca;fa.style.color=ia;fa.style.fontSize="9pt";fa.style.padding="3px 7px";fa.style.marginTop="8px";fa.style.borderRadius="10px";fa.style.maxWidth="100px";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.whiteSpace="nowrap";mxUtils.write(fa,Q);T.appendChild(fa);b.diagramContainer.appendChild(T)}else T=m[S].cursor;W=m[S].selection};if(!V){G=JSON.parse(G);null!=G.bytes&&(G=e.stringToObject(G.bytes));q&&"cursor"!=G.type&&EditorUi.debug("P2PCollab: msg received",
-[G]);if(null!=M){if(G.from==C||x[G.from]>=G.id){EditorUi.debug("P2PCollab: Dropped Message",G,C,x[G.from]);return}x[G.from]=G.id}var Q=G.username?G.username:"Anonymous",S=G.sessionId,T,W;null!=m[S]&&(clearTimeout(m[S].inactiveTO),m[S].inactiveTO=setTimeout(function(){E(null,S)},12E4));var X=G.data;switch(G.type){case "cursor":N();m[S].lastCursor=X;p(m[S],!0);break;case "diff":try{G=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(G.d)}catch(ia){EditorUi.debug("P2PCollab: Diff msg error",
-ia)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var da=B.model.getCell(Y);null!=da&&(W[Y]=B.highlightCell(da,m[S].color,6E4,70,3))}}}break;case "notify":G=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,
-e.handleMessageData(G.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",G))}}catch(ia){null!=window.console&&console.warn(ia,G,M)}}function t(G,M){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:M,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(Q){L("sendSignal",{to:G,from:C,signal:Q})});N.on("error",function(Q){delete P[G];EditorUi.debug("P2PCollab: p2p socket error",Q);!V&&M&&N.destroyed&&I[G]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
-G),t(G,!0))});N.on("connect",function(){delete P[G];null==R[G]||R[G].destroyed?(R[G]=N,I[G]=!0,EditorUi.debug("P2PCollab: p2p socket connected",G)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",G))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",G),H(A[G]),delete R[G])});N.on("data",v);return P[G]=N}}function E(G,M){H(M||A[G]);null!=G&&(delete A[G],I[G]=!1)}function H(G){var M=m[G];if(null!=M){var N=M.selection,Q;for(Q in N)null!=
-N[Q]&&N[Q].destroy();null!=M.cursor&&null!=M.cursor.parentNode&&M.cursor.parentNode.removeChild(M.cursor);clearTimeout(M.inactiveTO);delete m[G]}}var B=b.editor.graph,d=0,g=null,k="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),m={},u=1,x={},A={},I={},F={},C,P={},R={},U=!0,O=!1,V=!1,q="0"!=urlParams["no-p2p"],y=!1,D=0,J=null,L=mxUtils.bind(this,function(G,M){if(!V)try{null!=
-g?(g.send(JSON.stringify({action:G,msg:M})),q||EditorUi.debug("P2PCollab: sending to socket server",[G],[M])):this.joinFile(!0)}catch(N){J=N,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,N)}});this.sendMessage=c;this.sendDiff=function(G){this.sendMessage("diff",{diff:G})};this.sendNotification=function(G){this.sendMessage("notify",{msg:G})};this.getState=function(){return null!=g?g.readyState:3};this.getLastError=function(){return J};
-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(G,M){},mouseMove:function(G,M){var N,Q=-1;return function(){clearTimeout(N);var S=this,T=arguments,W=function(){N=null;Q=Date.now();G.apply(S,T)};Date.now()-Q>M?W():N=setTimeout(W,M)}}(function(G,M){l(M)},300),mouseUp:function(G,M){l(M)}};B.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
-var K=mxGraphHandler.prototype.maxCells,n=null,z={};this.selectionChangeListener=function(G,M){var N=function(Q){return null!=Q?Q.id:null};null!=n&&window.clearTimeout(n);n=window.setTimeout(function(){for(var Q=B.getSelectionCount()>K?[]:B.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,T={},W=[],X=[],Z=0;Z<Q.length;Z++){var Y=Q[Z];null!=Y&&(T[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)T[Y]||W.push(Y);z=T;c("selectionChange",{pageId:S,removed:W,added:X})},300)};B.getSelectionModel().addListener(mxEvent.CHANGE,
-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var G in m)p(m[G])});mxEvent.addListener(B.container,"scroll",this.cursorHandler);B.getView().addListener(mxEvent.SCALE,this.cursorHandler);B.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);B.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(G){if(!V)try{y&&
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],p,v=[],t,E=!1,H=!0,B=!0,d=!0,g=!0,k=[],n=!1,u=!1,x=!1,A="default",I={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},G=!0;this.setClosedPath=function(q){E=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=
+function(q){B=q};this.setAutoScroll=function(q){d=q};this.setOpenFill=function(q){g=q};this.setStopClickEnabled=function(q){u=q};this.setSelectInserted=function(q){x=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){G=q};this.isPerfectFreehandMode=function(){return G};this.setBrushSize=function(q){I.size=q};this.getBrushSize=function(){return I.size};var C=function(q){n=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);
+b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return n};var P=mxUtils.bind(this,function(q){if(c){var y=t.length,D=u&&0<v.length&&null!=t&&2>t.length;D||v.push.apply(v,t);t=[];v.push(null);l.push(c);c=null;(D||B)&&this.stopDrawing();B&&(!D||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=
+A?A:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){A=q};this.createStyle=function(q){var y=";fillColor=none;";G&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(G){for(var q=[],y=0;y<v.length;y++)null!=v[y]&&q.push([v[y].x,
+v[y].y]);q=PerfectFreehand.getStroke(q,I);v=[];for(y=0;y<q.length;y++)v.push({x:q[y][0],y:q[y][1]});v.push(null)}q=v[0].x;var D=v[0].x,J=v[0].y,L=v[0].y;for(y=1;y<v.length;y++)null!=v[y]&&(q=Math.max(q,v[y].x),D=Math.min(D,v[y].x),J=Math.max(J,v[y].y),L=Math.min(L,v[y].y));q-=D;J-=L;if(0<q&&0<J){var K=100/q,m=100/J;v.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-D)*K;Q.y=(Q.y-L)*m;return Q});var z='<shape strokewidth="inherit"><foreground>',F=0;for(y=0;y<v.length;y++){var M=v[y];if(null==M){M=!1;F=
+v[F];var O=v[y-1];!E&&H&&(M=F.x-O.x,O=F.y-O.y,M=Math.sqrt(M*M+O*O)<=b.tolerance);if(E||M)z+='<line x="'+F.x.toFixed(2)+'" y="'+F.y.toFixed(2)+'"/>';z+="</path>"+(g||E||M?"<fillstroke/>":"<stroke/>");F=y+1}else z=y==F?z+('<path><move x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>'):z+('<line x="'+M.x.toFixed(2)+'" y="'+M.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;F=b.view.translate;
+y=new mxCell("",new mxGeometry(D/z-F.x,L/z-F.y,q/z,J/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}x&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];v=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&
+n&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),n&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var D=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);D=Math.max(1,D*b.view.scale);var J=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");
+c.setAttribute("fill",G?J:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",J);c.setAttribute("stroke-width",D);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(J=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",J=J.split(" ").map(function(L){return parseFloat(L)*D}).join(" "),c.setAttribute("stroke-dasharray",J));k=[];q=U(q);N(q);p="M"+q.x+" "+q.y;v.push(q);t=[];c.setAttribute("d",G?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],I):p);e.appendChild(c);y.consume()}}),
+mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=U(q);N(q);var D=V(0);if(D)if(v.push(D),G){var J=[];for(D=0;D<v.length;D++)J.push([v[D].x,v[D].y]);t=[];for(var L=2;L<k.length;L+=2)D=V(L),J.push([D.x,D.y]),t.push(D);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(J,I))}else{p+=" L"+D.x+" "+D.y;J="";t=[];for(L=2;L<k.length;L+=2)D=V(L),J+=" L"+D.x+" "+D.y,t.push(D);c.setAttribute("d",p+J)}d&&(D=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-
+D.x,q.y-D.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(P(y.getEvent()),y.consume())})});var U=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},N=function(q){for(k.push(q);k.length>f;)k.shift()},V=function(q){var y=k.length;if(1===y%2||y>=f){var D=0,J=0,L,K=0;for(L=q;L<y;L++)K++,q=k[L],D+=q.x,J+=q.y;return{x:D/K,y:J/K}}return null}}}
+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(F,M){try{if(!V){var O=e.file.getCurrentUser();if(N&&null!=O&&null!=O.displayName){var Q={from:C,id:u,type:F,sessionId:e.clientId,userId:O.id,username:O.displayName,data:M,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};Q={bytes:e.objectToString(Q),data:"aes"};Q=JSON.stringify(Q);q&&"cursor"!=F&&EditorUi.debug("P2PCollab: sending to socket server",[Q]);u++;O=!q&&("cursor"==F||"selectionChange"==F);U&&!O&&L("message",Q);if(O)for(p2pId in R)R[p2pId].send(Q)}}}catch(S){null!=
+window.console&&console.error(S,F,M)}}function l(F){if(b.shareCursorPosition&&!B.isMouseDown){var M=mxUtils.getOffset(B.container),O=B.view.translate,Q=B.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((F.getX()-M.x+B.container.scrollLeft)/Q-O.x),y:Math.round((F.getY()-M.y+B.container.scrollTop)/Q-O.y)})}}function p(F,M){var O=null!=b.currentPage?b.currentPage.getId():null;if(null!=F&&null!=F.cursor&&null!=F.lastCursor)if(null!=F.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=F.lastCursor.pageId&&F.lastCursor.pageId!=O)F.cursor.style.display="none";else{O=function(){var Z=Math.max(B.container.scrollLeft,Math.min(B.container.scrollLeft+B.container.clientWidth-F.cursor.clientWidth,T)),Y=Math.max(B.container.scrollTop-22,Math.min(B.container.scrollTop+B.container.clientHeight-F.cursor.clientHeight,W));X.style.opacity=Z!=T||Y!=W?0:1;F.cursor.style.left=Z+"px";F.cursor.style.top=Y+"px";F.cursor.style.display=""};var Q=B.view.translate,S=B.view.scale,T=(Q.x+F.lastCursor.x)*
+S+8,W=(Q.y+F.lastCursor.y)*S-12,X=F.cursor.getElementsByTagName("img")[0];M?(mxUtils.setPrefixedStyle(F.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(O,0)):(mxUtils.setPrefixedStyle(F.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),O())}}function v(F,M){try{var O=function(){if(null==n[S]){var ia=G[S];null==ia&&(ia=d%k.length,G[S]=ia,d++);var ca=k[ia];ia=11<ia?"black":"white";
+n[S]={cursor:document.createElement("div"),color:ca,selection:{}};A[M]=S;T=n[S].cursor;T.style.pointerEvents="none";T.style.position="absolute";T.style.display="none";T.style.opacity="0.9";var fa=document.createElement("img");mxUtils.setPrefixedStyle(fa.style,"transform","rotate(-45deg)translateX(-14px)");fa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ca+'" fill="'+ca+'"/>').src);fa.style.width="10px";T.appendChild(fa);fa=document.createElement("div");
+fa.style.backgroundColor=ca;fa.style.color=ia;fa.style.fontSize="9pt";fa.style.padding="3px 7px";fa.style.marginTop="8px";fa.style.borderRadius="10px";fa.style.maxWidth="100px";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.whiteSpace="nowrap";mxUtils.write(fa,Q);T.appendChild(fa);b.diagramContainer.appendChild(T)}else T=n[S].cursor;W=n[S].selection};if(!V){F=JSON.parse(F);null!=F.bytes&&(F=e.stringToObject(F.bytes));q&&"cursor"!=F.type&&EditorUi.debug("P2PCollab: msg received",
+[F]);if(null!=M){if(F.from==C||x[F.from]>=F.id){EditorUi.debug("P2PCollab: Dropped Message",F,C,x[F.from]);return}x[F.from]=F.id}var Q=F.username?F.username:"Anonymous",S=F.sessionId,T,W;null!=n[S]&&(clearTimeout(n[S].inactiveTO),n[S].inactiveTO=setTimeout(function(){E(null,S)},12E4));var X=F.data;switch(F.type){case "cursor":O();n[S].lastCursor=X;p(n[S],!0);break;case "diff":try{F=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(F.d)}catch(ia){EditorUi.debug("P2PCollab: Diff msg error",
+ia)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){O();for(O=0;O<X.removed.length;O++){var Y=X.removed[O];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(O=0;O<X.added.length;O++)if(Y=X.added[O],null!=Y){var da=B.model.getCell(Y);null!=da&&(W[Y]=B.highlightCell(da,n[S].color,6E4,70,3))}}}break;case "notify":F=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,
+e.handleMessageData(F.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",F))}}catch(ia){null!=window.console&&console.warn(ia,F,M)}}function t(F,M){if(!q&&SimplePeer.WEBRTC_SUPPORT){var O=new SimplePeer({initiator:M,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});O.on("signal",function(Q){L("sendSignal",{to:F,from:C,signal:Q})});O.on("error",function(Q){delete P[F];EditorUi.debug("P2PCollab: p2p socket error",Q);!V&&M&&O.destroyed&&I[F]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
+F),t(F,!0))});O.on("connect",function(){delete P[F];null==R[F]||R[F].destroyed?(R[F]=O,I[F]=!0,EditorUi.debug("P2PCollab: p2p socket connected",F)):(O.noP2PMapDel=!0,O.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",F))});O.on("close",function(){O.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",F),H(A[F]),delete R[F])});O.on("data",v);return P[F]=O}}function E(F,M){H(M||A[F]);null!=F&&(delete A[F],I[F]=!1)}function H(F){var M=n[F];if(null!=M){var O=M.selection,Q;for(Q in O)null!=
+O[Q]&&O[Q].destroy();null!=M.cursor&&null!=M.cursor.parentNode&&M.cursor.parentNode.removeChild(M.cursor);clearTimeout(M.inactiveTO);delete n[F]}}var B=b.editor.graph,d=0,g=null,k="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),n={},u=1,x={},A={},I={},G={},C,P={},R={},U=!0,N=!1,V=!1,q="0"!=urlParams["no-p2p"],y=!1,D=0,J=null,L=mxUtils.bind(this,function(F,M){if(!V)try{null!=
+g?(g.send(JSON.stringify({action:F,msg:M})),q||EditorUi.debug("P2PCollab: sending to socket server",[F],[M])):this.joinFile(!0)}catch(O){J=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,O)}});this.sendMessage=c;this.sendDiff=function(F){this.sendMessage("diff",{diff:F})};this.sendNotification=function(F){this.sendMessage("notify",{msg:F})};this.getState=function(){return null!=g?g.readyState:3};this.getLastError=function(){return J};
+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(F,M){},mouseMove:function(F,M){var O,Q=-1;return function(){clearTimeout(O);var S=this,T=arguments,W=function(){O=null;Q=Date.now();F.apply(S,T)};Date.now()-Q>M?W():O=setTimeout(W,M)}}(function(F,M){l(M)},300),mouseUp:function(F,M){l(M)}};B.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
+var K=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(F,M){var O=function(Q){return null!=Q?Q.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var Q=B.getSelectionCount()>K?[]:B.getSelectionCells().map(O),S=null!=b.currentPage?b.currentPage.getId():null,T={},W=[],X=[],Z=0;Z<Q.length;Z++){var Y=Q[Z];null!=Y&&(T[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)T[Y]||W.push(Y);z=T;c("selectionChange",{pageId:S,removed:W,added:X})},300)};B.getSelectionModel().addListener(mxEvent.CHANGE,
+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var F in n)p(n[F])});mxEvent.addListener(B.container,"scroll",this.cursorHandler);B.getView().addListener(mxEvent.SCALE,this.cursorHandler);B.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);B.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(F){if(!V)try{y&&
(EditorUi.debug("P2PCollab: joinInProgress on",y),J="busy");y=++D;try{null!=g&&1==g.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",g.joinId),g.close(1E3),g=null)}catch(Q){EditorUi.debug("P2PCollab: closing socket error",Q)}var M=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==g&&(g=M);M.addEventListener("open",function(Q){g=M;g.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",g.joinId);Editor.enableRealtimeCache||
-window.setTimeout(function(){e.sendJoinMessage()},0);G&&e.scheduleCleanup()});M.addEventListener("message",function(Q){try{q||EditorUi.debug("P2PCollab: msg received",[Q]);var S=JSON.parse(Q.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[Q]);switch(S.action){case "message":v(S.msg,S.from);break;case "clientsList":var T=S.msg;C=T.cId;O=!0;for(S=0;S<T.list.length;S++)t(T.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(P[W.from])var X=P[W.from];else X=t(W.from,!1),U=!0;
-X.signal(W.signal)}break;case "newClient":U=!0;break;case "clientLeft":E(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete P[Z.to];I[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,Q)}});var N=!1;M.addEventListener("close",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket closed",M.joinId,"reconnecting",Q.code,Q.reason);EditorUi.debug("P2PCollab: closing socket on",M.joinId);V||1E3==Q.code||D!=
-M.joinId||(y==D&&(EditorUi.debug("P2PCollab: joinInProgress in close on",M.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",M.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));M.addEventListener("error",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",Q);EditorUi.debug("P2PCollab: error socket on",M.joinId);V||D!=M.joinId||(y==D&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
-M.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",M.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(Q){J=Q,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!V){EditorUi.debug("P2PCollab: destroyed");V=!0;for(sessionId in m)H(sessionId);null!=this.mouseListeners&&B.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
-B.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(B.container,"scroll",this.cursorHandler),B.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=g&&1<=g.readyState&&(g.close(1E3),g=null);for(var G in R)null!=R[G]&&R[G].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+window.setTimeout(function(){e.sendJoinMessage()},0);F&&e.scheduleCleanup()});M.addEventListener("message",function(Q){try{q||EditorUi.debug("P2PCollab: msg received",[Q]);var S=JSON.parse(Q.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[Q]);switch(S.action){case "message":v(S.msg,S.from);break;case "clientsList":var T=S.msg;C=T.cId;N=!0;for(S=0;S<T.list.length;S++)t(T.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(P[W.from])var X=P[W.from];else X=t(W.from,!1),U=!0;
+X.signal(W.signal)}break;case "newClient":U=!0;break;case "clientLeft":E(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete P[Z.to];I[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,Q)}});var O=!1;M.addEventListener("close",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket closed",M.joinId,"reconnecting",Q.code,Q.reason);EditorUi.debug("P2PCollab: closing socket on",M.joinId);V||1E3==Q.code||D!=
+M.joinId||(y==D&&(EditorUi.debug("P2PCollab: joinInProgress in close on",M.joinId),y=!1),O||(EditorUi.debug("P2PCollab: calling rejoin on",M.joinId),window.setTimeout(mxUtils.bind(this,function(){O=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));M.addEventListener("error",mxUtils.bind(this,function(Q){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",Q);EditorUi.debug("P2PCollab: error socket on",M.joinId);V||D!=M.joinId||(y==D&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
+M.joinId),y=!1),O||(EditorUi.debug("P2PCollab: calling rejoin on",M.joinId),O=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(Q){J=Q,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!V){EditorUi.debug("P2PCollab: destroyed");V=!0;for(sessionId in n)H(sessionId);null!=this.mouseListeners&&B.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
+B.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(B.container,"scroll",this.cursorHandler),B.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=g&&1<=g.readyState&&(g.close(1E3),g=null);for(var F in R)null!=R[F]&&R[F].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/bootstrap.js b/src/main/webapp/js/bootstrap.js
new file mode 100644
index 000000000..6980379d7
--- /dev/null
+++ b/src/main/webapp/js/bootstrap.js
@@ -0,0 +1,343 @@
+/**
+ * URL Parameters and protocol description are here:
+ *
+ * https://www.drawio.com/doc/faq/supported-url-parameters
+ *
+ * Parameters for developers:
+ *
+ * - dev=1: For developers only
+ * - test=1: For developers only
+ * - export=URL for export: For developers only
+ * - ignoremime=1: For developers only (see DriveClient.js). Use Cmd-S to override mime.
+ * - createindex=1: For developers only (see etc/build/README)
+ * - filesupport=0: For developers only (see Editor.js in core)
+ * - savesidebar=1: For developers only (see Sidebar.js)
+ * - pages=1: For developers only (see Pages.js)
+ * - lic=email: For developers only (see LicenseServlet.java)
+ * --
+ * - networkshapes=1: For testing network shapes (temporary)
+ */
+// Parses URL parameters
+var urlParams = (function()
+{
+ var result = new Object();
+ var params = window.location.search.slice(1).split('&');
+
+ for (var i = 0; i < params.length; i++)
+ {
+ var idx = params[i].indexOf('=');
+
+ if (idx > 0)
+ {
+ result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+ }
+ }
+
+ return result;
+})();
+
+// Forces CDN caches by passing URL parameters via URL hash
+if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
+{
+ try
+ {
+ urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));
+
+ if (urlParams.hash != null)
+ {
+ window.location.hash = urlParams.hash;
+ }
+ }
+ catch (e)
+ {
+ // ignore
+ }
+}
+
+// Global variable for desktop
+var mxIsElectron = navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf(' electron/') > -1 &&
+ navigator.userAgent.indexOf(' draw.io/') > -1;
+
+// Redirects page if required
+if (urlParams['dev'] != '1')
+{
+ (function()
+ {
+ var proto = window.location.protocol;
+
+ if (!mxIsElectron)
+ {
+ var host = window.location.host;
+
+ // Redirects apex, drive and rt to www
+ if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io')
+ {
+ host = 'www.draw.io';
+ }
+
+ var href = proto + '//' + host + window.location.href.substring(
+ window.location.protocol.length +
+ window.location.host.length + 2);
+
+ // Redirects if href changes
+ if (href != window.location.href)
+ {
+ window.location.href = href;
+ }
+ }
+ })();
+}
+
+/**
+ * Adds meta tag to the page.
+ */
+function mxmeta(name, content, httpEquiv)
+{
+ try
+ {
+ var s = document.createElement('meta');
+
+ if (name != null)
+ {
+ s.setAttribute('name', name);
+ }
+
+ s.setAttribute('content', content);
+
+ if (httpEquiv != null)
+ {
+ s.setAttribute('http-equiv', httpEquiv);
+ }
+
+ var t = document.getElementsByTagName('meta')[0];
+ t.parentNode.insertBefore(s, t);
+ }
+ catch (e)
+ {
+ // ignore
+ }
+};
+
+/**
+ * Synchronously adds scripts to the page.
+ */
+function mxscript(src, onLoad, id, dataAppKey, noWrite, onError)
+{
+ var defer = onLoad == null && !noWrite;
+
+ if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
+ onLoad != null || noWrite)
+ {
+ var s = document.createElement('script');
+ s.setAttribute('type', 'text/javascript');
+ s.setAttribute('defer', 'true');
+ s.setAttribute('src', src);
+
+ if (id != null)
+ {
+ s.setAttribute('id', id);
+ }
+
+ if (dataAppKey != null)
+ {
+ s.setAttribute('data-app-key', dataAppKey);
+ }
+
+ if (onLoad != null)
+ {
+ var r = false;
+
+ s.onload = s.onreadystatechange = function()
+ {
+ if (!r && (!this.readyState || this.readyState == 'complete'))
+ {
+ r = true;
+ onLoad();
+ }
+ };
+ }
+
+ if (onError != null)
+ {
+ s.onerror = function(e)
+ {
+ onError('Failed to load ' + src, e);
+ };
+ }
+
+ var t = document.getElementsByTagName('script')[0];
+
+ if (t != null)
+ {
+ t.parentNode.insertBefore(s, t);
+ }
+ }
+ else
+ {
+ document.write('<script src="' + src + '"' + ((id != null) ? ' id="' + id +'" ' : '') +
+ ((dataAppKey != null) ? ' data-app-key="' + dataAppKey +'" ' : '') + '></scr' + 'ipt>');
+ }
+};
+
+/**
+ * Asynchronously adds scripts to the page.
+ */
+function mxinclude(src)
+{
+ var g = document.createElement('script');
+ g.type = 'text/javascript';
+ g.async = true;
+ g.src = src;
+
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(g, s);
+};
+
+/**
+ * Adds meta tags with application name (depends on offline URL parameter)
+ */
+(function()
+{
+ var name = 'diagrams.net';
+ mxmeta('apple-mobile-web-app-title', name);
+ mxmeta('application-name', name);
+
+ if (mxIsElectron)
+ {
+ mxmeta(null, 'default-src \'self\'; script-src \'self\' \'sha256-6g514VrT/cZFZltSaKxIVNFF46+MFaTSDTPB8WfYK+c=\' ' +
+ (urlParams['dev'] != '1' ? '' : ' \'unsafe-eval\'') + '; ' +
+ 'connect-src \'self\' https://*.draw.io https://*.diagrams.net https://fonts.googleapis.com https://fonts.gstatic.com; ' +
+ 'img-src * data:; media-src *; font-src *; frame-src \'none\'; style-src \'self\' \'unsafe-inline\' ' +
+ 'https://fonts.googleapis.com; base-uri \'none\';child-src \'self\';object-src \'none\';', 'Content-Security-Policy');
+ }
+})();
+
+// Checks for local storage
+var isLocalStorage = false;
+
+try
+{
+ isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined';
+}
+catch (e)
+{
+ // ignored
+}
+
+var mxScriptsLoaded = false, mxWinLoaded = false;
+
+function checkAllLoaded()
+{
+ if (mxScriptsLoaded && mxWinLoaded)
+ {
+ App.main();
+ }
+};
+
+var t0 = new Date();
+
+// Changes paths for local development environment
+if (urlParams['dev'] == '1')
+{
+ // Used to request grapheditor/mxgraph sources in dev mode
+ var mxDevUrl = '';
+
+ // Used to request draw.io sources in dev mode
+ var drawDevUrl = '';
+ var geBasePath = 'js/grapheditor';
+ var mxBasePath = 'mxgraph/src';
+
+ if (document.location.protocol == 'file:')
+ {
+ // Forces includes for dev environment in node.js
+ mxForceIncludes = true;
+ }
+
+ mxForceIncludes = false;
+
+ mxscript(drawDevUrl + 'js/PreConfig.js');
+ mxscript(drawDevUrl + 'js/diagramly/Init.js');
+ mxscript(geBasePath + '/Init.js');
+ mxscript(mxBasePath + '/mxClient.js');
+
+ // Adds all JS code that depends on mxClient. This indirection via Devel.js is
+ // required in some browsers to make sure mxClient.js (and the files that it
+ // loads asynchronously) are available when the code loaded in Devel.js runs.
+ mxscript(drawDevUrl + 'js/diagramly/Devel.js');
+
+ // Electron
+ if (mxIsElectron)
+ {
+ mxscript('js/desktop/DesktopLibrary.js');
+ mxscript('js/desktop/ElectronApp.js');
+ }
+
+ mxscript(drawDevUrl + 'js/PostConfig.js');
+}
+else
+{
+ (function()
+ {
+ var hostName = window.location.hostname;
+
+ // Supported domains are *.draw.io and the packaged version in Quip
+ var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
+ (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net');
+
+ function loadAppJS()
+ {
+ mxscript('js/app.min.js', function()
+ {
+ mxScriptsLoaded = true;
+ checkAllLoaded();
+
+ // Electron
+ if (mxIsElectron)
+ {
+ mxscript('js/diagramly/DesktopLibrary.js', function()
+ {
+ mxscript('js/diagramly/ElectronApp.js', function()
+ {
+ mxscript('js/extensions.min.js', function()
+ {
+ mxscript('js/stencils.min.js', function()
+ {
+ mxscript('js/shapes-14-6-5.min.js', function()
+ {
+ mxscript('js/PostConfig.js');
+ });
+ });
+ });
+ });
+ });
+ }
+ else if (!supportedDomain || navigator.onLine)
+ {
+ mxscript('js/PostConfig.js');
+ }
+ });
+ };
+
+ if (!supportedDomain || mxIsElectron || navigator.onLine)
+ {
+ mxscript('js/PreConfig.js', loadAppJS);
+ }
+ else
+ {
+ loadAppJS();
+ }
+ })();
+}
+
+// Adds basic error handling
+window.onerror = function()
+{
+ var status = document.getElementById('geStatus');
+
+ if (status != null)
+ {
+ status.innerHTML = 'Page could not be loaded. Please try refreshing.';
+ }
+};
+
+
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index fd8b598cb..966b70086 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -63,7 +63,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.5",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -201,17 +201,17 @@ function(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_D
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,"gesturechange",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,"gestureend",function(g){mxEvent.consume(g)})}else{var d=
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
-a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},
-isMouseEvent:function(a){return!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in
-a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||
-null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",
-CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",
-BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",
-CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",
-EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
-mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};
-mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
+a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.type&&0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.type&&0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return!mxClient.IS_ANDROID&&
+mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.type&&0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
+mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
+(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},
+LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",
+FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",
+BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",
+REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",
+UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;
+mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&this.acceptResponse&&(this.acceptResponse=!1,a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),null!=b&&(this.request.onerror=
mxUtils.bind(this,function(e){this.acceptResponse&&(this.acceptResponse=!1,b(this,e))})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
@@ -2034,10 +2034,10 @@ PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var g=documen
h.style.boxSizing="border-box";h.style.padding="2px";h.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";g.style.marginRight="6px";m.appendChild(g);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var q=document.createElement("span");q.style.width="100px";mxUtils.write(q,
mxResources.get("landscape"));m.appendChild(q);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign=
"right";k.appendChild(w);var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],D=0;D<C.length;D++){var E=document.createElement("option");E.setAttribute("value",C[D].unit);mxUtils.write(E,C[D].label);z.appendChild(E)}z.value=Editor.pageSizeUnit;k.appendChild(z);
-m.style.display="none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(D=0;D<I.length;D++)C=I[D],G[C.key]=C,E=document.createElement("option"),E.setAttribute("value",C.key),mxUtils.write(E,C.title),h.appendChild(E);var J=function(){h.value="custom";for(var K=0;K<I.length;K++){var U=I[K];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
-e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(h.value=U.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(h.value=U.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
-h.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};J();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,U){K=G[h.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),w.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display=
-"none",m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(w.value);if(isNaN(K)||0>=K)w.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){g.checked=!0;T(K);mxEvent.consume(K)});
+m.style.display="none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(D=0;D<I.length;D++)C=I[D],G[C.key]=C,E=document.createElement("option"),E.setAttribute("value",C.key),mxUtils.write(E,C.title),h.appendChild(E);var J=function(){h.value="custom";for(var K=0;K<I.length;K++){var V=I[K];null!=V.format&&("a4"==V.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==V.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),
+e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==V.format.width&&e.height==V.format.height?(h.value=V.key,g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==V.format.height&&e.height==V.format.width&&(h.value=V.key,g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==
+h.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),g.setAttribute("checked","checked"),h.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};J();a.appendChild(h);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,V){K=G[h.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),w.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display=
+"none",m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(w.value);if(isNaN(K)||0>=K)w.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));V||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){g.checked=!0;T(K);mxEvent.consume(K)});
mxEvent.addListener(q,"click",function(K){d.checked=!0;T(K);mxEvent.consume(K)});mxEvent.addListener(u,"blur",T);mxEvent.addListener(u,"click",T);mxEvent.addListener(w,"blur",T);mxEvent.addListener(w,"click",T);mxEvent.addListener(d,"change",T);mxEvent.addListener(g,"change",T);mxEvent.addListener(h,"change",function(K){T(K,"custom"==h.value);mxEvent.consume(K)});mxEvent.addListener(z,"change",function(K){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);w.value=Editor.toUnit(Editor.fromUnit(w.value,
Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;T(K,!0);mxEvent.consume(K)});T(null,!0);return{set:function(K){e=K;J(null,null,!0)},get:function(){return e},widthInput:u,heightInput:w}};
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)",
@@ -2063,40 +2063,39 @@ this.scale-z+m,D)+I*h)+"px "+-Math.round(D-mxUtils.mod(this.translate.y*this.sca
m){for(var q=this.graph.gridSize*this.scale*(null!=m?m:1);q<this.minGridSize;)q*=2;m=this.gridSteps*q;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*q;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}h=mxUtils.getLightDarkColor(h);q="color-scheme: light dark;";mxClient.IS_SF&&(q="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+q+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(h.cssText)+';" stroke="'+h.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){a.apply(this,arguments);
if(null!=this.shiftPreview1){var q=this.view.canvas;null!=q.ownerSVGElement&&(q=q.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+h,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";q.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(h,m,q){var k=this.view.scale,u=this.view.translate,w=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();
-m=C.width;q=C.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(q/D.height)-1:0,G=h?Math.ceil(m/D.width)-1:0,I=C.x+m,J=C.y+q;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?E:G,U=0;U<=K;U++){var V=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(U+1)*D.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*D.height))]:[new mxPoint(Math.round(C.x+(U+1)*D.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*D.width),Math.round(J))];null!=T[U]?(T[U].points=V,T[U].redraw()):(V=new mxPolyline(V,this.pageBreakColor),V.dialect=this.dialect,V.isDashed=this.pageBreakDashed,V.pointerEvents=!1,V.init(this.view.backgroundPane),V.redraw(),T[U]=V)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});h(this.horizontalPageBreaks);
+m=C.width;q=C.height;var D=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),E=(h=h&&Math.min(D.width,D.height)>this.minPageBreakDist)?Math.ceil(q/D.height)-1:0,G=h?Math.ceil(m/D.width)-1:0,I=C.x+m,J=C.y+q;null==this.horizontalPageBreaks&&0<E&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);h=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?E:G,V=0;V<=K;V++){var W=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
+Math.round(C.y+(V+1)*D.height)),new mxPoint(Math.round(I),Math.round(C.y+(V+1)*D.height))]:[new mxPoint(Math.round(C.x+(V+1)*D.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(V+1)*D.width),Math.round(J))];null!=T[V]?(T[V].points=W,T[V].redraw()):(W=new mxPolyline(W,this.pageBreakColor),W.dialect=this.dialect,W.isDashed=this.pageBreakDashed,W.pointerEvents=!1,W.init(this.view.backgroundPane),W.redraw(),T[V]=W)}for(V=K;V<T.length;V++)null!=T[V]&&T[V].destroy();T.splice(K,T.length-K)}});h(this.horizontalPageBreaks);
h(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(h,m,q){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var h=
e.apply(this,arguments);h.intersects=mxUtils.bind(this,function(m,q){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(h,arguments)});return h};mxGraphView.prototype.createBackgroundPageShape=function(h){return new mxRectangleShape(h,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var h=this.getGraphBounds(),m=0<h.width?h.x/this.scale-this.translate.x:0,q=0<h.height?h.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,q)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+h.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,q+h.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(h,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=h+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(h,m,q,k,u,w){var z=g.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(h,m,q){var k=this.graph.model.getParent(h);if(m){var u=this.graph.model.isEdge(h)?null:this.graph.getCellGeometry(h);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(h)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(h))}else if(u=d.apply(this,arguments),this.graph.isTableCell(h)||this.graph.isTableRow(h))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(q.getEvent())||
-this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(q.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),q=m.getParent(h),k=this.graph.view.getState(q),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(q)||m.isEdge(q));){var w=this.graph.isCellSelected(q);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=q;q=m.getParent(q)}return h}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,g=this.editor.graph;g.lightbox=e;var d=g.getGraphBounds;g.getGraphBounds=function(){var O=d.apply(this,arguments),X=this.backgroundImage;if(null!=X&&null!=X.width&&null!=X.height){var ja=this.view.translate,ka=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((ja.x+X.x)*ka,(ja.y+X.y)*ka,X.width*ka,X.height*ka))}return O};g.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(O,X){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=
-function(){return!1};g.panningHandler.isForcePanningEvent=function(O){for(var X=O.getSource();null!=X&&X!=g.container;){if("foreignObject"===X.nodeName||"text"===X.nodeName)return!1;X=X.parentNode}return!mxEvent.isPopupTrigger(O.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,q=!1;this.setDefaultStyle=function(O){try{g.getModel().isEdge(O)?
-q=g.pasteEdgeStyle=!1:m=!1;var X=g.getCellStyle(O,!1),ja=[],ka=[],ta;for(ta in X)ja.push(X[ta]),ka.push(ta);g.getModel().isEdge(O)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ka,"values",ja,"cells",[O],"force",!0));g.getModel().isEdge(O)?q=g.pasteEdgeStyle=!0:m=!0}catch(M){this.handleError(M)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=q=
-g.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(O,X){g.pasteCellStyles(g.includeDescendants(X.getProperty("cells")))});g.addListener("textInserted",function(O,X){g.pasteCellStyles(X.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(O){null==O&&(O=window.event);return g.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var O=
-null;if(/iP(hone|od|ad)/.test(navigator.platform)){var X=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{O=[parseInt(X[1],10),parseInt(X[2],10),parseInt(X[3]||0,10)]}catch(ja){}}return O}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect",
-"none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(O){if(null!=O){var X=mxEvent.getSource(O);if("A"==X.nodeName)for(;null!=X;){if("geHint"==X.className)return!0;X=X.parentNode}}return k(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=
-!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(O){var X=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-
-X.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-X.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,X){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){16==O.which?this.shiftDown=!0:32!=O.which||g.isEditing()?mxEvent.isConsumed(O)||27!=O.keyCode||this.hideDialog(null,
-!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||mxEvent.getSource(O)!=g.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(O){return z.apply(this,arguments)||
-f.isSpaceDown()||mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(O){return C.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var D=
-g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var O=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,X=this.toolbar.container.firstChild;null!=X;){var ja=X.getAttribute("data-min-width");null!=ja&&parseInt(ja)>O?X.style.display="none":X.style.display="";X=X.nextSibling}}),G=!1,I=null,J=null,T=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=
-g.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,X=[];null!=O;){var ja=O.nextSibling;O.parentNode.removeChild(O);X.push(O);O=ja}O=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var ka=0;ka<T.length;ka++)this.toolbar.container.appendChild(T[ka]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=J}G=g.cellEditor.isContentEditing();I=O;J=ja;T=X;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);
-this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,"resize",E);E();var U=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){U.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var O=!1,X=function(){O||(O=!0,window.setTimeout(function(){var ja=g.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),
-f.toolbar.setFontSize(parseInt(ja.fontSize))));O=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",X);mxEvent.addListener(g.cellEditor.textarea,"touchend",X);mxEvent.addListener(g.cellEditor.textarea,"mouseup",X);mxEvent.addListener(g.cellEditor.textarea,"keyup",X);X()}};var V=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(O,X){try{V.apply(this,arguments),K()}catch(ja){f.handleError(ja)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===
-window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(O){}var Q=g.fireMouseEvent;g.fireMouseEvent=function(O,X,ja){try{O==mxEvent.MOUSE_DOWN&&this.container.focus(),Q.apply(this,arguments)}catch(ka){f.handleError(ka)}};var N=g.foldCells;g.foldCells=function(O,X,ja,ka,ta){try{N.apply(this,arguments)}catch(M){f.handleError(M)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,X,ja){this.menus.createPopupMenu(O,X,ja)}));
-mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(O,X){var ja=[X.getProperty("cell")];X.getProperty("terminalInserted")&&(ja.push(X.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(ja[ja.length-1]))},0));g.pasteCellStyles(ja)});this.addListener("styleChanged",
-mxUtils.bind(this,function(O,X){O=X.getProperty("force");(this.updateDefaultStyle||O)&&g.copyCellStyles(X.getProperty("cells"),X.getProperty("keys"),X.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,q);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&
-"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?
-this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),
-null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var O=
-g.currentVertexStyle.fontFamily||"Helvetica",X=String(g.currentVertexStyle.fontSize||"12"),ja=g.getView().getState(g.getSelectionCell());null!=ja&&(O=ja.style[mxConstants.STYLE_FONTFAMILY]||O,X=ja.style[mxConstants.STYLE_FONTSIZE]||X,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(X)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(O,X){O=X.getProperty("cells");
-X=X.getProperty("parent");null!=X&&g.getModel().isLayer(X)&&!g.isCellVisible(X)&&null!=O&&0<O.length&&g.getModel().setVisible(X,!0)});Graph.selectParentLayer&&g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var O=g.getLayerForCells(g.getSelectionCells());null!=O&&g.setDefaultParent(O)}});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
-this.gestureHandler);var W=null;this.resizeHandler=mxUtils.bind(this,function(){null!=W&&window.clearTimeout(W);W=window.setTimeout(mxUtils.bind(this,function(){W=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=
-mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));
-this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;
+this.graph.isCellSelected(h)&&!this.graph.isToggleEvent(q.getEvent())||this.graph.isTableCell(h)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(h){h=h.getCell();for(var m=this.graph.getModel(),q=m.getParent(h),k=this.graph.view.getState(q),u=this.graph.isCellSelected(h);null!=k&&(m.isVertex(q)||m.isEdge(q));){var w=this.graph.isCellSelected(q);u=u||w;if(w||!u&&(this.graph.isTableCell(h)||this.graph.isTableRow(h)))h=q;q=m.getParent(q)}return h}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,g=this.editor.graph;g.lightbox=e;var d=g.getGraphBounds;g.getGraphBounds=function(){var N=d.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ja=this.view.translate,la=this.view.scale;N=mxRectangle.fromRectangle(N);N.add(new mxRectangle((ja.x+Y.x)*la,(ja.y+Y.y)*la,Y.width*la,Y.height*la))}return N};g.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(N,Y){this.clearSelectionState()});g.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);g.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);g.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);g.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){g.isEnabled=
+function(){return!1};g.panningHandler.isForcePanningEvent=function(N){for(var Y=N.getSource();null!=Y&&Y!=g.container;){if("foreignObject"===Y.nodeName||"text"===Y.nodeName)return!1;Y=Y.parentNode}return!mxEvent.isPopupTrigger(N.getEvent())};var h=g.panningHandler.start;g.panningHandler.start=function(){h.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!g.standalone){var m=!1,q=!1;this.setDefaultStyle=function(N){try{g.getModel().isEdge(N)?
+q=g.pasteEdgeStyle=!1:m=!1;var Y=g.getCellStyle(N,!1),ja=[],la=[],S;for(S in Y)ja.push(Y[S]),la.push(S);g.getModel().isEdge(N)?g.currentEdgeStyle={}:g.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ja,"cells",[N],"force",!0));g.getModel().isEdge(N)?q=g.pasteEdgeStyle=!0:m=!0}catch(U){this.handleError(U)}};this.clearDefaultStyle=function(){g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);m=q=g.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};g.addListener("cellsInserted",function(N,Y){g.pasteCellStyles(g.includeDescendants(Y.getProperty("cells")))});g.addListener("textInserted",function(N,Y){g.pasteCellStyles(Y.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(N){null==N&&(N=window.event);return g.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(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,null!=this.tabContainer&&(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var N=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var Y=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{N=[parseInt(Y[1],10),parseInt(Y[2],10),parseInt(Y[3]||0,10)]}catch(ja){}}return N}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(N){if(null!=N){var Y=mxEvent.getSource(N);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return k(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):g.panningHandler.usePopupTrigger=!1;g.init(this.diagramContainer);mxClient.IS_SVG&&null!=g.view.getDrawPane()&&
+(b=g.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=g.graphHandler){var u=g.graphHandler.start;g.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(N){var Y=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(N)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(N)-Y.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(N,Y){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(N){16==N.which?this.shiftDown=!0:32!=N.which||g.isEditing()?mxEvent.isConsumed(N)||27!=N.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),g.container.style.cursor="move",g.isEditing()||
+mxEvent.getSource(N)!=g.container||mxEvent.consume(N))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(N){g.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=g.panningHandler.isForcePanningEvent;g.panningHandler.isForcePanningEvent=function(N){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(N.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(N.getEvent()))&&
+(!mxEvent.isControlDown(N.getEvent())&&mxEvent.isRightMouseButton(N.getEvent())||mxEvent.isMiddleMouseButton(N.getEvent()))};var C=g.cellEditor.isStopEditingEvent;g.cellEditor.isStopEditingEvent=function(N){return C.apply(this,arguments)||13==N.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N)||mxClient.IS_SF&&mxEvent.isShiftDown(N))};var D=g.isZoomWheelEvent;g.isZoomWheelEvent=function(){return f.isSpaceDown()||D.apply(this,arguments)};var E=mxUtils.bind(this,
+function(){if(null!=this.toolbar)for(var N=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,Y=this.toolbar.container.firstChild;null!=Y;){var ja=Y.getAttribute("data-min-width");null!=ja&&parseInt(ja)>N?Y.style.display="none":Y.style.display="";Y=Y.nextSibling}}),G=!1,I=null,J=null,T=null,K=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=g.cellEditor.isContentEditing()){for(var N=this.toolbar.container.firstChild,Y=[];null!=N;){var ja=N.nextSibling;N.parentNode.removeChild(N);
+Y.push(N);N=ja}N=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==T)this.toolbar.createTextToolbar();else{for(var la=0;la<T.length;la++)this.toolbar.container.appendChild(T[la]);this.toolbar.fontMenu=I;this.toolbar.sizeMenu=J}G=g.cellEditor.isContentEditing();I=N;J=ja;T=Y;E()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();K()}));this.addListener("currentThemeChanged",E);mxEvent.addListener(window,
+"resize",E);E();var V=g.cellEditor.startEditing;g.cellEditor.startEditing=function(){V.apply(this,arguments);K();if(g.cellEditor.isContentEditing()){var N=!1,Y=function(){N||(N=!0,window.setTimeout(function(){var ja=g.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),f.toolbar.setFontSize(parseInt(ja.fontSize))));N=!1},0))};mxEvent.addListener(g.cellEditor.textarea,"input",Y);mxEvent.addListener(g.cellEditor.textarea,
+"touchend",Y);mxEvent.addListener(g.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(g.cellEditor.textarea,"keyup",Y);Y()}};var W=g.cellEditor.stopEditing;g.cellEditor.stopEditing=function(N,Y){try{W.apply(this,arguments),K()}catch(ja){f.handleError(ja)}};g.container.setAttribute("tabindex","0");g.container.style.cursor="default";if(window.self===window.top&&null!=g.container.parentNode)try{g.container.focus()}catch(N){}var O=g.fireMouseEvent;g.fireMouseEvent=function(N,Y,ja){try{N==mxEvent.MOUSE_DOWN&&
+this.container.focus(),O.apply(this,arguments)}catch(la){f.handleError(la)}};var M=g.foldCells;g.foldCells=function(N,Y,ja,la,S){try{M.apply(this,arguments)}catch(U){f.handleError(U)}};g.popupMenuHandler.autoExpand=!0;null!=this.menus&&(g.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,Y,ja){this.menus.createPopupMenu(N,Y,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){g.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=
+function(){return keyHandler};g.connectionHandler.addListener(mxEvent.CONNECT,function(N,Y){var ja=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(ja.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(ja[ja.length-1]))},0));g.pasteCellStyles(ja)});this.addListener("styleChanged",mxUtils.bind(this,function(N,Y){N=Y.getProperty("force");(this.updateDefaultStyle||N)&&g.copyCellStyles(Y.getProperty("cells"),Y.getProperty("keys"),
+Y.getProperty("values"),g.currentVertexStyle,g.currentEdgeStyle,m,q);null!=this.toolbar&&(this.toolbar.setFontName(g.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(g.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==g.currentEdgeStyle.edgeStyle&&"1"==g.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==g.currentEdgeStyle.edgeStyle||
+"none"==g.currentEdgeStyle.edgeStyle||null==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==g.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,
+Format.horizontalElbowImage.src):"isometricEdgeStyle"==g.currentEdgeStyle.edgeStyle?"vertical"==g.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):
+"flexArrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==g.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var N=g.currentVertexStyle.fontFamily||"Helvetica",Y=String(g.currentVertexStyle.fontSize||"12"),ja=g.getView().getState(g.getSelectionCell());
+null!=ja&&(N=ja.style[mxConstants.STYLE_FONTFAMILY]||N,Y=ja.style[mxConstants.STYLE_FONTSIZE]||Y,10<N.length&&(N=N.substring(0,8)+"..."));this.toolbar.setFontName(N);this.toolbar.setFontSize(Y)}),g.getSelectionModel().addListener(mxEvent.CHANGE,a),g.getModel().addListener(mxEvent.CHANGE,a));g.addListener(mxEvent.CELLS_ADDED,function(N,Y){N=Y.getProperty("cells");Y=Y.getProperty("parent");null!=Y&&g.getModel().isLayer(Y)&&!g.isCellVisible(Y)&&null!=N&&0<N.length&&g.getModel().setVisible(Y,!0)});Graph.selectParentLayer&&
+g.selectionModel.addListener(mxEvent.CHANGE,function(){if(g.isEnabled()&&!g.isSelectionEmpty()){var N=g.getLayerForCells(g.getSelectionCells());null!=N&&g.setDefaultParent(N)}});this.gestureHandler=mxUtils.bind(this,function(N){null!=this.currentMenu&&mxEvent.getSource(N)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var X=null;this.resizeHandler=mxUtils.bind(this,function(){null!=X&&window.clearTimeout(X);X=window.setTimeout(mxUtils.bind(this,
+function(){X=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",
+mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){g.view.validateBackground()}));g.addListener("gridSizeChanged",mxUtils.bind(this,function(){g.isGridEnabled()&&g.view.validateBackground()}));this.editor.resetGraph()}this.init();g.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(a,b,e){function f(m,q){var k=d;d+=q;return m.substring(k,d)}function g(m){m=f(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);do{e=g(a);var h=f(a,4);if(null!=b&&b(d-8,h,e))break;value=f(a,e);f(a,4);if("IEND"==h)break}while(e)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
@@ -2150,43 +2149,43 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
0),z=0;z<k.length;z++){u.add(w,k[z]);var C=d.view.getState(h[z]);if(null!=C){var D=d.getCellGeometry(k[z]);null!=D&&D.relative&&!u.isEdge(h[z])&&null==q[mxObjectIdentity.get(u.getParent(h[z]))]&&(D.offset=null,D.relative=!1,D.x=C.x/C.view.scale-C.view.translate.x,D.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,q),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return h};var e=mxClipboard.paste;mxClipboard.paste=function(d){var h=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):h=e.apply(this,arguments);a.updatePasteActionStates();return h};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,h){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var Y=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Y.x*P.width),this.scale*(this.translate.y+Y.y*P.height),this.scale*Y.width*P.width,
-this.scale*Y.height*P.height)};a.getPreferredPageSize=function(Y,P,ba){Y=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,Y.width*P.width,Y.height*P.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(Y,P,ba,la){if(null!=a.container&&!a.isViewer()){ba=null!=ba?ba:0;la=null!=la?la:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ma=mxUtils.hasScrollbars(a.container),ya=a.view.translate,za=a.view.scale,
-Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Pa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;Y=Y?Math.max(.3,Math.min(P||1,Ha/Ka.width)):za;P=(Ha-Y*Ka.width)/2/Y;var qa=0==this.lightboxVerticalDivider?0:(Ia-Y*Ka.height)/this.lightboxVerticalDivider/Y;ma&&(P=Math.max(P,0),qa=Math.max(qa,
-0));if(ma||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(Y,Math.floor(P-Ka.x),Math.floor(qa-Ka.y)),a.container.scrollTop=ya*Y/za,a.container.scrollLeft=Pa*Y/za;else if(0!=ba||0!=la)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ba/za),Math.floor(Ja.y+la/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Y){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Y){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var ba=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+ba.x*R.width),this.scale*(this.translate.y+ba.y*R.height),this.scale*ba.width*
+R.width,this.scale*ba.height*R.height)};a.getPreferredPageSize=function(ba,R,ca){ba=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,ba.width*R.width,ba.height*R.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(ba,R,ca,ma){if(null!=a.container&&!a.isViewer()){ca=null!=ca?ca:0;ma=null!=ma?ma:0;var Ja=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),na=mxUtils.hasScrollbars(a.container),ya=a.view.translate,
+za=a.view.scale,Ka=mxRectangle.fromRectangle(Ja);Ka.x=Ka.x/za-ya.x;Ka.y=Ka.y/za-ya.y;Ka.width/=za;Ka.height/=za;ya=a.container.scrollTop;var Pa=a.container.scrollLeft,Ia=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ia+=3;var Ha=a.container.offsetWidth-Ia;Ia=a.container.offsetHeight-Ia;ba=ba?Math.max(.3,Math.min(R||1,Ha/Ka.width)):za;R=(Ha-ba*Ka.width)/2/ba;var ra=0==this.lightboxVerticalDivider?0:(Ia-ba*Ka.height)/this.lightboxVerticalDivider/ba;na&&(R=Math.max(R,
+0),ra=Math.max(ra,0));if(na||Ja.width<Ha||Ja.height<Ia)a.view.scaleAndTranslate(ba,Math.floor(R-Ka.x),Math.floor(ra-Ka.y)),a.container.scrollTop=ya*ba/za,a.container.scrollLeft=Pa*ba/za;else if(0!=ca||0!=ma)Ja=a.view.translate,a.view.setTranslate(Math.floor(Ja.x+ca/za),Math.floor(Ja.y+ma/za))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(ba){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(ba){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var g=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=a.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 d=mxUtils.bind(this,function(){var Y=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Y?parseInt(Y["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(Y,P,ba){h++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",Y);null!=ba&&la.setAttribute("title",ba);Y=document.createElement("img");Y.setAttribute("border","0");Y.setAttribute("src",P);Y.style.width="36px";Y.style.filter="invert(100%)";la.appendChild(Y);this.chromelessToolbar.appendChild(la);return la});if(null!=g.backBtn){var m=Graph.sanitizeLink(g.backBtn.url);null!=m&&d(mxUtils.bind(this,function(Y){window.location.href=
-m;mxEvent.consume(Y)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var q=d(mxUtils.bind(this,function(Y){this.actions.get("previousPage").funct();mxEvent.consume(Y)}),Editor.chevronLeftImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(Y){this.actions.get("nextPage").funct();mxEvent.consume(Y)}),Editor.chevronRightImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var Y=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,Y+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());q.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(Y-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(Y+1,this.pages.length)].getName())}});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display=
-"",k.style.display="inline-block"):(u.style.display="none",q.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(Y){var P=new mxPopupMenu(C.funct);P.smartSeparators=!0;P.showDisabled=!0;P.autoExpand=!0;P.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(P,arguments);P.destroy()});var ba=mxUtils.getOffset(k);P.popup(ba.x,ba.y+k.offsetHeight,null,Y);mxEvent.addListener(P.div,
-"mouseleave",mxUtils.bind(this,function(){P.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(Y){this.actions.get("zoomOut").funct();mxEvent.consume(Y)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(Y){this.actions.get("zoomIn").funct();mxEvent.consume(Y)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(Y){a.isLightboxView()?
-(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Y)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,G=mxUtils.bind(this,function(Y){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
-600)}),Y||200)}),I=mxUtils.bind(this,function(Y){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Y||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=d(mxUtils.bind(this,function(Y){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=J.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=
-P.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));P=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Y)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){J.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(Y){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Y)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=g.refreshBtn){var U=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(Y){null!=
-U?window.location.href=U:window.location.reload();mxEvent.consume(Y)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(Y){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(Y)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
-document.body))&&d(mxUtils.bind(this,function(Y){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(Y))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(Y){mxEvent.isTouchEvent(Y)||
-(mxEvent.isShiftDown(Y)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Y){mxEvent.consume(Y)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Y){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Y)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Y){mxEvent.isShiftDown(Y)?G():I(100);mxEvent.consume(Y)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(Y){mxEvent.isTouchEvent(Y)||I(30)}));var V=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Y,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(Y,P){},mouseUp:function(Y,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<V&&Math.abs(this.scrollTop-a.container.scrollTop)<V&&
-Math.abs(this.startX-P.getGraphX())<V&&Math.abs(this.startY-P.getGraphY())<V&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate,N=new mxPoint,W=!1,O=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&O!=e.currentPage){O=e.currentPage;W=!0;var Y=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
-Y&&(Y=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));Y=a.getPageLayout(Y,N,1);var P=a.getDefaultTranslate(Y);this.x0=Y.x;this.y0=Y.y;if(P.x!=this.translate.x||P.y!=this.translate.y)this.invalidate(),this.translate.x=P.x,this.translate.y=P.y}P=a.getPagePadding();var ba=a.getPageSize();Y=P.x-(this.x0||0)*ba.width;P=P.y-(this.y0||0)*ba.height;if(this.translate.x!=Y||this.translate.y!=P)this.invalidate(),this.translate.x=Y,this.translate.y=P}Q.apply(this,arguments)};
-if(!a.isViewer()){var X=a.sizeDidChange;a.sizeDidChange=function(){var Y=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var P=this.getPageLayout(),ba=this.getDefaultTranslate(P),la=this.view.translate.x,Ja=this.view.translate.y;if(ba.x!=la||ba.y!=Ja){this.view.x0=P.x;this.view.y0=P.y;this.autoTranslate=!0;this.view.setTranslate(ba.x,ba.y);this.autoTranslate=!1;Y||(this.container.scrollLeft+=Math.round((ba.x-la)*this.view.scale),
-this.container.scrollTop+=Math.round((ba.y-Ja)*this.view.scale));return}}X.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=a.view.getBackgroundPane(),ka=a.view.getDrawPane();a.cumulativeZoomFactor=1;var ta=null,M=null,aa=null,ea=null,da=null,sa=function(Y){null!=ta&&window.clearTimeout(ta);0<=Y&&window.setTimeout(function(){if(!a.isMouseDown||ea)ta=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
-null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),ka.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(ka.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ka.style.transform="";ja.style.transform=""},0)):(ka.style.transform="",ja.style.transform=""),a.view.getDecoratorPane().style.opacity=
-"",a.view.getOverlayPane().style.opacity="");var P=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ba=mxUtils.getOffset(a.container),la=a.view.scale,Ja=0,ma=0;null!=M&&(Ja=a.container.offsetWidth/2-M.x+ba.x,ma=a.container.offsetHeight/2-M.y+ba.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=la&&(null!=aa&&(Ja+=P.x-aa.x,ma+=P.y-aa.y),null!=b&&e.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==Ja&&0==ma||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ma*(a.cumulativeZoomFactor-1)));null!=da&&ka.setAttribute("filter",da);a.cumulativeZoomFactor=1;da=ea=M=aa=ta=null}),null!=Y?Y:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(Y,P,ba,la){la=null!=la?la:this.zoomFactor;(P=P||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));Y?.15>=this.view.scale*
-this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,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/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=
-Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==da&&""!=ka.getAttribute("filter")&&(da=ka.getAttribute("filter"),ka.removeAttribute("filter"));aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);Y=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);la=P||null==M?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=P||null==
-M?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;ka.style.transformOrigin=la+"px "+Ja+"px";ka.style.transform="scale("+Y+")";ja.style.transformOrigin=la+"px "+Ja+"px";ja.style.transform="scale("+Y+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(la=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(la.style,"transform-origin",(P||null==M?a.container.clientWidth/2+a.container.scrollLeft-la.offsetLeft+"px":M.x+a.container.scrollLeft-
-la.offsetLeft-a.container.offsetLeft+"px")+" "+(P||null==M?a.container.clientHeight/2+a.container.scrollTop-la.offsetTop+"px":M.y+a.container.scrollTop-la.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(la.style,"transform","scale("+Y+")")):a.view.validateBackgroundStyles(Y,la,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",Y))}sa(a.isFastZoomEnabled()?
-ba:0)};mxEvent.addGestureListeners(a.container,function(Y){null!=ta&&window.clearTimeout(ta)},null,function(Y){1!=a.cumulativeZoomFactor&&sa(0)});mxEvent.addListener(a.container,"scroll",function(Y){null==ta||a.isMouseDown||1==a.cumulativeZoomFactor||sa(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Y,P,ba,la,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ba&&a.isScrollWheelEvent(Y))ba=a.view.getTranslate(),la=40/a.view.scale,
-mxEvent.isShiftDown(Y)?a.view.setTranslate(ba.x+(P?-la:la),ba.y):a.view.setTranslate(ba.x,ba.y+(P?la:-la));else if(ba||a.isZoomWheelEvent(Y))for(var ma=mxEvent.getSource(Y);null!=ma;){if(ma==a.container)return a.tooltipHandler.hideTooltip(),M=null!=la&&null!=Ja?new mxPoint(la,Ja):new mxPoint(mxEvent.getClientX(Y),mxEvent.getClientY(Y)),ea=ba,ba=a.zoomFactor,la=null,Y.ctrlKey&&null!=Y.deltaY&&40>Math.abs(Y.deltaY)&&Math.round(Y.deltaY)!=Y.deltaY?ba=1+Math.abs(Y.deltaY)/20*(ba-1):null!=Y.movementY&&
-"pointermove"==Y.type&&(ba=1+Math.max(1,Math.abs(Y.movementY))/20*(ba-1),la=-1),a.lazyZoom(P,null,la,ba),mxEvent.consume(Y),!1;ma=ma.parentNode}}),a.container);a.panningHandler.zoomGraph=function(Y){a.cumulativeZoomFactor=Y.scale;a.lazyZoom(0<Y.scale,!0);mxEvent.consume(Y)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var ba=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=ba?parseInt(ba["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0;d=mxUtils.bind(this,function(ba,R,ca){h++;
+var ma=document.createElement("span");ma.style.paddingLeft="8px";ma.style.paddingRight="8px";ma.style.cursor="pointer";mxEvent.addListener(ma,"click",ba);null!=ca&&ma.setAttribute("title",ca);ba=document.createElement("img");ba.setAttribute("border","0");ba.setAttribute("src",R);ba.style.width="36px";ba.style.filter="invert(100%)";ma.appendChild(ba);this.chromelessToolbar.appendChild(ma);return ma});if(null!=g.backBtn){var m=Graph.sanitizeLink(g.backBtn.url);null!=m&&d(mxUtils.bind(this,function(ba){window.location.href=
+m;mxEvent.consume(ba)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var q=d(mxUtils.bind(this,function(ba){this.actions.get("previousPage").funct();mxEvent.consume(ba)}),Editor.chevronLeftImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(ba){this.actions.get("nextPage").funct();mxEvent.consume(ba)}),Editor.chevronRightImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var ba=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,ba+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+
+": "+this.currentPage.getName());q.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(ba-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(ba+1,this.pages.length)].getName())}});q.style.paddingLeft="0px";q.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",q.style.display=
+"",k.style.display="inline-block"):(u.style.display="none",q.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(ba){var R=new mxPopupMenu(C.funct);R.smartSeparators=!0;R.showDisabled=!0;R.autoExpand=!0;R.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(R,arguments);R.destroy()});var ca=mxUtils.getOffset(k);R.popup(ca.x,ca.y+k.offsetHeight,null,ba);mxEvent.addListener(R.div,
+"mouseleave",mxUtils.bind(this,function(){R.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(ba){this.actions.get("zoomOut").funct();mxEvent.consume(ba)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ba){this.actions.get("zoomIn").funct();mxEvent.consume(ba)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(ba){a.isLightboxView()?
+(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(ba)}),Editor.zoomFitImage,mxResources.get("fit"));var D=null,E=null,G=mxUtils.bind(this,function(ba){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);D=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);D=null;E=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";E=null}),
+600)}),ba||200)}),I=mxUtils.bind(this,function(ba){null!=D&&(window.clearTimeout(D),D=null);null!=E&&(window.clearTimeout(E),E=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,ba||30)});if("1"==urlParams.layers){this.layersDialog=null;var J=d(mxUtils.bind(this,function(ba){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var R=J.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=
+R.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));R=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+R.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(ba)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){J.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(ba){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(ba)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=g.refreshBtn){var V=null==g.refreshBtn.url?null:Graph.sanitizeLink(g.refreshBtn.url);d(mxUtils.bind(this,function(ba){null!=
+V?window.location.href=V:window.location.reload();mxEvent.consume(ba)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(ba){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(ba)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!g.noCloseBtn&&(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
+document.body))&&d(mxUtils.bind(this,function(ba){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(ba))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||
+(mxEvent.isShiftDown(ba)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(ba){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(ba)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(ba){mxEvent.isShiftDown(ba)?G():I(100);mxEvent.consume(ba)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||I(30)}));var W=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(ba,R){},mouseUp:function(ba,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<W&&Math.abs(this.scrollTop-a.container.scrollTop)<
+W&&Math.abs(this.startX-R.getGraphX())<W&&Math.abs(this.startY-R.getGraphY())<W&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var O=a.view.validate,M=new mxPoint,X=!1,N=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&N!=e.currentPage){N=e.currentPage;X=!0;var ba=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
+ba&&(ba=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));ba=a.getPageLayout(ba,M,1);var R=a.getDefaultTranslate(ba);this.x0=ba.x;this.y0=ba.y;if(R.x!=this.translate.x||R.y!=this.translate.y)this.invalidate(),this.translate.x=R.x,this.translate.y=R.y}R=a.getPagePadding();var ca=a.getPageSize();ba=R.x-(this.x0||0)*ca.width;R=R.y-(this.y0||0)*ca.height;if(this.translate.x!=ba||this.translate.y!=R)this.invalidate(),this.translate.x=ba,this.translate.y=R}O.apply(this,arguments)};
+if(!a.isViewer()){var Y=a.sizeDidChange;a.sizeDidChange=function(){var ba=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var R=this.getPageLayout(),ca=this.getDefaultTranslate(R),ma=this.view.translate.x,Ja=this.view.translate.y;if(ca.x!=ma||ca.y!=Ja){this.view.x0=R.x;this.view.y0=R.y;this.autoTranslate=!0;this.view.setTranslate(ca.x,ca.y);this.autoTranslate=!1;ba||(this.container.scrollLeft+=Math.round((ca.x-ma)*this.view.scale),
+this.container.scrollTop+=Math.round((ca.y-Ja)*this.view.scale));return}}Y.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=a.view.getBackgroundPane(),la=a.view.getDrawPane();a.cumulativeZoomFactor=1;var S=null,U=null,aa=null,fa=null,ka=null,ta=function(ba){null!=S&&window.clearTimeout(S);0<=ba&&window.setTimeout(function(){if(!a.isMouseDown||fa)S=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&
+null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),la.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(la.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){la.style.transform="";ja.style.transform=""},0)):(la.style.transform="",ja.style.transform=""),a.view.getDecoratorPane().style.opacity=
+"",a.view.getOverlayPane().style.opacity="");var R=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ca=mxUtils.getOffset(a.container),ma=a.view.scale,Ja=0,na=0;null!=U&&(Ja=a.container.offsetWidth/2-U.x+ca.x,na=a.container.offsetHeight/2-U.y+ca.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=ma&&(null!=aa&&(Ja+=R.x-aa.x,na+=R.y-aa.y),null!=b&&e.chromelessResize(!1,null,Ja*(a.cumulativeZoomFactor-1),na*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==Ja&&0==na||(a.container.scrollLeft-=Ja*(a.cumulativeZoomFactor-1),a.container.scrollTop-=na*(a.cumulativeZoomFactor-1)));null!=ka&&la.setAttribute("filter",ka);a.cumulativeZoomFactor=1;ka=fa=U=aa=S=null}),null!=ba?ba:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(ba,R,ca,ma){ma=null!=ma?ma:this.zoomFactor;(R=R||!a.scrollbars)&&(U=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));ba?.15>=this.view.scale*
+this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,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/=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=
+Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==ka&&""!=la.getAttribute("filter")&&(ka=la.getAttribute("filter"),la.removeAttribute("filter"));aa=new mxPoint(a.container.scrollLeft,a.container.scrollTop);ba=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);ma=R||null==U?a.container.scrollLeft+a.container.clientWidth/2:U.x+a.container.scrollLeft-a.container.offsetLeft;var Ja=R||null==
+U?a.container.scrollTop+a.container.clientHeight/2:U.y+a.container.scrollTop-a.container.offsetTop;la.style.transformOrigin=ma+"px "+Ja+"px";la.style.transform="scale("+ba+")";ja.style.transformOrigin=ma+"px "+Ja+"px";ja.style.transform="scale("+ba+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(ma=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(ma.style,"transform-origin",(R||null==U?a.container.clientWidth/2+a.container.scrollLeft-ma.offsetLeft+"px":U.x+a.container.scrollLeft-
+ma.offsetLeft-a.container.offsetLeft+"px")+" "+(R||null==U?a.container.clientHeight/2+a.container.scrollTop-ma.offsetTop+"px":U.y+a.container.scrollTop-ma.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(ma.style,"transform","scale("+ba+")")):a.view.validateBackgroundStyles(ba,ma,Ja);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview","factor",ba))}ta(a.isFastZoomEnabled()?
+ca:0)};mxEvent.addGestureListeners(a.container,function(ba){null!=S&&window.clearTimeout(S)},null,function(ba){1!=a.cumulativeZoomFactor&&ta(0)});mxEvent.addListener(a.container,"scroll",function(ba){null==S||a.isMouseDown||1==a.cumulativeZoomFactor||ta(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(ba,R,ca,ma,Ja){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ca&&a.isScrollWheelEvent(ba))ca=a.view.getTranslate(),ma=40/a.view.scale,
+mxEvent.isShiftDown(ba)?a.view.setTranslate(ca.x+(R?-ma:ma),ca.y):a.view.setTranslate(ca.x,ca.y+(R?ma:-ma));else if(ca||a.isZoomWheelEvent(ba))for(var na=mxEvent.getSource(ba);null!=na;){if(na==a.container)return a.tooltipHandler.hideTooltip(),U=null!=ma&&null!=Ja?new mxPoint(ma,Ja):new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),fa=ca,ca=a.zoomFactor,ma=null,ba.ctrlKey&&null!=ba.deltaY&&40>Math.abs(ba.deltaY)&&Math.round(ba.deltaY)!=ba.deltaY?ca=1+Math.abs(ba.deltaY)/20*(ca-1):null!=ba.movementY&&
+"pointermove"==ba.type&&(ca=1+Math.max(1,Math.abs(ba.movementY))/20*(ca-1),ma=-1),a.lazyZoom(R,null,ma,ca),mxEvent.consume(ba),!1;na=na.parentNode}}),a.container);a.panningHandler.zoomGraph=function(ba){a.cumulativeZoomFactor=ba.scale;a.lazyZoom(0<ba.scale,!0);mxEvent.consume(ba)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;if(null!=this.format){var b=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+b+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=a?240:0;this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),
1E3*b)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};
@@ -2333,8 +2332,8 @@ Sidebar.prototype.addSearchPalette=function(a){function b(){h.setAttribute("src"
document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");g.appendChild(d);var h=document.createElement("img");h.setAttribute("src",Editor.magnifyImage);h.setAttribute("title",mxResources.get("search"));h.className="geAdaptiveAsset";h.style.background="url('"+this.editorUi.editor.transparentImage+"')";g.appendChild(h);f.appendChild(g);var m=document.createElement("div");m.style.display="none";m.style.paddingTop="8px";m.style.alignItems=
"center";m.style.justifyContent="center";var q=mxUtils.button(mxResources.get("moreResults"),function(){G()});q.setAttribute("title",mxResources.get("moreResults"));q.className="geBtn gePrimaryBtn";q.style.borderRadius="16px";q.style.padding="8px 12px";m.appendChild(q);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},D=12,E=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var I=f.firstChild;null!=I;){var J=I.nextSibling;I!=g&&I!=m&&I.parentNode.removeChild(I);I=J}});mxEvent.addListener(h,
"click",function(){h.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){D=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(E(),k=d.value,C={},w=!1,z=0),!u&&!w)){q.setAttribute("disabled","true");m.style.display="flex";q.style.cursor="wait";q.innerHTML="";mxUtils.write(q,mxResources.get("loading")+"...");u=!0;var I={};this.currentSearch=I;try{this.searchEntries(k,
-D,z,mxUtils.bind(this,function(J,T,K,U){if(this.currentSearch==I){J=null!=J?J:[];u=!1;z++;this.insertSearchHint(f,k,D,z,J,T,K,U);0==J.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<J.length;T++)mxUtils.bind(this,function(V){try{var Q=V();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(V,!1)&&(Q.style.opacity=this.closedLibraryOpacity);null==C[Q.innerHTML]?(C[Q.innerHTML]=null!=V.parentLibraries?V.parentLibraries.slice():[],f.appendChild(Q)):
-null!=V.parentLibraries&&(C[Q.innerHTML]=C[Q.innerHTML].concat(V.parentLibraries));mxEvent.addGestureListeners(Q,null,null,mxUtils.bind(this,function(N){var W=C[Q.innerHTML];mxEvent.isPopupTrigger(N)&&this.showPopupMenuForEntry(Q,W,N)}));mxEvent.disableContextMenu(Q)}catch(N){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(N.stack)):console.error(N))}})(J[T]);K?(q.removeAttribute("disabled"),q.innerHTML="",mxUtils.write(q,mxResources.get("moreResults"))):
+D,z,mxUtils.bind(this,function(J,T,K,V){if(this.currentSearch==I){J=null!=J?J:[];u=!1;z++;this.insertSearchHint(f,k,D,z,J,T,K,V);0==J.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<J.length;T++)mxUtils.bind(this,function(W){try{var O=W();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(W,!1)&&(O.style.opacity=this.closedLibraryOpacity);null==C[O.innerHTML]?(C[O.innerHTML]=null!=W.parentLibraries?W.parentLibraries.slice():[],f.appendChild(O)):
+null!=W.parentLibraries&&(C[O.innerHTML]=C[O.innerHTML].concat(W.parentLibraries));mxEvent.addGestureListeners(O,null,null,mxUtils.bind(this,function(M){var X=C[O.innerHTML];mxEvent.isPopupTrigger(M)&&this.showPopupMenuForEntry(O,X,M)}));mxEvent.disableContextMenu(O)}catch(M){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(M.stack)):console.error(M))}})(J[T]);K?(q.removeAttribute("disabled"),q.innerHTML="",mxUtils.write(q,mxResources.get("moreResults"))):
(q.innerHTML=mxResources.get("reset"),m.style.display="none",w=!0);q.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){q.style.cursor=""}),this.searchClosedLibraries)}catch(J){this.editorUi.handleError(J)}}}else E(),k=d.value="",C={},m.style.display="none",w=!1,d.focus()});this.searchShapes=function(I){d.value=I;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(I){13==I.keyCode?(G(),mxEvent.consume(I)):27==I.keyCode&&b()}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
function(){""==d.value?(h.setAttribute("src",Editor.magnifyImage),h.setAttribute("title",mxResources.get("search"))):(h.setAttribute("src",Editor.crossImage),h.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,m.style.display="none"):d.value!=k?(m.style.display="none",w=!1):u||(m.style.display=w?"none":"flex")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,"mousedown",function(I){I.stopPropagation&&I.stopPropagation();
I.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};Sidebar.prototype.insertSearchHint=function(a,b,e,f,g,d,h,m){0==g.length&&1==f&&(e=document.createElement("div"),e.className="geSidebarText",b=mxResources.get("noResultsFor",[b]),e.setAttribute("title",b),mxUtils.write(e,b),a.appendChild(e))};
@@ -2452,43 +2451,43 @@ null!=w?(D.className="geButton",D.style.backgroundImage="url("+w+")",D.style.bac
null!=a[0]&&a[0].edge&&(f=this.createDragSource(D,this.createDropHandler(a,!1,h,G,z,C),this.createDragPreview(g,d),a,G,z),this.addClickHandler(D,f,a,q)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(D,null,mxUtils.bind(this,function(I){mxEvent.isMouseEvent(I)&&this.showTooltip(D,a,G.width,G.height,b,e)}))):(D.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",D.setAttribute("title",b));return D};
Sidebar.prototype.createDropHandler=function(a,b,e,f,g,d){e=null!=e?e:!0;return mxUtils.bind(this,function(h,m,q,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&h.isEnabled()){a=h.getImportableCells(a);if(0<a.length){h.stopEditing();w=null==q||mxEvent.isAltDown(m)?!1:h.isValidDropTarget(q,a,m);var z=null;null==q||w||(q=null);if(!h.isCellLocked(q||
h.getDefaultParent())){h.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&h.isSplitTarget(q,a,m)){var C=h.view.scale,D=h.view.translate,E=(k+D.x)*C,G=(u+D.y)*C,I=h.cloneCells(a);h.splitEdge(q,I,null,k-f.width/2,u-f.height/2,E,G);z=I}else if(0<a.length&&(z=h.importCells(a,k,u,q),h.model.isVertex(d)&&1==z.length&&h.model.isVertex(z[0]))){var J=h.insertEdge(h.model.getParent(d),null,"",d,z[0],h.createCurrentEdgeStyle());h.applyNewEdgeStyle(d,[J]);z.push(J);h.connectionHandler.insertBeforeSource&&
-h.insertEdgeBeforeCell(J,d)}if(null!=h.layoutManager){var T=h.layoutManager.getLayout(q);if(null!=T){C=h.view.scale;D=h.view.translate;E=(k+D.x)*C;G=(u+D.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],E,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)h.model.isVertex(z[K])&&h.isAutoSizeCell(z[K])&&h.updateCellSize(z[K])}catch(U){this.editorUi.handleError(U)}finally{h.model.endUpdate()}null!=z&&0<z.length&&(h.scrollCellToVisible(z[0]),
+h.insertEdgeBeforeCell(J,d)}if(null!=h.layoutManager){var T=h.layoutManager.getLayout(q);if(null!=T){C=h.view.scale;D=h.view.translate;E=(k+D.x)*C;G=(u+D.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],E,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||h.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)h.model.isVertex(z[K])&&h.isAutoSizeCell(z[K])&&h.updateCellSize(z[K])}catch(V){this.editorUi.handleError(V)}finally{h.model.endUpdate()}null!=z&&0<z.length&&(h.scrollCellToVisible(z[0]),
h.setSelectionCells(z));(g||h.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){h.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
Sidebar.prototype.dropAndConnect=function(a,b,e,f,g,d,h){var m=this.editorUi.editor.graph,q=m.model.isEdge(a)||null!=d?d:h;q=this.getDropAndConnectGeometry(a,b[q],e,b);var k=[];if(null!=q){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),D=!0;if(null!=m.layoutManager){var E=m.layoutManager.getLayout(C);null!=E&&E.constructor==mxStackLayout&&(D=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=E=0;if(null!=k){var I=k.origin;E=I.x;
-G=I.y}var J=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),T=m.getCellAt((q.x+E+m.view.translate.x)*m.view.scale,(q.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(W,O,X){return!m.isContainer(W.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,J=!0,m.model.isEdge(a)||(q.x-=I.x-E,q.y-=I.y-G));else if(!D||m.isTableRow(a)||m.isTableCell(a))q.x+=E,q.y+=G;E=z.x;G=z.y;m.model.isEdge(b[f])&&(G=E=0);k=b=m.importCells(b,q.x-(J?E:0),q.y-(J?
-G:0),J?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),U=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var V=m.getCellGeometry(b[e]),Q=null!=V?V.getTerminalPoint(!0):null;null!=Q&&Q.x==U.x&&Q.y==U.y&&m.model.setTerminal(b[e],a,
-!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(q.getTerminalPoint(!1),!1);else if(J&&m.model.isVertex(C)){var N=m.view.getState(C);I=N.cell!=m.view.currentRoot?N.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),E=q.x-Math.round(z.x),G=q.y-Math.round(z.y),q.x=Math.round(z.x),q.y=Math.round(z.y),m.model.setGeometry(b[f],q),m.cellsMoved(b,E,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(W){this.editorUi.handleError(W)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
+G=I.y}var J=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&D),T=m.getCellAt((q.x+E+m.view.translate.x)*m.view.scale,(q.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(X,N,Y){return!m.isContainer(X.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,J=!0,m.model.isEdge(a)||(q.x-=I.x-E,q.y-=I.y-G));else if(!D||m.isTableRow(a)||m.isTableCell(a))q.x+=E,q.y+=G;E=z.x;G=z.y;m.model.isEdge(b[f])&&(G=E=0);k=b=m.importCells(b,q.x-(J?E:0),q.y-(J?
+G:0),J?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=h&&null!=d&&(m.model.remove(b[h]),m.updateShapes(b[h],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),V=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=V)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var W=m.getCellGeometry(b[e]),O=null!=W?W.getTerminalPoint(!0):null;null!=O&&O.x==V.x&&O.y==V.y&&m.model.setTerminal(b[e],a,
+!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(q.getTerminalPoint(!1),!1);else if(J&&m.model.isVertex(C)){var M=m.view.getState(C);I=M.cell!=m.view.currentRoot?M.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),E=q.x-Math.round(z.x),G=q.y-Math.round(z.y),q.x=Math.round(z.x),q.y=Math.round(z.y),m.model.setGeometry(b[f],q),m.cellsMoved(b,E,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=h?m.model.setTerminal(b[h],a,!0):b.push(m.insertEdge(null,
+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=g&&mxEvent.isShiftDown(g)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(X){this.editorUi.handleError(X)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=h&&1<k.length&&k.splice(h,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var g=this.editorUi.editor.graph,d=g.view,h=1<f.length,m=g.view.getState(a),q=g.getCellGeometry(a);f=g.getCellGeometry(b);null!=m&&null!=q&&null!=f&&(f=f.clone(),g.model.isEdge(a)?(q=m.absolutePoints,b=q[0],g=q[q.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=g.x/d.scale-d.translate.x-f.width/2,f.y=g.y/d.scale-d.translate.y-f.height/2)):(q.relative&&(q=q.clone(),
q.x=(m.x-d.translate.x)/d.scale,q.y=(m.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),g=f.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),f.x=q.getCenterX(),f.y=q.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=q.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=q.x+q.width,f.setTerminalPoint(new mxPoint(f.x+
f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=q.y+q.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=q.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!h&&45<f.width&&45<f.height&&45<q.width&&45<q.height&&(f.width*=q.height/f.height,f.height=q.height),f.x=q.x+q.width/2-f.width/2,f.y=q.y+q.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-q.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+q.width/2+
f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+q.height/2+f.height/2+d:e==mxConstants.DIRECTION_WEST&&(f.x=f.x-q.width/2-f.width/2-d),g.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(q=g.getCellGeometry(b.getTerminal(!1)),null!=q&&(e==mxConstants.DIRECTION_NORTH?(f.x-=q.getCenterX(),f.y-=q.getCenterY()+q.height/2):e==mxConstants.DIRECTION_EAST?(f.x-=q.getCenterX()-q.width/2,f.y-=q.getCenterY()):e==mxConstants.DIRECTION_SOUTH?(f.x-=q.getCenterX(),f.y-=q.getCenterY()-q.height/
2):e==mxConstants.DIRECTION_WEST&&(f.x-=q.getCenterX()+q.width/2,f.y-=q.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
-Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(ma,ya){var za=mxUtils.createImage(ma.src);za.style.width=ma.width+"px";za.style.height=ma.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,ma==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(ma,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,ma,ya)?(mxUtils.setOpacity(Ka,100),M=Ka):mxUtils.setOpacity(Ka,Ka==O?30:20));return za}var q=this.editorUi,k=
-q.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,D=0;D<f.length&&C;D++)d+=k.model.getDescendants(f[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,ya,za,Ka,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
-K&&M==O){var Ia=ma.isCellSelected(K.cell)?ma.getSelectionCells():[K.cell];ma.updateShapes(ma.model.isEdge(K.cell)?f[0]:f[w],Ia,!0);ma.setSelectionCells(Ia)}else null!=f&&null!=M&&null!=J&&M!=O?(Ia=ma.model.isEdge(J.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(J.cell,f,ta,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
-G.createPreviewElement=mxUtils.bind(this,function(ma){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";ma=ma.view.scale;ya.style.width=ma*Math.max(1,g.width)+"px";ya.style.height=ma*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(za,ma*Math.max(1,g.width),ma*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,
-0,ma);return ya}));var I=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var J=null,T=null,K=null,U=!1,V=h(this.triangleUp,mxResources.get("connect")),Q=h(this.triangleRight,mxResources.get("connect")),N=h(this.triangleDown,mxResources.get("connect")),W=h(this.triangleLeft,mxResources.get("connect")),O=h(this.refreshTarget,mxResources.get("replace")),X=null,ja=h(this.roundDrop),
-ka=h(this.roundDrop),ta=mxConstants.DIRECTION_NORTH,M=null,aa=G.createPreviewElement;G.createPreviewElement=function(ma){var ya=aa.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var ea=G.dragEnter;G.dragEnter=function(ma,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("none");ea.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("");da.apply(this,
-arguments)};G.dragOver=function(ma,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=M&&this.currentGuide.hide();if(null!=this.previewElement){q.hideShapePicker();var za=ma.view;if(null!=K&&M==O)this.previewElement.style.display="none";else if(null!=J&&null!=M){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=ma.model.isEdge(J.cell)||null!=w?w:u,Pa=z.getDropAndConnectGeometry(J.cell,f[Ka],ta,f),Ia=ma.model.isEdge(J.cell)?
-null:ma.getCellGeometry(J.cell),Ha=ma.getCellGeometry(f[Ka]),qa=ma.model.getParent(J.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&ma.model.isVertex(qa)&&qa!=za.currentRoot&&(Va=za.getState(qa),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;ma.model.isEdge(f[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Pa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Pa.y-Ha)*za.scale+Va+"px";1==f.length&&(this.previewElement.style.width=Pa.width*za.scale+"px",this.previewElement.style.height=
-Pa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&ma.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
-g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var sa=(new Date).getTime(),Y=0,P=null,ba=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(ma,ya,za,Ka){var Pa=mxEvent.isAltDown(Ka)||
-null==f?null:ma.getCellAt(ya,za,null,null,null,function(Va,Wa,cb){return ma.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ia=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Pa=Ia)}ma.isCellLocked(Pa)&&(Pa=null);var Ha=ma.view.getState(Pa);Ia=M=null;P!=Ha?(sa=(new Date).getTime(),Y=0,P=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ha&&(this.updateThread=window.setTimeout(function(){null==M&&(P=Ha,G.getDropTarget(ma,ya,za,Ka))},this.dropTargetDelay+10))):Y=(new Date).getTime()-sa;if(E&&2500>Y&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,
-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<Y||ma.model.isEdge(Ha.cell))&&Y>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(ma.model.isVertex(Ha.cell)&&null!=w||ma.model.isEdge(Ha.cell)&&ma.model.isEdge(f[0]))){if(ma.isCellEditable(Ha.cell)){K=Ha;var qa=ma.model.isEdge(Ha.cell)?ma.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);O.style.left=Math.floor(qa.x)+"px";O.style.top=Math.floor(qa.y)+"px";null==X&&(ma.container.appendChild(O),X=O.parentNode);m(ya,za,qa,O)}}else null==K||!mxUtils.contains(K,ya,za)||1500<Y&&!mxEvent.isShiftDown(Ka)?(K=null,null!=X&&(O.parentNode.removeChild(O),X=null)):null!=K&&null!=X&&(qa=ma.model.isEdge(K.cell)?ma.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),qa=new mxRectangle(qa.x-this.refreshTarget.width/2,qa.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,qa,O));if(U&&null!=J&&!mxEvent.isAltDown(Ka)&&null==M){Ia=mxRectangle.fromRectangle(J);if(ma.model.isEdge(J.cell)){var Da=J.absolutePoints;null!=ja.parentNode&&(qa=Da[0],Ia.add(m(ya,za,new mxRectangle(qa.x-this.roundDrop.width/2,qa.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ja)));null!=ka.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),ka)))}else qa=mxRectangle.fromRectangle(J),null!=J.shape&&null!=J.shape.boundingBox&&(qa=mxRectangle.fromRectangle(J.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(J.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&
-"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleUp.width/2,qa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),V)),Ia.add(m(ya,za,new mxRectangle(qa.x+qa.width,J.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Q)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleDown.width/2,qa.y+qa.height,this.triangleDown.width,
-this.triangleDown.height),N)),Ia.add(m(ya,za,new mxRectangle(qa.x-this.triangleLeft.width,J.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),W));null!=Ia&&Ia.grow(10)}ta=mxConstants.DIRECTION_NORTH;M==Q?ta=mxConstants.DIRECTION_EAST:M==N||M==ka?ta=mxConstants.DIRECTION_SOUTH:M==W&&(ta=mxConstants.DIRECTION_WEST);null!=K&&M==O&&(Ha=K);qa=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Pa)&&null!=w||ma.model.isVertex(Pa)&&ma.isCellConnectable(Pa));if(null!=
-J&&5E3<=Y||J!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<Y&&null==M&&qa))if(U=!1,J=5E3>Y&&Y>this.dropTargetDelay||ma.model.isEdge(Pa)?Ha:null,null!=J&&qa){Ia=[ja,ka,V,Q,N,W];for(qa=0;qa<Ia.length;qa++)null!=Ia[qa].parentNode&&Ia[qa].parentNode.removeChild(Ia[qa]);ma.model.isEdge(Pa)?(Da=Ha.absolutePoints,null!=Da&&(qa=Da[0],Da=Da[Da.length-1],ja.style.left=Math.floor(qa.x-this.roundDrop.width/2)+"px",ja.style.top=Math.floor(qa.y-this.roundDrop.height/2)+"px",ka.style.left=Math.floor(Da.x-this.roundDrop.width/
-2)+"px",ka.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Pa,!0)&&ma.container.appendChild(ja),null==ma.model.getTerminal(Pa,!1)&&ma.container.appendChild(ka))):(qa=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(qa=mxRectangle.fromRectangle(Ha.shape.boundingBox)),qa.grow(this.graph.tolerance),qa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(qa.x-=Da.horizontalOffset/2,qa.y-=
-Da.verticalOffset/2,qa.width+=Da.horizontalOffset,qa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&qa.add(Da.rotationShape.boundingBox)),V.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",V.style.top=Math.floor(qa.y-this.triangleUp.height)+"px",Q.style.left=Math.floor(qa.x+qa.width)+"px",Q.style.top=Math.floor(Ha.getCenterY()-
-this.triangleRight.height/2)+"px",N.style.left=V.style.left,N.style.top=Math.floor(qa.y+qa.height)+"px",W.style.left=Math.floor(qa.x-this.triangleLeft.width)+"px",W.style.top=Q.style.top,"eastwest"!=Ha.style.portConstraint&&(ma.container.appendChild(V),ma.container.appendChild(N)),ma.container.appendChild(Q),ma.container.appendChild(W));null!=Ha&&(T=ma.selectionCellsHandler.getHandler(Ha.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));U=!0}else for(Ia=[ja,ka,V,Q,N,W],qa=0;qa<Ia.length;qa++)null!=
-Ia[qa].parentNode&&Ia[qa].parentNode.removeChild(Ia[qa]);U||null==T||T.setHandlesVisible(!0);Pa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&M==O?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Pa||null==M&&ma.isSplitTarget(Pa,f,Ka)||(Pa=ma.getDropTarget(f,Ka,Pa,!0));return Pa});var la=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;la.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var ma=[ja,ka,O,V,Q,N,W],
-ya=0;ya<ma.length;ya++)null!=ma[ya].parentNode&&ma[ya].parentNode.removeChild(ma[ya]);null!=J&&null!=T&&T.reset();M=X=K=J=T=z.activeDragSource=null};return G};
+Sidebar.prototype.createDragSource=function(a,b,e,f,g,d){function h(na,ya){var za=mxUtils.createImage(na.src);za.style.width=na.width+"px";za.style.height=na.height+"px";null!=ya&&za.setAttribute("title",ya);mxUtils.setOpacity(za,na==this.refreshTarget?30:20);za.style.position="absolute";za.style.cursor="crosshair";return za}function m(na,ya,za,Ka){null!=Ka.parentNode&&(mxUtils.contains(za,na,ya)?(mxUtils.setOpacity(Ka,100),U=Ka):mxUtils.setOpacity(Ka,Ka==N?30:20));return za}var q=this.editorUi,k=
+q.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,D=0;D<f.length&&C;D++)d+=k.model.getDescendants(f[D]).length,C=d<k.graphHandler.maxLivePreview;for(D=0;D<f.length&&(null==w&&k.model.isVertex(f[D])?w=D:null==u&&k.model.isEdge(f[D])&&null==k.model.getTerminal(f[D],!0)&&(u=D),null==w||null==u);D++);var E=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(na,ya,za,Ka,Pa){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+K&&U==N){var Ia=na.isCellSelected(K.cell)?na.getSelectionCells():[K.cell];na.updateShapes(na.model.isEdge(K.cell)?f[0]:f[w],Ia,!0);na.setSelectionCells(Ia)}else null!=f&&null!=U&&null!=J&&U!=N?(Ia=na.model.isEdge(J.cell)||null==u?w:u,na.setSelectionCells(this.dropAndConnect(J.cell,f,S,Ia,ya,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(na.view.getState(na.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
+G.createPreviewElement=mxUtils.bind(this,function(na){var ya=document.createElement("a");ya.className="geItem";ya.style.overflow="visible";na=na.view.scale;ya.style.width=na*Math.max(1,g.width)+"px";ya.style.height=na*Math.max(1,g.height)+"px";mxUtils.setOpacity(ya,50);var za=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(za),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(za,na*Math.max(1,g.width),na*Math.max(1,g.height),ya,null,null,null,null,null,k.shapeBackgroundColor,
+0,na);return ya}));var I=G.mouseDown;G.mouseDown=function(na){mxEvent.isPopupTrigger(na)||mxEvent.isMultiTouchEvent(na)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var J=null,T=null,K=null,V=!1,W=h(this.triangleUp,mxResources.get("connect")),O=h(this.triangleRight,mxResources.get("connect")),M=h(this.triangleDown,mxResources.get("connect")),X=h(this.triangleLeft,mxResources.get("connect")),N=h(this.refreshTarget,mxResources.get("replace")),Y=null,ja=h(this.roundDrop),
+la=h(this.roundDrop),S=mxConstants.DIRECTION_NORTH,U=null,aa=G.createPreviewElement;G.createPreviewElement=function(na){var ya=aa.apply(this,arguments);this.previewElementWidth=ya.style.width;this.previewElementHeight=ya.style.height;ya.style.pointerEvents="none";return ya};var fa=G.dragEnter;G.dragEnter=function(na,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("none");fa.apply(this,arguments)};var ka=G.dragExit;G.dragExit=function(na,ya){null!=q.hoverIcons&&q.hoverIcons.setDisplay("");ka.apply(this,
+arguments)};G.dragOver=function(na,ya){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=U&&this.currentGuide.hide();if(null!=this.previewElement){q.hideShapePicker();var za=na.view;if(null!=K&&U==N)this.previewElement.style.display="none";else if(null!=J&&null!=U){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=na.model.isEdge(J.cell)||null!=w?w:u,Pa=z.getDropAndConnectGeometry(J.cell,f[Ka],S,f),Ia=na.model.isEdge(J.cell)?
+null:na.getCellGeometry(J.cell),Ha=na.getCellGeometry(f[Ka]),ra=na.model.getParent(J.cell),Da=za.translate.x*za.scale,Va=za.translate.y*za.scale;null!=Ia&&!Ia.relative&&na.model.isVertex(ra)&&ra!=za.currentRoot&&(Va=za.getState(ra),Da=Va.x,Va=Va.y);Ia=Ha.x;Ha=Ha.y;na.model.isEdge(f[Ka])&&(Ha=Ia=0);this.previewElement.style.left=(Pa.x-Ia)*za.scale+Da+"px";this.previewElement.style.top=(Pa.y-Ha)*za.scale+Va+"px";1==f.length&&(this.previewElement.style.width=Pa.width*za.scale+"px",this.previewElement.style.height=
+Pa.height*za.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&na.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*za.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
+g.height*za.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ta=(new Date).getTime(),ba=0,R=null,ca=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(na,ya,za,Ka){var Pa=mxEvent.isAltDown(Ka)||
+null==f?null:na.getCellAt(ya,za,null,null,null,function(Va,Wa,cb){return na.isContainer(Va.cell)&&"0"!=mxUtils.getValue(Va.style,"dropTarget","1")});if(null!=Pa&&!this.graph.isCellConnectable(Pa)&&!this.graph.model.isEdge(Pa)){var Ia=this.graph.getModel().getParent(Pa);this.graph.getModel().isVertex(Ia)&&this.graph.isCellConnectable(Ia)&&(Pa=Ia)}na.isCellLocked(Pa)&&(Pa=null);var Ha=na.view.getState(Pa);Ia=U=null;R!=Ha?(ta=(new Date).getTime(),ba=0,R=Ha,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=Ha&&(this.updateThread=window.setTimeout(function(){null==U&&(R=Ha,G.getDropTarget(na,ya,za,Ka))},this.dropTargetDelay+10))):ba=(new Date).getTime()-ta;if(E&&2500>ba&&null!=Ha&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ha.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ha.style,
+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)||1500<ba||na.model.isEdge(Ha.cell))&&ba>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ha)&&(na.model.isVertex(Ha.cell)&&null!=w||na.model.isEdge(Ha.cell)&&na.model.isEdge(f[0]))){if(na.isCellEditable(Ha.cell)){K=Ha;var ra=na.model.isEdge(Ha.cell)?na.view.getPoint(Ha):new mxPoint(Ha.getCenterX(),Ha.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height);N.style.left=Math.floor(ra.x)+"px";N.style.top=Math.floor(ra.y)+"px";null==Y&&(na.container.appendChild(N),Y=N.parentNode);m(ya,za,ra,N)}}else null==K||!mxUtils.contains(K,ya,za)||1500<ba&&!mxEvent.isShiftDown(Ka)?(K=null,null!=Y&&(N.parentNode.removeChild(N),Y=null)):null!=K&&null!=Y&&(ra=na.model.isEdge(K.cell)?na.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height),m(ya,za,ra,N));if(V&&null!=J&&!mxEvent.isAltDown(Ka)&&null==U){Ia=mxRectangle.fromRectangle(J);if(na.model.isEdge(J.cell)){var Da=J.absolutePoints;null!=ja.parentNode&&(ra=Da[0],Ia.add(m(ya,za,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ja)));null!=la.parentNode&&(Da=Da[Da.length-1],Ia.add(m(ya,za,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),la)))}else ra=mxRectangle.fromRectangle(J),null!=J.shape&&null!=J.shape.boundingBox&&(ra=mxRectangle.fromRectangle(J.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(J.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&
+"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),W)),Ia.add(m(ya,za,new mxRectangle(ra.x+ra.width,J.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),O)),Ia.add(m(ya,za,new mxRectangle(J.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,
+this.triangleDown.height),M)),Ia.add(m(ya,za,new mxRectangle(ra.x-this.triangleLeft.width,J.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),X));null!=Ia&&Ia.grow(10)}S=mxConstants.DIRECTION_NORTH;U==O?S=mxConstants.DIRECTION_EAST:U==M||U==la?S=mxConstants.DIRECTION_SOUTH:U==X&&(S=mxConstants.DIRECTION_WEST);null!=K&&U==N&&(Ha=K);ra=(null==w||na.isCellConnectable(f[w]))&&(na.model.isEdge(Pa)&&null!=w||na.model.isVertex(Pa)&&na.isCellConnectable(Pa));if(null!=
+J&&5E3<=ba||J!=Ha&&(null==Ia||!mxUtils.contains(Ia,ya,za)||500<ba&&null==U&&ra))if(V=!1,J=5E3>ba&&ba>this.dropTargetDelay||na.model.isEdge(Pa)?Ha:null,null!=J&&ra){Ia=[ja,la,W,O,M,X];for(ra=0;ra<Ia.length;ra++)null!=Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);na.model.isEdge(Pa)?(Da=Ha.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ja.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ja.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",la.style.left=Math.floor(Da.x-
+this.roundDrop.width/2)+"px",la.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==na.model.getTerminal(Pa,!0)&&na.container.appendChild(ja),null==na.model.getTerminal(Pa,!1)&&na.container.appendChild(la))):(ra=mxRectangle.fromRectangle(Ha),null!=Ha.shape&&null!=Ha.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ha.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ha.cell),null!=Da&&(ra.x-=Da.horizontalOffset/
+2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),W.style.left=Math.floor(Ha.getCenterX()-this.triangleUp.width/2)+"px",W.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",O.style.left=Math.floor(ra.x+ra.width)+"px",O.style.top=Math.floor(Ha.getCenterY()-
+this.triangleRight.height/2)+"px",M.style.left=W.style.left,M.style.top=Math.floor(ra.y+ra.height)+"px",X.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",X.style.top=O.style.top,"eastwest"!=Ha.style.portConstraint&&(na.container.appendChild(W),na.container.appendChild(M)),na.container.appendChild(O),na.container.appendChild(X));null!=Ha&&(T=na.selectionCellsHandler.getHandler(Ha.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));V=!0}else for(Ia=[ja,la,W,O,M,X],ra=0;ra<Ia.length;ra++)null!=
+Ia[ra].parentNode&&Ia[ra].parentNode.removeChild(Ia[ra]);V||null==T||T.setHandlesVisible(!0);Pa=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=K&&U==N?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Pa||null==U&&na.isSplitTarget(Pa,f,Ka)||(Pa=na.getDropTarget(f,Ka,Pa,!0));return Pa});var ma=G.startDrag;G.startDrag=function(na){z.activeDragSource=this;ma.apply(this,arguments)};var Ja=G.stopDrag;G.stopDrag=function(){Ja.apply(this,arguments);for(var na=[ja,la,N,W,O,M,X],
+ya=0;ya<na.length;ya++)null!=na[ya].parentNode&&na[ya].parentNode.removeChild(na[ya]);null!=J&&null!=T&&T.reset();U=Y=K=J=T=z.activeDragSource=null};return G};
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)f.model.isVertex(a[g])&&(b=g);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
Sidebar.prototype.addClickHandler=function(a,b,e,f){var g=b.getGraphForEvent,d=b.mouseDown,h=b.mouseMove,m=b.mouseUp,q=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,z=null;b.getGraphForEvent=function(C){return k?g.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none")};b.mouseMove=function(C){(k=null!=u&&(Math.abs(u.x-
@@ -2518,39 +2517,38 @@ mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphVie
mxShape.prototype.getConstraints=function(a,b,e){return null};mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};
(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,g,d){return"default"==g&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();
(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,g,d,h,m,q){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geButton")}return k}})();
-Graph=function(a,b,e,f,g,d){mxGraph.call(this,a,b,e,f);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var h=null,m=null,q=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var ea=M.getState();aa=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=ea&&(w=this.isCellSelected(ea.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent()))){var da=
-this.selectionCellsHandler.getHandler(ea.cell);if(null==da||null==da.getHandleForEvent(M)){var sa=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),Y=mxEvent.isTouchEvent(M.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=Y+2;sa.grow(Y);if(this.isTableCell(ea.cell)&&this.isCellMovable(ea.cell)&&!this.isCellSelected(ea.cell)&&!(mxUtils.contains(ea,M.getGraphX()-da,M.getGraphY()-da)&&mxUtils.contains(ea,M.getGraphX()-da,M.getGraphY()+da)&&mxUtils.contains(ea,
-M.getGraphX()+da,M.getGraphY()+da)&&mxUtils.contains(ea,M.getGraphX()+da,M.getGraphY()-da))){var P=this.model.getParent(ea.cell);da=this.model.getParent(P);if(!this.isCellSelected(da)){Y*=aa;var ba=2*Y;if(this.model.getChildAt(da,0)!=P&&mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y-Y,ea.width,ba))||this.model.getChildAt(P,0)!=ea.cell&&mxUtils.intersects(sa,new mxRectangle(ea.x-Y,ea.y,ba,ea.height))||mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y+ea.height-Y,ea.width,ba))||mxUtils.intersects(sa,
-new mxRectangle(ea.x+ea.width-Y,ea.y,ba,ea.height)))P=this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,M.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(Y=da.getHandleForEvent(M),null!=Y&&(da.start(M.getGraphX(),M.getGraphY(),Y),da.blockDelayedSelection=!P,M.consume()))}}for(;!M.isConsumed()&&null!=ea&&(this.isTableCell(ea.cell)||this.isTableRow(ea.cell)||this.isTable(ea.cell));)this.isSwimlane(ea.cell)&&this.isCellMovable(ea.cell)&&(da=this.getActualStartSize(ea.cell),
-(0<da.x||0<da.width)&&mxUtils.intersects(sa,new mxRectangle(ea.x+(da.x-da.width-1)*aa+(0==da.x?ea.width:0),ea.y,1,ea.height))||(0<da.y||0<da.height)&&mxUtils.intersects(sa,new mxRectangle(ea.x,ea.y+(da.y-da.height-1)*aa+(0==da.y?ea.height:0),ea.width,1)))&&(this.selectCellForEvent(ea.cell,M.getEvent()),da=this.selectionCellsHandler.getHandler(ea.cell),null!=da&&null!=da.customHandles&&(Y=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(M.getGraphX(),M.getGraphY(),Y),M.consume())),ea=this.view.getState(this.model.getParent(ea.cell))}}}}));
-this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){if("mouseDown"==aa.getProperty("eventName")&&this.isEnabled()){M=aa.getProperty("event");var ea=M.getState();mxEvent.isAltDown(M.getEvent())||mxEvent.isControlDown(aa)||mxEvent.isShiftDown(aa)||w||null==ea||!this.model.isEdge(ea.cell)||(h=new mxPoint(M.getGraphX(),M.getGraphY()),u=this.isCellSelected(ea.cell),q=ea,m=M,null!=ea.text&&null!=ea.text.boundingBox&&mxUtils.contains(ea.text.boundingBox,M.getGraphX(),M.getGraphY())?
-k=mxEvent.LABEL_HANDLE:(aa=this.selectionCellsHandler.getHandler(ea.cell),null!=aa&&null!=aa.bends&&0<aa.bends.length&&(k=aa.getHandleForEvent(M))))}}));this.addMouseListener({mouseDown:function(M,aa){},mouseMove:mxUtils.bind(this,function(M,aa){M=this.selectionCellsHandler.handlers.map;for(var ea in M)if(null!=M[ea].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(aa.getEvent())){var da=this.tolerance;if(null!=h&&null!=q&&null!=m){if(ea=q,null!=k||Math.abs(h.x-
-aa.getGraphX())>da||Math.abs(h.y-aa.getGraphY())>da){var sa=null;mxEvent.isShiftDown(aa.getEvent())||(sa=this.selectionCellsHandler.getHandler(ea.cell));if(null!=sa&&null!=sa.bends&&0<sa.bends.length){sa.redrawHandles();var Y=null!=k?k:sa.getHandleForEvent(m),P=this.view.getEdgeStyle(ea),ba=P==mxEdgeStyle.EntityRelation;da=ea.absolutePoints;u||(Y=k);Y!=mxEvent.LABEL_HANDLE&&null!=da&&(Y=k,null==Y&&(M=new mxRectangle(h.x,h.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,da[0].x,
-da[0].y)?Y=0:mxUtils.contains(M,da[da.length-1].x,da[da.length-1].y)?Y=sa.bends.length-1:null!=da&&(null==P&&null==Y||P==mxEdgeStyle.SegmentConnector||P==mxEdgeStyle.OrthConnector)&&(null!=P&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?Y=2:(Y=mxUtils.findNearestSegment(ea,h.x,h.y),Y=null==P?mxEvent.VIRTUAL_HANDLE-Y:Y+1))),null==Y&&(Y=mxEvent.VIRTUAL_HANDLE));M=Y==mxEvent.LABEL_HANDLE||
-0==Y||Y==sa.bends.length-1;if(!ba&&(null!=ea.visibleSourceState||null!=ea.visibleTargetState)||M)sa.start(aa.getGraphX(),aa.getGraphX(),Y),aa.consume(),this.graphHandler.reset()}null!=sa&&(this.selectionCellsHandler.isHandlerActive(sa)?this.isCellSelected(ea.cell)||(this.selectionCellsHandler.handlers.put(ea.cell,sa),this.selectCellForEvent(ea.cell,aa.getEvent())):this.isCellSelected(ea.cell)||sa.destroy());u=!1;h=m=q=k=null}}else if(ea=aa.getState(),null!=ea&&this.isCellEditable(ea.cell)){M=this.model.getParent(ea.cell);
-sa=null;if(this.model.isEdge(ea.cell)&&!this.isCellSelected(ea.cell)&&!mxEvent.isAltDown(aa.getEvent())&&!mxEvent.isShiftDown(aa.getEvent())&&!this.isAncestorSelected(ea.cell)&&(this.isSwimlane(M)||this.model.isLayer(M)||this.getCurrentRoot()==M)){if(M=new mxRectangle(aa.getGraphX(),aa.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),da=ea.absolutePoints,null!=da)null!=ea.text&&null!=ea.text.boundingBox&&mxUtils.contains(ea.text.boundingBox,aa.getGraphX(),aa.getGraphY())?sa="move":
-mxUtils.contains(M,da[0].x,da[0].y)||mxUtils.contains(M,da[da.length-1].x,da[da.length-1].y)?sa="pointer":(P=this.view.getEdgeStyle(ea),P==mxEdgeStyle.EntityRelation||null==ea.visibleSourceState&&null==ea.visibleTargetState||(sa="crosshair",P!=mxEdgeStyle.SegmentConnector&&P!=mxEdgeStyle.OrthConnector))||(aa=mxUtils.findNearestSegment(ea,aa.getGraphX(),aa.getGraphY()),aa<da.length-1&&0<=aa&&(sa=0==Math.round(da[aa].x-da[aa+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(aa.getEvent())){da=
-mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(aa.getGraphX(),aa.getGraphY());M.grow(da);if(this.isTableCell(ea.cell)&&this.isCellMovable(ea.cell)&&(aa=this.model.getParent(ea.cell),da=this.model.getParent(aa),!this.isCellSelected(da)))if(mxUtils.intersects(M,new mxRectangle(ea.x,ea.y-2,ea.width,4))&&this.model.getChildAt(da,0)!=aa||mxUtils.intersects(M,new mxRectangle(ea.x,ea.y+ea.height-2,ea.width,4)))sa="row-resize";else if(mxUtils.intersects(M,new mxRectangle(ea.x-2,ea.y,4,ea.height))&&
-this.model.getChildAt(aa,0)!=ea.cell||mxUtils.intersects(M,new mxRectangle(ea.x+ea.width-2,ea.y,4,ea.height)))sa="col-resize";for(aa=ea;null==sa&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&this.isCellMovable(aa.cell)&&(da=this.getActualStartSize(aa.cell),Y=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(M,new mxRectangle(aa.x+(da.x-da.width-1)*Y+(0==da.x?aa.width*Y:0),aa.y,1,aa.height))?sa="col-resize":(0<da.y||0<da.height)&&
-mxUtils.intersects(M,new mxRectangle(aa.x,aa.y+(da.y-da.height-1)*Y+(0==da.y?aa.height:0),aa.width,1))&&(sa="row-resize")),aa=this.view.getState(this.model.getParent(aa.cell))}null!=sa&&ea.setCursor(sa)}}}),mouseUp:mxUtils.bind(this,function(M,aa){k=h=m=q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(M){var aa=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&("0"==mxUtils.getValue(M.style,
-"html","0")?aa=mxUtils.htmlEntities(aa,!1):(M.lastLabelValue!=aa&&(M.lastLabelValue=aa,M.lastSanitizedLabelValue=Graph.sanitizeHtml(aa),z.innerHTML=M.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==M.view.graph.getAdaptiveColors())&&(M.lastSanitizedLabelValue=z.innerHTML)),aa=M.lastSanitizedLabelValue));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(M,aa){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=C.apply(this,arguments);if(this.graph.pageVisible){var aa=
-[],ea=this.graph.pageFormat,da=this.graph.pageScale,sa=ea.width*da;ea=ea.height*da;da=this.graph.view.translate;for(var Y=this.graph.view.scale,P=this.graph.getPageLayout(),ba=0;ba<P.width;ba++)aa.push(new mxRectangle(((P.x+ba)*sa+da.x)*Y,(P.y*ea+da.y)*Y,sa*Y,ea*Y));for(ba=1;ba<P.height;ba++)aa.push(new mxRectangle((P.x*sa+da.x)*Y,((P.y+ba)*ea+da.y)*Y,sa*Y,ea*Y));M=aa.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,
-aa){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var aa=D.apply(this,arguments),ea=new mxDictionary,da=[],sa=0;sa<aa.length;sa++){var Y=this.graph.isTableCell(M)&&this.graph.isTableCell(aa[sa])&&
-this.graph.isCellSelected(aa[sa])?this.graph.model.getParent(aa[sa]):this.graph.isTableRow(M)&&this.graph.isTableRow(aa[sa])&&this.graph.isCellSelected(aa[sa])?aa[sa]:this.graph.getCompositeParent(aa[sa]);null==Y||ea.get(Y)||(ea.put(Y,!0),da.push(Y))}return da};var E=this.graphHandler.start;this.graphHandler.start=function(M,aa,ea,da){var sa=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?sa=!0:M=this.graph.model.getParent(M));sa||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||
-(M=this.graph.getCompositeParent(M));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(M,aa){aa=this.graph.getCompositeParent(aa);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(M,aa,ea,da,sa,Y){var P=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[P]);return P};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),
-J=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;T.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),J=0):J=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&K.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(M){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var V=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(M){return V.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var Q=null;this.panningHandler.addListener(mxEvent.PAN_START,
-mxUtils.bind(this,function(){this.isEnabled()&&(Q=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=Q)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var N=this.click;this.click=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(this.getLayerForCell(M.sourceState.cell));
-if(this.isEnabled()&&!aa||M.isConsumed())return N.apply(this,arguments);var ea=aa?M.sourceState.cell:M.getCell();if(null!=ea){var da=this.getClickableLinkForCell(ea);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ea):this.openLink(da):aa&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),aa=
-0;aa<M.length;aa++)null!=M[aa].getAttribute("href")&&null==M[aa].getAttribute("target")&&M[aa].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var aa=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(aa?M.sourceState.cell:M.getCell())};var O=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";
-if(this.isCellLocked(M))return"default"}return O.apply(this,arguments)};this.selectRegion=function(M,aa){var ea=mxEvent.isAltDown(aa)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,ea,null,!0);if(this.isToggleEvent(aa))for(ea=0;ea<M.length;ea++)this.selectCellForEvent(M[ea],aa);else this.selectCellsForEvent(M,aa);return M};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,aa,ea){return this.graph.isCellSelected(M)?!1:X.apply(this,
-arguments)};var ja=this.updateMouseEvent;this.updateMouseEvent=function(M){M=ja.apply(this,arguments);null!=M.state&&this.isCellLocked(this.getLayerForCell(M.getCell()))&&(null==this.getLinkForCell(M.getCell())?M.state=this.view.getState(this.getCellAt(M.getGraphX(),M.getGraphY(),null,null,null,mxUtils.bind(this,function(aa,ea,da){return M.state==aa||this.isCellLocked(this.getLayerForCell(aa.cell))&&null==this.getLinkForCell(aa.cell)}))):M.state=null);return M};var ka=this.isCellSelectable;this.isCellSelectable=
-function(M){return ka.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(M))};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};var ta=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,aa){"mouseDown"==aa.getProperty("eventName")&&(M=aa.getProperty("event").getState(),ta=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));
-this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,aa){if(!mxEvent.isMultiTouchEvent(aa)){M=aa.getProperty("event");var ea=aa.getProperty("cell");null==ea?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),G.start(M.x,M.y)):null!=ta?this.addSelectionCells(ta):1<this.getSelectionCount()&&this.isCellSelected(ea)&&this.removeSelectionCell(ea);ta=null;aa.consume()}}));this.connectionHandler.selectCells=function(M,aa){this.graph.setSelectionCell(aa||M)};
-this.connectionHandler.constraintHandler.isStateIgnored=function(M,aa){var ea=M.view.graph;return aa&&(ea.isCellSelected(M.cell)||ea.isTableRow(M.cell)&&ea.selectionCellsHandler.isHandled(ea.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&
-this.initTouch()}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=function(a,b,e,f,g,d){mxGraph.call(this,a,b,e,f);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(S){S=this.getCurrentCellStyle(S);
+return null!=S?"1"==S.html||"wrap"==S[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var h=null,m=null,q=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,U){if("mouseDown"==U.getProperty("eventName")&&this.isEnabled()){S=U.getProperty("event");var aa=S.getState();U=this.view.scale;if(!mxEvent.isAltDown(S.getEvent())&&null!=aa&&(w=this.isCellSelected(aa.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(S.getEvent()))){var fa=this.selectionCellsHandler.getHandler(aa.cell);
+if(null==fa||null==fa.getHandleForEvent(S)){var ka=new mxRectangle(S.getGraphX()-1,S.getGraphY()-1),ta=mxEvent.isTouchEvent(S.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;fa=ta+2;ka.grow(ta);if(this.isTableCell(aa.cell)&&this.isCellMovable(aa.cell)&&!this.isCellSelected(aa.cell)&&!(mxUtils.contains(aa,S.getGraphX()-fa,S.getGraphY()-fa)&&mxUtils.contains(aa,S.getGraphX()-fa,S.getGraphY()+fa)&&mxUtils.contains(aa,S.getGraphX()+fa,S.getGraphY()+fa)&&mxUtils.contains(aa,
+S.getGraphX()+fa,S.getGraphY()-fa))){var ba=this.model.getParent(aa.cell);fa=this.model.getParent(ba);if(!this.isCellSelected(fa)){ta*=U;var R=2*ta;if(this.model.getChildAt(fa,0)!=ba&&mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y-ta,aa.width,R))||this.model.getChildAt(ba,0)!=aa.cell&&mxUtils.intersects(ka,new mxRectangle(aa.x-ta,aa.y,R,aa.height))||mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y+aa.height-ta,aa.width,R))||mxUtils.intersects(ka,new mxRectangle(aa.x+aa.width-ta,aa.y,R,aa.height)))ba=
+this.selectionCellsHandler.isHandled(fa),this.selectCellForEvent(fa,S.getEvent()),fa=this.selectionCellsHandler.getHandler(fa),null!=fa&&(ta=fa.getHandleForEvent(S),null!=ta&&(fa.start(S.getGraphX(),S.getGraphY(),ta),fa.blockDelayedSelection=!ba,S.consume()))}}for(;!S.isConsumed()&&null!=aa&&(this.isTableCell(aa.cell)||this.isTableRow(aa.cell)||this.isTable(aa.cell));)this.isSwimlane(aa.cell)&&this.isCellMovable(aa.cell)&&(fa=this.getActualStartSize(aa.cell),(0<fa.x||0<fa.width)&&mxUtils.intersects(ka,
+new mxRectangle(aa.x+(fa.x-fa.width-1)*U+(0==fa.x?aa.width:0),aa.y,1,aa.height))||(0<fa.y||0<fa.height)&&mxUtils.intersects(ka,new mxRectangle(aa.x,aa.y+(fa.y-fa.height-1)*U+(0==fa.y?aa.height:0),aa.width,1)))&&(this.selectCellForEvent(aa.cell,S.getEvent()),fa=this.selectionCellsHandler.getHandler(aa.cell),null!=fa&&null!=fa.customHandles&&(ta=mxEvent.CUSTOM_HANDLE-fa.customHandles.length+1,fa.start(S.getGraphX(),S.getGraphY(),ta),S.consume())),aa=this.view.getState(this.model.getParent(aa.cell))}}}}));
+this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(S,U){if("mouseDown"==U.getProperty("eventName")&&this.isEnabled()){S=U.getProperty("event");var aa=S.getState();mxEvent.isAltDown(S.getEvent())||mxEvent.isControlDown(U)||mxEvent.isShiftDown(U)||w||null==aa||!this.model.isEdge(aa.cell)||(h=new mxPoint(S.getGraphX(),S.getGraphY()),u=this.isCellSelected(aa.cell),q=aa,m=S,null!=aa.text&&null!=aa.text.boundingBox&&mxUtils.contains(aa.text.boundingBox,S.getGraphX(),S.getGraphY())?
+k=mxEvent.LABEL_HANDLE:(U=this.selectionCellsHandler.getHandler(aa.cell),null!=U&&null!=U.bends&&0<U.bends.length&&(k=U.getHandleForEvent(S))))}}));this.addMouseListener({mouseDown:function(S,U){},mouseMove:mxUtils.bind(this,function(S,U){S=this.selectionCellsHandler.handlers.map;for(var aa in S)if(null!=S[aa].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(U.getEvent())){var fa=this.tolerance;if(null!=h&&null!=q&&null!=m){if(aa=q,null!=k||Math.abs(h.x-U.getGraphX())>
+fa||Math.abs(h.y-U.getGraphY())>fa){var ka=null;mxEvent.isShiftDown(U.getEvent())||(ka=this.selectionCellsHandler.getHandler(aa.cell));if(null!=ka&&null!=ka.bends&&0<ka.bends.length){ka.redrawHandles();var ta=null!=k?k:ka.getHandleForEvent(m),ba=this.view.getEdgeStyle(aa),R=ba==mxEdgeStyle.EntityRelation;fa=aa.absolutePoints;u||(ta=k);ta!=mxEvent.LABEL_HANDLE&&null!=fa&&(ta=k,null==ta&&(S=new mxRectangle(h.x,h.y),S.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(S,fa[0].x,fa[0].y)?
+ta=0:mxUtils.contains(S,fa[fa.length-1].x,fa[fa.length-1].y)?ta=ka.bends.length-1:null!=fa&&(null==ba&&null==ta||ba==mxEdgeStyle.SegmentConnector||ba==mxEdgeStyle.OrthConnector)&&(null!=ba&&(2==fa.length||3==fa.length&&(0==Math.round(fa[0].x-fa[1].x)&&0==Math.round(fa[1].x-fa[2].x)||0==Math.round(fa[0].y-fa[1].y)&&0==Math.round(fa[1].y-fa[2].y)))?ta=2:(ta=mxUtils.findNearestSegment(aa,h.x,h.y),ta=null==ba?mxEvent.VIRTUAL_HANDLE-ta:ta+1))),null==ta&&(ta=mxEvent.VIRTUAL_HANDLE));S=ta==mxEvent.LABEL_HANDLE||
+0==ta||ta==ka.bends.length-1;if(!R&&(null!=aa.visibleSourceState||null!=aa.visibleTargetState)||S)ka.start(U.getGraphX(),U.getGraphX(),ta),U.consume(),this.graphHandler.reset()}null!=ka&&(this.selectionCellsHandler.isHandlerActive(ka)?this.isCellSelected(aa.cell)||(this.selectionCellsHandler.handlers.put(aa.cell,ka),this.selectCellForEvent(aa.cell,U.getEvent())):this.isCellSelected(aa.cell)||ka.destroy());u=!1;h=m=q=k=null}}else if(aa=U.getState(),null!=aa&&this.isCellEditable(aa.cell)){S=this.model.getParent(aa.cell);
+ka=null;if(this.model.isEdge(aa.cell)&&!this.isCellSelected(aa.cell)&&!mxEvent.isAltDown(U.getEvent())&&!mxEvent.isShiftDown(U.getEvent())&&!this.isAncestorSelected(aa.cell)&&(this.isSwimlane(S)||this.model.isLayer(S)||this.getCurrentRoot()==S)){if(S=new mxRectangle(U.getGraphX(),U.getGraphY()),S.grow(mxEdgeHandler.prototype.handleImage.width/2),fa=aa.absolutePoints,null!=fa)null!=aa.text&&null!=aa.text.boundingBox&&mxUtils.contains(aa.text.boundingBox,U.getGraphX(),U.getGraphY())?ka="move":mxUtils.contains(S,
+fa[0].x,fa[0].y)||mxUtils.contains(S,fa[fa.length-1].x,fa[fa.length-1].y)?ka="pointer":(ba=this.view.getEdgeStyle(aa),ba==mxEdgeStyle.EntityRelation||null==aa.visibleSourceState&&null==aa.visibleTargetState||(ka="crosshair",ba!=mxEdgeStyle.SegmentConnector&&ba!=mxEdgeStyle.OrthConnector))||(U=mxUtils.findNearestSegment(aa,U.getGraphX(),U.getGraphY()),U<fa.length-1&&0<=U&&(ka=0==Math.round(fa[U].x-fa[U+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(U.getEvent())){fa=mxShape.prototype.svgStrokeTolerance/
+2;S=new mxRectangle(U.getGraphX(),U.getGraphY());S.grow(fa);if(this.isTableCell(aa.cell)&&this.isCellMovable(aa.cell)&&(U=this.model.getParent(aa.cell),fa=this.model.getParent(U),!this.isCellSelected(fa)))if(mxUtils.intersects(S,new mxRectangle(aa.x,aa.y-2,aa.width,4))&&this.model.getChildAt(fa,0)!=U||mxUtils.intersects(S,new mxRectangle(aa.x,aa.y+aa.height-2,aa.width,4)))ka="row-resize";else if(mxUtils.intersects(S,new mxRectangle(aa.x-2,aa.y,4,aa.height))&&this.model.getChildAt(U,0)!=aa.cell||mxUtils.intersects(S,
+new mxRectangle(aa.x+aa.width-2,aa.y,4,aa.height)))ka="col-resize";for(U=aa;null==ka&&null!=U&&(this.isTableCell(U.cell)||this.isTableRow(U.cell)||this.isTable(U.cell));)this.isSwimlane(U.cell)&&this.isCellMovable(U.cell)&&(fa=this.getActualStartSize(U.cell),ta=this.view.scale,(0<fa.x||0<fa.width)&&mxUtils.intersects(S,new mxRectangle(U.x+(fa.x-fa.width-1)*ta+(0==fa.x?U.width*ta:0),U.y,1,U.height))?ka="col-resize":(0<fa.y||0<fa.height)&&mxUtils.intersects(S,new mxRectangle(U.x,U.y+(fa.y-fa.height-
+1)*ta+(0==fa.y?U.height:0),U.width,1))&&(ka="row-resize")),U=this.view.getState(this.model.getParent(U.cell))}null!=ka&&aa.setCursor(ka)}}}),mouseUp:mxUtils.bind(this,function(S,U){k=h=m=q=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(S){var U=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);S.view.graph.isHtmlLabel(S.cell)&&("0"==mxUtils.getValue(S.style,"html","0")?U=mxUtils.htmlEntities(U,!1):(S.lastLabelValue!=
+U&&(S.lastLabelValue=U,S.lastSanitizedLabelValue=Graph.sanitizeHtml(U),z.innerHTML=S.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==S.view.graph.getAdaptiveColors())&&(S.lastSanitizedLabelValue=z.innerHTML)),U=S.lastSanitizedLabelValue));return U};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(S,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var S=C.apply(this,arguments);if(this.graph.pageVisible){var U=[],aa=this.graph.pageFormat,fa=this.graph.pageScale,ka=aa.width*fa;aa=aa.height*
+fa;fa=this.graph.view.translate;for(var ta=this.graph.view.scale,ba=this.graph.getPageLayout(),R=0;R<ba.width;R++)U.push(new mxRectangle(((ba.x+R)*ka+fa.x)*ta,(ba.y*aa+fa.y)*ta,ka*ta,aa*ta));for(R=1;R<ba.height;R++)U.push(new mxRectangle((ba.x*ka+fa.x)*ta,((ba.y+R)*aa+fa.y)*ta,ka*ta,aa*ta));S=U.concat(S)}return S};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(S,U){return null==S.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(S){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var D=this.graphHandler.getCells;this.graphHandler.getCells=function(S){for(var U=D.apply(this,arguments),aa=new mxDictionary,fa=[],ka=0;ka<U.length;ka++){var ta=this.graph.isTableCell(S)&&this.graph.isTableCell(U[ka])&&this.graph.isCellSelected(U[ka])?this.graph.model.getParent(U[ka]):this.graph.isTableRow(S)&&this.graph.isTableRow(U[ka])&&
+this.graph.isCellSelected(U[ka])?U[ka]:this.graph.getCompositeParent(U[ka]);null==ta||aa.get(ta)||(aa.put(ta,!0),fa.push(ta))}return fa};var E=this.graphHandler.start;this.graphHandler.start=function(S,U,aa,fa){var ka=!1;this.graph.isTableCell(S)&&(this.graph.isCellSelected(S)?ka=!0:S=this.graph.model.getParent(S));ka||this.graph.isTableRow(S)&&this.graph.isCellSelected(S)||(S=this.graph.getCompositeParent(S));E.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(S,U){U=this.graph.getCompositeParent(U);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(S,U,aa,fa,ka,ta){var ba=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=fa&&this.graph.applyNewEdgeStyle(fa,[ba]);return ba};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),J=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var S=this.currentState;T.apply(this,arguments);S!=this.currentState?
+(I=(new Date).getTime(),J=0):J=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(S){return mxEvent.isShiftDown(S.getEvent())&&mxEvent.isAltDown(S.getEvent())?!1:null!=this.currentState&&S.getState()==this.currentState&&2E3<J||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var V=this.isToggleEvent;this.isToggleEvent=function(S){return V.apply(this,
+arguments)||mxEvent.isShiftDown(S)};var W=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(W=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=W)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(S){return mxEvent.isMouseEvent(S.getEvent())};var O=this.click;this.click=
+function(S){var U=null==S.state&&null!=S.sourceState&&this.isCellLocked(this.getLayerForCell(S.sourceState.cell));if(this.isEnabled()&&!U||S.isConsumed())return O.apply(this,arguments);var aa=U?S.sourceState.cell:S.getCell();if(null!=aa){var fa=this.getClickableLinkForCell(aa);null!=fa?this.isCustomLink(fa)?this.customLinkClicked(fa,aa):this.openLink(fa):U&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(S){return S.sourceState};var M=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){M.apply(this,arguments);if(null!=this.div)for(var S=this.div.getElementsByTagName("a"),U=0;U<S.length;U++)null!=S[U].getAttribute("href")&&null==S[U].getAttribute("target")&&S[U].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(S){return S.sourceState};this.getCursorForMouseEvent=function(S){var U=null==S.state&&null!=S.sourceState&&this.isCellLocked(S.sourceState.cell);return this.getCursorForCell(U?S.sourceState.cell:S.getCell())};var X=this.getCursorForCell;
+this.getCursorForCell=function(S){if(!this.isEnabled()||this.isCellLocked(S)){if(null!=this.getClickableLinkForCell(S))return"pointer";if(this.isCellLocked(S))return"default"}return X.apply(this,arguments)};this.selectRegion=function(S,U){var aa=mxEvent.isAltDown(U)?S:null;S=this.getCells(S.x,S.y,S.width,S.height,null,null,aa,null,!0);if(this.isToggleEvent(U))for(aa=0;aa<S.length;aa++)this.selectCellForEvent(S[aa],U);else this.selectCellsForEvent(S,U);return S};var N=this.graphHandler.shouldRemoveCellsFromParent;
+this.graphHandler.shouldRemoveCellsFromParent=function(S,U,aa){return this.graph.isCellSelected(S)?!1:N.apply(this,arguments)};var Y=this.updateMouseEvent;this.updateMouseEvent=function(S){S=Y.apply(this,arguments);null!=S.state&&this.isCellLocked(this.getLayerForCell(S.getCell()))&&(null==this.getLinkForCell(S.getCell())?S.state=this.view.getState(this.getCellAt(S.getGraphX(),S.getGraphY(),null,null,null,mxUtils.bind(this,function(U,aa,fa){return S.state==U||this.isCellLocked(this.getLayerForCell(U.cell))&&
+null==this.getLinkForCell(U.cell)}))):S.state=null);return S};var ja=this.isCellSelectable;this.isCellSelectable=function(S){return ja.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(S))};this.isCellLocked=function(S){for(;null!=S;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(S),"locked","0"))return!0;S=this.model.getParent(S)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,U){"mouseDown"==U.getProperty("eventName")&&(S=U.getProperty("event").getState(),
+la=null==S||this.isSelectionEmpty()||this.isCellSelected(S.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(S,U){if(!mxEvent.isMultiTouchEvent(U)){S=U.getProperty("event");var aa=U.getProperty("cell");null==aa?(S=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),G.start(S.x,S.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(aa)&&this.removeSelectionCell(aa);la=null;U.consume()}}));
+this.connectionHandler.selectCells=function(S,U){this.graph.setSelectionCell(U||S)};this.connectionHandler.constraintHandler.isStateIgnored=function(S,U){var aa=S.view.graph;return U&&(aa.isCellSelected(S.cell)||aa.isTableRow(S.cell)&&aa.selectionCellsHandler.isHandled(aa.model.getParent(S.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var S=this.connectionHandler.constraintHandler;null!=S.currentFocus&&S.isStateIgnored(S.currentFocus,!0)&&(S.currentFocus=null,
+S.constraints=null,S.destroyIcons());S.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved linecap linejoin".split(" ");Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
@@ -2577,14 +2575,14 @@ Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof p
Graph.fadeNodes=function(a,b,e,f,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},g)},0)};
Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,g){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var D=w.referenceCell||w,E=f.model.getCell(D.sourceCellId),G=f.getEdges(E,null,!0,!0,!1,!0),I=[],J=0;J<G.length;J++)null!=G[J].getTerminal(!0)&&null!=G[J].getTerminal(!1)&&f.isCellVisible(G[J])&&
!f.isEdgeIgnored(G[J])&&f.isCellVisible(G[J].getTerminal(!0))&&f.isCellVisible(G[J].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[J]))&&I.push(G[J]);I=G=I;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var T=w.startIndex||0;I=G.slice(Math.max(0,T),Math.min(G.length,T+pageSize))}I=f.getOpposites(I,E).concat(I);var K=u.cloneCells(I);for(J=0;J<I.length;J++)if(K[J].sourceCellId=I[J].id,u.model.isEdge(K[J]))for(K[J].geometry.x=0,K[J].geometry.y=0,K[J].geometry.points=null,K[J].setStyle(K[J].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[J].setTerminal(D,null==K[J].getTerminal(!0)),E=0;E<K[J].getChildCount();E++){var U=K[J].getChildAt(E);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var V=u.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");V.referenceCell=D;V.startIndex=Math.max(0,(w.startIndex||0)-pageSize);K.splice(0,0,V)}if(G.length>(w.startIndex||0)+pageSize){var Q=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Q.referenceCell=
-D;Q.startIndex=(w.startIndex||0)+pageSize;K.splice(0,0,Q)}for(var N in u.getModel().cells){var W=u.getModel().getCell(N);W!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,W)&&u.getModel().isVertex(W)&&u.removeCells([W])}u.addCells(K);var O=u.getModel().getGeometry(u.rootCell);null!=O&&(O=O.clone(),O.x=z-O.width/2,O.y=C-O.height/3,u.getModel().setGeometry(u.rootCell,O));w=[];for(N in u.getModel().cells)W=u.getModel().getCell(N),W!=u.rootCell&&u.getModel().isVertex(W)&&u.getModel().getParent(W)==u.getDefaultParent()&&
-(w.push(W),O=u.getModel().getGeometry(W),null!=O&&(O.x=z-O.width/2,O.y=C-O.height/2));var X=w.length,ja=2*Math.PI/X,ka=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<X;z++)O=u.getModel().getGeometry(w[z]),null!=O&&(O=O.clone(),O.x+=ka*Math.sin(z*ja),O.y+=ka*Math.cos(z*ja),u.getModel().setGeometry(w[z],O))}finally{u.getModel().endUpdate()}}}var h=document.createElement("div");h.style.position="absolute";h.style.display="block";h.style.background=
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[J].setTerminal(D,null==K[J].getTerminal(!0)),E=0;E<K[J].getChildCount();E++){var V=K[J].getChildAt(E);null!=V.geometry&&V.geometry.relative&&(V.setStyle(V.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),V.geometry.offset=new mxPoint(0,0),V.geometry.y=0,V.geometry.x=.5>V.geometry.x?-.8:.5<V.geometry.x?.8:0)}if(0<w.startIndex){var W=u.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");W.referenceCell=D;W.startIndex=Math.max(0,(w.startIndex||0)-pageSize);K.splice(0,0,W)}if(G.length>(w.startIndex||0)+pageSize){var O=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");O.referenceCell=
+D;O.startIndex=(w.startIndex||0)+pageSize;K.splice(0,0,O)}for(var M in u.getModel().cells){var X=u.getModel().getCell(M);X!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,X)&&u.getModel().isVertex(X)&&u.removeCells([X])}u.addCells(K);var N=u.getModel().getGeometry(u.rootCell);null!=N&&(N=N.clone(),N.x=z-N.width/2,N.y=C-N.height/3,u.getModel().setGeometry(u.rootCell,N));w=[];for(M in u.getModel().cells)X=u.getModel().getCell(M),X!=u.rootCell&&u.getModel().isVertex(X)&&u.getModel().getParent(X)==u.getDefaultParent()&&
+(w.push(X),N=u.getModel().getGeometry(X),null!=N&&(N.x=z-N.width/2,N.y=C-N.height/2));var Y=w.length,ja=2*Math.PI/Y,la=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Y;z++)N=u.getModel().getGeometry(w[z]),null!=N&&(N=N.clone(),N.x+=la*Math.sin(z*ja),N.y+=la*Math.cos(z*ja),u.getModel().setGeometry(w[z],N))}finally{u.getModel().endUpdate()}}}var h=document.createElement("div");h.style.position="absolute";h.style.display="block";h.style.background=
Editor.isDarkMode()?Editor.darkColor:"#ffffff";h.style.width="100%";h.style.height="100%";h.style.left="0px";h.style.top="0px";h.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";h.appendChild(m);var q=document.createElement("div");q.style.position="absolute";q.style.cursor="pointer";q.style.right="38px";q.style.top="14px";q.style.textAlign="right";q.style.verticalAlign=
"top";mxUtils.write(q,mxResources.get("close"));h.appendChild(q);document.body.appendChild(h);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(I){return this.model.isVertex(I)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(g)};mxEvent.addListener(m,"click",z);mxEvent.addListener(q,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(I){var J=I.getCell(),T=null!=J?null!=J.referenceCell?J.referenceCell:J:null;null!=J&&w.rootCell!=J&&0<w.getEdges(T).length?d(w,J):C.apply(this,arguments)};z=w.container.scrollWidth/2;var D=w.container.scrollHeight/3;w.model.beginUpdate();var E=w.importCells([g])[0];E.sourceCellId=g.id;E.geometry.x=z-E.geometry.width/2;
-E.geometry.y=D-E.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(I,J){G||(I=J.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,I,function(){var T=new mxParallelEdgeLayout(w);T.spacing=60;var K=T.layout;T.layout=function(U){T.spacing=Math.min(60,Math.max(30,60-5*U.length));K.apply(this,arguments)};T.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
+E.geometry.y=D-E.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(I,J){G||(I=J.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,I,function(){var T=new mxParallelEdgeLayout(w);T.spacing=60;var K=T.layout;T.layout=function(V){T.spacing=Math.min(60,Math.max(30,60-5*V.length));K.apply(this,arguments)};T.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,E)}else mxUtils.error("Browser is not supported!",200,!1)})(h)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};
@@ -2613,8 +2611,8 @@ h){var k={},u;for(u in h){var w=h[u];null!=w&&(k[u]=!0,null==m[u]&&q?m[u]=w:m[u]
(!this.isSwimlane(h)||0==m)&&""==this.getLabel(h)&&0<this.model.getChildCount(h))for(m=0;m<this.model.getChildCount(h);m++){var q=this.model.getChildAt(h,m);if(this.isCellEditable(q)){h=q;break}}return h};Graph.prototype.copyStyle=function(h){return this.getCellStyle(h,!1)};Graph.prototype.pasteStyle=function(h,m,q,k){null!=h&&(k||(q=null!=q?q:Graph.cellStyles,Graph.removeKeys(h,function(u){return 0>mxUtils.indexOf(q,u)})),this.updateCellStyles(h,m))};Graph.prototype.copyCellStyles=function(h,m,q,
k,u,w,z){var C=!1,D=!1;if(0<h.length)for(var E=0;E<h.length&&(C=this.getModel().isVertex(h[E])||C,!(D=this.getModel().isEdge(h[E])||D)||!C);E++);else D=C=!0;C=C&&!w;D=D&&!z;for(E=0;E<m.length;E++)if(h=0<=mxUtils.indexOf(Graph.textStyles,m[E]),"strokeColor"!=m[E]||null!=q[E]&&"none"!=q[E])if(0<=mxUtils.indexOf(Graph.cellStyles,m[E])||"shape"==m[E])if("shape"!=m[E]&&(C||h)&&(null==q[E]?delete k[m[E]]:k[m[E]]=q[E]),D||h)null==q[E]?delete u[m[E]]:u[m[E]]=q[E]};Graph.prototype.includeDescendants=function(h){for(var m=
[],q=0;q<h.length;q++)m=m.concat(this.model.getDescendants(h[q]));return m};Graph.prototype.pasteCellStyles=function(h,m,q,k,u){m=null!=m?m:this.currentVertexStyle;q=null!=q?q:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<h.length;w++){var z=h[w],C=this.model.getStyle(z),D=!1;null!=z.style&&(pairs=z.style.split(";"),D=D||0<=mxUtils.indexOf(pairs,"text"));if(D)var E=Graph.textStyles;else if(E=Graph.cellStyles.slice(),!k)for(var G=null!=C?C.split(";"):
-[],I=0;I<G.length;I++){var J=G[I],T=J.indexOf("=");if(0<=T){var K=J.substring(0,T),U=mxUtils.indexOf(E,K);0<=U&&E.splice(U,1);for(D=0;D<Graph.cellStyleGroups.length;D++){var V=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(V,K))for(var Q=0;Q<V.length;Q++){var N=mxUtils.indexOf(E,V[Q]);0<=N&&E.splice(N,1)}}}}var W=this.model.isEdge(z);D=W?q:m;for(I=0;I<E.length;I++){K=E[I];var O=D[K];null!=O&&("edgeStyle"!=K||u)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,K,O),"fontFamily"==
-K&&null==D.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),W&&"rounded"==K&&"1"==O&&null==D.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var q=0;q<m.length;q++)if(this.model.isVertex(m[q])||this.model.isEdge(m[q])){var k=this.getCellStyle(m[q],!1),u=k[mxConstants.STYLE_PERIMETER],
+[],I=0;I<G.length;I++){var J=G[I],T=J.indexOf("=");if(0<=T){var K=J.substring(0,T),V=mxUtils.indexOf(E,K);0<=V&&E.splice(V,1);for(D=0;D<Graph.cellStyleGroups.length;D++){var W=Graph.cellStyleGroups[D];if(0<=mxUtils.indexOf(W,K))for(var O=0;O<W.length;O++){var M=mxUtils.indexOf(E,W[O]);0<=M&&E.splice(M,1)}}}}var X=this.model.isEdge(z);D=X?q:m;for(I=0;I<E.length;I++){K=E[I];var N=D[K];null!=N&&("edgeStyle"!=K||u)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,K,N),"fontFamily"==
+K&&null==D.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),X&&"rounded"==K&&"1"==N&&null==D.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return h};Graph.prototype.updateCellStyles=function(h,m){this.model.beginUpdate();try{for(var q=0;q<m.length;q++)if(this.model.isVertex(m[q])||this.model.isEdge(m[q])){var k=this.getCellStyle(m[q],!1),u=k[mxConstants.STYLE_PERIMETER],
w=!1;for(C in h){var z=h[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[q]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[q]])}}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(h,m,q,k,u,w){this.useCssTransforms&&(h=h/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(h,m,q,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==q&&(q=this.getCurrentRoot(),null==q&&(q=this.getModel().getRoot()));if(null!=q)for(var z=this.model.getChildCount(q)-1;0<=
z;z--){var C=this.model.getChildAt(q,z),D=this.getScaledCellAt(h,m,C,k,u,w);if(null!=D)return D;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(D=this.view.getState(C),null!=D&&(null==w||!w(D,h,m))&&this.intersects(D,h,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(h){return!this.isSwimlane(h.cell)&&0<this.model.getChildCount(h.cell)&&!this.isCellCollapsed(h.cell)&&"1"==mxUtils.getValue(h.style,"recursiveResize","1")&&null==mxUtils.getValue(h.style,
@@ -2677,10 +2675,10 @@ Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&n
Graph.prototype.connectVertex=function(a,b,e,f,g,d,h,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var q=this.isCloneConnectSource(a),k=q?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,D=null;if(null!=d){d=d.reverse();for(var E=0;E<d.length;E++)if(!this.isCellLocked(d[E])&&!this.model.isEdge(d[E])&&d[E]!=a)if(!this.model.isAncestor(a,d[E])&&this.isContainer(d[E])&&(null==C||d[E]==this.model.getParent(a)))C=d[E];else if(null==D&&this.isCellConnectable(d[E])&&!this.model.isAncestor(d[E],a)&&!this.isSwimlane(d[E])){var G=this.view.getState(d[E]);null==w||null==G||mxUtils.intersects(w,G)||(D=d[E])}}var I=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;I&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var J=[],T=D;D=C;g=mxUtils.bind(this,function(K){if(null==h||null!=K||null==D&&q){this.model.beginUpdate();try{if(null==T&&I){var U=this.getAbsoluteParent(null!=K?K:a);U=q?a:this.getCompositeParent(U);T=null!=K?K:this.duplicateCells([U],
-!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var V=this.getCellGeometry(T);null!=V&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=V.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=V.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-V.width/2:u.x+V.width/2),V.x=u.x-V.width/2,V.y=u.y-V.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),D=null):I&&!q&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var Q=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&I||null==D&&q?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=Q&&(J.push(Q),this.applyNewEdgeStyle(a,[Q],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(Q,a));if(null==D&&null!=T&&null!=a.parent&&q&&b==mxConstants.DIRECTION_WEST){var N=a.parent.getIndex(a);this.model.add(a.parent,T,N)}null==D&&null!=T&&J.push(T);null==T&&null!=Q&&Q.geometry.setTerminalPoint(u,!1);null!=Q&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Q]))}finally{this.model.endUpdate()}}if(null!=m)m(J);else return J});if(null==h||null!=T||!I||null==D&&q)return g(T);h(k+u.x*e,z+u.y*e,g)};
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||g;I&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var J=[],T=D;D=C;g=mxUtils.bind(this,function(K){if(null==h||null!=K||null==D&&q){this.model.beginUpdate();try{if(null==T&&I){var V=this.getAbsoluteParent(null!=K?K:a);V=q?a:this.getCompositeParent(V);T=null!=K?K:this.duplicateCells([V],
+!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var W=this.getCellGeometry(T);null!=W&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=W.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=W.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-W.width/2:u.x+W.width/2),W.x=u.x-W.width/2,W.y=u.y-W.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),D=null):I&&!q&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var O=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&I||null==D&&q?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=O&&(J.push(O),this.applyNewEdgeStyle(a,[O],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(O,a));if(null==D&&null!=T&&null!=a.parent&&q&&b==mxConstants.DIRECTION_WEST){var M=a.parent.getIndex(a);this.model.add(a.parent,T,M)}null==D&&null!=T&&J.push(T);null==T&&null!=O&&O.geometry.setTerminalPoint(u,!1);null!=O&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[O]))}finally{this.model.endUpdate()}}if(null!=m)m(J);else return J});if(null==h||null!=T||!I||null==D&&q)return g(T);h(k+u.x*e,z+u.y*e,g)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,g=0;g<a.length;g++)if(f=a[g],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2772,13 +2770,13 @@ e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.m
arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var g=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return g.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);
-this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(ka,ta,M){var aa=new mxPoint(ta,M);aa.type=ka;D.push(aa);aa=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==aa||aa.type!=ka||aa.x!=ta||aa.y!=M},G=.5*
-this.scale;C=!1;D=[];for(var I=0;I<z.length-1;I++){for(var J=z[I+1],T=z[I],K=[],U=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,U.x,U.y,J.x,J.y)<1*this.scale*this.scale;)J=U,I++,U=z[I+2];C=E(0,T.x,T.y)||C;for(var V=0;V<this.validEdges.length;V++){var Q=this.validEdges[V],N=Q.absolutePoints;if(null!=N&&mxUtils.intersects(w,Q)&&"1"!=Q.style.noJump){var W=null;for(Q=0;Q<N.length-1;Q++){var O=N[Q+1],X=N[Q];for(U=N[Q+2];Q<N.length-2&&mxUtils.ptSegDistSq(X.x,X.y,U.x,U.y,O.x,O.y)<1*this.scale*this.scale;)O=
-U,Q++,U=N[Q+2];var ja=mxUtils.intersection(T.x,T.y,J.x,J.y,X.x,X.y,O.x,O.y);if(null!=ja&&(Math.abs(ja.x-T.x)>G||Math.abs(ja.y-T.y)>G)&&(Math.abs(ja.x-J.x)>G||Math.abs(ja.y-J.y)>G)&&(null==W||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,W.x,W.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,X.x,X.y)>G)&&(null==U||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,U.x,U.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,O.x,O.y)>G)){U=ja.x-T.x;W=ja.y-T.y;ja={distSq:U*U+W*W,x:ja.x,y:ja.y};for(U=0;U<K.length;U++)if(K[U].distSq>ja.distSq){K.splice(U,
-0,ja);ja=null;break}null==ja||0!=K.length&&K[K.length-1].x===ja.x&&K[K.length-1].y===ja.y||K.push(ja)}W=X}}}for(Q=0;Q<K.length;Q++)C=E(1,K[Q].x,K[Q].y)||C}ja=z[z.length-1];C=E(0,ja.x,ja.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)h.apply(this,
-arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,J=null,T=null,K=[],U=null;w.begin();for(var V=0;V<this.state.routedPoints.length;V++){var Q=this.state.routedPoints[V],N=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==V?N=z[0]:V==this.state.routedPoints.length-1&&(N=z[z.length-1]);var W=!1;if(null!=
-J&&1==Q.type){var O=this.state.routedPoints[V+1];Q=O.x/this.scale-N.x;O=O.y/this.scale-N.y;Q=Q*Q+O*O;null==U&&(U=new mxPoint(N.x-J.x,N.y-J.y),T=Math.sqrt(U.x*U.x+U.y*U.y),0<T?(U.x=U.x*E/T,U.y=U.y*E/T):U=null);Q>E*E&&0<T&&(Q=J.x-N.x,O=J.y-N.y,Q=Q*Q+O*O,Q>E*E&&(W=new mxPoint(N.x-U.x,N.y-U.y),Q=new mxPoint(N.x+U.x,N.y+U.y),K.push(W),this.addPoints(w,K,C,D,!1,null,I),K=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,I=!1,"sharp"==G?(w.lineTo(W.x-U.y*K,W.y+U.x*K),w.lineTo(Q.x-U.y*K,Q.y+
-U.x*K),w.lineTo(Q.x,Q.y)):"line"==G?(w.moveTo(W.x+U.y*K,W.y-U.x*K),w.lineTo(W.x-U.y*K,W.y+U.x*K),w.moveTo(Q.x-U.y*K,Q.y+U.x*K),w.lineTo(Q.x+U.y*K,Q.y-U.x*K),w.moveTo(Q.x,Q.y)):"arc"==G?(K*=1.3,w.curveTo(W.x-U.y*K,W.y+U.x*K,Q.x-U.y*K,Q.y+U.x*K,Q.x,Q.y)):(w.moveTo(Q.x,Q.y),I=!0),K=[Q],W=!0))}else U=null;W||(K.push(N),J=N)}this.addPoints(w,K,C,D,!1,null,I);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,D){return null!=z&&"centerPerimeter"==
+this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,D=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var E=function(la,S,U){var aa=new mxPoint(S,U);aa.type=la;D.push(aa);aa=null!=w.routedPoints?w.routedPoints[D.length-1]:null;return null==aa||aa.type!=la||aa.x!=S||aa.y!=U},G=.5*this.scale;
+C=!1;D=[];for(var I=0;I<z.length-1;I++){for(var J=z[I+1],T=z[I],K=[],V=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,V.x,V.y,J.x,J.y)<1*this.scale*this.scale;)J=V,I++,V=z[I+2];C=E(0,T.x,T.y)||C;for(var W=0;W<this.validEdges.length;W++){var O=this.validEdges[W],M=O.absolutePoints;if(null!=M&&mxUtils.intersects(w,O)&&"1"!=O.style.noJump){var X=null;for(O=0;O<M.length-1;O++){var N=M[O+1],Y=M[O];for(V=M[O+2];O<M.length-2&&mxUtils.ptSegDistSq(Y.x,Y.y,V.x,V.y,N.x,N.y)<1*this.scale*this.scale;)N=V,O++,
+V=M[O+2];var ja=mxUtils.intersection(T.x,T.y,J.x,J.y,Y.x,Y.y,N.x,N.y);if(null!=ja&&(Math.abs(ja.x-T.x)>G||Math.abs(ja.y-T.y)>G)&&(Math.abs(ja.x-J.x)>G||Math.abs(ja.y-J.y)>G)&&(null==X||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,X.x,X.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,Y.x,Y.y)>G)&&(null==V||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,V.x,V.y)>G||mxUtils.ptLineDist(T.x,T.y,J.x,J.y,N.x,N.y)>G)){V=ja.x-T.x;X=ja.y-T.y;ja={distSq:V*V+X*X,x:ja.x,y:ja.y};for(V=0;V<K.length;V++)if(K[V].distSq>ja.distSq){K.splice(V,
+0,ja);ja=null;break}null==ja||0!=K.length&&K[K.length-1].x===ja.x&&K[K.length-1].y===ja.y||K.push(ja)}X=Y}}}for(O=0;O<K.length;O++)C=E(1,K[O].x,K[O].y)||C}ja=z[z.length-1];C=E(0,ja.x,ja.y)||C}w.routedPoints=D;return C}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)h.apply(this,
+arguments);else{var D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,E=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,J=null,T=null,K=[],V=null;w.begin();for(var W=0;W<this.state.routedPoints.length;W++){var O=this.state.routedPoints[W],M=new mxPoint(O.x/this.scale,O.y/this.scale);0==W?M=z[0]:W==this.state.routedPoints.length-1&&(M=z[z.length-1]);var X=!1;if(null!=
+J&&1==O.type){var N=this.state.routedPoints[W+1];O=N.x/this.scale-M.x;N=N.y/this.scale-M.y;O=O*O+N*N;null==V&&(V=new mxPoint(M.x-J.x,M.y-J.y),T=Math.sqrt(V.x*V.x+V.y*V.y),0<T?(V.x=V.x*E/T,V.y=V.y*E/T):V=null);O>E*E&&0<T&&(O=J.x-M.x,N=J.y-M.y,O=O*O+N*N,O>E*E&&(X=new mxPoint(M.x-V.x,M.y-V.y),O=new mxPoint(M.x+V.x,M.y+V.y),K.push(X),this.addPoints(w,K,C,D,!1,null,I),K=0>Math.round(V.x)||0==Math.round(V.x)&&0>=Math.round(V.y)?1:-1,I=!1,"sharp"==G?(w.lineTo(X.x-V.y*K,X.y+V.x*K),w.lineTo(O.x-V.y*K,O.y+
+V.x*K),w.lineTo(O.x,O.y)):"line"==G?(w.moveTo(X.x+V.y*K,X.y-V.x*K),w.lineTo(X.x-V.y*K,X.y+V.x*K),w.moveTo(O.x-V.y*K,O.y+V.x*K),w.lineTo(O.x+V.y*K,O.y-V.x*K),w.moveTo(O.x,O.y)):"arc"==G?(K*=1.3,w.curveTo(X.x-V.y*K,X.y+V.x*K,O.x-V.y*K,O.y+V.x*K,O.x,O.y)):(w.moveTo(O.x,O.y),I=!0),K=[O],X=!0))}else V=null;X||(K.push(M),J=M)}this.addPoints(w,K,C,D,!1,null,I);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,D){return null!=z&&"centerPerimeter"==
z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var q=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,D){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)q.apply(this,arguments);else{z=this.getTerminalPort(w,z,D);var E=this.getNextPoint(w,C,D),G=this.graph.isOrthogonal(w),I=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),J=new mxPoint(z.getCenterX(),
z.getCenterY());if(0!=I){var T=Math.cos(-I),K=Math.sin(-I);E=mxUtils.getRotatedPoint(E,T,K,J)}T=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);T+=parseFloat(w.style[D?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);E=this.getPerimeterPoint(z,E,0==I&&G,T);0!=I&&(T=Math.cos(I),K=Math.sin(I),E=mxUtils.getRotatedPoint(E,T,K,J));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,D,E),D)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,
C,D,E){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);D=C=null;if(null!=w)for(var G=0;G<w.length;G++){var I=this.graph.getConnectionPoint(z,w[G]);if(null!=I){var J=(I.x-E.x)*(I.x-E.x)+(I.y-E.y)*(I.y-E.y);if(null==D||J<D)C=I,D=J}}null!=C&&(E=C)}return E};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var D=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(D=C.state.view.graph.replacePlaceholders(C.state.cell,
@@ -2801,145 +2799,145 @@ var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.cr
return p};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var p="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",A="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<A.length;B++)null!=
this.currentEdgeStyle[A[B]]&&(p+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?p+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(p+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?p+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(p+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(p+="elbow="+this.currentEdgeStyle.elbow+";");return p=null!=this.currentEdgeStyle.html?p+("html="+this.currentEdgeStyle.html+";"):p+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var p=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-p&&(new mxCodec(p.ownerDocument)).decode(p,this.getStylesheet())};Graph.prototype.createCellLookup=function(p,A){A=null!=A?A:{};for(var B=0;B<p.length;B++){var F=p[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),R=0;R<L;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(p,A,B){B=null!=B?B:{};for(var F in p){var L=A[F];null==B[L]&&(B[L]=p[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(p,A,
-B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(p.ownerDocument),R=new mxGraphModel;L.decode(p,R);p=[];L={};var Z={},ha=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),L));if(null!=ha){var fa=this.createCellLookup([R.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ha.length;R++)ia=this.model.getChildren(this.moveCells([ha[R]],A,B,!1,this.model.getRoot())[0]),null!=ia&&(p=p.concat(ia));else{var ia=R.getChildren(ha[0]);
-null!=ia&&(p=this.moveCells(ia,A,B,!1,this.getDefaultParent()),Z[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=p&&(this.createCellMapping(L,fa,Z),this.updateCustomLinks(Z,p),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(p,!0);null!=va&&this.moveCells(p,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return p};Graph.prototype.encodeCells=function(p){for(var A={},B=this.cloneCells(p,null,A),F=new mxDictionary,L=0;L<p.length;L++)F.put(p[L],
-!0);var R=new mxCodec,Z=new mxGraphModel,ha=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ha,B[L]);var fa=this.view.getState(p[L]);if(null!=fa){var ia=this.getCellGeometry(B[L]);null!=ia&&ia.relative&&!this.model.isEdge(p[L])&&null==F.get(this.model.getParent(p[L]))&&(ia.offset=null,ia.relative=!1,ia.x=fa.x/fa.view.scale-fa.view.translate.x,ia.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(p)),B);return R.encode(Z)};Graph.prototype.isSwimlane=
+p&&(new mxCodec(p.ownerDocument)).decode(p,this.getStylesheet())};Graph.prototype.createCellLookup=function(p,A){A=null!=A?A:{};for(var B=0;B<p.length;B++){var F=p[B];A[mxObjectIdentity.get(F)]=F.getId();for(var L=this.model.getChildCount(F),P=0;P<L;P++)this.createCellLookup([this.model.getChildAt(F,P)],A)}return A};Graph.prototype.createCellMapping=function(p,A,B){B=null!=B?B:{};for(var F in p){var L=A[F];null==B[L]&&(B[L]=p[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(p,A,
+B,F){A=null!=A?A:0;B=null!=B?B:0;var L=new mxCodec(p.ownerDocument),P=new mxGraphModel;L.decode(p,P);p=[];L={};var Z={},ha=P.getChildren(this.cloneCell(P.root,this.isCloneInvalidEdges(),L));if(null!=ha){var ea=this.createCellLookup([P.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(P=0;P<ha.length;P++)ia=this.model.getChildren(this.moveCells([ha[P]],A,B,!1,this.model.getRoot())[0]),null!=ia&&(p=p.concat(ia));else{var ia=P.getChildren(ha[0]);
+null!=ia&&(p=this.moveCells(ia,A,B,!1,this.getDefaultParent()),Z[P.getChildAt(P.root,0).getId()]=this.getDefaultParent().getId())}if(null!=p&&(this.createCellMapping(L,ea,Z),this.updateCustomLinks(Z,p),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(p,!0);null!=va&&this.moveCells(p,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return p};Graph.prototype.encodeCells=function(p){for(var A={},B=this.cloneCells(p,null,A),F=new mxDictionary,L=0;L<p.length;L++)F.put(p[L],
+!0);var P=new mxCodec,Z=new mxGraphModel,ha=Z.getChildAt(Z.getRoot(),0);for(L=0;L<B.length;L++){Z.add(ha,B[L]);var ea=this.view.getState(p[L]);if(null!=ea){var ia=this.getCellGeometry(B[L]);null!=ia&&ia.relative&&!this.model.isEdge(p[L])&&null==F.get(this.model.getParent(p[L]))&&(ia.offset=null,ia.relative=!1,ia.x=ea.x/ea.view.scale-ea.view.translate.x,ia.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(p)),B);return P.encode(Z)};Graph.prototype.isSwimlane=
function(p,A){var B=null;null==p||this.model.isEdge(p)||this.model.getParent(p)==this.model.getRoot()||(B=this.getCurrentCellStyle(p,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(p){return null!=p&&m.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellEditable(this.model.getParent(p)):!0:!1};var q=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=
-function(p){return null!=p&&q.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellMovable(this.model.getParent(p)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(p){var A=this.model.getParent(p);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(p,A,B,F,L,R,Z,ha){null==ha&&(ha=this.model.getParent(p),
-this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(R,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[p,A,B,F,L,R,Z,ha]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ia=this.getCellGeometry(fa[A]);null!=ia&&ia.relative&&0<ia.x&&this.model.remove(fa[A])}var va=this.getChildCells(p,!0);for(A=0;A<va.length;A++)ia=this.getCellGeometry(va[A]),null!=ia&&ia.relative&&0>=ia.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[p]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[p]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(p,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,R=[],Z=mxUtils.bind(this,
-function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(R.push(ha),ha==F)L=R.length-1;else if(p&&null==F&&0<R.length||null!=L&&p&&R.length>L||!p&&0<L)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)Z(this.model.getChildAt(ha,fa))});Z(this.model.root);0<R.length&&(L=null!=L?mxUtils.mod(L+(p?1:-1),R.length):0,this.setSelectionCell(R[L]))}};Graph.prototype.swapShapes=function(p,A){if(this.model.isVertex(p)&&this.model.isVertex(A)&&2==this.getMovableCells([p,
-A]).length){var B=this.getCellGeometry(p),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),R=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(p,L),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(p,A,B,F,L,R,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ha=[],fa=0;fa<p.length;fa++)this.isTable(p[fa])?
-ha=ha.concat(this.model.getChildCells(p[fa],!0).reverse()):ha.push(p[fa]);p=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<p.length;fa++)if(null!=L&&this.isTableRow(p[fa])){var ia=this.model.getParent(p[fa]),va=this.getCellGeometry(p[fa]);this.isTable(ia)&&ha.push(ia);if(null!=ia&&null!=va&&this.isTable(ia)&&this.isTable(L)&&(F||ia!=L)){if(!F){var Ma=this.getCellGeometry(ia);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ia,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),
-Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){p[fa]=F?this.cloneCell(p[fa]):p[fa];var Aa=this.model.getChildCells(p[fa],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Xa=this.cloneCell(Aa[Aa.length-1]);null!=Xa&&(Xa.value="",this.model.add(p[fa],Xa))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(p[fa],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
-this.getCellGeometry(Ga[ua]),La=this.getCellGeometry(Aa[ua]);null!=Qa&&null!=La&&(La=La.clone(),La.width=Qa.width,this.model.setGeometry(Aa[ua],La))}}}}var Ua=z.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!F&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&this.model.remove(ha[fa]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(p)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(p,
-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<p.length;F++)if(this.isTableCell(p[F])){var L=this.model.getParent(p[F]),R=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(p,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(p[F],"")}else{if(this.isTableRow(p[F])&&(R=this.model.getParent(p[F]),0>mxUtils.indexOf(p,R)&&0>mxUtils.indexOf(B,R))){for(var Z=this.model.getChildCells(R,!0),ha=0,fa=0;fa<Z.length;fa++)0<=mxUtils.indexOf(p,
-Z[fa])&&ha++;ha==Z.length&&B.push(R)}B.push(p[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(p,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(p,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(p,A){this.doUpdateCustomLinksForCell(p,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(p,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
-function(p,A){};Graph.prototype.getAllConnectionConstraints=function(p,A){if(null!=p){A=mxUtils.getValue(p.style,"points",null);if(null!=A){p=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];p.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return p}if(null!=p.shape&&null!=p.shape.bounds){F=p.shape.direction;A=p.shape.bounds;var L=p.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||
+function(p){return null!=p&&q.apply(this,arguments)?this.isTableCell(p)||this.isTableRow(p)?this.isCellMovable(this.model.getParent(p)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(p){var A=this.model.getParent(p);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(p,A,B,F,L,P,Z,ha){null==ha&&(ha=this.model.getParent(p),
+this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(P,Z,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[p,A,B,F,L,P,Z,ha]);this.model.setValue(B,"");var ea=this.getChildCells(B,!0);for(A=0;A<ea.length;A++){var ia=this.getCellGeometry(ea[A]);null!=ia&&ia.relative&&0<ia.x&&this.model.remove(ea[A])}var va=this.getChildCells(p,!0);for(A=0;A<va.length;A++)ia=this.getCellGeometry(va[A]),null!=ia&&ia.relative&&0>=ia.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
+if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[p]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[p]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(p,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),L=null,P=[],Z=mxUtils.bind(this,
+function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(P.push(ha),ha==F)L=P.length-1;else if(p&&null==F&&0<P.length||null!=L&&p&&P.length>L||!p&&0<L)return;for(var ea=0;ea<this.model.getChildCount(ha);ea++)Z(this.model.getChildAt(ha,ea))});Z(this.model.root);0<P.length&&(L=null!=L?mxUtils.mod(L+(p?1:-1),P.length):0,this.setSelectionCell(P[L]))}};Graph.prototype.swapShapes=function(p,A){if(this.model.isVertex(p)&&this.model.isVertex(A)&&2==this.getMovableCells([p,
+A]).length){var B=this.getCellGeometry(p),F=this.getCellGeometry(A);if(null!=B&&null!=F){var L=B.clone(),P=F.clone();this.model.beginUpdate();try{L.x=F.getCenterX()-B.width/2,L.y=F.getCenterY()-B.height/2,P.x=B.getCenterX()-F.width/2,P.y=B.getCenterY()-F.height/2,this.model.setGeometry(p,L),this.model.setGeometry(A,P)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(p,A,B,F,L,P,Z){Z=null!=Z?Z:{};if(this.isTable(L)){for(var ha=[],ea=0;ea<p.length;ea++)this.isTable(p[ea])?
+ha=ha.concat(this.model.getChildCells(p[ea],!0).reverse()):ha.push(p[ea]);p=ha}this.model.beginUpdate();try{ha=[];for(ea=0;ea<p.length;ea++)if(null!=L&&this.isTableRow(p[ea])){var ia=this.model.getParent(p[ea]),va=this.getCellGeometry(p[ea]);this.isTable(ia)&&ha.push(ia);if(null!=ia&&null!=va&&this.isTable(ia)&&this.isTable(L)&&(F||ia!=L)){if(!F){var Ma=this.getCellGeometry(ia);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ia,Ma))}Ma=this.getCellGeometry(L);null!=Ma&&(Ma=Ma.clone(),
+Ma.height+=va.height,this.model.setGeometry(L,Ma));var Na=this.model.getChildCells(L,!0);if(0<Na.length){p[ea]=F?this.cloneCell(p[ea]):p[ea];var Aa=this.model.getChildCells(p[ea],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-Aa.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Xa=this.cloneCell(Aa[Aa.length-1]);null!=Xa&&(Xa.value="",this.model.add(p[ea],Xa))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(Aa[Aa.length+ua-1]);Aa=this.model.getChildCells(p[ea],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
+this.getCellGeometry(Ga[ua]),La=this.getCellGeometry(Aa[ua]);null!=Qa&&null!=La&&(La=La.clone(),La.width=Qa.width,this.model.setGeometry(Aa[ua],La))}}}}var Ua=z.apply(this,arguments);for(ea=0;ea<ha.length;ea++)!F&&this.model.contains(ha[ea])&&0==this.model.getChildCount(ha[ea])&&this.model.remove(ha[ea]);F&&this.updateCustomLinks(this.createCellMapping(Z,this.createCellLookup(p)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(p,
+A){var B=[];this.model.beginUpdate();try{for(var F=0;F<p.length;F++)if(this.isTableCell(p[F])){var L=this.model.getParent(p[F]),P=this.model.getParent(L);1==this.model.getChildCount(L)&&1==this.model.getChildCount(P)?0>mxUtils.indexOf(p,P)&&0>mxUtils.indexOf(B,P)&&B.push(P):this.labelChanged(p[F],"")}else{if(this.isTableRow(p[F])&&(P=this.model.getParent(p[F]),0>mxUtils.indexOf(p,P)&&0>mxUtils.indexOf(B,P))){for(var Z=this.model.getChildCells(P,!0),ha=0,ea=0;ea<Z.length;ea++)0<=mxUtils.indexOf(p,
+Z[ea])&&ha++;ha==Z.length&&B.push(P)}B.push(p[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(p,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(p,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(p,A){this.doUpdateCustomLinksForCell(p,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(p,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
+function(p,A){};Graph.prototype.getAllConnectionConstraints=function(p,A){if(null!=p){A=mxUtils.getValue(p.style,"points",null);if(null!=A){p=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];p.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(P){}return p}if(null!=p.shape&&null!=p.shape.bounds){F=p.shape.direction;A=p.shape.bounds;var L=p.shape.scale;B=A.width/L;A=A.height/L;if(F==mxConstants.DIRECTION_NORTH||
F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=p.shape.getConstraints(p.style,B,A);if(null!=A)return A;if(null!=p.shape.stencil&&null!=p.shape.stencil.constraints)return p.shape.stencil.constraints;if(null!=p.shape.constraints)return p.shape.constraints}}return null};Graph.prototype.flipEdge=function(p){if(null!=p){var A=this.getCurrentCellStyle(p);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[p])}};Graph.prototype.isValidRoot=function(p){for(var A=this.model.getChildCount(p),B=0,F=0;F<A;F++){var L=this.model.getChildAt(p,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(p)};Graph.prototype.isValidDropTarget=function(p,A,B){for(var F=this.getCurrentCellStyle(p),L=!0,R=!0,Z=0;Z<A.length&&R;Z++)L=L&&this.isTable(A[Z]),R=R&&this.isTableRow(A[Z]);return!this.isCellLocked(p)&&(this.isTargetShape(p,
-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(p))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(p))&&!this.isTableRow(p)&&(!this.isTable(p)||R||L))};Graph.prototype.createGroupCell=function(){var p=mxGraph.prototype.createGroupCell.apply(this,arguments);p.setStyle("group");return p};Graph.prototype.isExtendParentsOnAdd=function(p){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
+this.setCellStyles(mxConstants.STYLE_ELBOW,A,[p])}};Graph.prototype.isValidRoot=function(p){for(var A=this.model.getChildCount(p),B=0,F=0;F<A;F++){var L=this.model.getChildAt(p,F);this.model.isVertex(L)&&(L=this.getCellGeometry(L),null==L||L.relative||B++)}return 0<B||this.isContainer(p)};Graph.prototype.isValidDropTarget=function(p,A,B){for(var F=this.getCurrentCellStyle(p),L=!0,P=!0,Z=0;Z<A.length&&P;Z++)L=L&&this.isTable(A[Z]),P=P&&this.isTableRow(A[Z]);return!this.isCellLocked(p)&&(this.isTargetShape(p,
+A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(p))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(p))&&!this.isTableRow(p)&&(!this.isTable(p)||P||L))};Graph.prototype.createGroupCell=function(){var p=mxGraph.prototype.createGroupCell.apply(this,arguments);p.setStyle("group");return p};Graph.prototype.isExtendParentsOnAdd=function(p){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
p&&null!=this.layoutManager){var B=this.model.getParent(p);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(p,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(p,A){var B=this.getModel(),F=[];B.beginUpdate();
-try{for(var L=0;L<p.length;L++){var R=p[L];if(B.isEdge(R)){var Z=B.getTerminal(R,!0),ha=B.getTerminal(R,!1);B.setTerminal(R,ha,!0);B.setTerminal(R,Z,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ia=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ia,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(Z),Aa=this.view.getState(ha);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
-Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(R,Z,!0,wa);this.setConnectionConstraint(R,ha,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=
-fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Xa=fa.width;fa.width=fa.height;fa.height=Xa;B.setGeometry(R,fa)}var Qa=this.view.getState(R);if(null!=Qa){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
-La[mxUtils.mod(mxUtils.indexOf(La,Ua)+(A?-1:1),La.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(p){if(null!=p&&null!=p.fgNode)for(p=p.fgNode.firstChild;null!=p;){if("text"==p.nodeName&&"1"==p.getAttribute("placeholders"))return!0;p=p.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(p){if(p instanceof mxGeometryChange&&(this.isTableCell(p.cell)||this.isTableRow(p.cell))&&(null==p.previous&&null!=
+try{for(var L=0;L<p.length;L++){var P=p[L];if(B.isEdge(P)){var Z=B.getTerminal(P,!0),ha=B.getTerminal(P,!1);B.setTerminal(P,ha,!0);B.setTerminal(P,Z,!1);var ea=B.getGeometry(P);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ia=ea.getTerminalPoint(!0),va=ea.getTerminalPoint(!1);ea.setTerminalPoint(ia,!1);ea.setTerminalPoint(va,!0);B.setGeometry(P,ea);var Ma=this.view.getState(P),Na=this.view.getState(Z),Aa=this.view.getState(ha);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
+Na,!0):null,wa=null!=Aa?this.getConnectionConstraint(Ma,Aa,!1):null;this.setConnectionConstraint(P,Z,!0,wa);this.setConnectionConstraint(P,ha,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[P]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[P])}F.push(P)}}else if(B.isVertex(P)&&(ea=this.getCellGeometry(P),null!=
+ea)){if(!(this.isTable(P)||this.isTableRow(P)||this.isTableCell(P)||this.isSwimlane(P))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Xa=ea.width;ea.width=ea.height;ea.height=Xa;B.setGeometry(P,ea)}var Qa=this.view.getState(P);if(null!=Qa){var La=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
+La[mxUtils.mod(mxUtils.indexOf(La,Ua)+(A?-1:1),La.length)],[P])}F.push(P)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(p){if(null!=p&&null!=p.fgNode)for(p=p.fgNode.firstChild;null!=p;){if("text"==p.nodeName&&"1"==p.getAttribute("placeholders"))return!0;p=p.nextSibling}return!1};var D=Graph.prototype.processChange;Graph.prototype.processChange=function(p){if(p instanceof mxGeometryChange&&(this.isTableCell(p.cell)||this.isTableRow(p.cell))&&(null==p.previous&&null!=
p.geometry||null!=p.previous&&!p.previous.equals(p.geometry))){var A=p.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}D.apply(this,arguments);p instanceof mxValueChange&&null!=p.cell&&null!=p.cell.value&&"object"==typeof p.cell.value&&this.invalidateDescendantsWithPlaceholders(p.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(p){p=
this.model.getDescendants(p);if(0<p.length)for(var A=0;A<p.length;A++){var B=this.view.getState(p[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(p[A]):this.isReplacePlaceholders(p[A])&&this.view.invalidate(p[A],!1,!1)}};Graph.prototype.replaceElement=function(p,A){A=p.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(p.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=
-p.innerHTML;p.parentNode.replaceChild(A,p)};Graph.prototype.processElements=function(p,A){if(null!=p){p=p.getElementsByTagName("*");for(var B=0;B<p.length;B++)null!=p[B]&&A(p[B])}};Graph.prototype.updateLabelElements=function(p,A,B){p=null!=p?p:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<p.length;L++){var R=this.getCurrentCellStyle(p[L]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(p[L]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var Z=F.getElementsByTagName(null!=
-B?B:"*"),ha=0;ha<Z.length;ha++)A(Z[ha]);F.innerHTML!=R&&this.cellLabelChanged(p[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(p,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=p.value&&"object"==typeof p.value){if(this.isReplacePlaceholders(p)&&null!=p.getAttribute("placeholder"))for(var F=p.getAttribute("placeholder"),L=p;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var R=
-p.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(p){if(null!=p){for(var A=new mxDictionary,B=0;B<p.length;B++)A.put(p[B],!0);var F=[];for(B=0;B<p.length;B++){var L=this.model.getParent(p[B]);null==L||A.get(L)||(A.put(L,!0),
-F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var R=!0,Z=0;Z<this.model.getChildCount(L.cell)&&R;Z++)A.get(this.model.getChildAt(L.cell,Z))||(R=!1);R&&p.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(p){for(var A=[],B=0;B<p.length;B++)this.isCellDeletable(p[B])&&this.isTransparentState(this.view.getState(p[B]))&&
+p.innerHTML;p.parentNode.replaceChild(A,p)};Graph.prototype.processElements=function(p,A){if(null!=p){p=p.getElementsByTagName("*");for(var B=0;B<p.length;B++)null!=p[B]&&A(p[B])}};Graph.prototype.updateLabelElements=function(p,A,B){p=null!=p?p:this.getSelectionCells();for(var F=document.createElement("div"),L=0;L<p.length;L++){var P=this.getCurrentCellStyle(p[L]);if(null!=P&&"1"==P.html&&(P=this.convertValueToString(p[L]),null!=P&&0<P.length)){F.innerHTML=Graph.sanitizeHtml(P);for(var Z=F.getElementsByTagName(null!=
+B?B:"*"),ha=0;ha<Z.length;ha++)A(Z[ha]);F.innerHTML!=P&&this.cellLabelChanged(p[L],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(p,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=p.value&&"object"==typeof p.value){if(this.isReplacePlaceholders(p)&&null!=p.getAttribute("placeholder"))for(var F=p.getAttribute("placeholder"),L=p;null!=L;){if(L==this.model.getRoot()||null!=L.value&&"object"==typeof L.value&&L.hasAttribute(F)){this.setAttributeForCell(L,F,A);break}L=this.model.getParent(L)}var P=
+p.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&P.hasAttribute("label_"+Graph.diagramLanguage)?P.setAttribute("label_"+Graph.diagramLanguage,A):P.setAttribute("label",A);A=P}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(p){if(null!=p){for(var A=new mxDictionary,B=0;B<p.length;B++)A.put(p[B],!0);var F=[];for(B=0;B<p.length;B++){var L=this.model.getParent(p[B]);null==L||A.get(L)||(A.put(L,!0),
+F.push(L))}for(B=0;B<F.length;B++)if(L=this.view.getState(F[B]),null!=L&&(this.model.isEdge(L.cell)||this.model.isVertex(L.cell))&&this.isCellDeletable(L.cell)&&this.isTransparentState(L)){for(var P=!0,Z=0;Z<this.model.getChildCount(L.cell)&&P;Z++)A.get(this.model.getChildAt(L.cell,Z))||(P=!1);P&&p.push(L.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(p){for(var A=[],B=0;B<p.length;B++)this.isCellDeletable(p[B])&&this.isTransparentState(this.view.getState(p[B]))&&
A.push(p[B]);p=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(p,A){this.setAttributeForCell(p,"link",A)};Graph.prototype.setTooltipForCell=function(p,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(p.value)&&p.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(p,B,A)};Graph.prototype.getAttributeForCell=function(p,A,B){p=null!=p.value&&
"object"===typeof p.value?p.value.getAttribute(A):null;return null!=p?p:B};Graph.prototype.setAttributeForCell=function(p,A,B){if(null!=p.value&&"object"==typeof p.value)var F=p.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",p.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(p,F)};Graph.prototype.isTargetShape=function(p,A,B){p=mxUtils.getValue(this.getCurrentCellStyle(p),mxConstants.STYLE_SHAPE,"");for(B=0;B<
-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,p))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(p,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<p.length;L++){var R=this.model.getParent(p[L]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(p,R))return null}R=E.apply(this,arguments);var Z=!0;for(L=0;L<p.length&&Z;L++)Z=Z&&this.isTableRow(p[L]);Z&&(this.isTableCell(R)&&(R=
-this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(p){mxGraph.prototype.click.call(this,p);this.firstClickState=p.getState();this.firstClickSource=p.getSource()};Graph.prototype.dblClick=function(p,A){this.isEnabled()&&(A=this.insertTextForEvent(p,A),mxGraph.prototype.dblClick.call(this,p,A))};Graph.prototype.insertTextForEvent=function(p,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));
+A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,p))return!0}return!1};var E=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(p,A,B,F){if(mxEvent.isAltDown(A))return null;for(var L=0;L<p.length;L++){var P=this.model.getParent(p[L]);if(this.model.isEdge(P)&&0>mxUtils.indexOf(p,P))return null}P=E.apply(this,arguments);var Z=!0;for(L=0;L<p.length&&Z;L++)Z=Z&&this.isTableRow(p[L]);Z&&(this.isTableCell(P)&&(P=
+this.model.getParent(P)),this.isTableRow(P)&&(P=this.model.getParent(P)),this.isTable(P)||(P=null));return P};Graph.prototype.click=function(p){mxGraph.prototype.click.call(this,p);this.firstClickState=p.getState();this.firstClickSource=p.getSource()};Graph.prototype.dblClick=function(p,A){this.isEnabled()&&(A=this.insertTextForEvent(p,A),mxGraph.prototype.dblClick.call(this,p,A))};Graph.prototype.insertTextForEvent=function(p,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));
if(null!=p&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,L=mxEvent.getSource(p);this.firstClickState!=F||this.firstClickSource!=L||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(p)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&L==this.view.getCanvas().ownerSVGElement)||
(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var p=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),L=this.getPageSize();A=Math.max(A,F.x*L.width);B=Math.max(B,F.y*L.height)}return new mxPoint(this.snap(A+p),this.snap(B+p))};Graph.prototype.getFreeInsertPoint=
function(){var p=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/p.scale-p.translate.x+(0==A.width?2*this.gridSize:0))));p=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/p.scale-p.translate.y+2*this.gridSize)));return new mxPoint(F,p)};Graph.prototype.getCenterInsertPoint=function(p){p=null!=p?p: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-p.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-p.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-p.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-p.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(p,A){p=null!=p?p:"";null!=
A&&(0<p.length&&";"!=p.charAt(p.length-1)&&(p+=";"),p+="fontSize="+A+";");return p};Graph.prototype.addText=function(p,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var L=this.view.getRelativePoint(B,p,A);F.geometry.x=Math.round(1E4*L.x)/1E4;F.geometry.y=Math.round(L.y);
-F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((p-L.x)/R),Math.round((A-L.y)/R))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(p/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(p,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ia=0;ia<fa.length;ia++){var va=this.getAbsoluteUrl(fa[ia].getAttribute("href"));null!=va&&(fa[ia].setAttribute("rel",this.linkRelation),
-fa[ia].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ia],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,R=this.getTolerance(),Z=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=p&&""!=p&&p!=mxConstants.NONE?new mxCellHighlight(Z,p,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ia=fa.sourceState;if(null==ia||null==Z.getLinkForCell(ia.cell))fa=Z.getCellAt(fa.getGraphX(),
-fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ia=null==ia||Z.model.isAncestor(fa,ia.cell)?Z.view.getState(fa):null;ia!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ia,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&
-(Z.container.style.cursor="move");this.updateCurrentState(ia)},mouseMove:function(fa,ia){if(Z.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ia.getGraphX()),ia=Math.abs(this.startY-ia.getGraphY()),(fa>R||ia>R)&&this.clear());else{for(fa=ia.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ia,!0,this.currentState),(null==this.currentState||ia.getState()!=
-this.currentState&&null!=ia.sourceState||!Z.intersects(this.currentState,ia.getGraphX(),ia.getGraphY()))&&this.updateCurrentState(ia))}},mouseUp:function(fa,ia){var va=ia.getSource();for(fa=ia.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&(null==ia.sourceState||!ia.isSource(ia.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&
-!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,fa),ia.consume())):null!=B&&!ia.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<
-R&&Math.abs(this.scrollTop-Z.container.scrollTop)<R&&Math.abs(this.startX-ia.getGraphX())<R&&Math.abs(this.startY-ia.getGraphY())<R&&B(ia.getEvent()));this.clear()},activate:function(fa){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(fa.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(fa){};Z.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(p,A){p=null!=p?p:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<p.length;B++)this.isTableCell(p[B])&&(p[B]=this.model.getParent(p[B]));p=this.model.getTopmostCells(p);var F=this.getModel(),L=this.gridSize,R=[];F.beginUpdate();
-try{var Z={},ha=this.createCellLookup(p),fa=this.cloneCells(p,!1,Z,!0);for(B=0;B<p.length;B++){var ia=F.getParent(p[B]);if(null!=ia){var va=this.moveCells([fa[B]],L,L,!1)[0];R.push(va);if(A)F.add(ia,fa[B]);else{var Ma=ia.getIndex(p[B]);F.add(ia,fa[B],Ma+1)}if(this.isTable(ia)){var Na=this.getCellGeometry(fa[B]),Aa=this.getCellGeometry(ia);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ia,Aa))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(Z,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(p,A,B){if(null!=p&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],R=0;R<F.length;R++)L.push(F[R]);document.execCommand("insertimage",!1,p);p=this.cellEditor.textarea.getElementsByTagName("img");if(p.length==L.length+1)for(R=p.length-1;0<=R;R--)if(0==R||p[R]!=L[R-1]){p[R].setAttribute("width",A);p[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(p){if(null!=
+F.geometry.offset=new mxPoint(0,0);L=this.view.getPoint(B,F.geometry);var P=this.view.scale;F.geometry.offset=new mxPoint(Math.round((p-L.x)/P),Math.round((A-L.y)/P))}else L=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(p/this.view.scale)-L.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-L.y-(null!=B?B.origin.y:0),F.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(p,A,B){var F=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ia=0;ia<ea.length;ia++){var va=this.getAbsoluteUrl(ea[ia].getAttribute("href"));null!=va&&(ea[ia].setAttribute("rel",this.linkRelation),
+ea[ia].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(ea[ia],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var L=this.container.style.cursor,P=this.getTolerance(),Z=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=p&&""!=p&&p!=mxConstants.NONE?new mxCellHighlight(Z,p,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ia=ea.sourceState;if(null==ia||null==Z.getLinkForCell(ia.cell))ea=Z.getCellAt(ea.getGraphX(),
+ea.getGraphY(),null,null,null,function(va,Ma,Na){return null==Z.getLinkForCell(va.cell)}),ia=null==ia||Z.model.isAncestor(ea,ia.cell)?Z.view.getState(ea):null;ia!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ia,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ia){this.startX=ia.getGraphX();this.startY=ia.getGraphY();this.scrollLeft=Z.container.scrollLeft;this.scrollTop=Z.container.scrollTop;null==this.currentLink&&"auto"==Z.container.style.overflow&&
+(Z.container.style.cursor="move");this.updateCurrentState(ia)},mouseMove:function(ea,ia){if(Z.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ia.getGraphX()),ia=Math.abs(this.startY-ia.getGraphY()),(ea>P||ia>P)&&this.clear());else{for(ea=ia.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=Z.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&Z.tooltipHandler.reset(ia,!0,this.currentState),(null==this.currentState||ia.getState()!=
+this.currentState&&null!=ia.sourceState||!Z.intersects(this.currentState,ia.getGraphX(),ia.getGraphY()))&&this.updateCurrentState(ia))}},mouseUp:function(ea,ia){var va=ia.getSource();for(ea=ia.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<P&&Math.abs(this.scrollTop-Z.container.scrollTop)<P&&(null==ia.sourceState||!ia.isSource(ia.sourceState.control))&&((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&
+!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(va=Z.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(ea,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":va?Z.linkTarget:"_top",Z.openLink(this.currentLink,ea),ia.consume())):null!=B&&!ia.isConsumed()&&Math.abs(this.scrollLeft-Z.container.scrollLeft)<
+P&&Math.abs(this.scrollTop-Z.container.scrollTop)<P&&Math.abs(this.startX-ia.getGraphX())<P&&Math.abs(this.startY-ia.getGraphY())<P&&B(ia.getEvent()));this.clear()},activate:function(ea){this.currentLink=Z.getAbsoluteUrl(Z.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=Z.getLinkTargetForCell(ea.cell),Z.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=Z.container&&(Z.container.style.cursor=L);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=Z.tooltipHandler&&Z.tooltipHandler.hide()}};Z.click=function(ea){};Z.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(ea){ha.clear()})};Graph.prototype.duplicateCells=function(p,A){p=null!=p?p:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<p.length;B++)this.isTableCell(p[B])&&(p[B]=this.model.getParent(p[B]));p=this.model.getTopmostCells(p);var F=this.getModel(),L=this.gridSize,P=[];F.beginUpdate();
+try{var Z={},ha=this.createCellLookup(p),ea=this.cloneCells(p,!1,Z,!0);for(B=0;B<p.length;B++){var ia=F.getParent(p[B]);if(null!=ia){var va=this.moveCells([ea[B]],L,L,!1)[0];P.push(va);if(A)F.add(ia,ea[B]);else{var Ma=ia.getIndex(p[B]);F.add(ia,ea[B],Ma+1)}if(this.isTable(ia)){var Na=this.getCellGeometry(ea[B]),Aa=this.getCellGeometry(ia);null!=Na&&null!=Aa&&(Aa=Aa.clone(),Aa.height+=Na.height,F.setGeometry(ia,Aa))}}else P.push(ea[B])}this.updateCustomLinks(this.createCellMapping(Z,ha),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",ea))}finally{F.endUpdate()}return P};Graph.prototype.insertImage=function(p,A,B){if(null!=p&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),L=[],P=0;P<F.length;P++)L.push(F[P]);document.execCommand("insertimage",!1,p);p=this.cellEditor.textarea.getElementsByTagName("img");if(p.length==L.length+1)for(P=p.length-1;0<=P;P--)if(0==P||p[P]!=L[P-1]){p[P].setAttribute("width",A);p[P].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(p){if(null!=
this.cellEditor.textarea)if(0==p.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(p));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);
B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(p))};Graph.prototype.isCellResizable=function(p){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(p);return!this.isTableCell(p)&&!this.isTableRow(p)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(p,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],L=
-null,R=null,Z=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var fa=this.view.getState(A[ha]);if(null!=fa){var ia=p?fa.getCenterX():fa.getCenterY();L=null!=L?Math.max(L,ia):ia;R=null!=R?Math.min(R,ia):ia;B&&(Z+=p?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ga,wa){return p?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=p?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ia=this.view.scale;R=R/ia-(p?fa.x:fa.y);L=L/ia-(p?fa.x:fa.y);this.getModel().beginUpdate();
-try{var va=(L-R-Z)/(F.length-1),Ma=R+(B?p?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),Aa=this.getCellGeometry(F[ha].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),p?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,Aa));B&&(Ma+=p?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(p){return mxClient.IS_MAC&&
-mxEvent.isMetaDown(p)||mxEvent.isControlDown(p)};Graph.prototype.createSvgImageExport=function(p){p=new mxImageExport;p.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var R=B.value.attributes[L];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=p.visitStatesRecursive;
-p.visitStatesRecursive=function(B,F,L){if(null!=B){var R=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};p.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});p.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
-return p};Graph.prototype.parseBackgroundImage=function(p){var A=null;null!=p&&0<p.length&&(p=JSON.parse(p),A=new mxImage(p.src,p.width,p.height));return A};Graph.prototype.getBackgroundImageObject=function(p){return p};Graph.prototype.getSvg=function(p,A,B,F,L,R,Z,ha,fa,ia,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Xa=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),
-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;R=null!=R?R:!0;Z=null!=Z?Z:!0;ia=null!=ia?ia:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),La=this.backgroundImage,Ua=this.view.translate,Ya=this.view.scale;"diagram"==Na&&null!=La&&null!=La.width&&null!=La.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+La.x)*Ya,(Ua.y+La.y)*Ya,La.width*Ya,La.height*
+null,P=null,Z=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var ea=this.view.getState(A[ha]);if(null!=ea){var ia=p?ea.getCenterX():ea.getCenterY();L=null!=L?Math.max(L,ia):ia;P=null!=P?Math.min(P,ia):ia;B&&(Z+=p?ea.width:ea.height);F.push(ea)}}if(2<F.length){F.sort(function(Ga,wa){return p?Ga.x-wa.x:Ga.y-wa.y});B&&(Z-=p?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);ea=this.view.translate;ia=this.view.scale;P=P/ia-(p?ea.x:ea.y);L=L/ia-(p?ea.x:ea.y);this.getModel().beginUpdate();
+try{var va=(L-P-Z)/(F.length-1),Ma=P+(B?p?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),Aa=this.getCellGeometry(F[ha].cell);Ma+=va;null!=Aa&&null!=Na&&(Aa=Aa.clone(),p?Aa.x=Math.round(Ma-(B?0:Aa.width/2))-Na.origin.x:Aa.y=Math.round(Ma-(B?0:Aa.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,Aa));B&&(Ma+=p?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(p){return mxClient.IS_MAC&&
+mxEvent.isMetaDown(p)||mxEvent.isControlDown(p)};Graph.prototype.createSvgImageExport=function(p){p=new mxImageExport;p.addCellData=function(B,F,L){F.setAttribute("data-cell-id",B.id);if(L)if(mxUtils.isNode(B.value))for(L=0;L<B.value.attributes.length;L++){var P=B.value.attributes[L];F.setAttribute("data-cell-"+P.name,P.value)}else if("object"===typeof B.value)for(P in B.value)F.setAttribute("data-cell-"+P,B.value[P]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=p.visitStatesRecursive;
+p.visitStatesRecursive=function(B,F,L){if(null!=B){var P=F.root,Z=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=Z.createElementNS?Z.createElementNS(mxConstants.NS_SVG,"g"):Z.createElement("g"),Editor.addSvgMetadata);P.appendChild(F.root);A.apply(this,arguments);F.root=P}};p.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});p.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
+return p};Graph.prototype.parseBackgroundImage=function(p){var A=null;null!=p&&0<p.length&&(p=JSON.parse(p),A=new mxImage(p.src,p.width,p.height));return A};Graph.prototype.getBackgroundImageObject=function(p){return p};Graph.prototype.getSvg=function(p,A,B,F,L,P,Z,ha,ea,ia,va,Ma,Na,Aa,Ga,wa){var ua=null;if(null!=Aa)for(ua=new mxDictionary,va=0;va<Aa.length;va++)ua.put(Aa[va],!0);Aa=this.useCssTransforms;var Xa=this.enableFlowAnimation;this.enableFlowAnimation=!1;Aa&&(this.useCssTransforms=!1,this.view.revalidate(),
+this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;L=null!=L?L:!0;P=null!=P?P:!0;Z=null!=Z?Z:!0;ia=null!=ia?ia:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():P&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),La=this.backgroundImage,Ua=this.view.translate,Ya=this.view.scale;"diagram"==Na&&null!=La&&null!=La.width&&null!=La.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+La.x)*Ya,(Ua.y+La.y)*Ya,La.width*Ya,La.height*
Ya)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Ya;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ia&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ia&&0==B?5:0);ia=L?-.5:0;var vb=mxUtils.getLightDarkColor(p),jb=Graph.createSvgNode(ia,ia,mb,ub,vb),nb=jb.ownerDocument;if(null!=p){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=L?-.5:0;bb.textOffset=L?-.5:0;bb.imageOffset=L?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Ya),Math.floor(B/A-Qa.y/Ya));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
-Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),H=[],y=0,ca=0;(0==x||y<x)&&ca<Za.length;){var S=Za.charCodeAt(ca);if(10==S||13==S){if(0<y)break}else H.push(Za.charAt(ca)),255>S&&y++;ca++}H.length<Za.length&&1<Za.length-H.length&&(Za=mxUtils.trim(H.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=La&&null!=La.width&&null!=La.height&&(p=Ya/A,ia=new mxRectangle((La.x+
+Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),H=[],y=0,da=0;(0==x||y<x)&&da<Za.length;){var Q=Za.charCodeAt(da);if(10==Q||13==Q){if(0<y)break}else H.push(Za.charAt(da)),255>Q&&y++;da++}H.length<Za.length&&1<Za.length-H.length&&(Za=mxUtils.trim(H.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=La&&null!=La.width&&null!=La.height&&(p=Ya/A,ia=new mxRectangle((La.x+
Ua.x)*p,(La.y+Ua.y)*p,La.width*p,La.height*p),mxUtils.intersects(Qa,ia)&&bb.image(La.x+Ua.x,La.y+Ua.y,La.width,La.height,La.src,!0));bb.scale(F);bb.textEnabled=Z;ha=null!=ha?ha:this.createSvgImageExport();var tb=ha.getLinkForCellState;ha.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};ha.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=ha.drawCellState,
-lb=null,ib=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
-$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Xa&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,ib())};if(R&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
-sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,fa,!0);return jb}finally{this.enableFlowAnimation=Xa,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(p,A){if("0"!=urlParams["svg-warning"]&&
+lb=null,ib=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(P&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
+$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Xa&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,ib())};if(P&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
+sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,ea,!0);return jb}finally{this.enableFlowAnimation=Xa,Aa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(p,A){if("0"!=urlParams["svg-warning"]&&
0<A.getElementsByTagName("foreignObject").length){var B=p.createElement("switch"),F=p.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var L=p.createElement("a");L.setAttribute("transform","translate(0,-5)");null==L.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(L.setAttribute("xlink:href",Graph.foreignObjectWarningLink),L.setAttribute("target","_blank")):(L.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
L.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));p=p.createElement("text");p.setAttribute("text-anchor","middle");p.setAttribute("font-size","10px");p.setAttribute("x","50%");p.setAttribute("y","100%");mxUtils.write(p,Graph.foreignObjectWarningText);B.appendChild(F);L.appendChild(p);B.appendChild(L);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(p,A){p=p.getElementsByTagName("a");for(var B=0;B<p.length;B++){var F=p[B].getAttribute("href");null==F&&(F=p[B].getAttribute("xlink:href"));
null!=F&&(p[B].style.pointerEvents="none",p[B].setAttribute("href",""));A&&A(p[B])}};Graph.prototype.updateSvgLinks=function(p,A,B){p=p.getElementsByTagName("a");for(var F=0;F<p.length;F++)if(null==p[F].getAttribute("target")){var L=p[F].getAttribute("href");null==L&&(L=p[F].getAttribute("xlink:href"));null!=L&&(null!=A&&/^https?:\/\//.test(L)?p[F].setAttribute("target",A):B&&this.isCustomLink(L)&&p[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(p){p=new mxSvgCanvas2D(p);
p.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;p.adaptiveColors=this.getAdaptiveColors();p.pointerEvents=!0;return p};Graph.prototype.getSelectedElement=function(){var p=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(p=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(p=document.selection.createRange().parentElement());return p};Graph.prototype.getSelectedEditingElement=function(){var p=null;if(null!=this.cellEditor.textarea)for(p=this.getSelectedElement();null!=
p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.parentNode;return p};Graph.prototype.getParentByName=function(p,A,B){for(;null!=p&&p.nodeName!=A;){if(p==B)return null;p=p.parentNode}return p};Graph.prototype.getParentByNames=function(p,A,B){for(;null!=p&&!(0<=mxUtils.indexOf(A,p.nodeName));){if(p==B)return null;p=p.parentNode}return p};Graph.prototype.selectNode=function(p){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(p);
-A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(p=A.createRange(),p.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",p),B.select())};Graph.prototype.flipEdgePoints=function(p,A,B){var F=this.getCellGeometry(p);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));
-this.model.setGeometry(p,F)}};Graph.prototype.flipChildren=function(p,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(p),L=0;L<F;L++){var R=this.model.getChildAt(p,L);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var Z=this.getCellGeometry(R);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(R,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(p,A){this.model.beginUpdate();try{p=this.model.getTopmostCells(p);
-for(var B=[],F=0;F<p.length;F++)if(this.model.isEdge(p[F])){var L=this.view.getState(p[F]);null!=L&&this.flipEdgePoints(p[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(p[F]);null!=R&&this.flipChildren(p[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(p[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
-function(p,A){var B=null;if(null!=p&&0<p.length){this.model.beginUpdate();try{for(var F=0;F<p.length;F++){var L=this.model.getParent(p[F]);if(this.isTable(L)){var R=this.getCellGeometry(p[F]),Z=this.getCellGeometry(L);null!=R&&null!=Z&&(Z=Z.clone(),Z.height-=R.height,this.model.setGeometry(L,Z))}}var ha=this.selectParentAfterDelete?this.model.getParents(p):null;this.removeCells(p,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
-this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=0;if(this.isTableCell(p)){var R=B.getParent(p);F=B.getParent(R);L=mxUtils.indexOf(B.getChildCells(R,!0),p)}else this.isTableRow(p)?F=B.getParent(p):p=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(p,!0).length-1);var Z=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(p=0;p<Z.length;p++){var fa=B.getChildCells(Z[p],!0)[L],ia=B.cloneCell(fa,!1);
+A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(p=A.createRange(),p.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",p),B.select())};Graph.prototype.flipEdgePoints=function(p,A,B){var F=this.getCellGeometry(p);if(null!=F){F=F.clone();if(null!=F.points)for(var L=0;L<F.points.length;L++)A?F.points[L].x=B+(B-F.points[L].x):F.points[L].y=B+(B-F.points[L].y);L=function(P){null!=P&&(A?P.x=B+(B-P.x):P.y=B+(B-P.y))};L(F.getTerminalPoint(!0));L(F.getTerminalPoint(!1));
+this.model.setGeometry(p,F)}};Graph.prototype.flipChildren=function(p,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(p),L=0;L<F;L++){var P=this.model.getChildAt(p,L);if(this.model.isEdge(P))this.flipEdgePoints(P,A,B);else{var Z=this.getCellGeometry(P);null!=Z&&(Z=Z.clone(),A?Z.x=B+(B-Z.x-Z.width):Z.y=B+(B-Z.y-Z.height),this.model.setGeometry(P,Z))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(p,A){this.model.beginUpdate();try{p=this.model.getTopmostCells(p);
+for(var B=[],F=0;F<p.length;F++)if(this.model.isEdge(p[F])){var L=this.view.getState(p[F]);null!=L&&this.flipEdgePoints(p[F],A,(A?L.getCenterX():L.getCenterY())/this.view.scale-(A?L.origin.x:L.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var P=this.getCellGeometry(p[F]);null!=P&&this.flipChildren(p[F],A,A?P.getCenterX()-P.x:P.getCenterY()-P.y);B.push(p[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
+function(p,A){var B=null;if(null!=p&&0<p.length){this.model.beginUpdate();try{for(var F=0;F<p.length;F++){var L=this.model.getParent(p[F]);if(this.isTable(L)){var P=this.getCellGeometry(p[F]),Z=this.getCellGeometry(L);null!=P&&null!=Z&&(Z=Z.clone(),Z.height-=P.height,this.model.setGeometry(L,Z))}}var ha=this.selectParentAfterDelete?this.model.getParents(p):null;this.removeCells(p,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
+this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=0;if(this.isTableCell(p)){var P=B.getParent(p);F=B.getParent(P);L=mxUtils.indexOf(B.getChildCells(P,!0),p)}else this.isTableRow(p)?F=B.getParent(p):p=B.getChildCells(F,!0)[0],A||(L=B.getChildCells(p,!0).length-1);var Z=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(p=0;p<Z.length;p++){var ea=B.getChildCells(Z[p],!0)[L],ia=B.cloneCell(ea,!1);
null==ia&&(ia=this.createVertex());var va=this.getCellGeometry(ia);ia.value=null;ia.style=mxUtils.setStyle(mxUtils.setStyle(ia.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ha=va.width;var Ma=this.getCellGeometry(Z[p]);null!=Ma&&(va.height=Ma.height)}B.add(Z[p],ia,L+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ha,B.setGeometry(F,Na))}finally{B.endUpdate()}};
Graph.prototype.deleteLane=function(p){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(p).childLayout?p:A.getParent(p);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==p&&(p=F[F.length-1]),A.remove(p))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(p).childLayout){F=p;var L=B.getChildCells(F,!0);p=L[A?0:L.length-1]}else F=B.getParent(p);
-var R=F.getIndex(p);p=B.cloneCell(p,!1);p.value=null;B.add(F,p,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=p;if(this.isTableCell(p))L=B.getParent(p),F=B.getParent(L);else if(this.isTableRow(p))F=B.getParent(p);else{var R=B.getChildCells(F,!0);L=R[A?0:R.length-1]}var Z=B.getChildCells(L,!0),ha=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var fa=this.getCellGeometry(L);if(null!=fa){for(R=0;R<Z.length;R++){p=B.cloneCell(Z[R],
-!1);p.value=null;p.style=mxUtils.setStyle(mxUtils.setStyle(p.style,"rowspan",null),"colspan",null);var ia=this.getCellGeometry(p);null!=ia&&(null!=ia.alternateBounds&&(ia.width=ia.alternateBounds.width,ia.height=ia.alternateBounds.height,ia.alternateBounds=null),ia.height=fa.height);L.insert(p)}B.add(F,L,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(p){var A=this.getModel();
-A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(F=A.getParent(p));this.isTableRow(F)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var Z=R.length-1;this.isTableCell(p)&&(Z=mxUtils.indexOf(R,p));for(F=p=0;F<L.length;F++){var ha=A.getChildCells(L[F],!0)[Z];A.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(p=Math.max(p,fa.width))}var ia=this.getCellGeometry(B);null!=
-ia&&(ia=ia.clone(),ia.width-=p,A.setGeometry(B,ia))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(p){var A=this.getModel();A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(p=F=A.getParent(p));this.isTableRow(p)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);p=0;var R=this.getCellGeometry(F);null!=R&&(p=R.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=p,A.setGeometry(B,
-Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(p,A){for(var B=p.tBodies[0],F=B.rows[0].cells,L=p=0;L<F.length;L++){var R=F[L].getAttribute("colspan");p+=null!=R?parseInt(R):1}A=B.insertRow(A);for(L=0;L<p;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(p,A){p.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(p,A){var B=p.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);
+var P=F.getIndex(p);p=B.cloneCell(p,!1);p.value=null;B.add(F,p,P+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(p,A){var B=this.getModel();B.beginUpdate();try{var F=p,L=p;if(this.isTableCell(p))L=B.getParent(p),F=B.getParent(L);else if(this.isTableRow(p))F=B.getParent(p);else{var P=B.getChildCells(F,!0);L=P[A?0:P.length-1]}var Z=B.getChildCells(L,!0),ha=F.getIndex(L);L=B.cloneCell(L,!1);L.value=null;var ea=this.getCellGeometry(L);if(null!=ea){for(P=0;P<Z.length;P++){p=B.cloneCell(Z[P],
+!1);p.value=null;p.style=mxUtils.setStyle(mxUtils.setStyle(p.style,"rowspan",null),"colspan",null);var ia=this.getCellGeometry(p);null!=ia&&(null!=ia.alternateBounds&&(ia.width=ia.alternateBounds.width,ia.height=ia.alternateBounds.height,ia.alternateBounds=null),ia.height=ea.height);L.insert(p)}B.add(F,L,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=ea.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(p){var A=this.getModel();
+A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(F=A.getParent(p));this.isTableRow(F)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(0==L.length)A.remove(B);else{this.isTableRow(F)||(F=L[0]);var P=A.getChildCells(F,!0);if(1>=P.length)A.remove(B);else{var Z=P.length-1;this.isTableCell(p)&&(Z=mxUtils.indexOf(P,p));for(F=p=0;F<L.length;F++){var ha=A.getChildCells(L[F],!0)[Z];A.remove(ha);var ea=this.getCellGeometry(ha);null!=ea&&(p=Math.max(p,ea.width))}var ia=this.getCellGeometry(B);null!=
+ia&&(ia=ia.clone(),ia.width-=p,A.setGeometry(B,ia))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(p){var A=this.getModel();A.beginUpdate();try{var B=p,F=p;this.isTableCell(p)&&(p=F=A.getParent(p));this.isTableRow(p)&&(B=A.getParent(F));var L=A.getChildCells(B,!0);if(1>=L.length)A.remove(B);else{this.isTableRow(F)||(F=L[L.length-1]);A.remove(F);p=0;var P=this.getCellGeometry(F);null!=P&&(p=P.height);var Z=this.getCellGeometry(B);null!=Z&&(Z=Z.clone(),Z.height-=p,A.setGeometry(B,
+Z))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(p,A){for(var B=p.tBodies[0],F=B.rows[0].cells,L=p=0;L<F.length;L++){var P=F[L].getAttribute("colspan");p+=null!=P?parseInt(P):1}A=B.insertRow(A);for(L=0;L<p;L++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(p,A){p.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(p,A){var B=p.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var L=document.createElement("th");B.rows[F].appendChild(L);
mxUtils.br(L)}p=p.tBodies[0];for(B=0;B<p.rows.length;B++)F=p.rows[B].insertCell(A),mxUtils.br(F);return p.rows[0].cells[0<=A?A:p.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(p,A){if(0<=A){p=p.tBodies[0].rows;for(var B=0;B<p.length;B++)p[B].cells.length>A&&p[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(p){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
-p;p=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=p.appendChild(F);A.insertNode(p)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(p)};Graph.prototype.createLinkForHint=function(p,A,B){function F(R,Z){R.length>Z&&(R=R.substring(0,Math.round(Z/2))+"..."+R.substring(R.length-Math.round(Z/4)));return R}p=null!=p?p:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(p)?this.getLinkTitle(p):p;var L=document.createElement("a");L.setAttribute("rel",
-this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(p));L.setAttribute("title",F(this.isCustomLink(p)?this.getLinkTitle(p):p,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(p)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(R){this.customLinkClicked(p,B);mxEvent.consume(R)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(R,Z){this.popupMenuHandler.hideMenu()});var p=this.updateMouseEvent;this.updateMouseEvent=function(R){R=p.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var Z=this.getCellAt(R.graphX,R.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,R.graphX,R.graphY)||(R.state=this.view.getState(Z),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(R,Z,ha){R==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=
-!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ia.x+1,Z.getY()+ia.y+1,fa,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[R,Z,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var p=this.graph.view.getState(this.editingCell);return null!=p&&1==p.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var p="";window.getSelection?p=window.getSelection():document.getSelection?p=document.getSelection():document.selection&&(p=document.selection.createRange().text);
+p;p=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=p.appendChild(F);A.insertNode(p)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(p)};Graph.prototype.createLinkForHint=function(p,A,B){function F(P,Z){P.length>Z&&(P=P.substring(0,Math.round(Z/2))+"..."+P.substring(P.length-Math.round(Z/4)));return P}p=null!=p?p:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(p)?this.getLinkTitle(p):p;var L=document.createElement("a");L.setAttribute("rel",
+this.linkRelation);L.setAttribute("href",this.getAbsoluteUrl(p));L.setAttribute("title",F(this.isCustomLink(p)?this.getLinkTitle(p):p,80));null!=this.linkTarget&&L.setAttribute("target",this.linkTarget);mxUtils.write(L,F(A,40));this.isCustomLink(p)&&mxEvent.addListener(L,"click",mxUtils.bind(this,function(P){this.customLinkClicked(p,B);mxEvent.consume(P)}));return L};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(P,Z){this.popupMenuHandler.hideMenu()});var p=this.updateMouseEvent;this.updateMouseEvent=function(P){P=p.apply(this,arguments);if(mxEvent.isTouchEvent(P.getEvent())&&null==P.getState()){var Z=this.getCellAt(P.graphX,P.graphY);null!=Z&&this.isSwimlane(Z)&&this.hitsSwimlaneContent(Z,P.graphX,P.graphY)||(P.state=this.view.getState(Z),null!=P.state&&null!=P.state.shape&&(this.container.style.cursor=P.state.shape.node.style.cursor))}null==P.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return P};var A=!1,B=!1,F=!1,L=this.fireMouseEvent;this.fireMouseEvent=function(P,Z,ha){P==mxEvent.MOUSE_DOWN&&(Z=this.updateMouseEvent(Z),A=this.isCellSelected(Z.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());L.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(P,Z){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(Z.getEvent());this.popupMenuHandler.popupTrigger=
+!this.isEditing()&&this.isEnabled()&&(null==Z.getState()||!Z.isSource(Z.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==Z.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(Z.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ia=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(Z.getX()+ia.x+1,Z.getY()+ia.y+1,ea,Z.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[P,Z,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var p=this.graph.view.getState(this.editingCell);return null!=p&&1==p.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var p="";window.getSelection?p=window.getSelection():document.getSelection?p=document.getSelection():document.selection&&(p=document.selection.createRange().text);
return""!=p};mxCellEditor.prototype.insertTab=function(p){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);p=Graph.createTabNode(p);B.insertNode(p);B.setStartAfter(p);B.setEndAfter(p);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(p,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),
-L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(p)}F||document.execCommand("justify"+p.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var p=window.getSelection();if(p.getRangeAt&&p.rangeCount){for(var A=
+L=null!=A&&mxEvent.isShiftDown(A);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var P=!0;this.graph.processElements(this.textarea,function(Z){L||F||window.getSelection().containsNode(Z,!0)?(Z.removeAttribute("align"),Z.style.textAlign=null):P=!1});(P||F)&&this.graph.cellEditor.setAlign(p)}F||document.execCommand("justify"+p.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var p=window.getSelection();if(p.getRangeAt&&p.rangeCount){for(var A=
[],B=0,F=p.rangeCount;B<F;++B)A.push(p.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(p){try{if(p)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=p.length;A<B;++A)sel.addRange(p[A])}else document.selection&&p.select&&p.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(p){null!=p.text&&(p.text.replaceLinefeeds="0"!=mxUtils.getValue(p.style,"nl2Br","1"));G.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(p,A){this.isKeepFocusEvent(p)||!mxEvent.isAltDown(p.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(p){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var J=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(p,A){p=this.graph.getStartEditingCell(p,A);J.apply(this,arguments);var B=this.graph.view.getState(p);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(p)};mxCellEditor.prototype.toggleViewMode=function(){var p=this.graph.view.getState(this.editingCell);
-if(null!=p){var A=null!=p&&"0"!=mxUtils.getValue(p.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(p.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-A=mxUtils.getValue(p.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");
-(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
+if(null!=p){var A=null!=p&&"0"!=mxUtils.getValue(p.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(p.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+A=mxUtils.getValue(p.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),L=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,P=(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,Z=[];(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&Z.push("underline");
+(mxUtils.getValue(p.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&Z.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=Z.join(" ");this.textarea.style.fontWeight=L?"bold":"normal";this.textarea.style.fontStyle=P?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(fa)+"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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
+Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(ea)+"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!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
B;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(p,A){if(null!=this.textarea)if(p=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=p){var B=p.view.scale;this.bounds=mxRectangle.fromRectangle(p);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=p.text?p.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(p.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
mxUtils.getValue(p.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);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("+B+","+B+")")}else this.textarea.style.height=
"",this.textarea.style.overflow="",T.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(p,A){if("0"==mxUtils.getValue(p.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(p.cell,A);"1"==mxUtils.getValue(p.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
function(p,A){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(p.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(p){if("0"==mxUtils.getValue(p.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);
var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(p.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(p){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};
-mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(p){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(p,A){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==A&&this.graph.isCellDeletable(p.cell)&&0==this.graph.model.getChildCount(p.cell)&&this.graph.isTransparentState(p)&&this.graph.removeCells([p.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(p){p=
+mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(p){}};var V=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(p,A){this.graph.getModel().beginUpdate();try{V.apply(this,arguments),""==A&&this.graph.isCellDeletable(p.cell)&&0==this.graph.model.getChildCount(p.cell)&&this.graph.isTransparentState(p)&&this.graph.removeCells([p.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(p){p=
mxUtils.getValue(p.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);p==mxConstants.NONE&&(p=null);return p};mxCellEditor.prototype.getBorderColor=function(p){p=mxUtils.getValue(p.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);p==mxConstants.NONE&&(p=null);return p};mxCellEditor.prototype.getMinimumSize=function(p){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==p.text?30:p.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=
function(p,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(p){return p?b(p,this.unit):p};mxGraphHandler.prototype.updateHint=function(p){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;p=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+
-this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(p,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var V=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
-function(p,A){V.apply(this,arguments);var B=this.graph.getCellStyle(p);if(null==B.childLayout){var F=this.graph.model.getParent(p),L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var Z=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+Z.y+Z.height+2*R:L.width=A.width+Z.x+Z.width+2*R;
-this.graph.model.setGeometry(F,L)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function p(ha){B.get(ha)||(B.put(ha,!0),L.push(ha))}for(var A=Q.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],R=0;R<A.length;R++){var Z=A[R];this.graph.isTableCell(Z)?p(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&p(F.getParent(Z));p(Z)}return L};var N=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
-function(p){return N.apply(this,arguments)&&!mxEvent.isControlDown(p.getEvent())&&!mxEvent.isShiftDown(p.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var O=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
-function(p){var A=O.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var X=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(p){var A=X.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var p=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(p,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var W=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
+function(p,A){W.apply(this,arguments);var B=this.graph.getCellStyle(p);if(null==B.childLayout){var F=this.graph.model.getParent(p),L=null!=F?this.graph.getCellGeometry(F):null;if(null!=L&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var Z=this.graph.getActualStartSize(F);L=L.clone();B?L.height=A.height+Z.y+Z.height+2*P:L.width=A.width+Z.x+Z.width+2*P;
+this.graph.model.setGeometry(F,L)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function p(ha){B.get(ha)||(B.put(ha,!0),L.push(ha))}for(var A=O.apply(this,arguments),B=new mxDictionary,F=this.graph.model,L=[],P=0;P<A.length;P++){var Z=A[P];this.graph.isTableCell(Z)?p(F.getParent(F.getParent(Z))):this.graph.isTableRow(Z)&&p(F.getParent(Z));p(Z)}return L};var M=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
+function(p){return M.apply(this,arguments)&&!mxEvent.isControlDown(p.getEvent())&&!mxEvent.isShiftDown(p.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var N=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
+function(p){var A=N.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Y=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(p){var A=Y.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var p=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
p.x/2,this.bounds.y+this.rotationHandleVSpacing-p.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(p,A){return this.graph.isRecursiveVertexResize(p)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(p,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 ka=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
-var ta=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(p){return p.tableHandle||ta.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var p=0;this.graph.isTableRow(this.state.cell)?p=1:this.graph.isTableCell(this.state.cell)&&(p=2);return p};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
-function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,ea=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var p=ea.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Xa=[],Qa=0;Qa<Ga.length;Qa++){var La=Ga[Qa];Xa.push(null==La?null:new mxPoint((fa+La.x+wa)*R,(ia+La.y+
-ua)*R))}return Xa},B=this,F=this.graph,L=F.model,R=F.view.scale,Z=this.state,ha=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ia=this.state.origin.y+F.view.translate.y;null==p&&(p=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
+!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 la=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return la.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
+var S=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(p){return p.tableHandle||S.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var p=0;this.graph.isTableRow(this.state.cell)?p=1:this.graph.isTableCell(this.state.cell)&&(p=2);return p};var U=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
+function(){return U.apply(this,arguments).grow(-this.getSelectionBorderInset())};var aa=null,fa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==aa&&(aa=mxCellRenderer.defaultShapes.tableLine);var p=fa.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Xa=[],Qa=0;Qa<Ga.length;Qa++){var La=Ga[Qa];Xa.push(null==La?null:new mxPoint((ea+La.x+wa)*P,(ia+La.y+
+ua)*P))}return Xa},B=this,F=this.graph,L=F.model,P=F.view.scale,Z=this.state,ha=this.selectionBorder,ea=this.state.origin.x+F.view.translate.x,ia=this.state.origin.y+F.view.translate.y;null==p&&(p=[]);var va=F.view.getCellStates(L.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=L.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),Aa=F.getTableLines(this.state.cell,!0,!1);for(L=0;L<va.length;L++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Xa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Aa[Ga]?new aa(Aa[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Aa[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Ua.x*R);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var La=!1;ua.setPosition=function(Ua,Ya,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Ya.y-Ua.y-Ua.height);
+0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Aa[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(Z.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*P;this.shape.bounds.x=Z.x+(Ga==va.length-1?0:Ua.x*P);this.shape.bounds.width=Z.width-(Ga==va.length-1?0:Ua.width+Ua.x+P)}this.shape.redraw()}};var La=!1;ua.setPosition=function(Ua,Ya,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Ya.y-Ua.y-Ua.height);
La=mxEvent.isShiftDown(mb.getEvent());null!=Xa&&La&&(Qa=Math.min(Qa,Xa.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!La);else if(!B.blockDelayedSelection){var Ya=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(Ya,Ua)}Qa=0};ua.reset=function(){Qa=0}}p.push(ua)})(L);for(L=0;L<Ma.length;L++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Xa=null!=ua.alternateBounds?
-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*R,wa.y=Z.y+ua.y*R,wa.width=Xa.width*R,wa.height=Xa.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new aa(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
-null,ua);wa.tableHandle=!0;var La=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Na[Ga],La,0),this.shape.updateBoundsFromLine();else{var Ya=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Xa.width+La)*R;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Ya.y*R);this.shape.bounds.height=
-Z.height-(Ga==Ma.length-1?0:(Ya.height+Ya.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Ya,mb,ub){La=Math.max(Graph.minTableColumnWidth-Xa.width,mb.x-Ya.x-Xa.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(La=Math.min(La,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Ya){if(0!=La)F.setTableColumnWidth(this.state.cell,La,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Ya.getGraphX(),Ya.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(mb,Ya)}La=
-0};wa.positionChanged=function(){};wa.reset=function(){La=0};p.push(wa)})(L)}}return null!=p?p.reverse():null};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(p){da.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=p?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
+ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=Z.x+ua.x*P,wa.y=Z.y+ua.y*P,wa.width=Xa.width*P,wa.height=Xa.height*P,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new aa(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
+null,ua);wa.tableHandle=!0;var La=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==La?mxConstants.NONE:ha.stroke;if(this.shape.constructor==aa)this.shape.line=A(Na[Ga],La,0),this.shape.updateBoundsFromLine();else{var Ya=F.getActualStartSize(Z.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Xa.width+La)*P;this.shape.bounds.y=Z.y+(Ga==Ma.length-1?0:Ya.y*P);this.shape.bounds.height=
+Z.height-(Ga==Ma.length-1?0:(Ya.height+Ya.y)*P)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Ya,mb,ub){La=Math.max(Graph.minTableColumnWidth-Xa.width,mb.x-Ya.x-Xa.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(La=Math.min(La,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Ya){if(0!=La)F.setTableColumnWidth(this.state.cell,La,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Ya.getGraphX(),Ya.getGraphY())||Z.cell;F.graphHandler.selectCellForEvent(mb,Ya)}La=
+0};wa.positionChanged=function(){};wa.reset=function(){La=0};p.push(wa)})(L)}}return null!=p?p.reverse():null};var ka=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(p){ka.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=p?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
p?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var p=this.isMoveHandlesVisible();p&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():p||null==this.moveHandles||this.destroyMoveHandles();if(p&&null==this.moveHandles){for(p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].parentNode.removeChild(this.moveHandles[p]);
-this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var p=this.graph,A=p.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&p.isCellMovable(L.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=L;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
-R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.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),L.cell,Z),mxEvent.consume(Z))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].destroy();
-this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var p=0;p<this.cornerHandles.length;p++)null!=this.cornerHandles[p]&&null!=this.cornerHandles[p].node&&null!=this.cornerHandles[p].node.parentNode&&this.cornerHandles[p].node.parentNode.removeChild(this.cornerHandles[p].node);this.cornerHandles=null}};var sa=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){sa.apply(this,arguments);this.destroyMoveHandles();
+this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var p=this.graph,A=p.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(L){if(null!=L&&A.isVertex(L.cell)&&p.isCellMovable(L.cell)){var P=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);P=new mxImageShape(P,this.rowHandleImage.src);P.rowState=L;P.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;P.init(this.graph.getView().getOverlayPane());
+P.node.style.cursor="move";mxEvent.addGestureListeners(P.node,mxUtils.bind(this,function(Z){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(Z)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.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),L.cell,Z),mxEvent.consume(Z))}));B.push(P)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var p=0;p<this.moveHandles.length;p++)null!=this.moveHandles[p]&&this.moveHandles[p].destroy();
+this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var p=0;p<this.cornerHandles.length;p++)null!=this.cornerHandles[p]&&null!=this.cornerHandles[p].node&&null!=this.cornerHandles[p].node.parentNode&&this.cornerHandles[p].node.parentNode.removeChild(this.cornerHandles[p].node);this.cornerHandles=null}};var ta=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ta.apply(this,arguments);this.destroyMoveHandles();
this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var p=0;4>p;p++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());
-this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();p=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var Y=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var p=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
-this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var L=this.customHandles[F].shape.bounds,R=L.getCenterX(),Z=L.getCenterY();if(Math.abs(this.state.x-R)<L.width/2||Math.abs(this.state.y-Z)<L.height/2||Math.abs(this.state.x+this.state.width-R)<L.width/2||Math.abs(this.state.y+this.state.height-Z)<L.height/2){B=
-!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),p.x=this.sizers[0].bounds.width+A,p.y=this.sizers[0].bounds.height+A):p=Y.apply(this,arguments);return p};mxVertexHandler.prototype.updateHint=function(p){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{p=this.state.view.scale;
+this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();p=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var p=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
+this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var L=this.customHandles[F].shape.bounds,P=L.getCenterX(),Z=L.getCenterY();if(Math.abs(this.state.x-P)<L.width/2||Math.abs(this.state.y-Z)<L.height/2||Math.abs(this.state.x+this.state.width-P)<L.width/2||Math.abs(this.state.y+this.state.height-Z)<L.height/2){B=
+!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),p.x=this.sizers[0].bounds.width+A,p.y=this.sizers[0].bounds.height+A):p=ba.apply(this,arguments);return p};mxVertexHandler.prototype.updateHint=function(p){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{p=this.state.view.scale;
var A=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/p),A)+" x "+b(this.roundLength(this.bounds.height/p),A)}p=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==p&&(p=this.bounds);this.hint.style.left=p.x+Math.round((p.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=p.y+p.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 P=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){P.apply(this,arguments);var p=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ba=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(p,A){ba.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 la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(p,A){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(p,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
-L=this.graph.view.scale,R=this.roundLength(A.x/L-F.x);F=this.roundLength(A.y/L-F.y);var Z=this.graph.view.unit;this.hint.innerHTML=b(R,Z)+", "+b(F,Z);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(Z==mxConstants.POINTS?Math.round(B.length/L):b(B.length/L,Z))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
+function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var R=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){R.apply(this,arguments);var p=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(p,A)};var ca=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(p,A){ca.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 ma=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(p,A){ma.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(p,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
+L=this.graph.view.scale,P=this.roundLength(A.x/L-F.x);F=this.roundLength(A.y/L-F.y);var Z=this.graph.view.unit;this.hint.innerHTML=b(P,Z)+", "+b(F,Z);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(Z==mxConstants.POINTS?Math.round(B.length/L):b(B.length/L,Z))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
this.hint.innerHTML="["+Math.round(100*B.x)+"%, "+Math.round(100*B.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(p.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(p.getGraphY(),A.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"/>');
@@ -2953,26 +2951,26 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
function(p){return!mxEvent.isShiftDown(p.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(p){return!mxEvent.isShiftDown(p.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(p){return mxEvent.isMouseEvent(p.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(p){var A=p.getEvent();return null==p.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==p.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(p){var A=p.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==p.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};
mxRubberband.prototype.isSpaceEvent=function(p){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(p.getEvent())||mxEvent.isMetaDown(p.getEvent()))&&mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(p,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=
-null!=this.div&&"none"!=this.div.style.display,F=null,L=null,R=p=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,p=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(p=this.graph.snap(p),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(p)<this.graph.tolerance&&(p=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
-try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ha=this.graph.view.getState(Z[B]),fa=this.graph.getCellGeometry(Z[B]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(p,R),this.graph.model.setGeometry(Z[B],fa))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(p,A){if(!A.isConsumed()&&
-null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);p=mxUtils.getOffset(this.graph.container);B.x-=p.x;B.y-=p.y;p=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-p,L=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(L)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(p,B),this.isSpaceEvent(A)?(p=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
+null!=this.div&&"none"!=this.div.style.display,F=null,L=null,P=p=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,L=this.first.y,p=(this.currentX-F)/this.graph.view.scale,P=(this.currentY-L)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(p=this.graph.snap(p),P=this.graph.snap(P),this.graph.isGridEnabled()||(Math.abs(p)<this.graph.tolerance&&(p=0),Math.abs(P)<this.graph.tolerance&&(P=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
+try{var Z=this.graph.getCellsBeyond(F,L,this.graph.getDefaultParent(),!0,!0);for(B=0;B<Z.length;B++)if(this.graph.isCellMovable(Z[B])){var ha=this.graph.view.getState(Z[B]),ea=this.graph.getCellGeometry(Z[B]);null!=ha&&null!=ea&&(ea=ea.clone(),ea.translate(p,P),this.graph.model.setGeometry(Z[B],ea))}}finally{this.graph.model.endUpdate()}}else Z=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(Z,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(p,A){if(!A.isConsumed()&&
+null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);p=mxUtils.getOffset(this.graph.container);B.x-=p.x;B.y-=p.y;p=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-p,L=this.first.y-B,P=this.graph.tolerance;if(null!=this.div||Math.abs(F)>P||Math.abs(L)>P)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(p,B),this.isSpaceEvent(A)?(p=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
F)*F,this.height=this.graph.snap(this.height/F)*F,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=p-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+
"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor=
-"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Ja.apply(this,arguments)};var ma=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(p,
-A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(ma=(new Date).getTime(),ya=0):ya=(new Date).getTime()-ma;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(p){return mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())?!1:null!=this.currentTerminalState&&p.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Ja=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Ja.apply(this,arguments)};var na=(new Date).getTime(),ya=0,za=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(p,
+A,B,F){za.apply(this,arguments);B!=this.currentTerminalState?(na=(new Date).getTime(),ya=0):ya=(new Date).getTime()-na;this.currentTerminalState=B};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(p){return mxEvent.isShiftDown(p.getEvent())&&mxEvent.isAltDown(p.getEvent())?!1:null!=this.currentTerminalState&&p.getState()==this.currentTerminalState&&2E3<ya||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(p,A,B){A=null!=p&&0==p;var F=this.state.getVisibleTerminalState(A);p=null!=p&&null!=this.state.absolutePoints&&(0==p||p>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==p)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=p?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),p):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
null!=p&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Pa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(p,A,B,F){F=A==mxEvent.ROTATION_HANDLE?
HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Pa.apply(this,arguments)};var Ia=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(p){if(null!=p&&1==p.length){var A=this.graph.getModel(),B=A.getParent(p[0]),F=this.graph.getCellGeometry(p[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(p[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ia.apply(this,
-arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var p=Ha.apply(this,arguments),A=[],B=0;B<p.length;B++)"1"!=mxUtils.getValue(p[B].style,"part","0")&&A.push(p[B]);return A};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(p){var A=this.graph.getModel(),B=A.getParent(p.cell),F=this.graph.getCellGeometry(p.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>p.width&&2>p.height&&null!=
-p.text&&null!=p.text.boundingBox?(A=p.text.unrotatedBoundingBox||p.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(p,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||
+arguments)};var Ha=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var p=Ha.apply(this,arguments),A=[],B=0;B<p.length;B++)"1"!=mxUtils.getValue(p[B].style,"part","0")&&A.push(p[B]);return A};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(p){var A=this.graph.getModel(),B=A.getParent(p.cell),F=this.graph.getCellGeometry(p.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>p.width&&2>p.height&&null!=
+p.text&&null!=p.text.boundingBox?(A=p.text.unrotatedBoundingBox||p.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(p,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),L=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==L||!L.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var p=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&p==mxConstants.NONE&&A==mxConstants.NONE?(p=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
p,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Va=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(p,A){Va.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 Wa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(p,A){Wa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(p,A){try{if(null==p&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=p||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=p){var L=document.createElement("div");
-L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(p,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);L.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,
-"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ha,fa){var ia=document.createElement("div");ia.style.display="flex";ia.style.alignItems="center";ia.style.marginTop=null!=p||0<fa?"6px":"0px";ia.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ia.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=
-document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[fa];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
+L.style.display="flex";L.style.alignItems="center";L.appendChild(this.graph.createLinkForHint(p,null,this.state.cell));this.linkHint.appendChild(L);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var P=B.cloneNode(!0);L.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var Z=F.cloneNode(!0);L.appendChild(Z);mxEvent.addListener(Z,
+"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(L=0;L<A.length;L++)mxUtils.bind(this,function(ha,ea){var ia=document.createElement("div");ia.style.display="flex";ia.style.alignItems="center";ia.style.marginTop=null!=p||0<ea?"6px":"0px";ia.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ia.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var Aa=
+document.createElement("div");Aa.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=Aa.getElementsByTagName("a")[ea];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,Aa.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ia.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ia)})(A[L],L)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var p=cb.apply(this,
arguments);p.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return p};var fb=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){fb.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var p=0;p<this.moveHandles.length;p++)null!=
this.moveHandles[p]&&(this.moveHandles[p].bounds.x=Math.round(this.moveHandles[p].rowState.x+this.moveHandles[p].rowState.width-this.moveHandles[p].bounds.width/2),this.moveHandles[p].bounds.y=Math.round(this.moveHandles[p].rowState.y+(this.moveHandles[p].rowState.height-this.moveHandles[p].bounds.height)/2),this.moveHandles[p].redraw());if(null!=this.cornerHandles){p=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+p;A[0].bounds.y=
@@ -3010,7 +3008,7 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,g){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);a.addListener("languageChanged",this.update);a.addListener("formatWidthChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};
Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,q=mxUtils.bind(this,function(D,E,G,I){var J=mxUtils.bind(this,function(K,U){h!=D&&(U||(d?this.labelIndex=G:b.isSelectionEmpty()?this.diagramIndex=G:this.currentIndex=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.className="geFormatContent";var f=document.createElement("div");f.className="geFormatTitle";this.container.appendChild(e);var g=a.getSelectionState(),d=g.containsLabel,h=null,m=null,q=mxUtils.bind(this,function(D,E,G,I){var J=mxUtils.bind(this,function(K,V){h!=D&&(V||(d?this.labelIndex=G:b.isSelectionEmpty()?this.diagramIndex=G:this.currentIndex=
G),null!=h&&h.classList.remove("geActiveFormatTitle"),h=D,h.classList.add("geActiveFormatTitle"),m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(D,"click",J);var T=d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex;(I&&null==h||G==T)&&J(null,I&&null==h)}),k=0;if(b.isSelectionEmpty()){var u=document.createElement("div");mxUtils.write(u,mxResources.get("diagram"));f.appendChild(u);f.setAttribute("title",mxResources.get("diagram"));e.appendChild(f);
g=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);g.style.display="none";var w=f.cloneNode(!1);q(f,g,k++);var z=e.cloneNode(!1);z.style.display="none";u=document.createElement("div");mxUtils.write(u,mxResources.get("style"));w.appendChild(u);w.setAttribute("title",mxResources.get("style"));e.appendChild(w);this.panels.push(new DiagramStylePanel(this,a,z));this.container.appendChild(z);q(w,z,k++,!0)}else if(b.isEditing())u=document.createElement("div"),
mxUtils.write(u,mxResources.get("text")),f.appendChild(u),f.setAttribute("title",mxResources.get("text")),e.appendChild(f),z=e.cloneNode(!1),z.style.display="none",this.panels.push(new TextFormatPanel(this,a,z)),this.container.appendChild(z),q(f,z,k++,!0);else{w=f.cloneNode(!1);var C=w.cloneNode(!1);0<g.cells.length&&(u=document.createElement("div"),mxUtils.write(u,mxResources.get("style")),f.appendChild(u),f.setAttribute("title",mxResources.get("style")),e.appendChild(f),z=e.cloneNode(!1),z.style.display=
@@ -3029,13 +3027,13 @@ BaseFormatPanel.prototype.createOption=function(a,b,e,f,g){var d=document.create
h.checked=!1),k!=w&&(k=w,b()!=k&&e(k,z)),q=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=h.getAttribute("disabled")){var z=mxEvent.getSource(w);if(z==d||z==m)h.checked=!h.checked;u(h.checked,w)}});u(k);null!=f&&(f.install(u),this.listeners.push(f));null!=g&&g(d);return d};
BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,g,d,h,m,q){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;g=null!=g?"null"==g?null:g:0;var w=null!=q?u.getCommonStyle(q):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=g},function(z){m&&u.stopEditing();if(null!=h)h.funct();else{u.getModel().beginUpdate();try{var C=null!=q?q:k.getSelectionState().cells;z=z?f:g;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=g)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,q,k){function u(Q,N){"default"!=Q||N||(Q=m);"default"!=Q&&q&&(Q=mxUtils.getLightDarkColor(Q),Q=k()?Q.dark:Q.light);return Q}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||C.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);C.appendChild(E);var G=
-b(),I=!1,J=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(J=document.createElement("img"),J.src=Editor.colorDropperImage,J.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(J,"click",function(Q){K.value=u(G);K.click();mxEvent.consume(Q)}));var U=null,V=function(Q,N){I||
-(I=!0,null!=d&&d(Q),N||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(Q)),G=b(),Q=mxUtils.getLightDarkColor("default"!=G?G:m),N=document.createElement("div"),N.style.width="21px",N.style.height="12px",N.style.margin="2px 18px 2px 3px",N.style.borderWidth="1px",N.style.borderStyle="solid",N.style.backgroundColor=Q.cssText,T.innerText="",T.appendChild(N),!q&&mxUtils.isLightDarkColor(G)&&Q.light!=Q.dark?N.style.background="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+
-" 50.3%)":q&&w&&(N.style.backgroundColor=k()?Q.dark:Q.light),null!=J?(N.style.width="21px",N.style.margin="2px 18px 2px 3px",N.appendChild(J)):(N.style.width="36px",N.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(Q="#"==G.charAt(0)?G.substring(1).toUpperCase():G,Q=ColorDialog.prototype.colorNames[Q],null!=Q?T.setAttribute("title",Q):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||
-z.isSpecialColor(G)?(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1):(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0),T.style.display=D.checked||h?"":"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var Q=K.value;if(!q){var N=mxUtils.getLightDarkColor(G);k()?N.dark=Q:N.light=Q;Q="light-dark("+N.light+", "+N.dark+")"}V(Q)});T=mxUtils.button("",mxUtils.bind(this,function(Q){var N=m;q&&k()&&mxUtils.isLightDarkColor(N)&&(N=mxUtils.getLightDarkColor(m).dark);
-this.editorUi.pickColor(u(G,!0),function(W){V(W)},"default"==f?"default":null,N,q);mxEvent.consume(Q)}));T.className="geColorBtn";T.style.display=D.checked||h?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);h||(mxEvent.addListener(C,"click",function(Q){Q=mxEvent.getSource(Q);if(Q==D||"INPUT"!=Q.nodeName)Q!=D&&(D.checked=!D.checked),D.checked||null==G||G==mxConstants.NONE||
-f==mxConstants.NONE||(f=u(G)),V(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));V(G,!0);null!=g&&g.install(function(){V(G,!0)},this.listeners.push(g));return C};
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,g,d,h,m,q,k){function u(O,M){"default"!=O||M||(O=m);"default"!=O&&q&&(O=mxUtils.getLightDarkColor(O),O=k()?O.dark:O.light);return O}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.className="geFormatEntry";var D=document.createElement("input");D.setAttribute("type","checkbox");h||C.appendChild(D);var E=document.createElement("span");mxUtils.write(E,a);C.appendChild(E);var G=
+b(),I=!1,J=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(J=document.createElement("img"),J.src=Editor.colorDropperImage,J.className="geColorDropper geAdaptiveAsset",mxEvent.addListener(J,"click",function(O){K.value=u(G);K.click();mxEvent.consume(O)}));var V=null,W=function(O,M){I||
+(I=!0,null!=d&&d(O),M||(null!=V&&(z.cellEditor.restoreSelection(V),V=null),e(O)),G=b(),O=mxUtils.getLightDarkColor("default"!=G?G:m),M=document.createElement("div"),M.style.width="21px",M.style.height="12px",M.style.margin="2px 18px 2px 3px",M.style.borderWidth="1px",M.style.borderStyle="solid",M.style.backgroundColor=O.cssText,T.innerText="",T.appendChild(M),!q&&mxUtils.isLightDarkColor(G)&&O.light!=O.dark?M.style.background="linear-gradient(to right bottom, "+O.cssText+" 50%, "+mxUtils.invertLightDarkColor(O).cssText+
+" 50.3%)":q&&w&&(M.style.backgroundColor=k()?O.dark:O.light),null!=J?(M.style.width="21px",M.style.margin="2px 18px 2px 3px",M.appendChild(J)):(M.style.width="36px",M.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(O="#"==G.charAt(0)?G.substring(1).toUpperCase():G,O=ColorDialog.prototype.colorNames[O],null!=O?T.setAttribute("title",O):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||
+z.isSpecialColor(G)?(D.removeAttribute("checked"),D.defaultChecked=!1,D.checked=!1):(D.setAttribute("checked","checked"),D.defaultChecked=!0,D.checked=!0),T.style.display=D.checked||h?"":"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var O=K.value;if(!q){var M=mxUtils.getLightDarkColor(G);k()?M.dark=O:M.light=O;O="light-dark("+M.light+", "+M.dark+")"}W(O)});T=mxUtils.button("",mxUtils.bind(this,function(O){var M=m;q&&k()&&mxUtils.isLightDarkColor(M)&&(M=mxUtils.getLightDarkColor(m).dark);
+this.editorUi.pickColor(u(G,!0),function(X){W(X)},"default"==f?"default":null,M,q);mxEvent.consume(O)}));T.className="geColorBtn";T.style.display=D.checked||h?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);h||(mxEvent.addListener(C,"click",function(O){O=mxEvent.getSource(O);if(O==D||"INPUT"!=O.nodeName)O!=D&&(D.checked=!D.checked),D.checked||null==G||G==mxConstants.NONE||
+f==mxConstants.NONE||(f=u(G)),W(D.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(D,mxUtils.bind(this,function(O){document.activeElement==z.cellEditor.textarea&&(V=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(O){document.activeElement==z.cellEditor.textarea&&(V=z.cellEditor.saveSelection())})));W(G,!0);null!=g&&g.install(function(){W(G,!0)},this.listeners.push(g));return C};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,g,d){var h=this.editorUi,m=h.editor.graph;return this.createColorOption(a,function(){var q=m.getCellStyle(m.getSelectionCell(),!1);return null!=q?q[b]:null},function(q){m.getModel().beginUpdate();try{var k=h.getSelectionState().cells;m.setCellStyles(b,q,k);null!=g&&g(q);h.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[q],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(q){this.listener=
function(){var k=m.getCellStyle(m.getSelectionCell(),!1);null!=k&&q(k[b],!0)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}},f,null,d)};BaseFormatPanel.prototype.addArrow=function(a){var b=document.createElement("div");b.className="geAdaptiveAsset geArrow";b.style.backgroundImage="url("+Editor.thinExpandImage+")";a.className="geStyleBtn";a.appendChild(b);return b};
BaseFormatPanel.prototype.addUnitInput=function(a,b,e,f,g,d,h,m,q){b=document.createElement("input");b.style.position="absolute";b.style.left=216-e-f+"px";b.style.width=f+"px";a.appendChild(b);f=this.createStepper(b,g,d,m,null,q);f.style.left=216-e+"px";a.appendChild(f);return b};
@@ -3074,78 +3072,78 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=f.getModel(),d=e.getSelectionState(),h=this.createPanel();h.style.height="60px";var m=document.createElement("div");m.className="geStyleLabel";m.style.position="absolute";m.style.fontWeight="bold";m.style.marginTop="4px";m.style.maxWidth="50px";mxUtils.write(m,mxResources.get("size"));h.appendChild(m);var q=this.addUnitInput(h,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,
null,this.isFloatUnit()),k=this.addUnitInput(h,this.getUnit(),16,52,function(){D.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());m=document.createElement("div");m.style.backgroundImage="url("+Editor.autosizeImage+")";m.className="geButton";m.style.margin="0";m.style.width="21px";m.style.height="21px";m.style.left="52px";mxUtils.setOpacity(m,50);mxEvent.addListener(m,"click",function(){e.actions.get("autosize").funct()});h.appendChild(m);d.row?(q.style.visibility="hidden",q.nextSibling.style.visibility=
"hidden"):this.addLabel(h,mxResources.get("width"),87,64).style.marginTop="0px";this.addLabel(h,mxResources.get("height"),16,64).style.marginTop="0px";mxUtils.br(h);var u=document.createElement("div");u.className="geFormatEntry";u.style.marginTop="14px";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.className="geFullWidthElement";u.appendChild(w);d.cell||d.row?m.style.visibility="hidden":h.appendChild(u);var z=w.getElementsByTagName("input")[0];
-this.addKeyHandler(q,V);this.addKeyHandler(k,V);var C=this.addGeometryHandler(q,function(W,O,X){O=Math.max(1,b.fromUnit(O));if(f.isTableCell(X))return f.setTableColumnWidth(X,O-W.width,!0),!0;0<W.width&&(z.checked&&(W.height=Math.round(W.height*O*100/W.width)/100),W.width=O)});var D=this.addGeometryHandler(k,function(W,O,X){O=Math.max(1,b.fromUnit(O));f.isTableCell(X)&&(X=g.getParent(X));if(f.isTableRow(X))return f.setTableRowHeight(X,O-W.height),!0;0<W.height&&(z.checked&&(W.width=Math.round(W.width*
-O*100/W.height)/100),W.height=O)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(E,this.getUnit(),16,
-52,function(){N.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var J=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);J=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/
-10},function(W){W=parseFloat(W);if(!isNaN(W)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(W)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var U=null;T=this.addUnitInput(E,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(T,function(W,O){W.y=b.fromUnit(O)})}else T=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(W){W=parseFloat(W);if(!isNaN(W)){g.beginUpdate();try{K=
-K.clone(),K.y=parseFloat(W)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var V=mxUtils.bind(this,function(W,O,X){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(X||document.activeElement!=q)q.value=this.inUnit(d.width)+
-" "+this.getUnit();if(X||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){W=f.getCellGeometry(d.vertices[0]);E.style.display="";if(X||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(X||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=W&&W.relative&&(null==J||!X&&document.activeElement==J||(J.value=Math.round(1E3*W.x)/10+" %"),null==T||
-!X&&document.activeElement==T||(g.isEdge(g.getParent(d.vertices[0]))?T.value=this.inUnit(W.y)+" "+this.getUnit():T.value=Math.round(1E3*W.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(V)}});g.addListener(mxEvent.CHANGE,V);this.addKeyHandler(G,V);this.addKeyHandler(I,V);V();var Q=this.addGeometryHandler(G,function(W,O){O=b.fromUnit(O);W.relative?(W.offset=null!=W.offset?W.offset:new mxPoint,W.offset.x=O):W.x=O});var N=this.addGeometryHandler(I,
-function(W,O){O=b.fromUnit(O);W.relative?(W.offset=null!=W.offset?W.offset:new mxPoint,W.offset.y=O):W.y=O});d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(W){g.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),
+this.addKeyHandler(q,W);this.addKeyHandler(k,W);var C=this.addGeometryHandler(q,function(X,N,Y){N=Math.max(1,b.fromUnit(N));if(f.isTableCell(Y))return f.setTableColumnWidth(Y,N-X.width,!0),!0;0<X.width&&(z.checked&&(X.height=Math.round(X.height*N*100/X.width)/100),X.width=N)});var D=this.addGeometryHandler(k,function(X,N,Y){N=Math.max(1,b.fromUnit(N));f.isTableCell(Y)&&(Y=g.getParent(Y));if(f.isTableRow(Y))return f.setTableRowHeight(Y,N-X.height),!0;0<X.height&&(z.checked&&(X.width=Math.round(X.width*
+N*100/X.height)/100),X.height=N)});(d.resizable||d.row||d.cell)&&a.appendChild(h);var E=this.createPanel();E.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));E.appendChild(m);var G=this.addUnitInput(E,this.getUnit(),87,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(E,this.getUnit(),16,
+52,function(){M.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(E);u=!0;var J=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(E);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));E.appendChild(m);J=this.addGenericInput(E," %",87,52,function(){return Math.round(1E3*K.x)/
+10},function(X){X=parseFloat(X);if(!isNaN(X)){g.beginUpdate();try{K=K.clone(),K.x=parseFloat(X)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});if(g.isEdge(g.getParent(d.vertices[0]))){u=!1;var V=null;T=this.addUnitInput(E,this.getUnit(),16,52,function(){V.apply(this,arguments)});V=this.addGeometryHandler(T,function(X,N){X.y=b.fromUnit(N)})}else T=this.addGenericInput(E," %",16,52,function(){return Math.round(1E3*K.y)/10},function(X){X=parseFloat(X);if(!isNaN(X)){g.beginUpdate();try{K=
+K.clone(),K.y=parseFloat(X)/100,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}}});mxUtils.br(E)}}a.appendChild(E)}this.addLabel(E,mxResources.get(u?"left":"line"),87,64);this.addLabel(E,mxResources.get(u?"top":"orthogonal"),16,64);var W=mxUtils.bind(this,function(X,N,Y){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)h.style.display="none";else{h.style.display="";if(Y||document.activeElement!=q)q.value=this.inUnit(d.width)+
+" "+this.getUnit();if(Y||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){X=f.getCellGeometry(d.vertices[0]);E.style.display="";if(Y||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Y||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=X&&X.relative&&(null==J||!Y&&document.activeElement==J||(J.value=Math.round(1E3*X.x)/10+" %"),null==T||
+!Y&&document.activeElement==T||(g.isEdge(g.getParent(d.vertices[0]))?T.value=this.inUnit(X.y)+" "+this.getUnit():T.value=Math.round(1E3*X.y)/10+" %"))}else E.style.display="none"});this.listeners.push({destroy:function(){g.removeListener(W)}});g.addListener(mxEvent.CHANGE,W);this.addKeyHandler(G,W);this.addKeyHandler(I,W);W();var O=this.addGeometryHandler(G,function(X,N){N=b.fromUnit(N);X.relative?(X.offset=null!=X.offset?X.offset:new mxPoint,X.offset.x=N):X.x=N});var M=this.addGeometryHandler(I,
+function(X,N){N=b.fromUnit(N);X.relative?(X.offset=null!=X.offset?X.offset:new mxPoint,X.offset.y=N):X.y=N});d.movable&&(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(X){g.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,g.setGeometry(d.vertices[0],K)}finally{g.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),
m.style.width="134px",m.style.left="89px",m.style.position="absolute",mxUtils.br(E),mxUtils.br(E),E.appendChild(m))),a.appendChild(E))};
ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var q=parseFloat(a.value);if(isNaN(q))a.value=d+" "+h.getUnit();else if(q!=d){g.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(g.getModel().isVertex(k[u])){var w=g.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,q,k[u]))){var z=g.view.getState(k[u]);null!=z&&g.isRecursiveVertexResize(z)&&g.resizeChildCells(k[u],w);g.getModel().setGeometry(k[u],w);g.constrainChildCells(k[u])}}}finally{g.getModel().endUpdate()}d=
q;a.value=q+" "+h.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,g=f.editor.graph,d=null,h=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(h){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){g.getModel().beginUpdate();try{for(var q=f.getSelectionState().cells,k=0;k<q.length;k++)if(g.getModel().isEdge(q[k])){var u=g.getCellGeometry(q[k]);null!=u&&(u=u.clone(),b(u,m),g.getModel().setGeometry(q[k],u))}}finally{g.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(h)}var f=this.editorUi,g=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){q.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var q=mxUtils.bind(this,function(K){var U=parseInt(m.value);
-U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var V=e.getSelectionState().cells;f.setCellStyles("width",U,V);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",V))}m.value=U+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",q);mxEvent.addListener(m,"change",q);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,g=e.getSelectionState(),d=this.createPanel(),h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";mxUtils.write(h,mxResources.get("width"));d.appendChild(h);var m=this.addUnitInput(d,"pt",12,44,function(){q.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,E);var q=mxUtils.bind(this,function(K){var V=parseInt(m.value);
+V=Math.min(999,Math.max(1,isNaN(V)?1:V));if(V!=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var W=e.getSelectionState().cells;f.setCellStyles("width",V,W);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[V],"cells",W))}m.value=V+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",q);mxEvent.addListener(m,"change",q);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";h=document.createElement("div");h.style.position=
"absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("linestart"));k.appendChild(h);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){I.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
this.addKeyHandler(u,E);this.addKeyHandler(w,E);var z=this.createPanel();z.style.paddingBottom="30px";h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="4px";mxUtils.write(h,mxResources.get("lineend"));z.appendChild(h);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){J.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),D=this.addUnitInput(z,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(K,U,V){g=e.getSelectionState();K=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",V||document.activeElement!=m)V=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=V+" pt"}else d.style.display=
-"none";1==g.cells.length&&f.model.isEdge(K)?(V=f.model.getGeometry(K),null!=V&&null!=V.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(V.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(V.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=V&&null!=V.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(V.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(V.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
-"none")});var G=this.addEdgeGeometryHandler(u,function(K,U){null!=K.sourcePoint&&(K.sourcePoint.x=b.fromUnit(U))});var I=this.addEdgeGeometryHandler(w,function(K,U){null!=K.sourcePoint&&(K.sourcePoint.y=b.fromUnit(U))});var J=this.addEdgeGeometryHandler(C,function(K,U){null!=K.targetPoint&&(K.targetPoint.x=b.fromUnit(U))});var T=this.addEdgeGeometryHandler(D,function(K,U){null!=K.targetPoint&&(K.targetPoint.y=b.fromUnit(U))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
+null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,E);this.addKeyHandler(D,E);var E=mxUtils.bind(this,function(K,V,W){g=e.getSelectionState();K=g.cells[0];if("link"==g.style.shape||"flexArrow"==g.style.shape){if(d.style.display="",W||document.activeElement!=m)W=mxUtils.getValue(g.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=W+" pt"}else d.style.display=
+"none";1==g.cells.length&&f.model.isEdge(K)?(W=f.model.getGeometry(K),null!=W&&null!=W.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(W.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(W.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=W&&null!=W.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(W.targetPoint.x)+" "+this.getUnit(),D.value=this.inUnit(W.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
+"none")});var G=this.addEdgeGeometryHandler(u,function(K,V){null!=K.sourcePoint&&(K.sourcePoint.x=b.fromUnit(V))});var I=this.addEdgeGeometryHandler(w,function(K,V){null!=K.sourcePoint&&(K.sourcePoint.y=b.fromUnit(V))});var J=this.addEdgeGeometryHandler(C,function(K,V){null!=K.targetPoint&&(K.targetPoint.x=b.fromUnit(V))});var T=this.addEdgeGeometryHandler(D,function(K,V){null!=K.targetPoint&&(K.targetPoint.y=b.fromUnit(V))});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});
E()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.appendChild(this.addFont(this.createPanel()));this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(p){p=null!=p?p.fontSize:null;return null!=p&&"px"==p.substring(p.length-2)?parseFloat(p):mxConstants.DEFAULT_FONTSIZE}function e(p,A){if(null!=p&&""!=p.textContent){p.style.lineHeight="";var B=mxUtils.getCurrentStyle(p);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?p.style.lineHeight=A+"%":""==p.getAttribute("style")&&p.removeAttribute("style")}}function f(p,A){A?p.classList.add("geActiveItem"):p.classList.remove("geActiveItem")}var g=
this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=this.createTitle(mxResources.get("font"));a.appendChild(m);m=this.createPanel();m.className="geFormatEntry";if(d.cellEditor.isContentEditing()){var q=m.cloneNode(),k=g.toolbar.addMenu(g.menus.get("formatBlock"),mxResources.get("style"),null,q);this.addArrow(k);k.style.margin="0px";k.style.position="relative";k.classList.add("geFullWidthElement");a.appendChild(q)}a.appendChild(m);q=this.createPanel();var u=g.toolbar.addMenu(g.menus.get("fontFamily"),
"Helvetica",null,m);this.addArrow(u);u.style.margin="0px";u.style.position="relative";u.classList.add("geFullWidthElement");k=m.cloneNode(!1);var w=g.toolbar.addItems(["bold","italic","underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+g.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+g.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+
" ("+g.actions.get("underline").shortcut+")");var z=g.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);var C=m.cloneNode(!1),D=function(p){return function(){return p()}},E=g.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(p){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
[mxConstants.ALIGN_LEFT])),C),G=g.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(p){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),C),I=g.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?
-function(p){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);d.cellEditor.isContentEditing()&&(U=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k));var J=g.addButton(Editor.alignTopImage,mxResources.get("top"),
-D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),T=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),C),K=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);a.appendChild(C);var U,V,Q,N;if(d.cellEditor.isContentEditing()){J.style.display=
-"none";T.style.display="none";K.style.display="none";z.style.display="none";var W=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==W.style.opacity&&document.execCommand("justifyfull",!1,null)},C);W.style.marginRight="9px";var O=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);O.style.marginLeft="10px";var X=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+
-Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);O.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",
+function(p){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,p);g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",h.cells))}:D(g.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);d.cellEditor.isContentEditing()&&(V=g.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k));var J=g.addButton(Editor.alignTopImage,mxResources.get("top"),
+D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),T=g.addButton(Editor.alignMiddleImage,mxResources.get("middle"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),C),K=g.addButton(Editor.alignBottomImage,mxResources.get("bottom"),D(g.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);a.appendChild(C);var V,W,O,M;if(d.cellEditor.isContentEditing()){J.style.display=
+"none";T.style.display="none";K.style.display="none";z.style.display="none";var X=g.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==X.style.opacity&&document.execCommand("justifyfull",!1,null)},C);X.style.marginRight="9px";var N=g.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C);N.style.marginLeft="10px";var Y=g.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+
+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C);N.style.marginLeft="10px";D=C.cloneNode(!1);D.style.paddingTop="4px";C=[g.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},D),g.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},D),g.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",
!1,null)},D),g.addButton(Editor.outdentImage,mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},D),g.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},D),g.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},D)];C[C.length-2].style.marginLeft="10px";a.appendChild(D)}else w[2].style.marginRight="12px",I.style.marginRight="12px";C=m.cloneNode(!1);mxUtils.write(C,
-mxResources.get("position"));var ja=document.createElement("select");ja.style.left="114px";ja.style.width="98px";var ka="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),ta={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],
+mxResources.get("position"));var ja=document.createElement("select");ja.style.left="114px";ja.style.width="98px";var la="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),S={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],
left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,
-mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<ka.length;D++){var M=document.createElement("option");M.setAttribute("value",ka[D]);mxUtils.write(M,mxResources.get(ka[D]));ja.appendChild(M)}C.appendChild(ja);ka=C.cloneNode(!1);mxUtils.write(ka,mxResources.get("writingDirection"));var aa=ja.cloneNode(!1);M=["automatic","leftToRight","rightToLeft"];h.html&&(M.push("vertical-leftToRight"),M.push("vertical-rightToLeft"));
-var ea={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<M.length;D++){var da=document.createElement("option");da.setAttribute("value",M[D]);"vertical-"==M[D].substring(0,9)?mxUtils.write(da,mxResources.get("vertical")+" ("+mxResources.get(M[D].substring(9))+")"):mxUtils.write(da,mxResources.get(M[D]));aa.appendChild(da)}ka.appendChild(aa);
-d.isEditing()||(a.appendChild(C),mxEvent.addListener(ja,"change",function(p){d.getModel().beginUpdate();try{var A=ta[ja.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(p)}),a.appendChild(ka),mxEvent.addListener(aa,"change",function(p){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
-ea[aa.value],h.cells);mxEvent.consume(p)}));var sa=document.createElement("input");sa.style.position="absolute";sa.style.left="146px";sa.style.width="52px";k.appendChild(sa);C=this.installInputHandler(sa,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(p){if(null!=d.getSelectedEditingElement()){sa.value=p+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==
-A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);p!=b(F)?A[B].style.fontSize=p+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(sa,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=sa.style.display;C.style.left="198px";k.appendChild(C);var Y=null,P=d.shapeBackgroundColor,ba=null,la=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+
-", "+mxUtils.hex2rgb(k.dark)+")",ma=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return P==d.shapeBackgroundColor||P==Ja?"default":P},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,p,!1),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){Y=p},destroy:function(){Y=
-null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(p){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);ma.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():
-d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return la},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,p,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ba=p},destroy:function(){ba=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=
-k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(p){ma.style.display=p==mxConstants.NONE?"none":"";ya.style.display=ma.style.display},function(p){p==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,p,h.cells);d.updateLabelElements(h.cells,
-function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";q.appendChild(k);q.appendChild(ma);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(q.appendChild(ya),q.appendChild(k));a.appendChild(q);q=this.createPanel();
+mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(D=0;D<la.length;D++){var U=document.createElement("option");U.setAttribute("value",la[D]);mxUtils.write(U,mxResources.get(la[D]));ja.appendChild(U)}C.appendChild(ja);la=C.cloneNode(!1);mxUtils.write(la,mxResources.get("writingDirection"));var aa=ja.cloneNode(!1);U=["automatic","leftToRight","rightToLeft"];h.html&&(U.push("vertical-leftToRight"),U.push("vertical-rightToLeft"));
+var fa={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(D=0;D<U.length;D++){var ka=document.createElement("option");ka.setAttribute("value",U[D]);"vertical-"==U[D].substring(0,9)?mxUtils.write(ka,mxResources.get("vertical")+" ("+mxResources.get(U[D].substring(9))+")"):mxUtils.write(ka,mxResources.get(U[D]));aa.appendChild(ka)}la.appendChild(aa);
+d.isEditing()||(a.appendChild(C),mxEvent.addListener(ja,"change",function(p){d.getModel().beginUpdate();try{var A=S[ja.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],h.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],h.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(p)}),a.appendChild(la),mxEvent.addListener(aa,"change",function(p){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,
+fa[aa.value],h.cells);mxEvent.consume(p)}));var ta=document.createElement("input");ta.style.position="absolute";ta.style.left="146px";ta.style.width="52px";k.appendChild(ta);C=this.installInputHandler(ta,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(p){if(null!=d.getSelectedEditingElement()){ta.value=p+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==
+A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);p!=b(F)?A[B].style.fontSize=p+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ta,C,1,!0,Menus.prototype.defaultFontSize);C.style.display=ta.style.display;C.style.left="198px";k.appendChild(C);var ba=null,R=d.shapeBackgroundColor,ca=null,ma=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Ja="light-dark("+mxUtils.hex2rgb(k.light)+
+", "+mxUtils.hex2rgb(k.dark)+")",na=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return R==d.shapeBackgroundColor||R==Ja?"default":R},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,p,!1),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ba=p},destroy:function(){ba=
+null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(p){d.updateLabelElements(h.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);na.style.fontWeight="bold";var ya=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);ya.style.fontWeight="bold";k=1<=h.vertices.length?d.stylesheet.getDefaultVertexStyle():
+d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ma},function(p){null!=d.cellEditor.textarea&&("default"==p&&(p=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,p,!0),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[p],"cells",h.cells)))},"default",{install:function(p){ca=p},destroy:function(){ca=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=
+k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(p){na.style.display=p==mxConstants.NONE?"none":"";ya.style.display=na.style.display},function(p){p==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",h.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,h.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,p,h.cells);d.updateLabelElements(h.cells,
+function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";q.appendChild(k);q.appendChild(na);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(q.appendChild(ya),q.appendChild(k));a.appendChild(q);q=this.createPanel();
q.style.paddingTop="2px";q.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(p){var A=d.view.getState(p);return null==A||d.getModel().isEdge(p)||d.isAutoSizeState(A)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&q.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,g.actions.get("formattedText"));k.style.fontWeight=
"bold";q.appendChild(k);k=this.createPanel();k.style.height="86px";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var za=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ka=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,
this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Pa=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ia=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},
-this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var qa=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(p){var A=""==p.value?120:parseInt(p.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=qa&&(d.cellEditor.restoreSelection(qa),qa=null);
+this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ra=null,Da=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(p){var A=""==p.value?120:parseInt(p.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ra&&(d.cellEditor.restoreSelection(ra),ra=null);
var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var L=F.getRangeAt(0);B=document.createElement("div");B.appendChild(L.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();L=new Range;L.selectNodeContents(B);F.addRange(L)}}if(null!=B)for(B!=d.cellEditor.textarea&&e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),L=0;L<B.length;L++)F.containsNode(B[L],
-!0)&&e(B[L],A)}p.value=A+" %"},function(p){Da=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(qa=d.cellEditor.saveSelection())}));mxEvent.addListener(p,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(qa=d.cellEditor.saveSelection())});p.value="120 %"}));q=m.cloneNode(!1);g.toolbar.addItems(["link","image"],q,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),
-function(){document.execCommand("inserthorizontalrule",!1)},q),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(p){g.menus.addInsertTableItem(p,null,null,!1)})),null,Editor.tableImage,q)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(q);a.appendChild(k);k=m.cloneNode(!1);C=[g.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=V&&d.insertColumn(V,null!=Q?Q.cellIndex:0)}catch(p){g.handleError(p)}}),
-k),g.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=V&&d.insertColumn(V,null!=Q?Q.cellIndex+1:-1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=V&&null!=Q&&d.deleteColumn(V,Q.cellIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.insertRow(V,
-N.sectionRowIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.insertRow(V,N.sectionRowIndex+1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=V&&null!=N&&d.deleteRow(V,N.sectionRowIndex)}catch(p){g.handleError(p)}}),k)];C[2].style.marginRight="10px";q=this.createPanel();q.appendChild(this.createTitle(mxResources.get("table")));
-q.appendChild(k);m=m.cloneNode(!1);C=[g.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(p){if(null!=V){var A=V.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==Q||null!=p&&mxEvent.isShiftDown(p)?V:Q;d.processElements(F,function(L){L.style.border=
-null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(p){if(null!=V){var A=V.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+
-("0"+Number(R).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==Q||null!=p&&mxEvent.isShiftDown(p)?V:Q;d.processElements(F,function(L){L.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=V){var p=V.getAttribute("cellPadding")||0;p=new FilenameDialog(g,p,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?V.setAttribute("cellPadding",A):
-V.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(p.container,300,80,!0,!0);p.init()}},m),g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=V&&V.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=V&&V.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=V&&V.setAttribute("align","right")},m)];C[2].style.marginRight="10px";q.appendChild(m);
+!0)&&e(B[L],A)}p.value=A+" %"},function(p){Da=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())}));mxEvent.addListener(p,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ra=d.cellEditor.saveSelection())});p.value="120 %"}));q=m.cloneNode(!1);g.toolbar.addItems(["link","image"],q,!0,[Editor.linkImage,Editor.imageImage]);C=[g.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),
+function(){document.execCommand("inserthorizontalrule",!1)},q),g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(p){g.menus.addInsertTableItem(p,null,null,!1)})),null,Editor.tableImage,q)];k=this.createPanel();k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(q);a.appendChild(k);k=m.cloneNode(!1);C=[g.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=W&&d.insertColumn(W,null!=O?O.cellIndex:0)}catch(p){g.handleError(p)}}),
+k),g.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=W&&d.insertColumn(W,null!=O?O.cellIndex+1:-1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=W&&null!=O&&d.deleteColumn(W,O.cellIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.insertRow(W,
+M.sectionRowIndex)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.insertRow(W,M.sectionRowIndex+1)}catch(p){g.handleError(p)}}),k),g.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=W&&null!=M&&d.deleteRow(W,M.sectionRowIndex)}catch(p){g.handleError(p)}}),k)];C[2].style.marginRight="10px";q=this.createPanel();q.appendChild(this.createTitle(mxResources.get("table")));
+q.appendChild(k);m=m.cloneNode(!1);C=[g.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(p){if(null!=W){var A=W.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,P){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+("0"+Number(P).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==O||null!=p&&mxEvent.isShiftDown(p)?W:O;d.processElements(F,function(L){L.style.border=
+null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),g.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(p){if(null!=W){var A=W.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,L,P){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(L).toString(16)).substr(-2)+
+("0"+Number(P).toString(16)).substr(-2)});g.pickColor(A,function(B){var F=null==O||null!=p&&mxEvent.isShiftDown(p)?W:O;d.processElements(F,function(L){L.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),g.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=W){var p=W.getAttribute("cellPadding")||0;p=new FilenameDialog(g,p,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?W.setAttribute("cellPadding",A):
+W.removeAttribute("cellPadding")}),mxResources.get("spacing"));g.showDialog(p.container,300,80,!0,!0);p.init()}},m),g.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=W&&W.setAttribute("align","left")},m),g.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=W&&W.setAttribute("align","center")},m),g.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=W&&W.setAttribute("align","right")},m)];C[2].style.marginRight="10px";q.appendChild(m);
a.appendChild(q);var Va=q}else a.appendChild(q),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(D=0;3>D;D++)(function(p){mxEvent.addListener(w[p],"click",function(){f(w[p],""==w[p].style.backgroundImage)})})(D);var Wa=mxUtils.bind(this,function(p,A,B){h=g.getSelectionState();p=mxUtils.getValue(h.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(p&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(p&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);
-f(w[2],(p&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(z,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=sa)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),sa.value=isNaN(p)?"":p+" "+Editor.fontSizeUnit;p=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,
+f(w[2],(p&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);g.toolbar.setMenuText(u,mxUtils.getValue(h.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));f(z,"0"==mxUtils.getValue(h.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ta)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ta.value=isNaN(p)?"":p+" "+Editor.fontSizeUnit;p=mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(E,
p==mxConstants.ALIGN_LEFT);f(G,p==mxConstants.ALIGN_CENTER);f(I,p==mxConstants.ALIGN_RIGHT);p=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(J,p==mxConstants.ALIGN_TOP);f(T,p==mxConstants.ALIGN_MIDDLE);f(K,p==mxConstants.ALIGN_BOTTOM);p=mxUtils.getValue(h.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(h.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ja.value=p==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?
"topLeft":p==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":p==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":p==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":p==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":p==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":p==mxConstants.ALIGN_LEFT?"left":p==mxConstants.ALIGN_RIGHT?"right":"center";p=mxUtils.getValue(h.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
p==mxConstants.TEXT_DIRECTION_RTL?aa.value="rightToLeft":p==mxConstants.TEXT_DIRECTION_LTR?aa.value="leftToRight":p!=mxConstants.TEXT_DIRECTION_AUTO&&h.html?p==mxConstants.TEXT_DIRECTION_VERTICAL_LR?aa.value="vertical-leftToRight":p==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(aa.value="vertical-rightToLeft"):aa.value="automatic";if(B||document.activeElement!=Ka)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING,2)),Ka.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=
za)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_TOP,0)),za.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Ha)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ha.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Ia)p=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ia.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit();if(B||document.activeElement!=Pa)p=parseFloat(mxUtils.getValue(h.style,
mxConstants.STYLE_SPACING_LEFT,0)),Pa.value=isNaN(p)?"":this.inUnit(p)+" "+this.getUnit()});var cb=this.installInputHandler(Ka,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fb=this.installInputHandler(za,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_BOTTOM,
-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Pa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(sa,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Pa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var hb=
+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Pa,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ta,Wa);this.addKeyHandler(Ka,Wa);this.addKeyHandler(za,Wa);this.addKeyHandler(Ha,Wa);this.addKeyHandler(Ia,Wa);this.addKeyHandler(Pa,Wa);d.getModel().addListener(mxEvent.CHANGE,Wa);this.listeners.push({destroy:function(){d.getModel().removeListener(Wa)}});Wa();if(d.cellEditor.isContentEditing()){var hb=
null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var p=d.getSelectedEditingElement();if(null!=p&&null!=d.cellEditor.textarea){var A=function(Aa,Ga){if(null!=Aa&&null!=Ga){if(Aa==Ga)return!0;if(Aa.length>Ga.length+1)return Aa.substring(Aa.length-Ga.length-1,Aa.length)=="-"+Ga}return!1},B=function(Aa){if(null!=d.getParentByName(p,Aa,d.cellEditor.textarea))return!0;for(var Ga=p;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==Aa)return!0;
-return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(p),R=p==d.cellEditor.textarea||""==p.style.lineHeight?null:p.style.lineHeight,Z=p==d.cellEditor.textarea||""==p.style.fontSize?null:b(L);if(window.getSelection)for(var ha=p.getElementsByTagName("*"),fa=window.getSelection(),ia=0;ia<ha.length&&(!fa.containsNode(ha[ia],!0)||null==ha[ia].style||(null==Z&&""!=ha[ia].style.fontSize&&
-(Z=parseFloat(ha[ia].style.fontSize)),null==R&&""!=ha[ia].style.lineHeight&&(R=ha[ia].style.lineHeight),null==Z||null==R));ia++);null==Z&&(Z=b(L));if(null==R)for(ha=p;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=L){f(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==L.fontStyle||B("I")||B("EM"));f(w[2],"underline"==L.textDecorationLine||B("U"));f(U,"line-through"==
-L.textDecorationLine||B("STRIKE"));f(X,B("SUP"));f(O,B("SUB"));var va=F(p);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Xa=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Xa[Aa]=Qa;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");
-B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=hb?hb.parentNode.replaceChild(B,hb):a.appendChild(B);hb=B}d.cellEditor.isTableSelected()?(f(W,A(L.textAlign,"justify")),f(E,A(L.textAlign,"left")),f(G,A(L.textAlign,"center")),f(I,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?
-(f(W,A(L.textAlign,"justify")),f(E,!1),f(G,!1),f(I,!1)):(f(W,!1),f(E,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));V=d.getParentByName(p,"TABLE",d.cellEditor.textarea);N=null==V?null:d.getParentByName(p,"TR",V);Q=null==V?null:d.getParentByNames(p,["TD","TH"],V);Va.style.display=null!=V?"":"none";document.activeElement!=sa&&(sa.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?Da.value=R.replace("%"," %"):(A=parseFloat(R),
-isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ba&&(la=d.getTextColor(p,!0),ba(la,!0));null!=Y&&(P=d.getTextColor(p,!1),Y(P,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}eb=!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,
-"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
+return!1},F=function(Aa){for(;null!=Aa&&Aa!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(Aa).display)return Aa;Aa=Aa.parentNode}return null},L=mxUtils.getCurrentStyle(p),P=p==d.cellEditor.textarea||""==p.style.lineHeight?null:p.style.lineHeight,Z=p==d.cellEditor.textarea||""==p.style.fontSize?null:b(L);if(window.getSelection)for(var ha=p.getElementsByTagName("*"),ea=window.getSelection(),ia=0;ia<ha.length&&(!ea.containsNode(ha[ia],!0)||null==ha[ia].style||(null==Z&&""!=ha[ia].style.fontSize&&
+(Z=parseFloat(ha[ia].style.fontSize)),null==P&&""!=ha[ia].style.lineHeight&&(P=ha[ia].style.lineHeight),null==Z||null==P));ia++);null==Z&&(Z=b(L));if(null==P)for(ha=p;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){P=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=L){f(w[0],"bold"==L.fontWeight||400<L.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==L.fontStyle||B("I")||B("EM"));f(w[2],"underline"==L.textDecorationLine||B("U"));f(V,"line-through"==
+L.textDecorationLine||B("STRIKE"));f(Y,B("SUP"));f(N,B("SUB"));var va=F(p);if(null!=va){B=function(Aa,Ga){Na.push({name:Aa,dispName:Ga,type:"string",getValue:function(){return Ma[Aa]},valueChanged:function(wa,ua){var Xa=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Xa[Aa]=Qa;""==wa&&null!=ua&&(ua.value=Ma[Aa])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");
+B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,h,!0);null!=hb?hb.parentNode.replaceChild(B,hb):a.appendChild(B);hb=B}d.cellEditor.isTableSelected()?(f(X,A(L.textAlign,"justify")),f(E,A(L.textAlign,"left")),f(G,A(L.textAlign,"center")),f(I,A(L.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(h.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(L.textAlign,"justify")?
+(f(X,A(L.textAlign,"justify")),f(E,!1),f(G,!1),f(I,!1)):(f(X,!1),f(E,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));W=d.getParentByName(p,"TABLE",d.cellEditor.textarea);M=null==W?null:d.getParentByName(p,"TR",W);O=null==W?null:d.getParentByNames(p,["TD","TH"],W);Va.style.display=null!=W?"":"none";document.activeElement!=ta&&(ta.value=isNaN(Z)?"":Z+" "+Editor.fontSizeUnit,"string"===typeof P&&0<P.indexOf("%")?Da.value=P.replace("%"," %"):(A=parseFloat(P),
+isNaN(A)?Da.value="120 %":Da.value=Math.round(100*A)+" %"));null!=ca&&(ma=d.getTextColor(p,!0),ca(ma,!0));null!=ba&&(R=d.getTextColor(p,!1),ba(R,!0));g.toolbar.setMenuText(u,mxUtils.getCssFontFamily(L.fontFamily))}}eb=!1}),0))});mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};
+StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
@@ -3167,66 +3165,66 @@ g.fill?"":"none";E=mxUtils.getValue(g.style,q,null);if(g.fill&&null!=E&&E!=mxCon
"cells",g.cells));mxEvent.consume(E)});mxEvent.addListener(h,"change",function(E){f.setCellStyles("fillStyle",h.value,g.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[h.value],"cells",g.cells));mxEvent.consume(E)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue));k=mxUtils.bind(this,function(E,G){if(null!=E){E=E.split(",");for(var I=0;I<E.length;I++){var J=
E[I].replace(/([a-z])([A-Z])/g,"$1 $2");a.appendChild(this.createCellColorOption(J.charAt(0).toUpperCase()+J.substring(1),E[I],"default",null,null,G))}}});k(g.style.fillColorStyles,f.shapeBackgroundColor);k(g.style.strokeColorStyles,f.shapeForegroundColor);return a};
StyleFormatPanel.prototype.getCustomColors=function(){var a=this.editorUi.getSelectionState(),b=[];if(null!=a.customProperties)for(var e in a.customProperties){var f=a.customProperties[e];null!=f&&"color"==f.type&&f.primary&&b.push({title:f.dispName,defaultValue:null==f.defVal?"#000000":f.defVal,key:f.name})}a.swimlane&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return b};
-StyleFormatPanel.prototype.addStroke=function(a){function b(P){var ba=f.fromUnit(parseFloat(J.value));ba=Math.min(999,Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));J.value=f.inUnit(ba)+" "+f.getUnit();mxEvent.consume(P)}function e(P){var ba=f.fromUnit(parseFloat(T.value));ba=Math.min(999,
-Math.max(0,isNaN(ba)?1:ba));ba!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ba,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ba],"cells",h.cells)));T.value=f.inUnit(ba)+" "+f.getUnit();mxEvent.consume(P)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var q=document.createElement("select");
-q.style.position="absolute";q.style.left="72px";q.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));q.appendChild(w)}mxEvent.addListener(q,"change",function(P){d.getModel().beginUpdate();try{var ba=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],la=["0","0"];"rounded"==q.value?la=["1","0"]:"curved"==q.value&&(la=["0","1"]);for(var Ja=0;Ja<ba.length;Ja++)d.setCellStyles(ba[Ja],
-la[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",la,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(P)});mxEvent.addListener(q,"click",function(P){mxEvent.consume(P)});var z="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(P){d.setCellStyles(z,P,h.cells);if(null==P||
-P==mxConstants.NONE){P=[];for(var ba=0;ba<h.cells.length;ba++)(d.isTableCell(h.cells[ba])||d.isTableRow(h.cells[ba]))&&P.push(h.cells[ba]);0<P.length&&d.setCellStyles(z,"inherit",P)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(q);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(P,ba,la,Ja,ma){P=this.editorUi.menus.styleChange(P,"",Ja,ma,"",null);Ja=document.createElement("div");ma=la.split(" ");2==ma.length?(la=parseInt(ma[0])+parseInt(ma[1]),
-ma=parseInt(ma[0])/la*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+ma+"%, transparent 0%)",Ja.style.backgroundSize=la+"px 1px"):Ja.style.borderBottomStyle=la;P.firstChild.firstChild.className="geStyleMenuItem";P.firstChild.firstChild.style.width=ba+"px";P.firstChild.firstChild.appendChild(Ja);return P}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",
-mxResources.get("solid"));D(P,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),I=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,
-mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(P,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))})),"",null,G);
-w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){D(P,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(P,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(P,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(P,40,"12 12",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(P,40,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(P,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(P,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
+StyleFormatPanel.prototype.addStroke=function(a){function b(R){var ca=f.fromUnit(parseFloat(J.value));ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",h.cells)));J.value=f.inUnit(ca)+" "+f.getUnit();mxEvent.consume(R)}function e(R){var ca=f.fromUnit(parseFloat(T.value));ca=Math.min(999,
+Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,h.cells),g.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",h.cells)));T.value=f.inUnit(ca)+" "+f.getUnit();mxEvent.consume(R)}var f=this,g=this.editorUi,d=g.editor.graph,h=g.getSelectionState(),m=document.createElement("div");m.className="geFormatEntry";h.stroke||(m.style.display="none");var q=document.createElement("select");
+q.style.position="absolute";q.style.left="72px";q.style.width="90px";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));q.appendChild(w)}mxEvent.addListener(q,"change",function(R){d.getModel().beginUpdate();try{var ca=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ma=["0","0"];"rounded"==q.value?ma=["1","0"]:"curved"==q.value&&(ma=["0","1"]);for(var Ja=0;Ja<ca.length;Ja++)d.setCellStyles(ca[Ja],
+ma[Ja],h.cells);g.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",ma,"cells",h.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(R)});mxEvent.addListener(q,"click",function(R){mxEvent.consume(R)});var z="image"==h.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;k="image"==h.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(R){d.setCellStyles(z,R,h.cells);if(null==R||
+R==mxConstants.NONE){R=[];for(var ca=0;ca<h.cells.length;ca++)(d.isTableCell(h.cells[ca])||d.isTableRow(h.cells[ca]))&&R.push(h.cells[ca]);0<R.length&&d.setCellStyles(z,"inherit",R)}}),d.shapeForegroundColor);u.style.fontWeight="bold";u.appendChild(q);var C=m.cloneNode(!1);C.style.position="relative";var D=mxUtils.bind(this,function(R,ca,ma,Ja,na){R=this.editorUi.menus.styleChange(R,"",Ja,na,"",null);Ja=document.createElement("div");na=ma.split(" ");2==na.length?(ma=parseInt(na[0])+parseInt(na[1]),
+na=parseInt(na[0])/ma*100,Ja.style.borderBottomStyle="none",Ja.style.backgroundImage="linear-gradient(to right, black "+na+"%, transparent 0%)",Ja.style.backgroundSize=ma+"px 1px"):Ja.style.borderBottomStyle=ma;R.firstChild.firstChild.className="geStyleMenuItem";R.firstChild.firstChild.style.width=ca+"px";R.firstChild.firstChild.appendChild(Ja);return R}),E=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){D(R,110,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",
+mxResources.get("solid"));D(R,110,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(R,110,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(R,110,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(R,110,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(R,110,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(R,110,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),"",null,C),G=C.cloneNode(!1),I=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,
+mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(R,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))})),"",null,G);
+w=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){D(R,40,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));D(R,40,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");D(R,40,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");D(R,40,"12 12",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");D(R,40,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");D(R,40,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");D(R,40,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
" (3)")})),"",null,G);k=C.cloneNode(!1);var J=document.createElement("input");J.style.position="absolute";J.style.width="52px";J.style.left="148px";J.setAttribute("title",mxResources.get("linewidth"));C.appendChild(J);var T=J.cloneNode(!0);T.style.width="56px";T.style.left="144px";G.appendChild(T);var K=this.createStepper(J,b,this.getUnitStep(),null,null,this.isFloatUnit());K.style.display=J.style.display;C.appendChild(K);K=this.createStepper(T,e,this.getUnitStep(),null,null,this.isFloatUnit());K.style.display=
-T.style.display;G.appendChild(K);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(T,"blur",e);mxEvent.addListener(T,"change",e);var U=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",
-mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
-["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),"connector"==h.style.shape&&Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],null,null,!0,Format.curvedImage.src)).setAttribute("title",mxResources.get("curved")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],null,null,!0,Format.entityImage.src)).setAttribute("title",mxResources.get("entityRelation")))})),"",null,k),V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,
-function(P){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,
-0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,
-0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",
-0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],
-null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],
-null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src)).setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,
-function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k),Q=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(P){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==
-h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,
-1],null,null,!1,Format.diamondThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
-!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(P,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),P.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=P.div&&mxUtils.fit(P.div)}),0)})),"",null,k);I.style.width="67px";I.style.marginRight="2px";w.style.width=
-"67px";w.style.marginRight="2px";U.style.width="67px";U.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";Q.style.width="67px";Q.style.marginRight="2px";this.addArrow(I).appendChild(document.createElement("div"));this.addArrow(U).appendChild(document.createElement("div"));this.addArrow(V);this.addArrow(Q);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var N=document.createElement("div");N.className="gePatternPreview";N.style.width="100px";N.style.borderBottomStyle=
-"solid";E.appendChild(N);var W=document.createElement("div");W.className="gePatternPreview";W.style.width="36px";W.style.borderBottomStyle="solid";w.appendChild(W);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,
-mxResources.get("lineend"));u.appendChild(w);var O=this.addUnitInput(u,this.getUnit(),82,52,function(){sa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),X=this.addUnitInput(u,this.getUnit(),16,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var ja=this.addUnitInput(u,this.getUnit(),
-82,52,function(){ea.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ka=this.addUnitInput(u,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),82,62);this.addLabel(u,mxResources.get("size"),16,62);mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var ta=this.addUnitInput(m,
-this.getUnit(),16,52,function(){Y.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var M=mxUtils.bind(this,function(P,ba,la){function Ja(ma,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,ma,ya);return za}h=g.getSelectionState();if(la||document.activeElement!=J)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,
-1)),J.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=T)P=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),T.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();q.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?q.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(q.value="rounded");N.style.borderBottom=
-"1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(P=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ba=String(P).split(" "),2<=ba.length?(P=parseInt(ba[0])+parseInt(ba[1]),ba=parseInt(ba[0])/P*100,N.style.borderBottom="1px solid transparent",N.style.backgroundImage="linear-gradient(to right, black "+ba+"%, transparent 0%)",N.style.backgroundPosition="bottom left",N.style.backgroundSize=P+"px 1px",N.style.backgroundRepeat="repeat-x"):N.style.borderBottom=
-"1px dashed black");W.style.backgroundImage=N.style.backgroundImage;W.style.backgroundPosition=N.style.backgroundPosition;W.style.backgroundSize=N.style.backgroundSize;W.style.backgroundRepeat=N.style.backgroundRepeat;W.style.borderBottom=N.style.borderBottom;P=U.getElementsByTagName("div")[1];null!=P&&(ba=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ba=null),"orthogonalEdgeStyle"==ba&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,
-null)?P.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ba||"none"==ba||null==ba?P.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ba?P.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ba?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalElbowImage.src+")":P.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ba?"vertical"==
-mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?P.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":P.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":P.style.backgroundImage="url("+Format.orthogonalImage.src+")");P=I.getElementsByTagName("div")[1];null!=P&&(P.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+
-")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),V,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),Q,"end");mxUtils.setOpacity(U,
-"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&(mxUtils.setOpacity(V,30),mxUtils.setOpacity(Q,30));if(la||document.activeElement!=ka)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ka.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ja)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ja.value=
-isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=X)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),X.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ja)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),O.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit();if(la||document.activeElement!=ta)P=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,
-0)),ta.value=isNaN(P)?"":this.inUnit(P)+" "+this.getUnit()});var aa=this.installInputHandler(ka,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ea=this.installInputHandler(ja,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(X,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var sa=this.installInputHandler(O,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Y=this.installInputHandler(ta,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,M);this.addKeyHandler(ka,M);this.addKeyHandler(ja,M);this.addKeyHandler(X,M);this.addKeyHandler(O,M);this.addKeyHandler(ta,M);d.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){d.getModel().removeListener(M)}});M();return a};
+T.style.display;G.appendChild(K);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(T,"blur",e);mxEvent.addListener(T,"change",e);var V=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){"arrow"!=h.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",
+mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],
+["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),"connector"==h.style.shape&&Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],null,null,!0,Format.curvedImage.src)).setAttribute("title",mxResources.get("curved")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],null,null,!0,Format.entityImage.src)).setAttribute("title",mxResources.get("entityRelation")))})),"",null,k),W=g.toolbar.addMenu(new Menu(mxUtils.bind(this,
+function(R){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,
+0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,
+0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",
+0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],
+null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],
+null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src)).setAttribute("title",mxResources.get("block")),R.div.style.width="40px",window.setTimeout(mxUtils.bind(this,
+function(){null!=R.div&&mxUtils.fit(R.div)}),0)})),"",null,k),O=g.toolbar.addMenu(new Menu(mxUtils.bind(this,function(R){if("connector"==h.style.shape||"flexArrow"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape)Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"startFill"],[mxConstants.NONE,0],null,null,!1,Format.noMarkerImage.src)).setAttribute("title",mxResources.get("none")),"connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==
+h.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,
+1],null,null,!1,Format.diamondThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
+!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(R,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),R.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=R.div&&mxUtils.fit(R.div)}),0)})),"",null,k);I.style.width="67px";I.style.marginRight="2px";w.style.width=
+"67px";w.style.marginRight="2px";V.style.width="67px";V.style.marginRight="2px";W.style.width="67px";W.style.marginRight="2px";O.style.width="67px";O.style.marginRight="2px";this.addArrow(I).appendChild(document.createElement("div"));this.addArrow(V).appendChild(document.createElement("div"));this.addArrow(W);this.addArrow(O);E.style.width="142px";E=this.addArrow(E);w=this.addArrow(w);var M=document.createElement("div");M.className="gePatternPreview";M.style.width="100px";M.style.borderBottomStyle=
+"solid";E.appendChild(M);var X=document.createElement("div");X.className="gePatternPreview";X.style.width="36px";X.style.borderBottomStyle="solid";w.appendChild(X);a.appendChild(u);a.appendChild(G);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.height="60px";u.style.paddingTop="2px";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginTop="4px";w.style.fontWeight="normal";mxUtils.write(w,
+mxResources.get("lineend"));u.appendChild(w);var N=this.addUnitInput(u,this.getUnit(),82,52,function(){ta.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Y=this.addUnitInput(u,this.getUnit(),16,52,function(){ka.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);E=document.createElement("div");E.style.height="8px";u.appendChild(E);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var ja=this.addUnitInput(u,this.getUnit(),
+82,52,function(){fa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),la=this.addUnitInput(u,this.getUnit(),16,52,function(){aa.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),82,62);this.addLabel(u,mxResources.get("size"),16,62);mxUtils.br(u);m=m.cloneNode(!1);m.className="geFormatEntry";w=document.createElement("div");mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var S=this.addUnitInput(m,
+this.getUnit(),16,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());h.edges.length==h.cells.length?(a.appendChild(k),a.appendChild(u)):h.vertices.length==h.cells.length&&a.appendChild(m);var U=mxUtils.bind(this,function(R,ca,ma){function Ja(na,ya,za,Ka){za=za.getElementsByTagName("div")[0];null!=za&&g.updateCssForMarker(za,Ka,h.style.shape,na,ya);return za}h=g.getSelectionState();if(ma||document.activeElement!=J)R=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,
+1)),J.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=T)R=parseFloat(mxUtils.getValue(h.style,mxConstants.STYLE_STROKEWIDTH,1)),T.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();q.style.visibility="connector"==h.style.shape||"filledEdge"==h.style.shape||"wire"==h.style.shape?"":"hidden";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,null)?q.value="curved":"1"==mxUtils.getValue(h.style,mxConstants.STYLE_ROUNDED,null)&&(q.value="rounded");M.style.borderBottom=
+"1px solid black";"1"==mxUtils.getValue(h.style,mxConstants.STYLE_DASHED,null)&&(R=mxUtils.getValue(h.style,mxConstants.STYLE_DASH_PATTERN,""),ca=String(R).split(" "),2<=ca.length?(R=parseInt(ca[0])+parseInt(ca[1]),ca=parseInt(ca[0])/R*100,M.style.borderBottom="1px solid transparent",M.style.backgroundImage="linear-gradient(to right, black "+ca+"%, transparent 0%)",M.style.backgroundPosition="bottom left",M.style.backgroundSize=R+"px 1px",M.style.backgroundRepeat="repeat-x"):M.style.borderBottom=
+"1px dashed black");X.style.backgroundImage=M.style.backgroundImage;X.style.backgroundPosition=M.style.backgroundPosition;X.style.backgroundSize=M.style.backgroundSize;X.style.backgroundRepeat=M.style.backgroundRepeat;X.style.borderBottom=M.style.borderBottom;R=V.getElementsByTagName("div")[1];null!=R&&(ca=mxUtils.getValue(h.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(h.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ca=null),"orthogonalEdgeStyle"==ca&&"1"==mxUtils.getValue(h.style,mxConstants.STYLE_CURVED,
+null)?R.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ca||"none"==ca||null==ca?R.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ca?R.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ca?"vertical"==mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?R.style.backgroundImage="url("+Format.verticalElbowImage.src+")":R.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ca?"vertical"==
+mxUtils.getValue(h.style,mxConstants.STYLE_ELBOW,null)?R.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":R.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":R.style.backgroundImage="url("+Format.orthogonalImage.src+")");R=I.getElementsByTagName("div")[1];null!=R&&(R.style.backgroundImage="link"==h.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.style.shape?"url("+Format.arrowImage.src+")":"arrow"==h.style.shape?"url("+Format.simpleArrowImage.src+
+")":"url("+Format.connectionImage.src+")");h.edges.length==h.cells.length?(G.style.display="",C.style.display="none"):(G.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<h.edges.length&&0==h.vertices.length&&h.lineJumps&&(a.style.borderBottomStyle="none");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(h.style,"startFill","1"),W,"start");Ja(mxUtils.getValue(h.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(h.style,"endFill","1"),O,"end");mxUtils.setOpacity(V,
+"arrow"==h.style.shape?30:100);"connector"!=h.style.shape&&"flexArrow"!=h.style.shape&&"filledEdge"!=h.style.shape&&"wire"!=h.style.shape&&(mxUtils.setOpacity(W,30),mxUtils.setOpacity(O,30));if(ma||document.activeElement!=la)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),la.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=ja)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),ja.value=
+isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=Y)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),Y.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=ja)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),N.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit();if(ma||document.activeElement!=S)R=parseInt(mxUtils.getValue(h.style,mxConstants.STYLE_PERIMETER_SPACING,
+0)),S.value=isNaN(R)?"":this.inUnit(R)+" "+this.getUnit()});var aa=this.installInputHandler(la,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fa=this.installInputHandler(ja,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ka=this.installInputHandler(Y,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ta=this.installInputHandler(N,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,U);this.addKeyHandler(la,U);this.addKeyHandler(ja,U);this.addKeyHandler(Y,U);this.addKeyHandler(N,U);this.addKeyHandler(S,U);d.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){d.getModel().removeListener(U)}});U();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.height="22px";if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.display="flex";a.style.alignItems="center";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="72px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");
d.style.left="72px";d.style.width="72px";g=["none","arc","gap","sharp","line"];for(var h=0;h<g.length;h++){var m=document.createElement("option");m.setAttribute("value",g[h]);mxUtils.write(m,mxResources.get(g[h]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});
mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var q=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(q,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=mxUtils.bind(this,function(w,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=q)w=parseInt(mxUtils.getValue(f.style,
@@ -3245,19 +3243,19 @@ w.style.width="82px";k=document.createElement("option");k.setAttribute("title",m
k.setAttribute("title",mxResources.get("simple"));mxUtils.write(k,mxUtils.htmlEntities(k.getAttribute("title")));k.setAttribute("value","simple");w.appendChild(k);k=document.createElement("option");k.setAttribute("title",mxResources.get("none"));mxUtils.write(k,mxUtils.htmlEntities(k.getAttribute("title")));k.setAttribute("value","none");w.appendChild(k);w.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(w,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;
C.ignoreImage=!0;C.adaptiveColors=w.value;e.model.execute(C)});q.appendChild(w);if(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)k=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),q.appendChild(k);h.appendChild(m);h.appendChild(q);d.appendChild(h);k=this.getGlobalStyleButtons();for(u=0;u<k.length;u+=2){m=m.cloneNode(!1);q=q.cloneNode(!1);h=h.cloneNode(!1);var z=k[u];z.style.width="100%";m.appendChild(z);h.appendChild(m);z=k[u+1];null!=z&&(z.style.width="100%",
q.appendChild(z));h.appendChild(q);d.appendChild(h)}g.appendChild(d);f.appendChild(g);a.appendChild(f);e.isEnabled()&&null!=Editor.styles&&this.addGraphStyles(a)}return a};
-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),g=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(U,V){var Q=e.getVerticesAndEdges();f.beginUpdate();try{for(var N=0;N<Q.length;N++){var W=e.getCellStyle(Q[N]);q||null==W.labelBackgroundColor?q&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[Q[N]]):e.updateCellStyles({labelBackgroundColor:null!=
-V?V.background:null},[Q[N]]);for(var O=f.isEdge(Q[N]),X=f.getStyle(Q[N]),ja=O?e.currentEdgeStyle:e.currentVertexStyle,ka=0;ka<U.length;ka++)if(null!=W[U[ka]]&&W[U[ka]]!=mxConstants.NONE||U[ka]!=mxConstants.STYLE_FILLCOLOR&&U[ka]!=mxConstants.STYLE_STROKECOLOR)X=q&&O&&U[ka]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(X,U[ka],"default"):mxUtils.setStyle(X,U[ka],ja[U[ka]]);f.setStyle(Q[N],X)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(U,V,Q){if(null!=U)for(var N=0;N<V.length;N++)if(null!=
-U[V[N]]&&U[V[N]]!=mxConstants.NONE||V[N]!=mxConstants.STYLE_FILLCOLOR&&V[N]!=mxConstants.STYLE_STROKECOLOR)U[V[N]]=Q[V[N]]}),q=!0,k=mxUtils.bind(this,function(U,V,Q,N,W){if(null!=U){null!=Q&&(q||null==V.labelBackgroundColor?q&&(V.labelBackgroundColor=mxConstants.NONE):(N=null!=N?N.background:null,W=null!=W?W:e,null==N&&(N=W.background),null==N&&(N=W.defaultPageBackgroundColor),V.labelBackgroundColor=N));for(var O in U)if(null==Q||null!=V[O]&&V[O]!=mxConstants.NONE||O!=mxConstants.STYLE_FILLCOLOR&&
-O!=mxConstants.STYLE_STROKECOLOR)q&&f.isEdge(Q)&&O==mxConstants.STYLE_FONTCOLOR?V[O]="default":V[O]=U[O]}}),u=mxUtils.bind(this,function(U,V,Q,N,W){var O=document.createElement("div");O.style.position="relative";O.style.pointerEvents="none";O.style.width="60px";O.style.height="60px";W.appendChild(O);var X=new Graph(O,null,null,e.getStylesheet());X.shapeForegroundColor="light-dark(#000000, #c0c0c0)";X.shapeBackgroundColor="light-dark(var(--panel-color), var(--dark-panel-color))";X.resetViewOnRootChange=
-!1;X.foldingEnabled=!1;X.gridEnabled=!1;X.autoScroll=!1;X.setTooltips(!1);X.setConnectable(!1);X.setPanning(!1);X.setEnabled(!1);X.getCellStyle=function(ta,M){M=null!=M?M:!0;var aa=mxUtils.clone(e.getCellStyle.apply(this,arguments)),ea=e.stylesheet.getDefaultVertexStyle(),da=V;f.isEdge(ta)&&(ea=e.stylesheet.getDefaultEdgeStyle(),da=Q);m(aa,d,ea);k(U,aa,ta,N,X);k(da,aa,ta,N,X);M&&(aa=e.postProcessCellStyle(ta,aa));return aa};X.model.beginUpdate();try{var ja=X.insertVertex(X.getDefaultParent(),null,
-"Shape",2,2,56,30,"strokeWidth=2;"),ka=X.insertEdge(X.getDefaultParent(),null,"Connector",ja,ja,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");ka.geometry.points=[new mxPoint(28,46)];ka.geometry.offset=new mxPoint(0,8)}finally{X.model.endUpdate()}W=X.view.getDrawPane().ownerSVGElement;null!=W&&(O=W.cloneNode(!0),O.style.position="absolute",O.style.clipPath="rect(0 52% 100% 0)",W.style.clipPath="rect(0 100% 100% 51%)",W.style.colorScheme="light",
-W.parentNode.appendChild(O))}),w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(U,V,Q,N,W){var O=this.format.cachedStyleEntries[W];null==O&&(O=document.createElement("div"),O.className="geGraphStylePreview",q||null==N||null==N.background||(O.style.backgroundColor=N.background),u(U,V,Q,N,O),mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){e.currentVertexStyle=
-mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(U,e.currentVertexStyle);k(U,e.currentEdgeStyle);k(V,e.currentVertexStyle);k(Q,e.currentEdgeStyle);f.beginUpdate();try{var ja=d.slice(),ka;for(ka in U)ja.push(ka);h(ja,N);if(!q){var ta=new ChangePageSetup(b,null!=N?N.background:null);ta.ignoreImage=!0;f.execute(ta);f.execute(new ChangeGridColor(b,null!=N&&null!=N.gridColor?N.gridColor:g))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(O,mxUtils.bind(this,
-function(X){O.style.opacity=.6}),null,mxUtils.bind(this,function(X){O.style.opacity=""})),mxEvent.addListener(O,"mouseenter",mxUtils.bind(this,function(X){var ja=e.getCellStyle;X=e.background;var ka=e.view.gridColor;q||(e.background=null!=N?N.background:null,e.view.gridColor=null!=N&&null!=N.gridColor?N.gridColor:g);e.getCellStyle=function(ta,M){M=null!=M?M:!0;var aa=mxUtils.clone(ja.apply(this,arguments)),ea=e.stylesheet.getDefaultVertexStyle(),da=V;f.isEdge(ta)&&(ea=e.stylesheet.getDefaultEdgeStyle(),
-da=Q);m(aa,d,ea);k(U,aa,ta,N);k(da,aa,ta,N);M&&(aa=this.postProcessCellStyle(ta,aa));return aa};e.refresh();e.getCellStyle=ja;e.background=X;e.view.gridColor=ka})),mxEvent.addListener(O,"mouseleave",mxUtils.bind(this,function(X){e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[W]=O));w.appendChild(O)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<
-D.length&&(D[this.format.currentStylePage].style.background="#84d7ff");for(var U=10*this.format.currentStylePage;U<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);U++){var V=Editor.styles[U];z(V.commonStyle,V.vertexStyle,V.edgeStyle,V.graph,U)}}),G=mxUtils.bind(this,function(U){0<=U&&U<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=U,E())});if(1<C){var I=document.createElement("div");I.className="geSwitcher";I.style.width=
-"200px";for(var J=0;J<C;J++){var T=document.createElement("div");T.className="geSwitcherDot";mxUtils.bind(this,function(U,V){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(U)}))})(J,T);I.appendChild(T);D.push(T)}a.appendChild(I);E();if(15>C&&0<D.length){J=document.createElement("div");J.className="geButton";J.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=J.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";I.insertBefore(J,D[0]);I.appendChild(K);
-mxEvent.addListener(J,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),g=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";var h=mxUtils.bind(this,function(V,W){var O=e.getVerticesAndEdges();f.beginUpdate();try{for(var M=0;M<O.length;M++){var X=e.getCellStyle(O[M]);q||null==X.labelBackgroundColor?q&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},[O[M]]):e.updateCellStyles({labelBackgroundColor:null!=
+W?W.background:null},[O[M]]);for(var N=f.isEdge(O[M]),Y=f.getStyle(O[M]),ja=N?e.currentEdgeStyle:e.currentVertexStyle,la=0;la<V.length;la++)if(null!=X[V[la]]&&X[V[la]]!=mxConstants.NONE||V[la]!=mxConstants.STYLE_FILLCOLOR&&V[la]!=mxConstants.STYLE_STROKECOLOR)Y=q&&N&&V[la]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(Y,V[la],"default"):mxUtils.setStyle(Y,V[la],ja[V[la]]);f.setStyle(O[M],Y)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(V,W,O){if(null!=V)for(var M=0;M<W.length;M++)if(null!=
+V[W[M]]&&V[W[M]]!=mxConstants.NONE||W[M]!=mxConstants.STYLE_FILLCOLOR&&W[M]!=mxConstants.STYLE_STROKECOLOR)V[W[M]]=O[W[M]]}),q=!0,k=mxUtils.bind(this,function(V,W,O,M,X){if(null!=V){null!=O&&(q||null==W.labelBackgroundColor?q&&(W.labelBackgroundColor=mxConstants.NONE):(M=null!=M?M.background:null,X=null!=X?X:e,null==M&&(M=X.background),null==M&&(M=X.defaultPageBackgroundColor),W.labelBackgroundColor=M));for(var N in V)if(null==O||null!=W[N]&&W[N]!=mxConstants.NONE||N!=mxConstants.STYLE_FILLCOLOR&&
+N!=mxConstants.STYLE_STROKECOLOR)q&&f.isEdge(O)&&N==mxConstants.STYLE_FONTCOLOR?W[N]="default":W[N]=V[N]}}),u=mxUtils.bind(this,function(V,W,O,M,X){var N=document.createElement("div");N.style.position="relative";N.style.pointerEvents="none";N.style.width="60px";N.style.height="60px";X.appendChild(N);var Y=new Graph(N,null,null,e.getStylesheet());Y.shapeForegroundColor="light-dark(#000000, #c0c0c0)";Y.shapeBackgroundColor="light-dark(var(--panel-color), var(--dark-panel-color))";Y.resetViewOnRootChange=
+!1;Y.foldingEnabled=!1;Y.gridEnabled=!1;Y.autoScroll=!1;Y.setTooltips(!1);Y.setConnectable(!1);Y.setPanning(!1);Y.setEnabled(!1);Y.getCellStyle=function(S,U){U=null!=U?U:!0;var aa=mxUtils.clone(e.getCellStyle.apply(this,arguments)),fa=e.stylesheet.getDefaultVertexStyle(),ka=W;f.isEdge(S)&&(fa=e.stylesheet.getDefaultEdgeStyle(),ka=O);m(aa,d,fa);k(V,aa,S,M,Y);k(ka,aa,S,M,Y);U&&(aa=e.postProcessCellStyle(S,aa));return aa};Y.model.beginUpdate();try{var ja=Y.insertVertex(Y.getDefaultParent(),null,"Shape",
+2,2,56,30,"strokeWidth=2;"),la=Y.insertEdge(Y.getDefaultParent(),null,"Connector",ja,ja,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=3;strokeWidth=2;");la.geometry.points=[new mxPoint(28,46)];la.geometry.offset=new mxPoint(0,8)}finally{Y.model.endUpdate()}X=Y.view.getDrawPane().ownerSVGElement;null!=X&&(N=X.cloneNode(!0),N.style.position="absolute",N.style.clipPath="rect(0 52% 100% 0)",X.style.clipPath="rect(0 100% 100% 51%)",X.style.colorScheme="light",X.parentNode.appendChild(N))}),
+w=document.createElement("div");w.style.whiteSpace="normal";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(V,W,O,M,X){var N=this.format.cachedStyleEntries[X];null==N&&(N=document.createElement("div"),N.className="geGraphStylePreview",q||null==M||null==M.background||(N.style.backgroundColor=M.background),u(V,W,O,M,N),mxEvent.addListener(N,"click",mxUtils.bind(this,function(Y){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);
+e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(V,e.currentVertexStyle);k(V,e.currentEdgeStyle);k(W,e.currentVertexStyle);k(O,e.currentEdgeStyle);f.beginUpdate();try{var ja=d.slice(),la;for(la in V)ja.push(la);h(ja,M);if(!q){var S=new ChangePageSetup(b,null!=M?M.background:null);S.ignoreImage=!0;f.execute(S);f.execute(new ChangeGridColor(b,null!=M&&null!=M.gridColor?M.gridColor:g))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(N,mxUtils.bind(this,function(Y){N.style.opacity=.6}),null,
+mxUtils.bind(this,function(Y){N.style.opacity=""})),mxEvent.addListener(N,"mouseenter",mxUtils.bind(this,function(Y){var ja=e.getCellStyle;Y=e.background;var la=e.view.gridColor;q||(e.background=null!=M?M.background:null,e.view.gridColor=null!=M&&null!=M.gridColor?M.gridColor:g);e.getCellStyle=function(S,U){U=null!=U?U:!0;var aa=mxUtils.clone(ja.apply(this,arguments)),fa=e.stylesheet.getDefaultVertexStyle(),ka=W;f.isEdge(S)&&(fa=e.stylesheet.getDefaultEdgeStyle(),ka=O);m(aa,d,fa);k(V,aa,S,M);k(ka,
+aa,S,M);U&&(aa=this.postProcessCellStyle(S,aa));return aa};e.refresh();e.getCellStyle=ja;e.background=Y;e.view.gridColor=la})),mxEvent.addListener(N,"mouseleave",mxUtils.bind(this,function(Y){e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[X]=N));w.appendChild(N)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var D=[],E=mxUtils.bind(this,function(){0<D.length&&(D[this.format.currentStylePage].style.background=
+"#84d7ff");for(var V=10*this.format.currentStylePage;V<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);V++){var W=Editor.styles[V];z(W.commonStyle,W.vertexStyle,W.edgeStyle,W.graph,V)}}),G=mxUtils.bind(this,function(V){0<=V&&V<C&&(D[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=V,E())});if(1<C){var I=document.createElement("div");I.className="geSwitcher";I.style.width="200px";for(var J=0;J<C;J++){var T=document.createElement("div");
+T.className="geSwitcherDot";mxUtils.bind(this,function(V,W){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(V)}))})(J,T);I.appendChild(T);D.push(T)}a.appendChild(I);E();if(15>C&&0<D.length){J=document.createElement("div");J.className="geButton";J.style.backgroundImage="url("+Editor.chevronLeftImage+")";var K=J.cloneNode(!1);K.style.backgroundImage="url("+Editor.chevronRightImage+")";I.insertBefore(J,D[0]);I.appendChild(K);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-
+1,C))}));mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}))}}else E();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),g=f.getElementsByTagName("input")[0];null!=g&&(g.style.visibility=null!=e.backgroundImage?
@@ -3275,13 +3273,13 @@ DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(thi
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var g=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});e.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){e.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function g(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function h(){mxActor.call(this)}function m(){mxCylinder.call(this)}function q(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function J(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function V(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(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,N.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,N.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,N.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,N.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-N.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,N.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function ta(){mxRectangleShape.call(this)}function M(){mxRectangleShape.call(this)}function aa(){mxCylinder.call(this)}function ea(){mxShape.call(this)}function da(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
-function Y(){mxShape.call(this)}function P(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function la(){mxShape.call(this)}function Ja(){mxShape.call(this)}function ma(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function qa(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function D(){mxActor.call(this)}function E(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function J(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxActor.call(this)}function M(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,M.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,M.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,M.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,M.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+M.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,M.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function Y(){mxActor.call(this)}function ja(){mxActor.call(this)}function la(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function aa(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function ka(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
+function ba(){mxShape.call(this)}function R(){mxShape.call(this)}function ca(){mxRectangleShape.call(this)}function ma(){mxShape.call(this)}function Ja(){mxShape.call(this)}function na(){mxShape.call(this)}function ya(){mxShape.call(this)}function za(){mxShape.call(this)}function Ka(){mxCylinder.call(this)}function Pa(){mxCylinder.call(this)}function Ia(){mxRectangleShape.call(this)}function Ha(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function Da(){mxArrowConnector.call(this);
this.spacing=0}function Va(){mxArrowConnector.call(this);this.spacing=0}function Wa(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function hb(){mxActor.call(this)}function eb(){mxActor.call(this)}function p(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function L(){mxEllipse.call(this)}
-function R(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Xa(c,l,t,n,r,v,x,H,y,ca){x+=y;var S=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(S.x-r-x,S.y-v-x,2*x,2*x);ca?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
+function P(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function Aa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Xa(c,l,t,n,r,v,x,H,y,da){x+=y;var Q=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(Q.x-r-x,Q.y-v-x,2*x,2*x);da?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
!1,x=this.isHorizontal(),H=this.getTitleSize();0==H||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&H<r||!x&&H<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var H=v;v=x;x=H}c.rotate(-this.getShapeRotation(),
@@ -3315,59 +3313,59 @@ mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
l*this.scale))}return null};E.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 t=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),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));
r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,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};u.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(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=
-20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,
-t,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(V,mxActor);V.prototype.size=.5;V.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};
-mxCellRenderer.registerShape("curlyBracket",V);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);N.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};N.prototype.close=function(){null!=this.firstX&&
-null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};N.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};N.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};N.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=
-x};N.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var ca=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,
-y*v+this.lastX-ca*r,t*v+this.lastY-ca*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l};N.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Ya.apply(this,
-arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new N(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?
-null:this.createComicCanvas(c)};var ub=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"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=N)vb.apply(this,arguments);
+"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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(V,mxActor);V.prototype.size=.2;V.prototype.fixedSize=
+20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,t,n,r){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))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,
+t,!0)};mxCellRenderer.registerShape("trapezoid",V);mxUtils.extend(W,mxActor);W.prototype.size=.5;W.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};
+mxCellRenderer.registerShape("curlyBracket",W);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);M.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};M.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)};M.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};M.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};M.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=
+x};M.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(Q){return"number"===typeof Q?Q?0>Q?-1:1:Q===Q?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var da=(Math.random()-.5)*H;this.originalLineTo.call(this.canvas,
+y*v+this.lastX-da*r,t*v+this.lastY-da*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l};M.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ya=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Ya.apply(this,
+arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new M(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?
+null:this.createComicCanvas(c)};var ub=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"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=M)vb.apply(this,arguments);
else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=
-function(){return!1};W.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,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
-100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};W.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();
-c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(O,mxRectangleShape);O.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};O.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",O);mxUtils.extend(X,mxHexagon);
-X.prototype.size=30;X.prototype.position=.5;X.prototype.position2=.5;X.prototype.base=20;X.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),H=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,r-t),new mxPoint(Math.min(n,v+H),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",X);mxUtils.extend(ja,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=
+function(){return!1};X.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,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
+100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};X.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();
+c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(N,mxRectangleShape);N.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};N.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",N);mxUtils.extend(Y,mxHexagon);
+Y.prototype.size=30;Y.prototype.position=.5;Y.prototype.position2=.5;Y.prototype.base=20;Y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),H=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,r-t),new mxPoint(Math.min(n,v+H),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Y);mxUtils.extend(ja,
mxActor);ja.prototype.size=.2;ja.prototype.fixedSize=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,t,n,r){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))));t=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,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(ka,mxHexagon);ka.prototype.size=.25;ka.prototype.fixedSize=20;ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(c,l,t,n,r){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))));t=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*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",ka);mxUtils.extend(ta,mxRectangleShape);ta.prototype.isHtmlAllowed=function(){return!1};ta.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+
-n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",ta);var jb=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,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(M,mxRectangleShape);M.prototype.isHtmlAllowed=function(){return!1};M.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};M.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var H=this.style["symbol"+v+"Align"],
-y=this.style["symbol"+v+"VerticalAlign"],ca=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var na=t;Oa=H==mxConstants.ALIGN_CENTER?Oa+(n-ca)/2:H==mxConstants.ALIGN_RIGHT?Oa+(n-ca-Fa):Oa+Fa;na=y==mxConstants.ALIGN_MIDDLE?na+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?na+(r-S-Ra):na+
-Ra;c.save();H=new x;H.style=this.style;x.prototype.paintVertexShape.call(H,c,Oa,na,ca,S);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",M);mxUtils.extend(aa,mxCylinder);aa.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",aa);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=
-function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ea);mxUtils.extend(da,mxShape);da.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};da.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);
-c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",da);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",sa);mxUtils.extend(Y,mxShape);Y.prototype.paintVertexShape=
-function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",Y);mxUtils.extend(P,mxShape);P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};P.prototype.paintForeground=
-function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=40;ba.prototype.isHtmlAllowed=function(){return!1};ba.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)};ba.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ba&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ba.prototype.paintForeground=
-function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(la,mxShape);la.prototype.width=60;la.prototype.height=30;la.prototype.corner=10;la.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&
-0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};la.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))};la.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",
+l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(la,mxHexagon);la.prototype.size=.25;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(c,l,t,n,r){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))));t=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*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",la);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,
+t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",S);var jb=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,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(U,mxRectangleShape);U.prototype.isHtmlAllowed=function(){return!1};U.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};U.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var H=this.style["symbol"+v+"Align"],
+y=this.style["symbol"+v+"VerticalAlign"],da=this.style["symbol"+v+"Width"],Q=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var oa=t;Oa=H==mxConstants.ALIGN_CENTER?Oa+(n-da)/2:H==mxConstants.ALIGN_RIGHT?Oa+(n-da-Fa):Oa+Fa;oa=y==mxConstants.ALIGN_MIDDLE?oa+(r-Q)/2:y==mxConstants.ALIGN_BOTTOM?oa+(r-Q-Ra):oa+
+Ra;c.save();H=new x;H.style=this.style;x.prototype.paintVertexShape.call(H,c,Oa,oa,da,Q);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",U);mxUtils.extend(aa,mxCylinder);aa.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",aa);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=
+function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(ka,mxShape);ka.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ka.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);
+c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",ka);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(ba,mxShape);ba.prototype.paintVertexShape=
+function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ba);mxUtils.extend(R,mxShape);R.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};R.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};R.prototype.paintForeground=
+function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",R);mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=40;ca.prototype.isHtmlAllowed=function(){return!1};ca.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)};ca.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ca&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ca.prototype.paintForeground=
+function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ca);mxUtils.extend(ma,mxShape);ma.prototype.width=60;ma.prototype.height=30;ma.prototype.corner=10;ma.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&
+0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};ma.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))};ma.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",
this.width)))),H=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;
-c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,H-1.5*v));c.lineTo(l+Math.max(0,x-v),t+H);c.lineTo(l,t+H);c.close();c.fillAndStroke();this.configurePointerEvents(c);c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",la);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
-function(c,l,t,n){n=ba.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;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,H-1.5*v));c.lineTo(l+Math.max(0,x-v),t+H);c.lineTo(l,t+H);c.close();c.fillAndStroke();this.configurePointerEvents(c);c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+H);c.stroke()};mxCellRenderer.registerShape("umlFrame",ma);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
+function(c,l,t,n){n=ca.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;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,t,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 t.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,t.y)));t.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,t,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",X.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=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?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+
-y,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,H)]);ca=c.getCenterX();c=c.getCenterY();c=new mxPoint(ca,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,
-"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_WEST?
-(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+ca),new mxPoint(x+r,H+ca),new mxPoint(x,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca-r),new mxPoint(x,
-H+ca),new mxPoint(x,H)]);ca=c.getCenterX();c=c.getCenterY();c=new mxPoint(ca,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ja.prototype.fixedSize:ja.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height,S=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?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+ca),new mxPoint(x,H+ca),new mxPoint(x+r,c),new mxPoint(x,H)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+
-y-r,c),new mxPoint(x+y,H+ca),new mxPoint(x+r,H+ca),new mxPoint(x,c),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(S,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca),new mxPoint(S,H+ca-r),new mxPoint(x,H+ca),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(S,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+ca-r),new mxPoint(S,H+ca),new mxPoint(x,
-H+ca-r),new mxPoint(x,H)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(H,S,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ka.prototype.fixedSize:ka.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,ca=c.height,S=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?(r=r?Math.max(0,Math.min(ca,v)):ca*Math.max(0,Math.min(1,v)),H=[new mxPoint(S,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+ca-r),new mxPoint(S,H+ca),new mxPoint(x,H+ca-r),new mxPoint(x,H+r),new mxPoint(S,H)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+ca),new mxPoint(x+
-r,H+ca),new mxPoint(x,c),new mxPoint(x+r,H)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(H,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};
-mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};
-mxCellRenderer.registerShape("requires",ma);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();
+c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,t,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",Y.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=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?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+
+y,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+da),new mxPoint(x,H+da),new mxPoint(x+r,H)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,
+"fixedSize","0"),v=r?V.prototype.fixedSize:V.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,H+da),new mxPoint(x,H+da),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_WEST?
+(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-r,H+da),new mxPoint(x+r,H+da),new mxPoint(x,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da-r),new mxPoint(x,
+H+da),new mxPoint(x,H)]);da=c.getCenterX();c=c.getCenterY();c=new mxPoint(da,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ja.prototype.fixedSize:ja.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height,Q=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?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+da),new mxPoint(x,H+da),new mxPoint(x+r,c),new mxPoint(x,H)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y,H),new mxPoint(x+
+y-r,c),new mxPoint(x+y,H+da),new mxPoint(x+r,H+da),new mxPoint(x,c),new mxPoint(x+r,H)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+r),new mxPoint(Q,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da),new mxPoint(Q,H+da-r),new mxPoint(x,H+da),new mxPoint(x,H+r)]):(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(Q,H+r),new mxPoint(x+y,H),new mxPoint(x+y,H+da-r),new mxPoint(Q,H+da),new mxPoint(x,
+H+da-r),new mxPoint(x,H)]);Q=new mxPoint(Q,c);n&&(t.x<x||t.x>x+y?Q.y=t.y:Q.x=t.x);return mxUtils.getPerimeterPoint(H,Q,t)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?la.prototype.fixedSize:la.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,H=c.y,y=c.width,da=c.height,Q=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?(r=r?Math.max(0,Math.min(da,v)):da*Math.max(0,Math.min(1,v)),H=[new mxPoint(Q,H),new mxPoint(x+y,H+r),new mxPoint(x+y,H+da-r),new mxPoint(Q,H+da),new mxPoint(x,H+da-r),new mxPoint(x,H+r),new mxPoint(Q,H)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+r,H),new mxPoint(x+y-r,H),new mxPoint(x+y,c),new mxPoint(x+y-r,H+da),new mxPoint(x+
+r,H+da),new mxPoint(x,c),new mxPoint(x+r,H)]);Q=new mxPoint(Q,c);n&&(t.x<x||t.x>x+y?Q.y=t.y:Q.x=t.x);return mxUtils.getPerimeterPoint(H,Q,t)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(Ja,mxShape);Ja.prototype.size=10;Ja.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};
+mxCellRenderer.registerShape("lollipop",Ja);mxUtils.extend(na,mxShape);na.prototype.size=10;na.prototype.inset=2;na.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};
+mxCellRenderer.registerShape("requires",na);mxUtils.extend(ya,mxShape);ya.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ya);mxUtils.extend(za,mxShape);za.prototype.inset=2;za.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();
c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",za);mxUtils.extend(Ka,mxCylinder);Ka.prototype.jettyWidth=20;Ka.prototype.jettyHeight=10;Ka.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=Math.min(l,r-l),y=Math.min(H+2*l,r-l);v?(c.moveTo(t,H),
c.lineTo(x,H),c.lineTo(x,H+l),c.lineTo(t,H+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+l),c.lineTo(0,H+l),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Ka);mxUtils.extend(Pa,mxCylinder);Pa.prototype.jettyWidth=32;Pa.prototype.jettyHeight=12;Pa.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,
"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x,H+l),c.lineTo(t,H+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+l),c.lineTo(0,H+l),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",
Pa);mxUtils.extend(Ia,mxRectangleShape);Ia.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ia);mxUtils.extend(Ha,mxDoubleEllipse);Ha.prototype.outerStroke=
-!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(qa,Ha);qa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",qa);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+!0;Ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ha);mxUtils.extend(ra,Ha);ra.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ra);mxUtils.extend(Da,mxArrowConnector);Da.prototype.defaultWidth=4;Da.prototype.isOpenEnded=function(){return!0};Da.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Da.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Da);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",
this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Wa,mxActor);Wa.prototype.size=30;Wa.prototype.isRoundable=function(){return!0};Wa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,
[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",Wa);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/
@@ -3381,12 +3379,12 @@ v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab)
"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,r/2,n,r);c.lineTo(l,r);c.quadTo(l-2*l,r/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",eb);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.close();c.end()};mxCellRenderer.registerShape("or",p);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,
l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",A);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n/2,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=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,
-r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
-c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();
-c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();
-c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,H=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,H);c.lineTo(l+v+x,H-x/2);c.moveTo(l+v,H);c.lineTo(l+v+x,H+x/2);c.moveTo(l+v,H);c.lineTo(l+n-v,H);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,H);c.lineTo(l+n-x-v,H-x/2);c.moveTo(l+n-v,H);c.lineTo(l+
+r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",L);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",P);mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();
+c.stroke()};mxCellRenderer.registerShape("sumEllipse",Z);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();
+c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ea);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,H=t+r-x/2;c.begin();c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,H);c.lineTo(l+v+x,H-x/2);c.moveTo(l+v,H);c.lineTo(l+v+x,H+x/2);c.moveTo(l+v,H);c.lineTo(l+n-v,H);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,H);c.lineTo(l+n-x-v,H-x/2);c.moveTo(l+n-v,H);c.lineTo(l+
n-x-v,H+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ia);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var H="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),
-ca="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||H||ca||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||H?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||ca?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};
+da="1"==mxUtils.getValue(this.style,"right","1"),Q="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||H||da||Q||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,t),this.outline||H?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||da?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||Q?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};
mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,
0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(Aa,mxActor);Aa.prototype.size=.2;Aa.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,
r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",Aa);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};
@@ -3395,89 +3393,89 @@ type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"dou
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"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=
-function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ca=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),na=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),ra=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),pa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),oa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:
+function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),H=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),da=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),Q=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,Q)),oa=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),sa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),qa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),pa=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:
mxUtils.getValue(this.style,"topLeftStyle","default"),Ba=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ca=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Bb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Cb=
v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Ab=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Db=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Fa);Ra&&""!=Ra&&
-c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);H||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));H||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(na||ra||pa||oa)&&"frame"!=ca&&(c.begin(),na?v.moveNW(c,l,t,n,r,x,xa,y,oa):c.moveTo(0,0),na&&v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),ra&&v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),pa&&v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),oa&&v.paintSW(c,
-l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=H=Eb,"none"==zb&&(H=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,H,Fa),c.begin(),na?v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa):c.moveTo(S,0),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),oa&&pa&&v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),pa&&ra&&v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),ra&&na&&v.paintNEInner(c,
-l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),na&&oa&&v.paintNWInner(c,l,t,n,r,x,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,na,ra,pa,oa),c.stroke()));na||ra||pa||!oa?na||ra||!pa||oa?!na&&!ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,
-l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na||!ra||pa||oa?!na&&ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,
-l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke(),c.begin(),
-v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na&&ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,
-r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na&&ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,
-l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,
-l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):!na||ra||pa||oa?na&&!ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,
-y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke()):
-na&&!ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),
-v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na&&!ra&&pa&&oa?"frame"!=ca?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&
-(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,
-l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):na&&ra&&!pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,
-x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):na&&ra&&!pa&&oa?"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,
-l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,
-n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke()):na&&ra&&pa&&!oa?"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,
-Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,
-Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):na&&ra&&pa&&oa&&("frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,
-y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,
-Ea,y,S,pa,oa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.paintNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.paintSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.paintSW(c,l,t,n,r,x,Ea,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,x,Ca,y,S),
-v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),v.paintNEInner(c,l,t,n,r,x,Ba,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke())):"frame"!=ca?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),"double"==ca&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,oa),v.paintTop(c,l,t,n,r,x,Ba,y,ra),v.lineNEInner(c,
-l,t,n,r,x,Ba,y,S,ra),v.paintTopInner(c,l,t,n,r,x,xa,y,S,oa,na),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),"double"==ca&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,na),v.paintRight(c,l,t,n,r,x,Ca,y,pa),v.lineSEInner(c,l,t,n,r,x,Ca,y,S,pa),v.paintRightInner(c,l,t,n,r,x,Ba,y,S,na,ra),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveSE(c,
-l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),"double"==ca&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,ra),v.paintBottom(c,l,t,n,r,x,Ea,y,oa),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,oa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,S,ra,pa),c.close(),c.fillAndStroke()):"frame"!=ca?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),"double"==ca&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,
-l,t,n,r,x,Ea,y,S,pa,oa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,pa),v.paintLeft(c,l,t,n,r,x,xa,y,na),v.lineNWInner(c,l,t,n,r,x,xa,y,S,na,oa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,pa,oa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,na,ra,pa,oa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==
+c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);H||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));H||(Q=Math.min(Oa*Math.min(n,r)/100));Q=Math.min(Q,.5*Math.min(n,r)-y);(oa||sa||qa||pa)&&"frame"!=da&&(c.begin(),oa?v.moveNW(c,l,t,n,r,x,xa,y,pa):c.moveTo(0,0),oa&&v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),sa&&v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),qa&&v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),pa&&v.paintSW(c,
+l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=H=Eb,"none"==zb&&(H=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,H,Fa),c.begin(),oa?v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa):c.moveTo(Q,0),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),pa&&qa&&v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),qa&&sa&&v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),sa&&oa&&v.paintNEInner(c,
+l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),oa&&pa&&v.paintNWInner(c,l,t,n,r,x,xa,y,Q),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,oa,sa,qa,pa),c.stroke()));oa||sa||qa||!pa?oa||sa||!qa||pa?!oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,
+l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa||!sa||qa||pa?!oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,
+l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke(),c.begin(),
+v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,
+r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa&&sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,
+l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,
+l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):!oa||sa||qa||pa?oa&&!sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,
+y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke()):
+oa&&!sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),
+v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa&&!sa&&qa&&pa?"frame"!=da?(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&
+(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,
+l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,
+x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&!qa&&pa?"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,
+l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,
+n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&!pa?"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,
+Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,
+Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):oa&&sa&&qa&&pa&&("frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,
+y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,
+Ea,y,Q,qa,pa),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.paintNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.paintSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.paintSW(c,l,t,n,r,x,Ea,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintSWInner(c,l,t,n,r,x,Ea,y,Q,qa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),v.paintSEInner(c,l,t,n,r,x,Ca,y,Q),
+v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),v.paintNEInner(c,l,t,n,r,x,Ba,y,Q),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),v.paintNWInner(c,l,t,n,r,x,xa,y,Q),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke())):"frame"!=da?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),"double"==da&&(v.moveNEInner(c,l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,pa),v.paintTop(c,l,t,n,r,x,Ba,y,sa),v.lineNEInner(c,
+l,t,n,r,x,Ba,y,Q,sa),v.paintTopInner(c,l,t,n,r,x,xa,y,Q,pa,oa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),"double"==da&&(v.moveSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,Ba,y,oa),v.paintRight(c,l,t,n,r,x,Ca,y,qa),v.lineSEInner(c,l,t,n,r,x,Ca,y,Q,qa),v.paintRightInner(c,l,t,n,r,x,Ba,y,Q,oa,sa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSE(c,
+l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),"double"==da&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Ca,y,sa),v.paintBottom(c,l,t,n,r,x,Ea,y,pa),v.lineSWInner(c,l,t,n,r,x,Ea,y,Q,pa),v.paintBottomInner(c,l,t,n,r,x,Ca,y,Q,sa,qa),c.close(),c.fillAndStroke()):"frame"!=da?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),"double"==da&&(v.moveNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,
+l,t,n,r,x,Ea,y,Q,qa,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,qa),v.paintLeft(c,l,t,n,r,x,xa,y,oa),v.lineNWInner(c,l,t,n,r,x,xa,y,Q,oa,pa),v.paintLeftInner(c,l,t,n,r,x,Ea,y,Q,qa,pa),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,l,t,n,r,x,xa,Ba,Ca,Ea,y,oa,sa,qa,pa);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,H)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==
v||!y?c.moveTo(n,0):c.moveTo(n-H,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-H)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,r):c.moveTo(H,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,H,0)}else("snip"==
x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(H,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-H,0)};wa.prototype.paintNE=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,n,H)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==
x&&"fold"==v)&&c.lineTo(n,H);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-H)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,H)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,
H,0,0,l,n-H,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-H,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,H,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,r):c.lineTo(H,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,H,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(H,H,0,0,l,0,r-H)}else("snip"==x||"default"==
-x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-H);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||
-S?!ca&&S?c.lineTo(0,y):ca&&!S?c.lineTo(y,0):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-H-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-H-y,y);else if("snip"==x||"default"==x&&"snip"==
-v)c.lineTo(n-H-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,H+y),c.lineTo(n-H-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(n-y,0):ca&&!S?c.lineTo(n,y):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):c.lineTo(n-y,H+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(y,
-r):ca&&!S?c.lineTo(0,r-y):ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):c.lineTo(y,r-H-y):c.lineTo(y,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-y,r-H-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-y,r-H-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-
-y,r-H-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,r-H-y),c.lineTo(n-y,r-H-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(n,r-y):ca&&!S?c.lineTo(n-y,r):"square"==x||"default"==x&&"square"==v||!ca?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-H-.5*y,r-y):c.lineTo(n-H-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,H,y,ca){if(!ca)c.lineTo(y,r);else if("square"==
-x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,H+y,r-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(H+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,r-H-y),c.lineTo(y+H,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==
-x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-H-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-H-y):
-c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-H-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==
-v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-H-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v||ca?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,H+y):c.moveTo(n,
-y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,H,y,ca){ca?"square"==x||"default"==x&&"square"==v||ca?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,H+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.moveTo(y,0):ca&&!S?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==
-x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,H,y,ca,S){ca||S?!ca&&S?c.lineTo(y,0):ca&&!S?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==
-x||"default"==x&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,H,y,ca,S,Fa,Ra,Oa,na){if("fold"==v||"fold"==x||"fold"==H||"fold"==y||"fold"==ca)("fold"==x||"default"==x&&"fold"==v)&&Fa&&na&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==H||"default"==H&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==ca||"default"==ca&&"fold"==
-v)&&Oa&&na&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),
+x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-H);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,y,.5*y+H);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,y,y+H);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+H);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,y+H),c.lineTo(y,y+H)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||
+Q?!da&&Q?c.lineTo(0,y):da&&!Q?c.lineTo(y,0):da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(H+.5*y,y):c.lineTo(H+y,y):c.lineTo(0,y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-H-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-H-y,y);else if("snip"==x||"default"==x&&"snip"==
+v)c.lineTo(n-H-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,H+y),c.lineTo(n-H-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(n-y,0):da&&!Q?c.lineTo(n,y):da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):c.lineTo(n-y,H+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(y,
+r):da&&!Q?c.lineTo(0,r-y):da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):c.lineTo(y,r-H-y):c.lineTo(y,r):c.lineTo(0,r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,H,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,n-y,r-H-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,n-y,r-H-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-
+y,r-H-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-H-y,r-H-y),c.lineTo(n-y,r-H-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(n,r-y):da&&!Q?c.lineTo(n-y,r):"square"==x||"default"==x&&"square"==v||!da?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-H-.5*y,r-y):c.lineTo(n-H-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,H,y,da){if(!da)c.lineTo(y,r);else if("square"==
+x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(H-.5*y,H-.5*y,0,0,0,H+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(H+y,H+y,0,0,1,H+y,r-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(H+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+H,r-H-y),c.lineTo(y+H,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==
+x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-H-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-H-y):
+c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-H-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==
+v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-H-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-H-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v||da?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,H+y):c.moveTo(n,
+y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,H,y,da){da?"square"==x||"default"==x&&"square"==v||da?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,H+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.moveTo(y,0):da&&!Q?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==
+x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,H+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,l,t,n,r,v,x,H,y,da,Q){da||Q?!da&&Q?c.lineTo(y,0):da&&!Q?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,H+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==
+x||"default"==x&&"fold"==v)&&c.lineTo(y,H+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,H,y,da,Q,Fa,Ra,Oa,oa){if("fold"==v||"fold"==x||"fold"==H||"fold"==y||"fold"==da)("fold"==x||"default"==x&&"fold"==v)&&Fa&&oa&&(c.moveTo(0,Q),c.lineTo(Q,Q),c.lineTo(Q,0)),("fold"==H||"default"==H&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-Q,0),c.lineTo(n-Q,Q),c.lineTo(n,Q)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-Q,r),c.lineTo(n-Q,r-Q),c.lineTo(n,r-Q)),("fold"==da||"default"==da&&"fold"==
+v)&&Oa&&oa&&(c.moveTo(0,r-Q),c.lineTo(Q,r-Q),c.lineTo(Q,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),
null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(r,v),ua.prototype.origPaintEdgeShape.apply(this,[c,l,t])))};mxCellRenderer.registerShape("filledEdge",ua);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",
-defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+S/2,Oa=n.y+Fa/2;n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-S/2-Fa/2,Oa-Fa/2+S/2);c.lineTo(Ra-S/2+Fa/2,Oa-Fa/2-S/2);c.lineTo(Ra+Fa/2-3*S/2,Oa-3*Fa/2-S/2);c.lineTo(Ra-
-Fa/2-3*S/2,Oa-3*Fa/2+S/2);c.close();ca?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.moveTo(n.x-S/2+Fa/2,n.y-Fa/2-S/2);c.lineTo(n.x-Fa/2-3*S/2,n.y-3*Fa/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Xa);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,H,y,ca){var S=n.clone(),Fa=Xa.apply(this,arguments),Ra=r*(x+2*
-y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,H,y,ca){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+S);c.quadTo(n.x-Fa,n.y+S,n.x,n.y);c.quadTo(n.x+Fa,n.y-S,Ra.x+Fa,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",
-function(c,l,t,n,r,v,x,H,y,ca){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);H?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();ca?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,H,y,ca,S){v*=H+ca;x*=H+ca;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/
+defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-Q/2-Fa/2,n.y-Fa/2+Q/2);c.lineTo(n.x+Fa/2-3*Q/2,n.y-3*Fa/2-Q/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+Q/2,Oa=n.y+Fa/2;n.x-=Q;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-Q/2-Fa/2,Oa-Fa/2+Q/2);c.lineTo(Ra-Q/2+Fa/2,Oa-Fa/2-Q/2);c.lineTo(Ra+Fa/2-3*Q/2,Oa-3*Fa/2-Q/2);c.lineTo(Ra-
+Fa/2-3*Q/2,Oa-3*Fa/2+Q/2);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-Q/2-Fa/2,n.y-Fa/2+Q/2);c.lineTo(n.x+Fa/2-3*Q/2,n.y-3*Fa/2-Q/2);c.moveTo(n.x-Q/2+Fa/2,n.y-Fa/2-Q/2);c.lineTo(n.x-Fa/2-3*Q/2,n.y-3*Fa/2+Q/2);c.stroke()}});mxMarker.addMarker("circle",Xa);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,H,y,da){var Q=n.clone(),Fa=Xa.apply(this,arguments),Ra=r*(x+2*
+y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(Q.x-r*y,Q.y-v*y);c.lineTo(Q.x-2*Ra+r*y,Q.y-2*Oa+v*y);c.moveTo(Q.x-Ra-Oa+v*y,Q.y-Oa+Ra-r*y);c.lineTo(Q.x+Oa-Ra-v*y,Q.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,t,n,r,v,x,H,y,da){var Q=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=Q;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+Q);c.quadTo(n.x-Fa,n.y+Q,n.x,n.y);c.quadTo(n.x+Fa,n.y-Q,Ra.x+Fa,Ra.y-Q);c.stroke()}});mxMarker.addMarker("async",
+function(c,l,t,n,r,v,x,H,y,da){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var Q=n.clone();Q.x-=l;Q.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(Q.x,Q.y);H?c.lineTo(Q.x-r-v/2,Q.y-v+r/2):c.lineTo(Q.x+v/2-r,Q.y-v-r/2);c.lineTo(Q.x-r,Q.y-v);c.close();da?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,H,y,da,Q){v*=H+da;x*=H+da;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/
c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,x,H){H=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+r*n/4+v*H/2,x.y+v*n/4-r*H/2)},function(n,r,v,x,H,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var H=x.length-1;v=c.view.translate;
-var y=c.view.scale,ca=t?x[0]:x[H];x=t?x[1]:x[H-1];H=x.x-ca.x;var S=x.y-ca.y,Fa=Math.sqrt(H*H+S*S);ca=n.call(this,Fa,H/Fa,S/Fa,ca,x);return new mxPoint(ca.x/y-v.x,ca.y/y-v.y)}return null},function(v,x,H){var y=c.absolutePoints,ca=y.length-1;v=c.view.translate;var S=c.view.scale,Fa=t?y[0]:y[ca];y=t?y[1]:y[ca-1];ca=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(ca*ca+Ra*Ra);x.x=(x.x+v.x)*S;x.y=(x.y+v.y)*S;r.call(this,Oa,ca/Oa,Ra/Oa,Fa,y,x,H)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,
+var y=c.view.scale,da=t?x[0]:x[H];x=t?x[1]:x[H-1];H=x.x-da.x;var Q=x.y-da.y,Fa=Math.sqrt(H*H+Q*Q);da=n.call(this,Fa,H/Fa,Q/Fa,da,x);return new mxPoint(da.x/y-v.x,da.y/y-v.y)}return null},function(v,x,H){var y=c.absolutePoints,da=y.length-1;v=c.view.translate;var Q=c.view.scale,Fa=t?y[0]:y[da];y=t?y[1]:y[da-1];da=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(da*da+Ra*Ra);x.x=(x.x+v.x)*Q;x.y=(x.y+v.y)*Q;r.call(this,Oa,da/Oa,Ra/Oa,Fa,y,x,H)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,
function(n,r,v,x,H){H=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*H/2,x.y+v*n/4-r*H/2)},function(n,r,v,x,H,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-l})]}},bb=function(c){return function(l){return[Ta(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ab.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,
"arrowSize",ab.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=
Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+x,v.y+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=
-[Ta(v,["size"],function(H){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ca=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,ca*(y?1:H.width))),H.getCenterY())},function(H,y,ca){H=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-H.x:Math.max(0,Math.min(t,(y.x-H.x)/H.width));this.state.style.size=H},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},
+[Ta(v,["size"],function(H){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(H.x+Math.max(0,Math.min(.5*H.width,da*(y?1:H.width))),H.getCenterY())},function(H,y,da){H=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-H.x:Math.max(0,Math.min(t,(y.x-H.x)/H.width));this.state.style.size=H},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(ib(v));return x}},
yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,H=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,H*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,
mxConstants.STYLE_ROUNDED,!1)&&r.push(ib(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l}},ib=function(c,l){return Ta(c,[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,
parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-
-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(ca){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);x&&x(ca)};H.getPosition=t;H.setPosition=n;H.ignoreGrid=null!=r?r:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=
+n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var H=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);H.execute=function(da){for(var Q=0;Q<l.length;Q++)this.copyStyle(l[Q]);x&&x(da)};H.getPosition=t;H.setPosition=n;H.ignoreGrid=null!=r?r:!0;if(v){var y=H.positionChanged;H.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return H},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=
c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)-r*
-n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ca.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-
+n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(da.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,r,v,x,H){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(H+c.shape.strokewidth*
-c.view.scale)-r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-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(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;
-mxEvent.isAltDown(ca.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&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ca.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!1,function(n,r,v,x,H){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,ca){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-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(ca.getEvent())||mxEvent.isControlDown(ca.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(ca.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]),
+c.view.scale)-r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-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(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;
+mxEvent.isAltDown(da.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&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(n,r,v,x,H){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(da.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])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!1,function(n,r,v,x,H){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;H=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(H+c.shape.strokewidth*c.view.scale)-v*n/2,x.y+v*(H+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,H,y,da){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,H.x,H.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-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(da.getEvent())||mxEvent.isControlDown(da.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(da.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 t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(ib(c,t/2))}l.push(Ta(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=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,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||
r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],H=0;H<v.length;H++)v[H]!=c.cell&&r.isSwimlane(v[H])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[H]))==n&&x.push(v[H]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(la.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",la.prototype.width))),n=Math.max(1.5*la.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",la.prototype.height)));
-return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(la.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*la.prototype.corner,Math.min(l.height,t.y-l.y)))},!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+
+parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(ma.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",ma.prototype.width))),n=Math.max(1.5*ma.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",ma.prototype.height)));
+return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(ma.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*ma.prototype.corner,Math.min(l.height,t.y-l.y)))},!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+
t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-
t)},function(l,t){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()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,
t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",
Wa.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},dataStorage:function(c){return[Ta(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?eb.prototype.fixedSize:eb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:
-l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",X.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position)));mxUtils.getValue(this.state.style,
-"base",X.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",X.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",X.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},
-function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",X.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",X.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=
-Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",X.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));
+l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Y.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position)));mxUtils.getValue(this.state.style,
+"base",Y.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",Y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",Y.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},
+function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Y.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",Y.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));
return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(ib(c));return l},module:function(c){return[Ta(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ka.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
"jettyHeight",Ka.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+
t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,
@@ -3486,20 +3484,20 @@ t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.wid
["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=
Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=
Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=
-Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:tb(ka.prototype.size,!0,.5,!0,
-ka.prototype.fixedSize),curlyBracket:tb(V.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=
+Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:tb(la.prototype.size,!0,.5,!0,
+la.prototype.fixedSize),curlyBracket:tb(W.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,V.prototype.size,V.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.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=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[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=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,
-H=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==H&&null!=l&&(H=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,ca=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=H){c=function(na,ra,pa){na-=Oa.x;var oa=ra-Oa.y;ra=(Fa*na-S*oa)/(y*Fa-ca*S);na=(ca*na-y*oa)/(ca*S-y*Fa);Ra?(pa&&(Oa=new mxPoint(Oa.x+y*ra,Oa.y+ca*ra),r.push(Oa)),Oa=new mxPoint(Oa.x+S*na,Oa.y+
-Fa*na)):(pa&&(Oa=new mxPoint(Oa.x+S*na,Oa.y+Fa*na),r.push(Oa)),Oa=new mxPoint(Oa.x+y*ra,Oa.y+ca*ra));r.push(Oa)};var Oa=H;null==n&&(n=new mxPoint(H.x+(x.x-H.x)/2,H.y+(x.y-H.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};
+H=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==H&&null!=l&&(H=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,da=$a.y,Q=kb.x,Fa=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=H){c=function(oa,sa,qa){oa-=Oa.x;var pa=sa-Oa.y;sa=(Fa*oa-Q*pa)/(y*Fa-da*Q);oa=(da*oa-y*pa)/(da*Q-y*Fa);Ra?(qa&&(Oa=new mxPoint(Oa.x+y*sa,Oa.y+da*sa),r.push(Oa)),Oa=new mxPoint(Oa.x+Q*oa,Oa.y+
+Fa*oa)):(qa&&(Oa=new mxPoint(Oa.x+Q*oa,Oa.y+Fa*oa),r.push(Oa)),Oa=new mxPoint(Oa.x+y*sa,Oa.y+da*sa));r.push(Oa)};var Oa=H;null==n&&(n=new mxPoint(H.x+(x.x-H.x)/2,H.y+(x.y-H.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};
h.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){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*t);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,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};X.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
+0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};Y.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
"position",this.position));var r=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*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-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,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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,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*(t+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};I.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,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*(t+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,
@@ -3511,12 +3509,12 @@ parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnect
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,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(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,r)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));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};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=
-mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+mxRectangleShape.prototype.constraints;L.prototype.constraints=mxEllipse.prototype.constraints;P.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=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,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+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,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,r,t));return c};Ka.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ka.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Ka.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(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-
.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.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)];ea.prototype.constraints=
+new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.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)];Pa.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)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
@@ -3526,7 +3524,7 @@ new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(n
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,
0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,
-.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
+.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.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;gb.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,
Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),r=Math.max(0,Math.min(t,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*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,.75*l+.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),
@@ -3539,7 +3537,7 @@ parseFloat(mxUtils.getValue(this.style,"arrowWidth",ab.prototype.arrowWidth)))),
!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Aa.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ba.prototype.constraints=null;p.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,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,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ca.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)];A.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)];ya.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];za.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,z,C){C.getModel().beginUpdate();try{var D=C.getCellGeometry(k);null!=D&&w&&z&&(w/=z,D=D.clone(),1<w?D.height=D.width/w:D.width=D.height*w,C.getModel().setGeometry(k,
@@ -3600,9 +3598,9 @@ k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w])
null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,
mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
-f.showImageDialog(k,w,function(D,E,G,I,J,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(D,E,G);else{var K=d.getSelectionCells();if(null!=D&&(0<D.length||0<K.length)){var U=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var V=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=V.x;K[0].geometry.y=
-V.y;null!=I&&e(K[0],I,J,T,d);U=K;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,K);var Q=d.getCurrentCellStyle(K[0]);"image"!=Q[mxConstants.STYLE_SHAPE]&&"label"!=Q[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=E&&null!=G)for(D=0;D<K.length;D++){var N=K[D];if("0"!=d.getCurrentCellStyle(N).expand){var W=
-d.getModel().getGeometry(N);null!=W&&(W=W.clone(),W.width=E,W.height=G,d.getModel().setGeometry(N,W))}null!=I&&e(N,I,J,T,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
+f.showImageDialog(k,w,function(D,E,G,I,J,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(D,E,G);else{var K=d.getSelectionCells();if(null!=D&&(0<D.length||0<K.length)){var V=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,E,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var W=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=W.x;K[0].geometry.y=
+W.y;null!=I&&e(K[0],I,J,T,d);V=K;d.fireEvent(new mxEventObject("cellsInserted","cells",V))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<D.length?D:null,K);var O=d.getCurrentCellStyle(K[0]);"image"!=O[mxConstants.STYLE_SHAPE]&&"label"!=O[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==D.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=E&&null!=G)for(D=0;D<K.length;D++){var M=K[D];if("0"!=d.getCurrentCellStyle(M).expand){var X=
+d.getModel().getGeometry(M);null!=X&&(X=X.clone(),X.width=E,X.height=G,d.getModel().setGeometry(M,X))}null!=I&&e(M,I,J,T,d)}}finally{d.getModel().endUpdate()}null!=V&&(d.setSelectionCells(V),d.scrollCellToVisible(V[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=h;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,D,E){e(k,C,D,E,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=h;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);
m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
@@ -3724,47 +3722,47 @@ G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+
"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(D,E){E=null!=E?E:!1;if(null==D||""==D||mxUtils.isVarColor(D)||D==mxConstants.NONE)D="#ffffff",E=!0;var G=mxUtils.parseColor(D);
D=G.r/255;var I=G.g/255,J=G.b/255,T=Math.min(Math.min(D,I),J);G=Math.max(Math.max(D,I),J);var K=G-T;0===K?D=[null,0,G]:(D=D===T?3+(J-I)/K:I===T?5+(D-J)/K:1+(I-D)/K,D=[6===D?0:D,K/G,G]);null!=D[0]&&(g[0]=D[0]);0!=D[2]&&(g[1]=D[1]);g[2]=D[2];q(E)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
-var ColorDialog=function(a,b,e,f,g,d,h){function m(ba){return mxUtils.color2hex("#"+ba).substring(1).toUpperCase()}function q(){ja.src="none"==X.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ba){ba||"none"==X.style.display?(X.style.display="flex",N.focus()):X.style.display="none";q()}function u(ba){""==ba.value&&null!=T&&U?ba.style.background=ba==N?T.dark:T.light:""==ba.value||ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)?ba.style.background="transparent":ba.style.background=
-"#"+ba.value;ba.style.color="transparent"==ba.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ba.style.background)?"#ffffff":"#000000"}function w(){u(V);u(N)}function z(ba){ba?h&&null!=T?(V.value=T.light.substring(1).toUpperCase(),ba=!1):(V.value="",N.value="",W.value="automatic",V.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),N.setAttribute("title",mxResources.get("useBlackAndWhite")),V.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==V.value&&
-null!=T&&(V.value=T.light.substring(1).toUpperCase()),V.removeAttribute("placeholder"),V.removeAttribute("title"),""==N.value&&null!=T&&(N.value=T.dark.substring(1).toUpperCase()),N.removeAttribute("placeholder"),N.removeAttribute("title"),ba=!1);U=ba}function C(ba){"#"==ba.value.charAt(0)&&(ba.value=ba.value.substring(1));var la=ba.value,Ja=la.toLowerCase();null==g||""!=la&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||
-null==T?(ba.value==mxConstants.NONE||mxUtils.isVarColor(ba.value)||(ba.value=m(ba.value),ea.fromString("#"+ba.value)),z(!1),ba!=N||V.value==mxConstants.NONE&&N.value==mxConstants.NONE||(W.value="custom"),ba==V&&"automatic"==W.value&&(V.value==mxConstants.NONE?N.value=mxConstants.NONE:mxUtils.isVarColor(V.value)?N.value=V.value:N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ba.value)).substring(1).toUpperCase()),w()):M.click()}function D(){var ba=V.value,la=N.value;if(U&&null!=T||(/(^#?[a-zA-Z0-9]*$)/.test(ba)||
-mxUtils.isVarColor(ba))&&(/(^#?[a-zA-Z0-9]*$)/.test(la)||mxUtils.isVarColor(la))){if(U)ba="default";else if(""==ba&&(ba=mxConstants.NONE),""==la&&(la=mxConstants.NONE),ba==mxConstants.NONE||mxUtils.isVarColor(ba)||"#"==ba.charAt(0)||(ba="#"+m(ba)),la==mxConstants.NONE||mxUtils.isVarColor(la)||"#"==la.charAt(0)||(la="#"+m(la)),ba!=mxConstants.NONE&&la!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=W.value&&la!=mxConstants.NONE?ba==mxConstants.NONE?ColorDialog.addRecentColor(la.substring(1),
-12):ColorDialog.addRecentColor("light-dark("+ba+","+la+")",12):ba!=mxConstants.NONE&&ColorDialog.addRecentColor(ba.substring(1),12),"none"!=ba||"none"!=la)ba=ba==mxConstants.NONE?"transparent":ba,la=la==mxConstants.NONE?"transparent":la,h||"automatic"==W.value||(ba="light-dark("+ba+","+la+")");aa(ba);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||(da.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?da.select():document.execCommand("selectAll",
-!1,null))}function G(){da.value!=mxConstants.NONE&&""!=da.value&&ea.fromString("#"+da.value,!0)}function I(){var ba=Y(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ba.style.marginBottom="8px";return ba}function J(ba){13==ba.keyCode&&(C(mxEvent.getSource(ba)),D())}var T=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var U=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||
-mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var V=document.createElement("input");V.style.textOverflow="ellipsis";V.style.margin="0 0 0 4px";V.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Q=document.createElement("div");Q.style.display="flex";Q.style.alignItems="center";d.appendChild(Q);var N=document.createElement("input");N.style.textOverflow="ellipsis";N.style.margin="0 4px";N.style.maxWidth="60px";N.style.width="100%";var W=document.createElement("select");
-W.style.textOverflow="ellipsis";W.style.width="100%";var O=document.createElement("option");O.setAttribute("value","automatic");mxUtils.write(O,mxResources.get("automatic"));W.appendChild(O);O=document.createElement("option");O.setAttribute("value","custom");mxUtils.write(O,mxResources.get("userDefined"));W.appendChild(O);W.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var X=document.createElement("div");X.style.padding="0 6px 0 6px";O=document.createElement("img");O.setAttribute("title",
-mxResources.get("dark"));O.className="geAdaptiveAsset";O.src=Editor.thinDarkImage;O.style.width="20px";X.appendChild(O);mxEvent.addListener(O,"click",function(){N.focus()});X.appendChild(N);X.appendChild(W);X.style.display="flex";X.style.alignItems="center";O=document.createElement("div");O.style.display="flex";O.style.alignItems="center";O.style.userSelect="none";O.style.cursor="pointer";O.style.padding="2px 0 2px 0";var ja=document.createElement("img");ja.setAttribute("title",mxResources.get("dark"));
-ja.className="geAdaptiveAsset";ja.style.marginLeft="-2px";O.appendChild(ja);mxUtils.write(O,mxResources.get("advanced"));var ka=document.createElement("img");ka.setAttribute("title",mxResources.get("swap"));ka.className="geAdaptiveAsset";ka.style.marginLeft="4px";ka.style.width="16px";ka.style.height="16px";ka.style.cursor="pointer";ka.src=Editor.swapImage;mxEvent.addListener(ka,"click",function(ba){k(!0);W.value="custom";var la=V.value;V.value=N.value;N.value=la;w();mxEvent.consume(ba)});O.appendChild(ka);
-var ta=document.createElement("img");ta.setAttribute("title",mxResources.get("copy"));ta.className="geAdaptiveAsset";ta.style.marginLeft="4px";ta.style.width="16px";ta.style.height="16px";ta.style.cursor="pointer";ta.src=Editor.doubleArrowUpImage;mxEvent.addListener(ta,"click",function(ba){da==N?V.value=N.value:N.value=V.value;k(!0);W.value="custom";w();mxEvent.consume(ba)});O.appendChild(ta);q();mxEvent.addListener(O,"click",function(){k();q();ColorDialog.collapsed="none"==X.style.display});var M=
-mxUtils.button("",function(){z(!0);w();da.focus();""==da.value&&null!=T&&U&&ea.fromString(da==N?T.dark:T.light,!0)});mxEvent.addListener(W,"change",function(){"automatic"==W.value?(V.focus(),C(V)):(z(!1),mxUtils.isVarColor(N.value)||(N.value=U&&null!=T?T.dark.substring(1).toUpperCase():N.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+V.value)).substring(1).toUpperCase()),N.focus(),E());w()});mxEvent.addListener(V,"change",function(){C(V)});mxEvent.addListener(N,"change",function(){C(N)});var aa=
-null!=e?e:this.createApplyFunction();this.init=function(){E()};var ea=new ColorPicker,da=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==W.value)&&!h?N:V;mxEvent.addListener(V,"focus",function(){da=V;G();ta.src=Editor.doubleArrowDownImage});mxEvent.addListener(N,"focus",function(){da=N;G();ta.src=Editor.doubleArrowUpImage});ea.addListener("change",function(ba,la){ba=la.getProperty("color").substring(1).toUpperCase();da.value.toUpperCase()!=ba&&(da.value=
-ba,C(da),window.setTimeout(function(){da.focus()},0))});e=document.createElement("div");e.appendChild(ea.div);var sa=document.createElement("div");sa.style.display="flex";sa.style.flexFlow="row wrap";sa.style.justifyContent="center";sa.style.paddingTop="10px";var Y=mxUtils.bind(this,function(ba,la,Ja,ma){la=null!=la?la:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";ya.style.marginLeft=
-"1px";var za=document.createElement("tbody");ya.appendChild(za);for(var Ka=ba.length/la,Pa=0;Pa<Ka;Pa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<la;Ha++)mxUtils.bind(this,function(qa){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==qa&&(qa=Ja);if(null!=qa){Da.style.borderWidth="1px";if(qa==mxConstants.NONE||null==qa)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(qa)){var Va=
-mxUtils.getLightDarkColor(qa);Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+qa;Va=this.colorNames[String(qa).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=qa&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(qa==mxConstants.NONE){da==N&&N.value==mxConstants.NONE?V.value=mxConstants.NONE:da.value=mxConstants.NONE;if(da==V||da==N&&
-V.value==mxConstants.NONE)W.value="automatic";C(da);window.setTimeout(function(){da.focus()},0)}else if(mxUtils.isLightDarkColor(qa)){k(!0);W.value="custom";var Wa=mxUtils.getLightDarkColor(qa);V.value=Wa.light.substring(1).toUpperCase();N.value=Wa.dark.substring(1).toUpperCase();C(V);C(N);da==V?ea.fromString(Wa.light):ea.fromString(Wa.dark)}else ea.fromString("#"+qa)}),mxEvent.addListener(Da,"dblclick",D))})(ba[Pa*la+Ha]);za.appendChild(Ia)}ma&&(ba=document.createElement("td"),ba.setAttribute("title",
-mxResources.get("reset")),ba.className="geAdaptiveAsset",ba.style.border="1px solid black",ba.style.padding="0px",ba.style.width="16px",ba.style.height="16px",ba.style.backgroundImage="url('"+Editor.crossImage+"')",ba.style.backgroundPosition="center center",ba.style.backgroundSize="14px 14px",ba.style.backgroundRepeat="no-repeat",ba.style.cursor="pointer",Ia.appendChild(ba),mxEvent.addListener(ba,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(I(),ya)}));sa.appendChild(ya);
-return ya});h||(d.appendChild(O),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=W.value||(X.style.display="none",q()),O=document.createElement("img"),O.setAttribute("title",mxResources.get("light")),O.className="geAdaptiveAsset",O.src=Editor.thinLightImage,O.style.width="20px",Q.appendChild(O),mxEvent.addListener(O,"click",function(){V.focus()}));Q.appendChild(V);null!=T&&(M.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),M.style.cursor=
-"pointer",M.style.position="relative",M.style.marginLeft="4px",M.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=T.light:K.style.backgroundImage="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+" 50.3%)",M.appendChild(K),Q.appendChild(M),mxEvent.addListener(M,
-"dblclick",D));var P=document.createElement("input");P.setAttribute("type","color");P.style.position="relative";P.style.visibility="hidden";P.style.top="10px";P.style.width="0px";P.style.height="0px";P.style.border="none";e.style.whiteSpace="nowrap";Q.appendChild(P);K=mxUtils.button("",function(){document.activeElement==P?V.focus():(P.value="#"+V.value,P.click())});K.style.cursor="pointer";O=document.createElement("img");O.src=Editor.colorDropperImage;O.className="geAdaptiveAsset";O.style.position=
-"relative";O.style.verticalAlign="middle";O.style.marginTop="-2px";O.style.width="auto";O.style.height="14px";K.appendChild(O);Q.appendChild(K);e.appendChild(d);mxEvent.addListener(P,"change",function(){ea.fromString(P.value)});h||e.appendChild(X);I();d=Y(this.presetColors);d.style.marginBottom="8px";d=Y(this.defaultColors);d.style.marginBottom="16px";e.appendChild(sa);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
-"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Q.className="geBtn";a.editor.cancelFirst&&d.appendChild(Q);K=mxUtils.button(mxResources.get("apply"),D);K.className="geBtn gePrimaryBtn";d.appendChild(K);a.editor.cancelFirst||d.appendChild(Q);null!=b&&("default"==b?M.click():(Q=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Q.light?V.value=mxConstants.NONE:
-mxUtils.isVarColor(Q.light)?V.value=Q.light:(mxUtils.isRgbColor(Q.light)?Q.light=mxUtils.rgba2hex(Q.light):mxUtils.isHexColor(Q.light)||(Q.light="#"+m(Q.light)),V.value=Q.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Q.dark?N.value=mxConstants.NONE:mxUtils.isVarColor(Q.dark)?N.value=Q.dark:(mxUtils.isRgbColor(Q.dark)?Q.dark=mxUtils.rgba2hex(Q.dark):mxUtils.isHexColor(Q.dark)||(Q.dark="#"+m(Q.dark)),N.value=Q.dark.substring(1).toUpperCase()),G(),w()));h||!ColorDialog.collapsed||
-"automatic"!=W.value||Editor.isDarkMode()||(X.style.display="none",q());e.appendChild(d);this.picker=ea;this.colorInput=V;mxEvent.addListener(V,"keypress",J);mxEvent.addListener(N,"keypress",J);mxEvent.addListener(e,"keydown",function(ba){27==ba.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ba))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
-ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+var ColorDialog=function(a,b,e,f,g,d,h){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function q(){ja.src="none"==Y.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){ca||"none"==Y.style.display?(Y.style.display="flex",M.focus()):Y.style.display="none";q()}function u(ca){""==ca.value&&null!=T&&V?ca.style.background=ca==M?T.dark:T.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background=
+"#"+ca.value;ca.style.color="transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(W);u(M)}function z(ca){ca?h&&null!=T?(W.value=T.light.substring(1).toUpperCase(),ca=!1):(W.value="",M.value="",X.value="automatic",W.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),M.setAttribute("title",mxResources.get("useBlackAndWhite")),W.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==W.value&&
+null!=T&&(W.value=T.light.substring(1).toUpperCase()),W.removeAttribute("placeholder"),W.removeAttribute("title"),""==M.value&&null!=T&&(M.value=T.dark.substring(1).toUpperCase()),M.removeAttribute("placeholder"),M.removeAttribute("title"),ca=!1);V=ca}function C(ca){"#"==ca.value.charAt(0)&&(ca.value=ca.value.substring(1));var ma=ca.value,Ja=ma.toLowerCase();null==g||""!=ma&&"automatic"!=Ja&&"default"!=Ja&&Ja!=mxResources.get("default").toLowerCase()&&Ja!=mxResources.get("automatic").toLowerCase()||
+null==T?(ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)||(ca.value=m(ca.value),fa.fromString("#"+ca.value)),z(!1),ca!=M||W.value==mxConstants.NONE&&M.value==mxConstants.NONE||(X.value="custom"),ca==W&&"automatic"==X.value&&(W.value==mxConstants.NONE?M.value=mxConstants.NONE:mxUtils.isVarColor(W.value)?M.value=W.value:M.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):U.click()}function D(){var ca=W.value,ma=M.value;if(V&&null!=T||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||
+mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(ma)||mxUtils.isVarColor(ma))){if(V)ca="default";else if(""==ca&&(ca=mxConstants.NONE),""==ma&&(ma=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),ma==mxConstants.NONE||mxUtils.isVarColor(ma)||"#"==ma.charAt(0)||(ma="#"+m(ma)),ca!=mxConstants.NONE&&ma!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=X.value&&ma!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(ma.substring(1),
+12):ColorDialog.addRecentColor("light-dark("+ca+","+ma+")",12):ca!=mxConstants.NONE&&ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=ma)ca=ca==mxConstants.NONE?"transparent":ca,ma=ma==mxConstants.NONE?"transparent":ma,h||"automatic"==X.value||(ca="light-dark("+ca+","+ma+")");aa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||(ka.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ka.select():document.execCommand("selectAll",
+!1,null))}function G(){ka.value!=mxConstants.NONE&&""!=ka.value&&fa.fromString("#"+ka.value,!0)}function I(){var ca=ba(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function J(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),D())}var T=null!=d?mxUtils.getLightDarkColor(d,null,null,h):null,K=a.editor.graph;this.editorUi=a;var V=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||
+mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var W=document.createElement("input");W.style.textOverflow="ellipsis";W.style.margin="0 0 0 4px";W.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var O=document.createElement("div");O.style.display="flex";O.style.alignItems="center";d.appendChild(O);var M=document.createElement("input");M.style.textOverflow="ellipsis";M.style.margin="0 4px";M.style.maxWidth="60px";M.style.width="100%";var X=document.createElement("select");
+X.style.textOverflow="ellipsis";X.style.width="100%";var N=document.createElement("option");N.setAttribute("value","automatic");mxUtils.write(N,mxResources.get("automatic"));X.appendChild(N);N=document.createElement("option");N.setAttribute("value","custom");mxUtils.write(N,mxResources.get("userDefined"));X.appendChild(N);X.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var Y=document.createElement("div");Y.style.padding="0 6px 0 6px";N=document.createElement("img");N.setAttribute("title",
+mxResources.get("dark"));N.className="geAdaptiveAsset";N.src=Editor.thinDarkImage;N.style.width="20px";Y.appendChild(N);mxEvent.addListener(N,"click",function(){M.focus()});Y.appendChild(M);Y.appendChild(X);Y.style.display="flex";Y.style.alignItems="center";N=document.createElement("div");N.style.display="flex";N.style.alignItems="center";N.style.userSelect="none";N.style.cursor="pointer";N.style.padding="2px 0 2px 0";var ja=document.createElement("img");ja.setAttribute("title",mxResources.get("dark"));
+ja.className="geAdaptiveAsset";ja.style.marginLeft="-2px";N.appendChild(ja);mxUtils.write(N,mxResources.get("advanced"));var la=document.createElement("img");la.setAttribute("title",mxResources.get("swap"));la.className="geAdaptiveAsset";la.style.marginLeft="4px";la.style.width="16px";la.style.height="16px";la.style.cursor="pointer";la.src=Editor.swapImage;mxEvent.addListener(la,"click",function(ca){k(!0);X.value="custom";var ma=W.value;W.value=M.value;M.value=ma;w();mxEvent.consume(ca)});N.appendChild(la);
+var S=document.createElement("img");S.setAttribute("title",mxResources.get("copy"));S.className="geAdaptiveAsset";S.style.marginLeft="4px";S.style.width="16px";S.style.height="16px";S.style.cursor="pointer";S.src=Editor.doubleArrowUpImage;mxEvent.addListener(S,"click",function(ca){ka==M?W.value=M.value:M.value=W.value;k(!0);X.value="custom";w();mxEvent.consume(ca)});N.appendChild(S);q();mxEvent.addListener(N,"click",function(){k();q();ColorDialog.collapsed="none"==Y.style.display});var U=mxUtils.button("",
+function(){z(!0);w();ka.focus();""==ka.value&&null!=T&&V&&fa.fromString(ka==M?T.dark:T.light,!0)});mxEvent.addListener(X,"change",function(){"automatic"==X.value?(W.focus(),C(W)):(z(!1),mxUtils.isVarColor(M.value)||(M.value=V&&null!=T?T.dark.substring(1).toUpperCase():M.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+W.value)).substring(1).toUpperCase()),M.focus(),E());w()});mxEvent.addListener(W,"change",function(){C(W)});mxEvent.addListener(M,"change",function(){C(M)});var aa=null!=e?e:this.createApplyFunction();
+this.init=function(){E()};var fa=new ColorPicker,ka=Editor.isDarkMode()&&("auto"==K.getAdaptiveColors()||"simple"==K.getAdaptiveColors()&&"custom"==X.value)&&!h?M:W;mxEvent.addListener(W,"focus",function(){ka=W;G();S.src=Editor.doubleArrowDownImage});mxEvent.addListener(M,"focus",function(){ka=M;G();S.src=Editor.doubleArrowUpImage});fa.addListener("change",function(ca,ma){ca=ma.getProperty("color").substring(1).toUpperCase();ka.value.toUpperCase()!=ca&&(ka.value=ca,C(ka),window.setTimeout(function(){ka.focus()},
+0))});e=document.createElement("div");e.appendChild(fa.div);var ta=document.createElement("div");ta.style.display="flex";ta.style.flexFlow="row wrap";ta.style.justifyContent="center";ta.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,ma,Ja,na){ma=null!=ma?ma:12;var ya=document.createElement("table");ya.style.borderCollapse="collapse";ya.setAttribute("cellspacing","0");ya.style.marginBottom="20px";ya.style.cellSpacing="0px";ya.style.marginLeft="1px";var za=document.createElement("tbody");
+ya.appendChild(za);for(var Ka=ca.length/ma,Pa=0;Pa<Ka;Pa++){for(var Ia=document.createElement("tr"),Ha=0;Ha<ma;Ha++)mxUtils.bind(this,function(ra){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==ra&&(ra=Ja);if(null!=ra){Da.style.borderWidth="1px";if(ra==mxConstants.NONE||null==ra)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(ra)){var Va=mxUtils.getLightDarkColor(ra);
+Da.style.background="linear-gradient(to right bottom, "+Va.cssText+" 50%, "+mxUtils.invertLightDarkColor(Va).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+ra;Va=this.colorNames[String(ra).toUpperCase()];null!=Va&&Da.setAttribute("title",Va)}Ia.appendChild(Da);null!=ra&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(ra==mxConstants.NONE){ka==M&&M.value==mxConstants.NONE?W.value=mxConstants.NONE:ka.value=mxConstants.NONE;if(ka==W||ka==M&&W.value==mxConstants.NONE)X.value=
+"automatic";C(ka);window.setTimeout(function(){ka.focus()},0)}else if(mxUtils.isLightDarkColor(ra)){k(!0);X.value="custom";var Wa=mxUtils.getLightDarkColor(ra);W.value=Wa.light.substring(1).toUpperCase();M.value=Wa.dark.substring(1).toUpperCase();C(W);C(M);ka==W?fa.fromString(Wa.light):fa.fromString(Wa.dark)}else fa.fromString("#"+ra)}),mxEvent.addListener(Da,"dblclick",D))})(ca[Pa*ma+Ha]);za.appendChild(Ia)}na&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),ca.className=
+"geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ia.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();ya.parentNode.replaceChild(I(),ya)}));ta.appendChild(ya);return ya});h||(d.appendChild(N),
+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==K.getAdaptiveColors()||"automatic"!=X.value||(Y.style.display="none",q()),N=document.createElement("img"),N.setAttribute("title",mxResources.get("light")),N.className="geAdaptiveAsset",N.src=Editor.thinLightImage,N.style.width="20px",O.appendChild(N),mxEvent.addListener(N,"click",function(){W.focus()}));O.appendChild(W);null!=T&&(U.setAttribute("title",mxResources.get(h?"default":"useBlackAndWhite")),U.style.cursor="pointer",U.style.position="relative",
+U.style.marginLeft="4px",U.innerText="",K=document.createElement("div"),K.style.display="inline-block",K.style.verticalAlign="middle",K.style.borderStyle="solid",K.style.borderWidth="1px",K.style.marginTop="-2px",K.style.width="12px",K.style.height="12px",h?K.style.backgroundColor=T.light:K.style.backgroundImage="linear-gradient(to right bottom, "+T.cssText+" 50%, "+mxUtils.invertLightDarkColor(T).cssText+" 50.3%)",U.appendChild(K),O.appendChild(U),mxEvent.addListener(U,"dblclick",D));var R=document.createElement("input");
+R.setAttribute("type","color");R.style.position="relative";R.style.visibility="hidden";R.style.top="10px";R.style.width="0px";R.style.height="0px";R.style.border="none";e.style.whiteSpace="nowrap";O.appendChild(R);K=mxUtils.button("",function(){document.activeElement==R?W.focus():(R.value="#"+W.value,R.click())});K.style.cursor="pointer";N=document.createElement("img");N.src=Editor.colorDropperImage;N.className="geAdaptiveAsset";N.style.position="relative";N.style.verticalAlign="middle";N.style.marginTop=
+"-2px";N.style.width="auto";N.style.height="14px";K.appendChild(N);O.appendChild(K);e.appendChild(d);mxEvent.addListener(R,"change",function(){fa.fromString(R.value)});h||e.appendChild(Y);I();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(ta);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));
+O=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});O.className="geBtn";a.editor.cancelFirst&&d.appendChild(O);K=mxUtils.button(mxResources.get("apply"),D);K.className="geBtn gePrimaryBtn";d.appendChild(K);a.editor.cancelFirst||d.appendChild(O);null!=b&&("default"==b?U.click():(O=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==O.light?W.value=mxConstants.NONE:mxUtils.isVarColor(O.light)?W.value=O.light:(mxUtils.isRgbColor(O.light)?O.light=mxUtils.rgba2hex(O.light):
+mxUtils.isHexColor(O.light)||(O.light="#"+m(O.light)),W.value=O.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==O.dark?M.value=mxConstants.NONE:mxUtils.isVarColor(O.dark)?M.value=O.dark:(mxUtils.isRgbColor(O.dark)?O.dark=mxUtils.rgba2hex(O.dark):mxUtils.isHexColor(O.dark)||(O.dark="#"+m(O.dark)),M.value=O.dark.substring(1).toUpperCase()),G(),w()));h||!ColorDialog.collapsed||"automatic"!=X.value||Editor.isDarkMode()||(Y.style.display="none",q());e.appendChild(d);this.picker=fa;
+this.colorInput=W;mxEvent.addListener(W,"keypress",J);mxEvent.addListener(M,"keypress",J);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};
+ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href",
"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,m,q,k,u,w,z,C,D){k=null!=k?k:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";m=document.createElement("div");
m.style.position="absolute";m.style.left="0px";m.style.right="0px";var E=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";E.style.top="20px";E.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);h.appendChild(m);h.appendChild(E);h.appendChild(G);null!=D&&m.appendChild(D);var I=document.createElement("textarea");u?I.setAttribute("wrap","off"):I.style.wordBreak="break-all";
I.setAttribute("spellcheck","false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};E.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
-C)for(b=0;b<C.length;b++)(function(T,K,U){T=mxUtils.button(T,function(V){K(V,I)});null!=U&&T.setAttribute("title",U);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=q&&q(G,I);if(null!=f){var J=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});J.setAttribute("title",
+C)for(b=0;b<C.length;b++)(function(T,K,V){T=mxUtils.button(T,function(W){K(W,I)});null!=V&&T.setAttribute("title",V);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=q&&q(G,I);if(null!=f){var J=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});J.setAttribute("title",
"Ctrl+Enter");J.className="geBtn gePrimaryBtn";G.appendChild(J);mxEvent.addListener(I,"keydown",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&J.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=h},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
"off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var q=new FileReader;
q.onload=function(k){e.value=k.target.result};q.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});g.className="geBtn";a.editor.cancelFirst&&b.appendChild(g);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var h=document.createElement("option");h.setAttribute("value","apply");mxUtils.write(h,mxResources.get("apply",
null,"Update Existing Drawing"));d.appendChild(h)}a.editor.graph.isEnabled()&&(h=document.createElement("option"),h.setAttribute("value","insert"),mxUtils.write(h,mxResources.get("insert")),d.appendChild(h));h=document.createElement("option");h.setAttribute("value","new");mxUtils.write(h,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(h);b.appendChild(d);h=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),q=null;
if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){q=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),w=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,w);var z=w.getChildren(w.getChildAt(w.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){q=C}finally{a.editor.graph.model.endUpdate()}}null!=
q&&a.handleError(q)});h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(g);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var Q=u.value,N=Q.lastIndexOf(".");u.value=0<N?Q.substring(0,N+1)+w.value:Q+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?J.removeAttribute("disabled"):J.setAttribute("disabled",
+var ExportDialog=function(a){function b(){var O=u.value,M=O.lastIndexOf(".");u.value=0<M?O.substring(0,M+1)+w.value:O+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),D.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),D.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?J.removeAttribute("disabled"):J.setAttribute("disabled",
"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===w.value?(E.removeAttribute("disabled"),G.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*D.value>MAX_AREA||0>=C.value?"red":"";D.style.backgroundColor=C.value*D.value>MAX_AREA||0>=D.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/
d),m=Math.ceil(g.height/d);d=document.createElement("table");var q=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");g.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);g.appendChild(k);
q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");g.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
@@ -3773,56 +3771,56 @@ k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResourc
C.setAttribute("value",h);C.style.width="180px";k=document.createElement("td");k.appendChild(C);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");g.appendChild(k);var D=document.createElement("input");D.setAttribute("value",m);D.style.width="180px";k=document.createElement("td");k.appendChild(D);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");g.appendChild(k);var E=document.createElement("select");E.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");E.appendChild(k);k=document.createElement("option");
k.setAttribute("value","400");mxUtils.write(k,"400dpi");E.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));E.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(E,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
-"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var Q=parseInt(G.value);isNaN(Q)||0>=Q?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=Q))});k=document.createElement("td");k.appendChild(E);k.appendChild(G);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var J=document.createElement("input");
+"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var O=parseInt(G.value);isNaN(O)||0>=O?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=O))});k=document.createElement("td");k.appendChild(E);k.appendChild(G);g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");g.appendChild(k);var J=document.createElement("input");
J.setAttribute("type","checkbox");J.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(J);mxUtils.write(k,mxResources.get("transparent"));g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");g.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;k=document.createElement("td");k.appendChild(T);
g.appendChild(k);q.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);g.appendChild(k);q.appendChild(g);d.appendChild(q);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",
-function(){I=!0;var Q=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*Q).toFixed(2));0<h?(C.value=Math.floor(h*Q),D.value=Math.floor(m*Q)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(C,"change",function(){var Q=parseInt(C.value)/h;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),D.value=Math.floor(m*Q)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var Q=parseInt(D.value)/m;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),C.value=Math.floor(h*
-Q)):(z.value="100",C.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var Q=u.value,N=w.value,W=Math.max(0,parseFloat(z.value)||100)/100,O=Math.max(0,parseInt(K.value)),X=f.background,ja=Math.max(1,parseInt(G.value));if(("svg"==N||"png"==N||
-"pdf"==N)&&J.checked)X=null;else if(null==X||X==mxConstants.NONE)X="#ffffff";ExportDialog.lastBorderValue=O;ExportDialog.exportFile(a,Q,N,X,W,O,ja,T.checked)}}));U.className="geBtn gePrimaryBtn";var V=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});V.className="geBtn";a.editor.cancelFirst?(k.appendChild(V),k.appendChild(U)):(k.appendChild(U),k.appendChild(V));g.appendChild(k);q.appendChild(g);d.appendChild(q);this.container=d};ExportDialog.lastBorderValue=0;
+function(){I=!0;var O=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*O).toFixed(2));0<h?(C.value=Math.floor(h*O),D.value=Math.floor(m*O)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(C,"change",function(){var O=parseInt(C.value)/h;0<O?(z.value=parseFloat((100*O).toFixed(2)),D.value=Math.floor(m*O)):(z.value="100",C.value=h,D.value=m);e()});mxEvent.addListener(D,"change",function(){var O=parseInt(D.value)/m;0<O?(z.value=parseFloat((100*O).toFixed(2)),C.value=Math.floor(h*
+O)):(z.value="100",C.value=h,D.value=m);e()});g=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var V=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var O=u.value,M=w.value,X=Math.max(0,parseFloat(z.value)||100)/100,N=Math.max(0,parseInt(K.value)),Y=f.background,ja=Math.max(1,parseInt(G.value));if(("svg"==M||"png"==M||
+"pdf"==M)&&J.checked)Y=null;else if(null==Y||Y==mxConstants.NONE)Y="#ffffff";ExportDialog.lastBorderValue=N;ExportDialog.exportFile(a,O,M,Y,X,N,ja,T.checked)}}));V.className="geBtn gePrimaryBtn";var W=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});W.className="geBtn";a.editor.cancelFirst?(k.appendChild(W),k.appendChild(V)):(k.appendChild(V),k.appendChild(W));g.appendChild(k);q.appendChild(g);d.appendChild(q);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,g,d,h,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,g,d)),b,e);else{var q=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/g-q.x)/m.view.scale),Math.floor((d/g-q.y)/m.view.scale));k.scale(g/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(q.width*g/m.view.scale+2*d);g=Math.ceil(q.height*g/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+g+"&"+u+"&dpi="+h)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function e(){0<K.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var q=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=q&&(m=JSON.parse(q))}catch(Q){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,w=[],z=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(Q,N){var W=document.createElement("div");W.style.position="relative";W.style.paddingRight="20px";W.style.boxSizing="border-box";W.style.width="100%";var O=document.createElement("a"),X=mxUtils.createImage(Dialog.prototype.closeImage);X.style.height="9px";X.style.fontSize="9px";X.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";O.className="geButton";O.setAttribute("title",
-mxResources.get("delete"));O.style.position="absolute";O.style.top="4px";O.style.right="0px";O.style.margin="0px";O.style.width="9px";O.style.height="9px";O.style.cursor="pointer";O.appendChild(X);N=function(ja){return function(){for(var ka=0,ta=0;ta<w.length;ta++){if(w[ta]==ja){z[ta]=null;k.table.deleteRow(ka+(null!=D?1:0));break}null!=z[ta]&&ka++}}}(N);mxEvent.addListener(O,"click",N);N=Q.parentNode;W.appendChild(Q);W.appendChild(O);N.appendChild(W)};h=function(Q,N,W){w[Q]=N;z[Q]=k.addTextarea(w[C]+
-":",W,2);z[Q].style.width="100%";0<W.indexOf("\n")&&z[Q].setAttribute("rows","2");E(z[Q],N);null!=m[N]&&0==m[N].editable&&z[Q].setAttribute("disabled","disabled")};q=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),I=g.getCellStyle(b),J=0;J<u.length;J++)("label"!=u[J].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[J].nodeName&&q.push({name:u[J].nodeName,value:u[J].nodeValue});q.sort(function(Q,N){return"label"==Q.name?1:"label"==N.name?-1:Q.name<N.name?-1:Q.name>
-N.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(Q){Q=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(N){if(null!=N&&0<N.length&&N!=D)if(g.model.isRoot(b)){var W=a.getPageById(D);if(null!=W)if(null==a.getPageById(N)){var O=a.getPageIndex(W);0<=O&&(a.removePage(W),W.node.setAttribute("id",
-N),D=N,T.innerHTML=mxUtils.htmlEntities(N),a.insertPage(W,O))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(N)?(g.getModel().cellRemoved(b),b.setId(N),D=N,T.innerHTML=mxUtils.htmlEntities(N),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[N])})}),mxResources.get("id"));a.showDialog(Q.container,300,80,!0,!0);Q.init()})}for(J=0;J<q.length;J++)h(C,q[J].name,q[J].value),C++;q=document.createElement("div");
+var EditDataDialog=function(a,b){function e(){0<K.value.length?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")}var f=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",d||"");d=h}var m={};try{var q=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=q&&(m=JSON.parse(q))}catch(O){}var k=new mxForm("properties");k.table.style.width=
+"100%";var u=d.attributes,w=[],z=[],C=0,D=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,E=function(O,M){var X=document.createElement("div");X.style.position="relative";X.style.paddingRight="20px";X.style.boxSizing="border-box";X.style.width="100%";var N=document.createElement("a"),Y=mxUtils.createImage(Dialog.prototype.closeImage);Y.style.height="9px";Y.style.fontSize="9px";Y.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";N.className="geButton";N.setAttribute("title",
+mxResources.get("delete"));N.style.position="absolute";N.style.top="4px";N.style.right="0px";N.style.margin="0px";N.style.width="9px";N.style.height="9px";N.style.cursor="pointer";N.appendChild(Y);M=function(ja){return function(){for(var la=0,S=0;S<w.length;S++){if(w[S]==ja){z[S]=null;k.table.deleteRow(la+(null!=D?1:0));break}null!=z[S]&&la++}}}(M);mxEvent.addListener(N,"click",M);M=O.parentNode;X.appendChild(O);X.appendChild(N);M.appendChild(X)};h=function(O,M,X){w[O]=M;z[O]=k.addTextarea(w[C]+":",
+X,2);z[O].style.width="100%";0<X.indexOf("\n")&&z[O].setAttribute("rows","2");E(z[O],M);null!=m[M]&&0==m[M].editable&&z[O].setAttribute("disabled","disabled")};q=[];for(var G=g.getModel().getParent(b)==g.getModel().getRoot(),I=g.getCellStyle(b),J=0;J<u.length;J++)("label"!=u[J].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[J].nodeName&&q.push({name:u[J].nodeName,value:u[J].nodeValue});q.sort(function(O,M){return"label"==O.name?1:"label"==M.name?-1:O.name<M.name?-1:O.name>
+M.name?1:0});if(null!=D){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,D);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(O){O=new FilenameDialog(a,D,mxResources.get("apply"),mxUtils.bind(this,function(M){if(null!=M&&0<M.length&&M!=D)if(g.model.isRoot(b)){var X=a.getPageById(D);if(null!=X)if(null==a.getPageById(M)){var N=a.getPageIndex(X);0<=N&&(a.removePage(X),X.node.setAttribute("id",
+M),D=M,T.innerHTML=mxUtils.htmlEntities(M),a.insertPage(X,N))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==g.getModel().getCell(M)?(g.getModel().cellRemoved(b),b.setId(M),D=M,T.innerHTML=mxUtils.htmlEntities(M),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[M])})}),mxResources.get("id"));a.showDialog(O.container,300,80,!0,!0);O.init()})}for(J=0;J<q.length;J++)h(C,q[J].name,q[J].value),C++;q=document.createElement("div");
q.style.position="absolute";q.style.top="30px";q.style.left="30px";q.style.right="30px";q.style.bottom="80px";q.style.overflowY="auto";q.appendChild(k.table);h=document.createElement("div");h.style.display="flex";h.style.alignItems="center";h.style.boxSizing="border-box";h.style.paddingRight="160px";h.style.whiteSpace="nowrap";h.style.marginTop="6px";h.style.width="100%";var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("enterPropertyName"));K.setAttribute("type",
-"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";h.appendChild(K);q.appendChild(h);f.appendChild(q);var U=mxUtils.button(mxResources.get("addProperty"),function(){var Q=K.value;if(0<Q.length&&"label"!=Q&&"id"!=Q&&"placeholders"!=Q&&0>Q.indexOf(":"))try{var N=mxUtils.indexOf(w,Q);if(0<=N&&null!=z[N])z[N].focus();else{d.cloneNode(!1).setAttribute(Q,
-"");0<=N&&(w.splice(N,1),z.splice(N,1));w.push(Q);var W=k.addTextarea(Q+":","",2);W.style.width="100%";z.push(W);E(W,Q);W.focus()}U.setAttribute("disabled","disabled");K.value=""}catch(O){mxUtils.alert(O)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(Q){13==Q.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
-U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";h.appendChild(U);q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});q.setAttribute("title","Escape");q.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(Q){var N=g.getDataForCells([b],!0);Q=new EmbedDialog(a,JSON.stringify(N,null,2),null,null,function(){console.log(N);a.alert("Written to Console (Dev Tools)")},
-mxResources.get("export"),null,"Console","data.json");a.showDialog(Q.container,450,240,!0,!0);Q.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var V=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var Q=!1,N=0;N<w.length;N++)null==z[N]?d.removeAttribute(w[N]):(d.setAttribute(w[N],z[N].value),Q=Q||"placeholder"==w[N]&&"1"==d.getAttribute("placeholders"));Q&&d.removeAttribute("label");g.getModel().setValue(b,
-d)}catch(W){mxUtils.alert(W)}});V.setAttribute("title","Ctrl+Enter");V.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&V.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
+"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";h.appendChild(K);q.appendChild(h);f.appendChild(q);var V=mxUtils.button(mxResources.get("addProperty"),function(){var O=K.value;if(0<O.length&&"label"!=O&&"id"!=O&&"placeholders"!=O&&0>O.indexOf(":"))try{var M=mxUtils.indexOf(w,O);if(0<=M&&null!=z[M])z[M].focus();else{d.cloneNode(!1).setAttribute(O,
+"");0<=M&&(w.splice(M,1),z.splice(M,1));w.push(O);var X=k.addTextarea(O+":","",2);X.style.width="100%";z.push(X);E(X,O);X.focus()}V.setAttribute("disabled","disabled");K.value=""}catch(N){mxUtils.alert(N)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(O){13==O.keyCode&&V.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};V.setAttribute("title",mxResources.get("addProperty"));V.setAttribute("disabled","disabled");V.style.textOverflow="ellipsis";
+V.style.position="absolute";V.style.overflow="hidden";V.style.width="144px";V.style.right="0px";V.className="geBtn";h.appendChild(V);q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});q.setAttribute("title","Escape");q.className="geBtn";h=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(O){var M=g.getDataForCells([b],!0);O=new EmbedDialog(a,JSON.stringify(M,null,2),null,null,function(){console.log(M);a.alert("Written to Console (Dev Tools)")},
+mxResources.get("export"),null,"Console","data.json");a.showDialog(O.container,450,240,!0,!0);O.init()}));h.setAttribute("title",mxResources.get("export"));h.className="geBtn";var W=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var O=!1,M=0;M<w.length;M++)null==z[M]?d.removeAttribute(w[M]):(d.setAttribute(w[M],z[M].value),O=O||"placeholder"==w[M]&&"1"==d.getAttribute("placeholders"));O&&d.removeAttribute("label");g.getModel().setValue(b,
+d)}catch(X){mxUtils.alert(X)}});W.setAttribute("title","Ctrl+Enter");W.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(O){13==O.keyCode&&mxEvent.isControlDown(O)&&W.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
G.style.marginRight="10px",I=document.createElement("input"),I.setAttribute("type","checkbox"),I.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(I.setAttribute("checked","checked"),I.defaultChecked=!0),mxEvent.addListener(I,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(I),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
-u.appendChild(G);a.editor.cancelFirst&&u.appendChild(q);u.appendChild(h);u.appendChild(V);a.editor.cancelFirst||u.appendChild(q);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
+u.appendChild(G);a.editor.cancelFirst&&u.appendChild(q);u.appendChild(h);u.appendChild(W);a.editor.cancelFirst||u.appendChild(q);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,b,e,f){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var h=document.createElement("input");h.setAttribute("value",b);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type","text");
h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
mxEvent.addListener(b,"click",function(){h.value="";h.focus()});d.appendChild(h);d.appendChild(b);g.appendChild(d);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?h.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(h,"keypress",function(m){13==m.keyCode&&(a.hideDialog(),f(h.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);e=mxUtils.button(e,function(){a.hideDialog();f(h.value)});e.className="geBtn gePrimaryBtn";d.appendChild(e);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,e,f,g){var d=a.editor.graph,h=document.createElement("div");h.style.position="absolute";h.style.width="100%";h.style.height="100%";h.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),h,b,e,f,g,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
-function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(q,k){for(var u=!1,w=mxEvent.getSource(q);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=q.deltaY&&Math.round(q.deltaY)!=q.deltaY&&(u=1+Math.abs(q.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(q))})},LayersWindow=function(a,b,e,f,g){function d(){var N=K.get(q.getLayerForCells(q.getSelectionCells()));
-null!=N?N.appendChild(Q):null!=Q.parentNode&&Q.parentNode.removeChild(Q)}function h(){function N(X,ja,ka,ta){var M=document.createElement("div");M.className="geToolbarContainer";K.put(ka,M);M.style.overflow="hidden";M.style.position="relative";M.style.padding="4px";M.style.height="30px";M.style.display="flex";M.style.alignItems="center";M.style.borderWidth="0px 0px 1px 0px";M.style.borderStyle="solid";M.style.whiteSpace="nowrap";M.setAttribute("title",ja+" ("+ka.getId()+")");var aa=document.createElement("div");
-aa.style.display="inline-flex";aa.style.alignItems="center";aa.style.width="100%";aa.style.textOverflow="ellipsis";aa.style.overflow="hidden";var ea=document.createElement("span");mxEvent.addListener(M,"dragover",function(Y){Y.dataTransfer.dropEffect="move";z=X;Y.stopPropagation();Y.preventDefault()});mxEvent.addListener(M,"dragstart",function(Y){"true"!=ea.contentEditable&&(w=M,mxClient.IS_FF&&Y.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(M,"dragend",function(Y){null!=w&&null!=
-z&&1<q.model.getChildCount(q.model.root)&&q.addCell(ka,q.model.root,z);z=w=null;Y.stopPropagation();Y.preventDefault()});var da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 4px";da.style.cursor="pointer";da.setAttribute("title",mxResources.get(q.model.isVisible(ka)?"hide":"show"));q.model.isVisible(ka)?(da.setAttribute("src",Editor.visibleImage),
-mxUtils.setOpacity(M,90)):(da.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(M,40));q.isEnabled()||mxUtils.setOpacity(da,50);aa.appendChild(da);mxEvent.addListener(da,"click",function(Y){q.isEnabled()&&q.model.setVisible(ka,!q.model.isVisible(ka));mxEvent.consume(Y)});da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 0";da.setAttribute("title",
-mxResources.get("lockUnlock"));var sa=q.getCurrentCellStyle(ka);"1"==mxUtils.getValue(sa,"locked","0")?(da.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(da,90),M.style.color="red"):(da.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(da,40));q.isEnabled()&&(da.style.cursor="pointer");mxEvent.addListener(da,"click",function(Y){if(q.isEnabled()){var P=null;q.getModel().beginUpdate();try{P="1"==mxUtils.getValue(sa,"locked","0")?null:"1",q.setCellStyles("locked",P,[ka])}finally{q.getModel().endUpdate()}"1"==
-P&&q.removeSelectionCells(q.getModel().getDescendants(ka));mxEvent.consume(Y)}});aa.appendChild(da);mxUtils.write(ea,ja);ea.style.display="block";ea.style.whiteSpace="nowrap";ea.style.overflow="hidden";ea.style.textOverflow="ellipsis";ea.style.position="absolute";ea.style.padding="2px";ea.style.left="52px";ea.style.right="8px";aa.appendChild(ea);M.appendChild(aa);if(q.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ja=document.createElement("div"),
-ja.style.display="block",ja.style.textAlign="right",ja.style.whiteSpace="nowrap",ja.style.position="absolute",ja.style.right="16px",ja.style.top="6px",0<X&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toBack")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9660;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(Y){q.isEnabled()&&
-q.addCell(ka,q.model.root,X-1);mxEvent.consume(Y)})),0<=X&&X<C-1&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toFront")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9650;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(Y){q.isEnabled()&&q.addCell(ka,q.model.root,X+1);mxEvent.consume(Y)})),M.appendChild(ja);mxClient.IS_SVG&&
-(!mxClient.IS_IE||10<=document.documentMode)&&(M.setAttribute("draggable","true"),M.style.cursor="move")}mxEvent.addListener(M,"dblclick",function(Y){var P=mxEvent.getSource(Y).nodeName;"INPUT"!=P&&"IMG"!=P&&"true"!=ea.contentEditable&&(m(ka),mxEvent.consume(Y))});q.getDefaultParent()==ka&&(M.classList.add("geActivePage"),M.style.fontWeight=q.isEnabled()?"bold":"",D=ka);mxEvent.addListener(M,"click",function(Y){q.isEnabled()&&"true"!=ea.contentEditable&&(q.setDefaultParent(ta),q.view.setCurrentRoot(null),
-mxEvent.isShiftDown(Y)&&q.setSelectionCells(ka.children),mxEvent.consume(Y))});u.appendChild(M)}q.isEnabled()?(V.classList.remove("mxDisabled"),T.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),I.classList.remove("mxDisabled")):(V.classList.add("mxDisabled"),T.classList.add("mxDisabled"),U.classList.add("mxDisabled"),I.classList.add("mxDisabled"));C=q.model.getChildCount(q.model.root);u.innerText="";K.clear();for(var W=C-1;0<=W;W--)mxUtils.bind(this,function(X){N(W,q.convertValueToString(X)||
-mxResources.get("background"),X,X)})(q.model.getChildAt(q.model.root,W));var O=q.convertValueToString(D)||mxResources.get("background");V.setAttribute("title",mxResources.get("removeIt",[O]));U.setAttribute("title",mxResources.get("duplicateIt",[O]));q.isSelectionEmpty()&&J.classList.add("mxDisabled");d()}function m(N){if(q.isEnabled()&&null!=N){var W=K.get(N);if(null!=W){var O=W.getElementsByTagName("span");if(null!=O&&0<O.length){var X=O[0],ja=mxUtils.getTextContent(X);X.style.textOverflow="";X.style.cursor=
-"text";X.contentEditable="true";X.focus();document.execCommand("selectAll",!1,null);W.removeAttribute("draggable");W.style.cursor="";var ka=function(ta){if("true"==X.contentEditable){X.contentEditable="false";var M=mxUtils.getTextContent(X);ta&&M!=ja?(M=mxUtils.getTextContent(X),0<M.length?q.cellLabelChanged(N,M):q.cellLabelChanged(N,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(X,"keydown",function(ta){if(13==ta.keyCode||27==ta.keyCode)ka(13==ta.keyCode),mxEvent.consume(ta)});mxEvent.addListener(X,
-"blur",function(ta){ka(!0);mxEvent.consume(ta)})}}}}var q=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(N){N.dataTransfer.dropEffect="move";z=0;N.stopPropagation();
-N.preventDefault()});mxEvent.addListener(k,"drop",function(N){N.stopPropagation();N.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(I,"click",function(N){if(q.isEnabled()){q.model.beginUpdate();try{var W=q.addCell(new mxCell(mxResources.get("untitledLayer")),
-q.model.root);q.setDefaultParent(W)}finally{q.model.endUpdate()}m(W)}mxEvent.consume(N)});q.isEnabled()||I.classList.add("mxDisabled");E.appendChild(I);var J=G.cloneNode();J.style.backgroundImage="url("+Editor.layersImage+")";J.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(J,"click",function(N){if(q.isEnabled()&&!q.isSelectionEmpty()){var W=mxUtils.getOffset(J);a.showPopupMenu(mxUtils.bind(this,function(O,X){for(var ja=q.getLayerForCells(q.getSelectionCells()),
-ka=C-1;0<=ka;ka--)mxUtils.bind(this,function(ta){var M="1"==mxUtils.getValue(q.getCurrentCellStyle(ta),"locked","0"),aa=O.addItem(q.convertValueToString(ta)||mxResources.get("background"),null,mxUtils.bind(this,function(){M||q.moveCells(q.getSelectionCells(),0,0,!1,ta)}),X,null,null,!M);M?O.addCheckmark(aa,Editor.lockedImage):ta==ja&&O.addCheckmark(aa,Editor.checkmarkImage)})(q.model.getChildAt(q.model.root,ka))}),W.x,W.y+J.offsetHeight,N)}});E.appendChild(J);var T=G.cloneNode(!1);T.style.backgroundImage=
-"url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(N){q.isEnabled()&&a.showDataDialog(D);mxEvent.consume(N)});q.isEnabled()||T.classList.add("mxDisabled");E.appendChild(T);var K=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(N){if(q.isEnabled()){N=null;q.model.beginUpdate();try{N=q.cloneCell(D),
-q.cellLabelChanged(N,mxResources.get("untitledLayer")),N.setVisible(!0),N=q.addCell(N,q.model.root),q.setDefaultParent(N)}finally{q.model.endUpdate()}null==N||q.isCellLocked(N)||q.selectAll(N)}});q.isEnabled()||U.classList.add("mxDisabled");E.appendChild(U);var V=G.cloneNode(!1);V.style.backgroundImage="url("+Editor.trashImage+")";V.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(V,"click",function(N){if(q.isEnabled()){q.model.beginUpdate();try{var W=q.model.root.getIndex(D);
-q.removeCells([D],!1);0==q.model.getChildCount(q.model.root)?(q.model.add(q.model.root,new mxCell),q.setDefaultParent(null)):0<W&&W<=q.model.getChildCount(q.model.root)?q.setDefaultParent(q.model.getChildAt(q.model.root,W-1)):q.setDefaultParent(null)}finally{q.model.endUpdate()}}mxEvent.consume(N)});q.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);k.appendChild(E);var Q=document.createElement("span");Q.setAttribute("title",mxResources.get("selectionOnly"));Q.innerHTML="&#8226;";Q.style.position=
-"absolute";Q.style.fontWeight="bold";Q.style.fontSize="16pt";Q.style.right="6px";h();q.model.addListener(mxEvent.CHANGE,h);q.addListener("defaultParentChanged",h);a.addListener("lockedChanged",h);q.selectionModel.addListener(mxEvent.CHANGE,function(){q.isSelectionEmpty()?J.classList.add("mxDisabled"):J.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(h);mxEvent.addMouseWheelListener(function(q,k){for(var u=!1,w=mxEvent.getSource(q);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=q.deltaY&&Math.round(q.deltaY)!=q.deltaY&&(u=1+Math.abs(q.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(q))})},LayersWindow=function(a,b,e,f,g){function d(){var M=K.get(q.getLayerForCells(q.getSelectionCells()));
+null!=M?M.appendChild(O):null!=O.parentNode&&O.parentNode.removeChild(O)}function h(){function M(Y,ja,la,S){var U=document.createElement("div");U.className="geToolbarContainer";K.put(la,U);U.style.overflow="hidden";U.style.position="relative";U.style.padding="4px";U.style.height="30px";U.style.display="flex";U.style.alignItems="center";U.style.borderWidth="0px 0px 1px 0px";U.style.borderStyle="solid";U.style.whiteSpace="nowrap";U.setAttribute("title",ja+" ("+la.getId()+")");var aa=document.createElement("div");
+aa.style.display="inline-flex";aa.style.alignItems="center";aa.style.width="100%";aa.style.textOverflow="ellipsis";aa.style.overflow="hidden";var fa=document.createElement("span");mxEvent.addListener(U,"dragover",function(ba){ba.dataTransfer.dropEffect="move";z=Y;ba.stopPropagation();ba.preventDefault()});mxEvent.addListener(U,"dragstart",function(ba){"true"!=fa.contentEditable&&(w=U,mxClient.IS_FF&&ba.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(U,"dragend",function(ba){null!=w&&
+null!=z&&1<q.model.getChildCount(q.model.root)&&q.addCell(la,q.model.root,z);z=w=null;ba.stopPropagation();ba.preventDefault()});var ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.className="geAdaptiveAsset";ka.style.width="16px";ka.style.padding="0px 6px 0 4px";ka.style.cursor="pointer";ka.setAttribute("title",mxResources.get(q.model.isVisible(la)?"hide":"show"));q.model.isVisible(la)?(ka.setAttribute("src",Editor.visibleImage),
+mxUtils.setOpacity(U,90)):(ka.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(U,40));q.isEnabled()||mxUtils.setOpacity(ka,50);aa.appendChild(ka);mxEvent.addListener(ka,"click",function(ba){q.isEnabled()&&q.model.setVisible(la,!q.model.isVisible(la));mxEvent.consume(ba)});ka=document.createElement("img");ka.setAttribute("draggable","false");ka.setAttribute("align","top");ka.setAttribute("border","0");ka.className="geAdaptiveAsset";ka.style.width="16px";ka.style.padding="0px 6px 0 0";ka.setAttribute("title",
+mxResources.get("lockUnlock"));var ta=q.getCurrentCellStyle(la);"1"==mxUtils.getValue(ta,"locked","0")?(ka.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ka,90),U.style.color="red"):(ka.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ka,40));q.isEnabled()&&(ka.style.cursor="pointer");mxEvent.addListener(ka,"click",function(ba){if(q.isEnabled()){var R=null;q.getModel().beginUpdate();try{R="1"==mxUtils.getValue(ta,"locked","0")?null:"1",q.setCellStyles("locked",R,[la])}finally{q.getModel().endUpdate()}"1"==
+R&&q.removeSelectionCells(q.getModel().getDescendants(la));mxEvent.consume(ba)}});aa.appendChild(ka);mxUtils.write(fa,ja);fa.style.display="block";fa.style.whiteSpace="nowrap";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.position="absolute";fa.style.padding="2px";fa.style.left="52px";fa.style.right="8px";aa.appendChild(fa);U.appendChild(aa);if(q.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ja=document.createElement("div"),
+ja.style.display="block",ja.style.textAlign="right",ja.style.whiteSpace="nowrap",ja.style.position="absolute",ja.style.right="16px",ja.style.top="6px",0<Y&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toBack")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9660;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(ba){q.isEnabled()&&
+q.addCell(la,q.model.root,Y-1);mxEvent.consume(ba)})),0<=Y&&Y<C-1&&(aa=document.createElement("a"),aa.setAttribute("title",mxResources.get("toFront")),aa.className="geButton",aa.style.cssFloat="none",aa.innerHTML="&#9650;",aa.style.width="14px",aa.style.height="14px",aa.style.fontSize="14px",aa.style.margin="0px",aa.style.marginTop="-1px",ja.appendChild(aa),mxEvent.addListener(aa,"click",function(ba){q.isEnabled()&&q.addCell(la,q.model.root,Y+1);mxEvent.consume(ba)})),U.appendChild(ja);mxClient.IS_SVG&&
+(!mxClient.IS_IE||10<=document.documentMode)&&(U.setAttribute("draggable","true"),U.style.cursor="move")}mxEvent.addListener(U,"dblclick",function(ba){var R=mxEvent.getSource(ba).nodeName;"INPUT"!=R&&"IMG"!=R&&"true"!=fa.contentEditable&&(m(la),mxEvent.consume(ba))});q.getDefaultParent()==la&&(U.classList.add("geActivePage"),U.style.fontWeight=q.isEnabled()?"bold":"",D=la);mxEvent.addListener(U,"click",function(ba){q.isEnabled()&&"true"!=fa.contentEditable&&(q.setDefaultParent(S),q.view.setCurrentRoot(null),
+mxEvent.isShiftDown(ba)&&q.setSelectionCells(la.children),mxEvent.consume(ba))});u.appendChild(U)}q.isEnabled()?(W.classList.remove("mxDisabled"),T.classList.remove("mxDisabled"),V.classList.remove("mxDisabled"),I.classList.remove("mxDisabled")):(W.classList.add("mxDisabled"),T.classList.add("mxDisabled"),V.classList.add("mxDisabled"),I.classList.add("mxDisabled"));C=q.model.getChildCount(q.model.root);u.innerText="";K.clear();for(var X=C-1;0<=X;X--)mxUtils.bind(this,function(Y){M(X,q.convertValueToString(Y)||
+mxResources.get("background"),Y,Y)})(q.model.getChildAt(q.model.root,X));var N=q.convertValueToString(D)||mxResources.get("background");W.setAttribute("title",mxResources.get("removeIt",[N]));V.setAttribute("title",mxResources.get("duplicateIt",[N]));q.isSelectionEmpty()&&J.classList.add("mxDisabled");d()}function m(M){if(q.isEnabled()&&null!=M){var X=K.get(M);if(null!=X){var N=X.getElementsByTagName("span");if(null!=N&&0<N.length){var Y=N[0],ja=mxUtils.getTextContent(Y);Y.style.textOverflow="";Y.style.cursor=
+"text";Y.contentEditable="true";Y.focus();document.execCommand("selectAll",!1,null);X.removeAttribute("draggable");X.style.cursor="";var la=function(S){if("true"==Y.contentEditable){Y.contentEditable="false";var U=mxUtils.getTextContent(Y);S&&U!=ja?(U=mxUtils.getTextContent(Y),0<U.length?q.cellLabelChanged(M,U):q.cellLabelChanged(M,mxResources.get("untitledLayer"))):h()}};mxEvent.addListener(Y,"keydown",function(S){if(13==S.keyCode||27==S.keyCode)la(13==S.keyCode),mxEvent.consume(S)});mxEvent.addListener(Y,
+"blur",function(S){la(!0);mxEvent.consume(S)})}}}}var q=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom="32px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(M){M.dataTransfer.dropEffect="move";z=0;M.stopPropagation();
+M.preventDefault()});mxEvent.addListener(k,"drop",function(M){M.stopPropagation();M.preventDefault()});var C=null,D=null,E=document.createElement("div");E.className="geToolbarContainer geDialogToolbar";var G=document.createElement("a");G.className="geButton";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(I,"click",function(M){if(q.isEnabled()){q.model.beginUpdate();try{var X=q.addCell(new mxCell(mxResources.get("untitledLayer")),
+q.model.root);q.setDefaultParent(X)}finally{q.model.endUpdate()}m(X)}mxEvent.consume(M)});q.isEnabled()||I.classList.add("mxDisabled");E.appendChild(I);var J=G.cloneNode();J.style.backgroundImage="url("+Editor.layersImage+")";J.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(J,"click",function(M){if(q.isEnabled()&&!q.isSelectionEmpty()){var X=mxUtils.getOffset(J);a.showPopupMenu(mxUtils.bind(this,function(N,Y){for(var ja=q.getLayerForCells(q.getSelectionCells()),
+la=C-1;0<=la;la--)mxUtils.bind(this,function(S){var U="1"==mxUtils.getValue(q.getCurrentCellStyle(S),"locked","0"),aa=N.addItem(q.convertValueToString(S)||mxResources.get("background"),null,mxUtils.bind(this,function(){U||q.moveCells(q.getSelectionCells(),0,0,!1,S)}),Y,null,null,!U);U?N.addCheckmark(aa,Editor.lockedImage):S==ja&&N.addCheckmark(aa,Editor.checkmarkImage)})(q.model.getChildAt(q.model.root,la))}),X.x,X.y+J.offsetHeight,M)}});E.appendChild(J);var T=G.cloneNode(!1);T.style.backgroundImage=
+"url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(M){q.isEnabled()&&a.showDataDialog(D);mxEvent.consume(M)});q.isEnabled()||T.classList.add("mxDisabled");E.appendChild(T);var K=new mxDictionary,V=G.cloneNode(!1);V.style.backgroundImage="url("+Editor.duplicateImage+")";V.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(V,"click",function(M){if(q.isEnabled()){M=null;q.model.beginUpdate();try{M=q.cloneCell(D),
+q.cellLabelChanged(M,mxResources.get("untitledLayer")),M.setVisible(!0),M=q.addCell(M,q.model.root),q.setDefaultParent(M)}finally{q.model.endUpdate()}null==M||q.isCellLocked(M)||q.selectAll(M)}});q.isEnabled()||V.classList.add("mxDisabled");E.appendChild(V);var W=G.cloneNode(!1);W.style.backgroundImage="url("+Editor.trashImage+")";W.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(W,"click",function(M){if(q.isEnabled()){q.model.beginUpdate();try{var X=q.model.root.getIndex(D);
+q.removeCells([D],!1);0==q.model.getChildCount(q.model.root)?(q.model.add(q.model.root,new mxCell),q.setDefaultParent(null)):0<X&&X<=q.model.getChildCount(q.model.root)?q.setDefaultParent(q.model.getChildAt(q.model.root,X-1)):q.setDefaultParent(null)}finally{q.model.endUpdate()}}mxEvent.consume(M)});q.isEnabled()||W.classList.add("mxDisabled");E.appendChild(W);k.appendChild(E);var O=document.createElement("span");O.setAttribute("title",mxResources.get("selectionOnly"));O.innerHTML="&#8226;";O.style.position=
+"absolute";O.style.fontWeight="bold";O.style.fontSize="16pt";O.style.right="6px";h();q.model.addListener(mxEvent.CHANGE,h);q.addListener("defaultParentChanged",h);a.addListener("lockedChanged",h);q.selectionModel.addListener(mxEvent.CHANGE,function(){q.isSelectionEmpty()?J.classList.add("mxDisabled"):J.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=h;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
@@ -12159,7 +12157,7 @@ $jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_S
$jscomp.getGlobal=function(b){b=["object"==typeof globalThis&&globalThis,b,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var f=0;f<b.length;++f){var m=b[f];if(m&&m.Math==Math)return m}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(b,f){var m=$jscomp.propertyToPolyfillSymbol[f];if(null==m)return b[f];m=b[m];return void 0!==m?m:b[f]};$jscomp.polyfill=function(b,f,m,d){f&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(b,f,m,d):$jscomp.polyfillUnisolated(b,f,m,d))};
$jscomp.polyfillUnisolated=function(b,f,m,d){m=$jscomp.global;b=b.split(".");for(d=0;d<b.length-1;d++){var q=b[d];if(!(q in m))return;m=m[q]}b=b[b.length-1];d=m[b];f=f(d);f!=d&&null!=f&&$jscomp.defineProperty(m,b,{configurable:!0,writable:!0,value:f})};
-$jscomp.polyfillIsolated=function(b,f,m,d){var q=b.split(".");b=1===q.length;d=q[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var x=0;x<q.length-1;x++){var C=q[x];if(!(C in d))return;d=d[C]}q=q[q.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?d[q]:null;f=f(m);null!=f&&(b?$jscomp.defineProperty($jscomp.polyfills,q,{configurable:!0,writable:!0,value:f}):f!==m&&(void 0===$jscomp.propertyToPolyfillSymbol[q]&&(m=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[q]=$jscomp.IS_SYMBOL_NATIVE?
+$jscomp.polyfillIsolated=function(b,f,m,d){var q=b.split(".");b=1===q.length;d=q[0];d=!b&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var x=0;x<q.length-1;x++){var B=q[x];if(!(B in d))return;d=d[B]}q=q[q.length-1];m=$jscomp.IS_SYMBOL_NATIVE&&"es6"===m?d[q]:null;f=f(m);null!=f&&(b?$jscomp.defineProperty($jscomp.polyfills,q,{configurable:!0,writable:!0,value:f}):f!==m&&(void 0===$jscomp.propertyToPolyfillSymbol[q]&&(m=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[q]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(q):$jscomp.POLYFILL_PREFIX+m+"$"+q),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[q],{configurable:!0,writable:!0,value:f})))};$jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},f={};try{return f.__proto__=b,f.a}catch(m){}return!1};
$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,f){b.__proto__=f;if(b.__proto__!==f)throw new TypeError(b+" is not extensible");return b}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(b){if(!(b instanceof Object))throw new TypeError("Iterator result "+b+" is not an object");};
$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};
@@ -12175,37 +12173,37 @@ $jscomp.generator.Engine_.prototype.throw_=function(b){this.context_.start_();if
$jscomp.generator.Engine_.prototype.yieldAllStep_=function(b,f,m){try{var d=b.call(this.context_.yieldAllIterator_,f);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var q=d.value}catch(x){return this.context_.yieldAllIterator_=null,this.context_.throw_(x),this.nextStep_()}this.context_.yieldAllIterator_=null;m.call(this.context_,q);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var b=this.program_(this.context_);if(b)return this.context_.stop_(),{value:b.value,done:!1}}catch(f){this.context_.yieldResult=void 0,this.context_.throw_(f)}this.context_.stop_();if(this.context_.abruptCompletion_){b=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(b.isException)throw b.exception;return{value:b.return,done:!0}}return{value:void 0,done:!0}};
$jscomp.generator.Generator_=function(b){this.next=function(f){return b.next_(f)};this.throw=function(f){return b.throw_(f)};this.return=function(f){return b.return_(f)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(b,f){f=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(f));$jscomp.setPrototypeOf&&b.prototype&&$jscomp.setPrototypeOf(f,b.prototype);return f};
-$jscomp.asyncExecutePromiseGenerator=function(b){function f(d){return b.next(d)}function m(d){return b.throw(d)}return new Promise(function(d,q){function x(C){C.done?d(C.value):Promise.resolve(C.value).then(f,m).then(x,q)}x(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
+$jscomp.asyncExecutePromiseGenerator=function(b){function f(d){return b.next(d)}function m(d){return b.throw(d)}return new Promise(function(d,q){function x(B){B.done?d(B.value):Promise.resolve(B.value).then(f,m).then(x,q)}x(b.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(b){return $jscomp.asyncExecutePromiseGenerator(b())};$jscomp.asyncExecutePromiseGeneratorProgram=function(b){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(b)))};
DrawioFile=function(b,f){mxEventSource.call(this);this.ui=b;this.setData(f||"");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;DrawioFile.RESTRICT_EXPORT=!1;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.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,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var m=!0,d=window.setTimeout(mxUtils.bind(this,function(){m=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),q=mxUtils.bind(this,function(C){m&&(window.clearTimeout(d),null!=f&&f(C))}),x=mxUtils.bind(this,function(){return!m});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
-function(C){m&&(window.clearTimeout(d),this.sync.cleanup(b,f,C))}),q,x):this.updateFile(mxUtils.bind(this,function(){m&&(window.clearTimeout(d),null!=b&&b())}),q,x)}};
+DrawioFile.prototype.synchronizeFile=function(b,f){if(this.savingFile)null!=f&&f({message:mxResources.get("busy")});else{var m=!0,d=window.setTimeout(mxUtils.bind(this,function(){m=!1;null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.synchronizeFile(b,f)})})}),this.ui.timeout),q=mxUtils.bind(this,function(B){m&&(window.clearTimeout(d),null!=f&&f(B))}),x=mxUtils.bind(this,function(){return!m});null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,
+function(B){m&&(window.clearTimeout(d),this.sync.cleanup(b,f,B))}),q,x):this.updateFile(mxUtils.bind(this,function(){m&&(window.clearTimeout(d),null!=b&&b())}),q,x)}};
DrawioFile.prototype.updateFile=function(b,f,m,d,q){null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",q,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(x){try{null!=m&&m()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[x]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=x?this.mergeFile(x,b,f,
-d,q):this.reloadFile(b,f))}catch(C){null!=f&&f(C)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,m,d,q){try{var x=b.getShadowPages();if(null!=x&&0<x.length){var C=this.getShadowPages(),y=[this.ui.diffPages(null!=d?d:C,x)],I=this.ignorePatches(y);if(I)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",I),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var M=this.isModified()?this.ui.diffPages(C,
-this.isRealtime()?this.ownPages:this.ui.pages):null,H=this.ui.patchPages(this.ui.clonePages(C),y[0]),c=this.ui.getHashValueForPages(H,{}),e=this.ui.getHashValueForPages(x,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",C,"pages",x,"patched",H,"patches",y,"changes",M,"checksum",c,"current",e,"valid",c==e,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=c&&c!=e)this.checksumError(m,y,null,null,"mergeFile",
-c,e,b.getCurrentRevisionId());else{this.setShadowPages(x);if(null!=this.sync){var g=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?M:null,null,q);null==g||mxUtils.isEmptyObject(g)||y.push(g)}this.patch(y,DrawioFile.LAST_WRITE_WINS?M:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(u){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=m&&m(u);try{var l=this.getCurrentUser(),p=null!=l?
+d,q):this.reloadFile(b,f))}catch(B){null!=f&&f(B)}}),f))};
+DrawioFile.prototype.mergeFile=function(b,f,m,d,q){try{var x=b.getShadowPages();if(null!=x&&0<x.length){var B=this.getShadowPages(),y=[this.ui.diffPages(null!=d?d:B,x)],I=this.ignorePatches(y);if(I)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",I),null!=f&&f();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var L=this.isModified()?this.ui.diffPages(B,
+this.isRealtime()?this.ownPages:this.ui.pages):null,H=this.ui.patchPages(this.ui.clonePages(B),y[0]),c=this.ui.getHashValueForPages(H,{}),e=this.ui.getHashValueForPages(x,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",x,"patched",H,"patches",y,"changes",L,"checksum",c,"current",e,"valid",c==e,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=c&&c!=e)this.checksumError(m,y,null,null,"mergeFile",
+c,e,b.getCurrentRevisionId());else{this.setShadowPages(x);if(null!=this.sync){var g=this.sync.patchRealtime(y,DrawioFile.LAST_WRITE_WINS?L:null,null,q);null==g||mxUtils.isEmptyObject(g)||y.push(g)}this.patch(y,DrawioFile.LAST_WRITE_WINS?L:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=f&&f()}}catch(u){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=m&&m(u);try{var l=this.getCurrentUser(),p=null!=l?
l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),p,u)}catch(z){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(u){null!=m&&m(u)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),m=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var q=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(q=this.ui.anonymizeNode(q,!0));q.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,q,!0);m.appendChild(q)}return mxUtils.getPrettyXml(m)};
DrawioFile.prototype.compressReportData=function(b,f,m){f=null!=f?f:1E4;null!=m&&null!=b&&b.length>m?b=b.substring(0,m)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,f,m,d,q,x,C,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var I=this.getCurrentUser(),M=null!=I?I.id:"unknown",H=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,e=null;if(null!=f&&1E3>c){b=[];for(m=0;m<f.length;m++)b.push(this.ui.anonymizePatch(f[m]));e=JSON.stringify(b);e=null!=e&&1E3>
+DrawioFile.prototype.checksumError=function(b,f,m,d,q,x,B,y){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var I=this.getCurrentUser(),L=null!=I?I.id:"unknown",H=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(f).length,e=null;if(null!=f&&1E3>c){b=[];for(m=0;m<f.length;m++)b.push(this.ui.anonymizePatch(f[m]));e=JSON.stringify(b);e=null!=e&&1E3>
e.length?Graph.compress(e):null}this.getLatestVersion(mxUtils.bind(this,function(g){try{var l=null!=e?"report":"error",p=this.ui.getHashValueForPages(g.getShadowPages()),u="unknown",z="unknown",E="unknown";try{var D=null!=g.initialData&&0<g.initialData.length?mxUtils.parseXml(g.initialData).documentElement:null;null!=D&&(null!=D.getAttribute("version")&&(u=D.getAttribute("version")),null!=D.getAttribute("agent")&&(z=D.getAttribute("agent")),null!=D.getAttribute("type")&&(E=D.getAttribute("type")))}catch(A){}EditorUi.logError("Checksum "+
-l+" in "+q,null,this.getMode()+"."+H,"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=e?"-json_"+e:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=C?"-current_"+C:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+u)+("-latestAgent_"+z)+("-latestType_"+E));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+H,action:q,label:"user_"+
-M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(A){}}),function(){})}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,m,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),C=this.getCurrentUser(),y=null!=C?this.ui.hashValue(C.id):"unknown",I=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",M=this.getTitle(),H=M.lastIndexOf(".");C="xml";0<H&&(C=M.substring(H));var c=null!=m?m.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()+" ("+C+")\nUser="+y+I+"\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!=f?"\n\n"+f:
+l+" in "+q,null,this.getMode()+"."+H,"user_"+L+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+(null!=e?"-json_"+e:"")+"-size_"+this.getSize()+(null!=x?"-expected_"+x:"")+(null!=B?"-current_"+B:"")+(null!=y?"-rev_"+this.ui.hashValue(y):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+u)+("-latestAgent_"+z)+("-latestType_"+E));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+H,action:q,label:"user_"+
+L+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(A){}}),function(){})}catch(g){}};
+DrawioFile.prototype.sendErrorReport=function(b,f,m,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),x=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),y=null!=B?this.ui.hashValue(B.id):"unknown",I=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",L=this.getTitle(),H=L.lastIndexOf(".");B="xml";0<H&&(B=L.substring(H));var c=null!=m?m.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+B+")\nUser="+y+I+"\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!=f?"\n\n"+f:
"")+(null!=m?"\n\nError: "+m.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+q+"\n\nData:\n"+x,d)}catch(e){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var m=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,q=d.getSelectionCells(),x=d.getViewState(),C=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(y){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[m],"viewState",[x],"latestFile",y);null!=y?(this.ui.replaceFileData(y.getData(),
-[m]),this.ui.restoreViewState(C,x,q),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var I=this.ui.getCurrentFile();null!=I&&(I.stats=this.stats,I.patch([m]),I.fileChanged());this.ui.restoreViewState(C,x,q);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};
+DrawioFile.prototype.reloadFile=function(b,f){try{this.stats.fileReloaded++;var m=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,q=d.getSelectionCells(),x=d.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(y){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[m],"viewState",[x],"latestFile",y);null!=y?(this.ui.replaceFileData(y.getData(),
+[m]),this.ui.restoreViewState(B,x,q),this.setDescriptor(y.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var I=this.ui.getCurrentFile();null!=I&&(I.stats=this.stats,I.patch([m]),I.fileChanged());this.ui.restoreViewState(B,x,q);null!=b&&b()}else null!=f&&f(this.ui.fileLoadedError)}),!0))}),f)}catch(y){null!=f&&f(y)}};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var m=0;m<b.length&&f;m++)f=f&&mxUtils.isEmptyObject(b[m]);return f};
-DrawioFile.prototype.patch=function(b,f,m,d){if(null!=b){var q=this.ui.editor.undoManager,x=q.history.slice(),C=q.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var I=this.changeListenerEnabled;this.changeListenerEnabled=m;var M=y.foldingEnabled,H=y.mathEnabled,c=y.cellRenderer.redraw;y.cellRenderer.redraw=function(z){z.view.graph.isEditing(z.cell)&&(z.view.graph.scrollCellToVisible(z.cell),z.view.graph.cellEditor.resize());c.apply(this,arguments)};y.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,f,m,d){if(null!=b){var q=this.ui.editor.undoManager,x=q.history.slice(),B=q.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var I=this.changeListenerEnabled;this.changeListenerEnabled=m;var L=y.foldingEnabled,H=y.mathEnabled,c=y.cellRenderer.redraw;y.cellRenderer.redraw=function(z){z.view.graph.isEditing(z.cell)&&(z.view.graph.scrollCellToVisible(z.cell),z.view.graph.cellEditor.resize());c.apply(this,arguments)};y.model.beginUpdate();
try{if(m){for(var e=this.ui.pages.slice(),g=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),p=0;p<l.length;p++){var u=mxUtils.indexOf(this.ui.pages,l[p]);0>u?this.ui.insertPage(l[p],Math.min(p,this.ui.pages.length)):this.ui.movePage(u,p)}for(p=0;p<e.length;p++)0>mxUtils.indexOf(l,e[p])&&this.ui.removePage(e[p]);0<=mxUtils.indexOf(this.ui.pages,g)&&this.ui.selectPage(g,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,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);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=c;this.changeListenerEnabled=I;m||(q.history=x,q.indexOfNextAdd=C,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(M!=y.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);y.checkDefaultParent()}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=c;this.changeListenerEnabled=I;m||(q.history=x,q.indexOfNextAdd=B,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=y.mathEnabled?(this.ui.editor.updateGraphComponents(),y.refresh()):(L!=y.foldingEnabled?
y.view.revalidate():y.view.validate(),y.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",m)}return b};
DrawioFile.prototype.save=function(b,f,m,d,q,x){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",q,"manual",x,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!q&&this.invalidChecksum)if(null!=m)m({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=m)m({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(C){if(null!=m)m(C);else throw C;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=m)m(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return Editor.defaultCompressed};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};
DrawioFile.prototype.setLocked=function(b){this.ui.fileNode.setAttribute("locked",b?"true":"false");this.ui.fireEvent(new mxEventObject("lockedChanged"));this.fileChanged();b&&this.ui.editor.graph.clearSelection()};DrawioFile.prototype.isLocked=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("locked"):null;return null!=b?"true"==b:!1};DrawioFile.prototype.saveAs=function(b,f,m){};DrawioFile.prototype.saveFile=function(b,f,m,d){};DrawioFile.prototype.getFileUrl=function(){return null};
DrawioFile.prototype.getFolderUrl=function(b){return null};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return DrawioFile.RESTRICT_EXPORT};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};
@@ -12244,7 +12242,7 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
this.ui.updateStatus(mxUtils.bind(this,function(){this.addAllSavedStatus()})),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.clearStatus())};
DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||this.ui.updateStatus(mxUtils.bind(this,function(){var m=this.getErrorMessage(b);null!=m&&60<m.length&&(m=m.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+
(null!=m?" ("+mxUtils.htmlEntities(m)+")":"")+"</div>")}))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var m=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(C){this.handleFileError(C,!0)}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,m,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+DrawioFile.prototype.handleConflictError=function(b,f){var m=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(B){this.handleFileError(B,!0)}),q=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.clearStatus(),this.save(!0,m,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),x=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,m,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(m,d,q):this.invalidChecksum&&f?this.showRefreshDialog(m,d,this.getErrorMessage(b)):f?this.showConflictDialog(q,x):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(m,d)}))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT?f=mxResources.get("timeout"):"0"==f&&(f=mxResources.get("noResponse"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?this.ownPages:this.ui.pages;if(null!=f)for(var m=0;m<f.length;m++){var d=f[m].node;if(null!=d&&(null==this.ui.currentPage||this.ui.currentPage.getId()!=f[m].getId())){var q=d.getElementsByTagName("mxGraphModel");q=0<q.length?q[0]:null;var x=Graph.decompress(mxUtils.getNodeValue(d));b?0==x.length&&null!=q&&(EditorUi.removeChildNodes(d),mxUtils.setTextContent(d,Graph.compressNode(q)),EditorUi.debug("DrawioFile.compressionChanged",
@@ -12252,459 +12250,459 @@ DrawioFile.prototype.compressionChanged=function(b){var f=null!=this.ownPages?th
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosaveDelay",this.autosaveDelay,"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.ui.updateStatus(mxUtils.bind(this,function(){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(f){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(f){this.handleFileError(f)}))):(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 f=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(f,mxUtils.bind(this,function(m){EditorUi.debug("DrawioFile.createSecret",[this],"secret",f,"token",m);b(f,m)}),mxUtils.bind(this,function(){b(f)})):b(f)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,f,m,d,q,x,C){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;x=null!=x?x:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=m&&m()):this.sync.fileSaved(x,f,m,d,q,C)}catch(M){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=d&&d(M);try{var y=this.getCurrentUser(),I=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),I,M)}catch(H){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(M){this.descriptorChanged(),null!=d&&d(M)}};
-DrawioFile.prototype.autosave=function(b,f,m,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var q=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var x=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==x&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",x,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var C=this.isAutosaveRevision();
-C&&(this.lastAutosaveRevision=(new Date).getTime());this.save(C,mxUtils.bind(this,function(y){this.autosaveCompleted();null!=m&&m(y)}),mxUtils.bind(this,function(y){null!=d&&d(y)}))}else this.isModified()||this.ui.clearStatus(),null!=m&&m(null)}catch(y){null!=d&&d(y)}}),q);this.autosaveThread=x;EditorUi.debug("DrawioFile.autosave",[this],"thread",x,"delay",b,"maxDelay",f,"actualDelay",q,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
+DrawioFile.prototype.fileSaved=function(b,f,m,d,q,x,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;x=null!=x?x:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(x),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=m&&m()):this.sync.fileSaved(x,f,m,d,q,B)}catch(L){this.invalidChecksum=
+this.inConflictState=!0;this.descriptorChanged();null!=d&&d(L);try{var y=this.getCurrentUser(),I=null!=y?y.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),I,L)}catch(H){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[f],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(L){this.descriptorChanged(),null!=d&&d(L)}};
+DrawioFile.prototype.autosave=function(b,f,m,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());var q=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var x=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==x&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",x,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();
+B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(y){this.autosaveCompleted();null!=m&&m(y)}),mxUtils.bind(this,function(y){null!=d&&d(y)}))}else this.isModified()||this.ui.clearStatus(),null!=m&&m(null)}catch(y){null!=d&&d(y)}}),q);this.autosaveThread=x;EditorUi.debug("DrawioFile.autosave",[this],"thread",x,"delay",b,"maxDelay",f,"actualDelay",q,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.close=function(b){try{this.isAutosave()&&this.isModified()&&(this.updateFileData(),this.save(this.isAutosaveRevision(),null,null,b))}catch(f){}this.stats.closed++;this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var m=b.lastIndexOf(".");b=0<m?b.substring(m):"";m=f.lastIndexOf(".");return b===(0<m?f.substring(m):"")}return b==f};
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,f){b([])};DrawioFile.prototype.addComment=function(b,f,m){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,m,d,q,x,C){DrawioFile.call(this,b,f);this.title=m;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=x;this.editable=C};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};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,m){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,m,d,q,x,B){DrawioFile.call(this,b,f);this.title=m;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=x;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,f,m,d,q){this.saveAs(this.title,f,m,d,q)};LocalFile.prototype.saveAs=function(b,f,m,d,q){this.saveFile(b,!1,f,m,null,d,q)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?null!=f&&f({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,m,d,q,x,C){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var y=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var I=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()}),H=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var e=mxUtils.bind(this,function(l){this.savingFile=!1;null!=d&&d({error:l})});this.saveDraft(I);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);C||this.desc.lastModified==p.lastModified?l.write(y?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var z=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(I,z,M,e);this.removeDraft()}catch(E){e(E)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;e(p)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,y?"image/png":"text/xml",y);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));M()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){H(c)}),d,this.ui.getCurrentFile()!=this?I:null,f.scale,f.border)):H(I)};
+LocalFile.prototype.saveFile=function(b,f,m,d,q,x,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var y=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var I=this.getData(),L=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()}),H=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var e=mxUtils.bind(this,function(l){this.savingFile=!1;null!=d&&d({error:l})});this.saveDraft(I);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);B||this.desc.lastModified==p.lastModified?l.write(y?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(u){try{var z=this.desc;this.savingFile=!1;this.desc=u;this.fileSaved(I,z,L,e);this.removeDraft()}catch(E){e(E)}}),e)}),e)}),e):(this.inConflictState=!0,e())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;e(p)}))}),e)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,y?"image/png":"text/xml",y);else if(c.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(y?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));L()}});y?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){H(c)}),d,this.ui.getCurrentFile()!=this?I:null,f.scale,f.border)):H(I)};
LocalFile.prototype.rename=function(b,f,m){this.title=b;this.descriptorChanged();null!=f&&f()};LocalLibrary=function(b,f,m){LocalFile.call(this,b,f,m)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,m){DrawioFile.call(this,b,f);this.title=m;this.etag=this.getEtag(f)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,f){this.getLatestVersionId(b,f)};StorageFile.prototype.getLatestVersionId=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(m){b(this.getEtag(m))}),f)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,f,m){this.saveAs(this.getTitle(),f,m)};
StorageFile.prototype.saveAs=function(b,f,m){DrawioFile.prototype.save.apply(this,[!1,mxUtils.bind(this,function(){this.saveFile(this.getTitle(),!1,f,m)}),m])};StorageFile.insertFile=function(b,f,m,d,q,x){StorageFile.doInsertFile(null!=x?x:new StorageFile(b,m,f),d,q)};
-StorageFile.doInsertFile=function(b,f,m){var d=b.getTitle(),q=b.getUi(),x=mxUtils.bind(this,function(C){var y=function(){b.writeFile(d,function(){f(b)},m)};C?q.confirm(mxResources.get("replaceIt",[d]),y,m):y()});StorageFile.getFileContent(q,d,function(C){x(null!=C)},function(){x(!1)})};StorageFile.getFileContent=function(b,f,m,d){b.getDatabaseItem(f,function(q){m(null!=q?q.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,m):null!=d&&d()}),"files")};
+StorageFile.doInsertFile=function(b,f,m){var d=b.getTitle(),q=b.getUi(),x=mxUtils.bind(this,function(B){var y=function(){b.writeFile(d,function(){f(b)},m)};B?q.confirm(mxResources.get("replaceIt",[d]),y,m):y()});StorageFile.getFileContent(q,d,function(B){x(null!=B)},function(){x(!1)})};StorageFile.getFileContent=function(b,f,m,d){b.getDatabaseItem(f,function(q){m(null!=q?q.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,m):null!=d&&d()}),"files")};
StorageFile.getFileInfo=function(b,f,m,d){b.getDatabaseItem(f,function(q){m(q)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(q){m(null!=q?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,m,d,q){q=null!=q?q:0;if(this.isEditable()){var x=mxUtils.bind(this,function(){this.writeFile(b,m,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?x():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(C){this.isRenamable()&&this.getTitle()!=b&&null!=C?this.ui.confirm(mxResources.get("replaceIt",[b]),x,d):this.getLatestVersion(mxUtils.bind(this,function(y){y.getDescriptor()!=
+StorageFile.prototype.saveFile=function(b,f,m,d,q){q=null!=q?q:0;if(this.isEditable()){var x=mxUtils.bind(this,function(){this.writeFile(b,m,d)});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):this instanceof StorageLibrary?x():StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(B){this.isRenamable()&&this.getTitle()!=b&&null!=B?this.ui.confirm(mxResources.get("replaceIt",[b]),x,d):this.getLatestVersion(mxUtils.bind(this,function(y){y.getDescriptor()!=
this.getDescriptor()?(EditorUi.debug("StorageFile.saveFile",[this],"conflict",[y]),this.mergeFile(y,mxUtils.bind(this,function(){q>=this.maxRetries||this.invalidChecksum||this.inConflictState?(this.inConflictState=!0,null!=d&&d()):this.retrySave(mxUtils.bind(this,function(){this.updateFileData();this.saveFile(b,f,m,d,q+1)}))}),d)):x()}),d)}),d)}else null!=m&&m();EditorUi.debug("StorageFile.saveFile",[this],"title",b,"revision",f,"retry",q)};
StorageFile.prototype.retrySave=function(b){var f=300+300*Math.random();window.setTimeout(b,f);EditorUi.debug("StorageFile.retrySave",[this],"delay",f)};
StorageFile.prototype.writeFile=function(b,f,m){this.isRenamable()&&(this.title=b);try{var d=this.getDescriptor(),q=this.getData(),x=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.setDescriptor(this.getEtag(q));this.contentChanged();this.fileSaved(q,d,f,m)});this.setShadowModified(!1);this.ui.setDatabaseItem(null,[{title:this.title,size:q.length,lastModified:Date.now(),type:this.type},{title:this.title,data:q}],x,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
-q,x)}catch(C){null!=m&&m(C)}else null!=m&&m()}),["filesInfo","files"])}catch(C){null!=m&&m(C)}};StorageFile.prototype.rename=function(b,f,m){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(q){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),m)});null!=q?this.ui.confirm(mxResources.get("replaceIt",[b]),x,m):x()}),m):f()};
+q,x)}catch(B){null!=m&&m(B)}else null!=m&&m()}),["filesInfo","files"])}catch(B){null!=m&&m(B)}};StorageFile.prototype.rename=function(b,f,m){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(q){var x=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),m)});null!=q?this.ui.confirm(mxResources.get("replaceIt",[b]),x,m):x()}),m):f()};
StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(m){b(new StorageFile(this.ui,m,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],m=0;m<localStorage.length;m++){var d=localStorage.key(m),q=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<q.length){var x=(null==b||"F"==b)&&("<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12)),C=(null==b||"L"==b)&&"<mxlibrary>"===q.substring(0,11);(x||C)&&f.push({title:d,type:x?"F":"L",size:q.length,lastModified:Date.now()})}}return f};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],m=0;m<localStorage.length;m++){var d=localStorage.key(m),q=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<q.length){var x=(null==b||"F"==b)&&("<mxfile "===q.substring(0,8)||"<?xml"===q.substring(0,5)||"\x3c!--[if IE]>"===q.substring(0,12)),B=(null==b||"L"==b)&&"<mxlibrary>"===q.substring(0,11);(x||B)&&f.push({title:d,type:x?"F":"L",size:q.length,lastModified:Date.now()})}}return f};
StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var m=b.transaction(["files","filesInfo"],"readwrite");b=m.objectStore("files");m=m.objectStore("filesInfo");for(var d=0;d<f.length;d++){var q=f[d],x=localStorage.getItem(q.title);b.add({title:q.title,data:x});m.add(q)}};
-StorageFile.listFiles=function(b,f,m,d){b.getDatabaseItems(function(q){var x=[];if(null!=q)for(var C=0;C<q.length;C++)"."==q[C].title.charAt(0)||null!=f&&q[C].type!=f||x.push(q[C]);m(x)},function(){null==b.database?m(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,m,d){b.removeDatabaseItem([f,f],m,function(){null==b.database?(localStorage.removeItem(f),m()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,m){StorageFile.call(this,b,f,m)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listFiles=function(b,f,m,d){b.getDatabaseItems(function(q){var x=[];if(null!=q)for(var B=0;B<q.length;B++)"."==q[B].title.charAt(0)||null!=f&&q[B].type!=f||x.push(q[B]);m(x)},function(){null==b.database?m(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,m,d){b.removeDatabaseItem([f,f],m,function(){null==b.database?(localStorage.removeItem(f),m()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,m){StorageFile.call(this,b,f,m)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,m){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,m){DrawioFile.call(this,b,f);this.title=m;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,m){RemoteFile.call(this,b,f,m.title);this.libObj=m};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,m){};
RemoteLibrary.prototype.saveAs=function(b,f,m){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,m){StorageFile.call(this,b,f,m);b=m;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,m){return!1};UrlLibrary.prototype.saveAs=function(b,f,m){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,m){DrawioFile.call(this,b,f);this.desc=m||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
var StorageDialog=function(b,f,m){function d(c,e,g,l,p,u){function z(){mxEvent.addListener(E,"click",null!=u?u:function(){g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);f()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);f()}),function(T){b.spinner.stop();b.handleError(T)}):
-(b.setMode(g,!0),f())})}y++;++C>m&&(mxUtils.br(I),C=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",e);var D=document.createElement("div");D.style.textOverflow=
+(b.setMode(g,!0),f())})}y++;++B>m&&(mxUtils.br(I),B=1);var E=document.createElement("a");E.style.overflow="hidden";E.style.display="inline-block";E.className="geBaseButton";E.style.boxSizing="border-box";E.style.fontSize="11px";E.style.position="relative";E.style.margin="4px";E.style.marginTop="8px";E.style.marginBottom="0px";E.style.padding="8px 10px 8px 10px";E.style.width="88px";E.style.height="100px";E.style.whiteSpace="nowrap";E.setAttribute("title",e);var D=document.createElement("div");D.style.textOverflow=
"ellipsis";D.style.overflow="hidden";D.style.position="absolute";D.style.bottom="8px";D.style.left="0px";D.style.right="0px";mxUtils.write(D,e);E.appendChild(D);if(null!=c){var A=document.createElement("img");A.setAttribute("src",c);A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="60px";A.style.height="60px";A.style.paddingBottom="6px";E.appendChild(A)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(E.style.padding="0px 10px 20px 10px",E.style.top=
-"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=p)for(c=0;c<p.length;c++)mxUtils.br(D),mxUtils.write(D,p[c]);if(null!=l&&null==b[l]){A.style.visibility="hidden";mxUtils.setOpacity(D,10);var P=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});P.spin(E);var R=window.setTimeout(function(){null==b[l]&&(P.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(T,L){null!=b[l]&&L.getProperty("client")==b[l]&&(window.clearTimeout(R),mxUtils.setOpacity(D,100),A.style.visibility="",P.stop(),z(),"drive"==l&&null!=M.parentNode&&M.parentNode.removeChild(M))}))}else z();I.appendChild(E)}m=null!=m?m:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";
-x.style.padding="10px 0px 20px 0px";var C=0,y=0,I=document.createElement("div");I.style.paddingTop="2px";x.appendChild(I);var M=document.createElement("p"),H=document.createElement("p");H.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(H,mxResources.get("saveDiagramsTo")+":");q.appendChild(H);q.appendChild(x);C=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+"6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");if(null!=p)for(c=0;c<p.length;c++)mxUtils.br(D),mxUtils.write(D,p[c]);if(null!=l&&null==b[l]){A.style.visibility="hidden";mxUtils.setOpacity(D,10);var Q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});Q.spin(E);var R=window.setTimeout(function(){null==b[l]&&(Q.stop(),E.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(T,M){null!=b[l]&&M.getProperty("client")==b[l]&&(window.clearTimeout(R),mxUtils.setOpacity(D,100),A.style.visibility="",Q.stop(),z(),"drive"==l&&null!=L.parentNode&&L.parentNode.removeChild(L))}))}else z();I.appendChild(E)}m=null!=m?m:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.borderWidth="1px 0px 1px 0px";
+x.style.padding="10px 0px 20px 0px";var B=0,y=0,I=document.createElement("div");I.style.paddingTop="2px";x.appendChild(I);var L=document.createElement("p"),H=document.createElement("p");H.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(H,mxResources.get("saveDiagramsTo")+":");q.appendChild(H);q.appendChild(x);B=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");x=document.createElement("span");x.style.position="absolute";x.style.cursor="pointer";x.style.bottom="27px";x.style.color="gray";x.style.userSelect="none";x.style.textAlign="center";x.style.left="50%";mxUtils.setPrefixedStyle(x.style,"transform","translate(-50%,0)");mxUtils.write(x,mxResources.get("decideLater"));
-q.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(M.style.padding="7px",M.style.fontSize="9pt",M.style.marginTop="-14px",M.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
-mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(M))},5E3);this.container=q},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var m=b.addLanguageMenu(f,!1,"28px");null!=m&&(m.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
+q.appendChild(x);mxEvent.addListener(x,"click",function(){b.hideDialog();var c=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=c});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(L.style.padding="7px",L.style.fontSize="9pt",L.style.marginTop="-14px",L.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(L))},5E3);this.container=q},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var m=b.addLanguageMenu(f,!1,"28px");null!=m&&(m.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var q=document.createElement("div");q.style.margin="8px 0px 0px 0px";q.style.padding="18px 0px 24px 0px";m="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",m=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",m=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",m=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
(d.src=IMAGE_PATH+"/github-logo.svg",m=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",m=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",m=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",m=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",q.style.paddingBottom="10px",q.style.paddingTop="30px",m=mxResources.get("device"));var x=document.createElement("button");
-x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)q.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";var C=document.createElement("table"),y=document.createElement("tbody"),I=document.createElement("tr"),M=document.createElement("td"),H=document.createElement("td");C.setAttribute("align",
-"center");M.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,m);H.style.textAlign="left";H.appendChild(d);I.appendChild(M);I.appendChild(H);y.appendChild(I);C.appendChild(y);f.appendChild(C);m=document.createElement("span");m.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)");mxUtils.write(m,
+x.className="geBigButton";x.style.marginBottom="8px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)q.style.padding="42px 0px 10px 0px",x.style.marginBottom="12px";else{q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";var B=document.createElement("table"),y=document.createElement("tbody"),I=document.createElement("tr"),L=document.createElement("td"),H=document.createElement("td");B.setAttribute("align",
+"center");L.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,m);H.style.textAlign="left";H.appendChild(d);I.appendChild(L);I.appendChild(H);y.appendChild(I);B.appendChild(y);f.appendChild(B);m=document.createElement("span");m.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)");mxUtils.write(m,
mxResources.get("changeStorage"));mxEvent.addListener(m,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(m)}mxUtils.write(x,mxResources.get("createNewDiagram"));mxEvent.addListener(x,"click",function(){b.hideDialog();b.actions.get("new").funct()});q.appendChild(x);mxUtils.br(q);x=document.createElement("button");x.className="geBigButton";x.style.marginBottom="22px";x.style.fontSize="18px";x.style.padding="10px";x.style.width="340px";mxUtils.write(x,
mxResources.get("openExistingDiagram"));mxEvent.addListener(x,"click",function(){b.actions.get("open").funct()});q.appendChild(x);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&
mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(m=function(g){x.style.marginBottom="24px";var l=document.createElement("a");l.style.display="inline-block";l.style.color="gray";l.style.cursor="pointer";l.style.marginTop="6px";mxUtils.write(l,mxResources.get("signOut"));x.style.marginBottom="16px";q.style.paddingBottom="18px";mxEvent.addListener(l,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){g()})});q.appendChild(l)},b.mode==App.MODE_GOOGLE&&
-null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var e=document.createElement("select");e.style.marginLeft="4px";e.style.width="140px";for(m=0;m<c.length;m++)C=document.createElement("option"),mxUtils.write(C,c[m].displayName),C.value=m,e.appendChild(C),C=document.createElement("option"),C.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(C,"<"+c[m].email+">"),C.setAttribute("disabled","disabled"),e.appendChild(C);C=document.createElement("option");mxUtils.write(C,mxResources.get("addAccount"));C.value=c.length;e.appendChild(C);mxEvent.addListener(e,"change",function(){var g=e.value,l=c.length!=g;l&&b.drive.setUser(c[g]);b.drive.authorize(l,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(e)}else m(function(){b.drive.logout()})}else b.mode!=
+null!=b.drive){var c=b.drive.getUsersList();if(0<c.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");x.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var e=document.createElement("select");e.style.marginLeft="4px";e.style.width="140px";for(m=0;m<c.length;m++)B=document.createElement("option"),mxUtils.write(B,c[m].displayName),B.value=m,e.appendChild(B),B=document.createElement("option"),B.innerHTML="&nbsp;&nbsp;&nbsp;",
+mxUtils.write(B,"<"+c[m].email+">"),B.setAttribute("disabled","disabled"),e.appendChild(B);B=document.createElement("option");mxUtils.write(B,mxResources.get("addAccount"));B.value=c.length;e.appendChild(B);mxEvent.addListener(e,"change",function(){var g=e.value,l=c.length!=g;l&&b.drive.setUser(c[g]);b.drive.authorize(l,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(e)}else m(function(){b.drive.logout()})}else b.mode!=
App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?m(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?m(function(){b.gitLab.logout();var g=document.createElement("form");g.setAttribute("method","post");g.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");g.setAttribute("target","_blank");document.body.appendChild(g);g.submit();g.parentNode.removeChild(g)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&m(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&m(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):m(function(){b.oneDrive.logout()});f.appendChild(q);this.container=f},EmbedDialog=function(b,f,m,d,q,x,C,y,I){C=null!=C?C:"Check out the diagram I made using @drawio";d=document.createElement("div");var M=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>
-f.length?M?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var H=document.createElement("textarea");H.setAttribute("autocomplete","off");H.setAttribute("autocorrect","off");H.setAttribute("autocapitalize","off");H.setAttribute("spellcheck","false");H.style.fontFamily="monospace";H.style.wordBreak="break-all";H.style.marginTop=
+null!=b.trello?b.trello.isAuthorized()&&m(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&m(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):m(function(){b.oneDrive.logout()});f.appendChild(q);this.container=f},EmbedDialog=function(b,f,m,d,q,x,B,y,I){B=null!=B?B:"Check out the diagram I made using @drawio";d=document.createElement("div");var L=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=x?mxUtils.write(d,x):mxUtils.write(d,mxResources.get(5E5>
+f.length?L?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);x=document.createElement("div");x.style.position="absolute";x.style.top="30px";x.style.right="30px";x.style.color="gray";mxUtils.write(x,b.formatFileSize(f.length));d.appendChild(x);var H=document.createElement("textarea");H.setAttribute("autocomplete","off");H.setAttribute("autocorrect","off");H.setAttribute("autocapitalize","off");H.setAttribute("spellcheck","false");H.style.fontFamily="monospace";H.style.wordBreak="break-all";H.style.marginTop=
"10px";H.style.resize="none";H.style.height="150px";H.style.width="440px";H.style.border="1px solid gray";H.value=mxResources.get("updatingDocument");d.appendChild(H);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(H.value=f,H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)):(H.setAttribute("readonly","true"),H.value=mxResources.get("tooLargeUseDownload"))},0)};x=document.createElement("div");x.style.position=
-"absolute";x.style.bottom="36px";x.style.right="32px";var c=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!M||navigator.standalone||!(M||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(c=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var g=5E5>f.length?H.value:f;if(null!=q)q(g);else if(M)try{var l=b.openLink(g);null!=l&&(null==m||0<m)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=
+"absolute";x.style.bottom="36px";x.style.right="32px";var c=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!L||navigator.standalone||!(L||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(c=mxUtils.button(null!=y?y:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var g=5E5>f.length?H.value:f;if(null!=q)q(g);else if(L)try{var l=b.openLink(g);null!=l&&(null==m||0<m)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=l&&null!=
l.location.href&&l.location.href.substring(0,8)!=g.substring(0,8)&&(l.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(u){}}),m||500)}catch(u){b.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var p=window.open();p=null!=p?p.document:null;null!=p?(p.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==f.substring(0,7)?f:mxUtils.htmlEntities(f))+"</body></html>"),
-p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),c.className="geBtn",x.appendChild(c));if(!M||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=I?I:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",x.appendChild(y);if(M&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var e=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(H.value);
+p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),c.className="geBtn",x.appendChild(c));if(!L||7500<f.length)y=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=I?I:"embed.txt","txt",f,"text/plain")}),y.className="geBtn",x.appendChild(y);if(L&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var e=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(H.value);
b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}});y=document.createElement("img");y.setAttribute("src",Editor.facebookImage);y.setAttribute("width","18");y.setAttribute("height","18");y.setAttribute("border","0");e.appendChild(y);e.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");e.style.verticalAlign="bottom";e.style.paddingTop="4px";e.style.minWidth="46px";e.className="geBtn";x.appendChild(e)}7168>f.length&&(e=
-mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(C)+"&url="+encodeURIComponent(H.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",e.appendChild(y),e.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
+mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(B)+"&url="+encodeURIComponent(H.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.setAttribute("src",Editor.tweetImage),y.setAttribute("width","18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",e.appendChild(y),e.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
" max)"),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",x.appendChild(e))}!b.isOffline()&&5E5>f.length&&(e=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(I||b.defaultFilename)+"&body="+encodeURIComponent(H.value);b.openLink(g)}catch(l){b.handleError({message:l.message||mxResources.get("drawingTooLarge")})}}),y=document.createElement("img"),y.className="geAdaptiveAsset",y.setAttribute("src",Editor.mailImage),y.setAttribute("width",
"18"),y.setAttribute("height","18"),y.setAttribute("border","0"),y.style.marginBottom="5px",e.appendChild(y),e.style.verticalAlign="bottom",e.style.paddingTop="4px",e.style.minWidth="46px",e.className="geBtn",x.appendChild(e));y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.appendChild(y);e=mxUtils.button(mxResources.get("copy"),function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?y.className="geBtn gePrimaryBtn":(x.appendChild(e),e.className="geBtn gePrimaryBtn",y.className="geBtn"):null!=c&&(x.appendChild(c),y.className="geBtn",c.className="geBtn gePrimaryBtn");d.appendChild(x);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function m(){var T=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(A.checked&&""!=e.value){var L="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(e.value));null!=T&&(L+="&title="+encodeURIComponent(T));0<P.length&&(L+="&s="+P);""!=g.value&&"0"!=g.value&&(L+="&border="+g.value);""!=c.value&&(L+="&height="+c.value);L+="&pan="+(l.checked?"1":"0");L+="&zoom="+(p.checked?"1":"0");L+="&fit="+(D.checked?"1":"0");
-L+="&resize="+(E.checked?"1":"0");L+="&x0="+Number(H.value);L+="&y0="+I;q.mathEnabled&&(L+="&math=1");z.checked?L+="&edit=_blank":u.checked&&(L+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));M.value=L}else R.constructor==DriveFile||R.constructor==DropboxFile?(L="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=e.value?L+=encodeURIComponent(mxUtils.htmlEntities(e.value))+"&type=3":(L+=R.getHash().substring(1),L=R.constructor==DropboxFile?L+"&type=2":L+"&type=1"),null!=
-T&&(L+="&title="+encodeURIComponent(T)),""!=c.value&&(T=parseInt(c.value)+parseInt(H.value),L+="&height="+T),M.value=L):M.value=""}var d=document.createElement("div"),q=b.editor.graph,x=q.getGraphBounds(),C=q.view.scale,y=Math.floor(x.x/C-q.view.translate.x),I=Math.floor(x.y/C-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var M=document.createElement("input");M.setAttribute("type","text");M.style.marginBottom="8px";M.style.marginTop="2px";M.style.width="410px";
-d.appendChild(M);mxUtils.br(d);this.init=function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var H=document.createElement("input");H.setAttribute("type","text");H.setAttribute("size","4");H.style.marginRight="16px";H.style.marginLeft="4px";H.value=y;d.appendChild(H);mxUtils.write(d,mxResources.get("height")+":");var c=document.createElement("input");c.setAttribute("type","text");
-c.setAttribute("size","4");c.style.marginLeft="4px";c.value=Math.ceil(x.height/C);d.appendChild(c);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","28");e.style.marginBottom="8px";e.style.marginTop="2px";e.style.width="410px";e.value=f||"";d.appendChild(e);
+var GoogleSitesDialog=function(b,f){function m(){var T=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(A.checked&&""!=e.value){var M="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(e.value));null!=T&&(M+="&title="+encodeURIComponent(T));0<Q.length&&(M+="&s="+Q);""!=g.value&&"0"!=g.value&&(M+="&border="+g.value);""!=c.value&&(M+="&height="+c.value);M+="&pan="+(l.checked?"1":"0");M+="&zoom="+(p.checked?"1":"0");M+="&fit="+(D.checked?"1":"0");
+M+="&resize="+(E.checked?"1":"0");M+="&x0="+Number(H.value);M+="&y0="+I;q.mathEnabled&&(M+="&math=1");z.checked?M+="&edit=_blank":u.checked&&(M+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));L.value=M}else R.constructor==DriveFile||R.constructor==DropboxFile?(M="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=e.value?M+=encodeURIComponent(mxUtils.htmlEntities(e.value))+"&type=3":(M+=R.getHash().substring(1),M=R.constructor==DropboxFile?M+"&type=2":M+"&type=1"),null!=
+T&&(M+="&title="+encodeURIComponent(T)),""!=c.value&&(T=parseInt(c.value)+parseInt(H.value),M+="&height="+T),L.value=M):L.value=""}var d=document.createElement("div"),q=b.editor.graph,x=q.getGraphBounds(),B=q.view.scale,y=Math.floor(x.x/B-q.view.translate.x),I=Math.floor(x.y/B-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var L=document.createElement("input");L.setAttribute("type","text");L.style.marginBottom="8px";L.style.marginTop="2px";L.style.width="410px";
+d.appendChild(L);mxUtils.br(d);this.init=function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var H=document.createElement("input");H.setAttribute("type","text");H.setAttribute("size","4");H.style.marginRight="16px";H.style.marginLeft="4px";H.value=y;d.appendChild(H);mxUtils.write(d,mxResources.get("height")+":");var c=document.createElement("input");c.setAttribute("type","text");
+c.setAttribute("size","4");c.style.marginLeft="4px";c.value=Math.ceil(x.height/B);d.appendChild(c);mxUtils.br(d);x=document.createElement("hr");x.setAttribute("size","1");x.style.marginBottom="16px";x.style.marginTop="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","28");e.style.marginBottom="8px";e.style.marginTop="2px";e.style.width="410px";e.value=f||"";d.appendChild(e);
mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";d.appendChild(g);mxUtils.br(d);var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="16px";d.appendChild(l);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");
p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";u.setAttribute("title",window.location.href);d.appendChild(u);mxUtils.write(d,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,
mxResources.get("asNew")+" ");mxUtils.br(d);var E=document.createElement("input");E.setAttribute("type","checkbox");E.setAttribute("checked","checked");E.defaultChecked=!0;E.style.marginLeft="16px";d.appendChild(E);mxUtils.write(d,mxResources.get("resize")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";d.appendChild(D);mxUtils.write(d,mxResources.get("fit")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft=
-"8px";d.appendChild(A);mxUtils.write(d,mxResources.get("embed")+" ");var P=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(l,"change",m);mxEvent.addListener(p,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(D,"change",m);mxEvent.addListener(u,"change",m);mxEvent.addListener(z,"change",m);mxEvent.addListener(A,"change",m);mxEvent.addListener(c,"change",m);mxEvent.addListener(H,"change",m);mxEvent.addListener(g,"change",m);mxEvent.addListener(e,"change",m);m();
-mxEvent.addListener(M,"click",function(){M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,m){var d=document.createElement("div");d.style.textAlign="right";this.init=
+"8px";d.appendChild(A);mxUtils.write(d,mxResources.get("embed")+" ");var Q=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(l,"change",m);mxEvent.addListener(p,"change",m);mxEvent.addListener(E,"change",m);mxEvent.addListener(D,"change",m);mxEvent.addListener(u,"change",m);mxEvent.addListener(z,"change",m);mxEvent.addListener(A,"change",m);mxEvent.addListener(c,"change",m);mxEvent.addListener(H,"change",m);mxEvent.addListener(g,"change",m);mxEvent.addListener(e,"change",m);m();
+mxEvent.addListener(L,"click",function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";x=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});x.className="geBtn gePrimaryBtn";f.appendChild(x);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,m){var d=document.createElement("div");d.style.textAlign="right";this.init=
function(){var q=document.createElement("div");q.style.position="relative";q.style.border="1px solid gray";q.style.boxSizing="border-box";q.style.width="100%";q.style.height="360px";q.style.overflow="hidden";q.style.marginBottom="16px";mxEvent.disableContextMenu(q);d.appendChild(q);var x=new Graph(q);x.setCellsCloneable(!0);x.setPanning(!0);x.setAllowDanglingEdges(!1);x.connectionHandler.select=!1;x.view.setTranslate(20,20);x.border=20;x.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&
-null!=x.view.getDrawPane()&&(q=x.view.getDrawPane().ownerSVGElement,null!=q&&(q.style.position="absolute"));var C="curved=1;";x.cellRenderer.installCellOverlayListeners=function(l,p,u){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(u.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(z){p.fireEvent(new mxEventObject("pointerdown","event",z,"state",l))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(u.node,"touchstart",function(z){p.fireEvent(new mxEventObject("pointerdown",
-"event",z,"state",l))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=!1;x.connectionHandler.createEdgeState=function(l){l=x.createEdge(null,null,null,null,null,C);return new mxCellState(this.graph.view,l,this.graph.getCellStyle(l))};var y=x.getDefaultParent(),I=mxUtils.bind(this,function(l){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(u,z){x.connectionHandler.reset();x.clearSelection();
-var E=x.getCellGeometry(l),D;c(function(){D=x.insertVertex(y,null,"Entry",E.x,E.y,80,30,"rounded=1;");I(D);x.view.refresh(D);x.insertEdge(y,null,"",l,D,C)},function(){x.scrollCellToVisible(D)})});p.addListener("pointerdown",function(u,z){u=z.getProperty("event");z=z.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var E=mxUtils.convertPoint(x.container,mxEvent.getClientX(u),mxEvent.getClientY(u));x.connectionHandler.start(z,E.x,E.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(u);
-mxEvent.consume(u)});x.addCellOverlay(l,p)});x.getModel().beginUpdate();try{var M=x.insertVertex(y,null,"Start",0,0,80,30,"ellipse");I(M)}finally{x.getModel().endUpdate()}if("horizontalTree"==m){var H=new mxCompactTreeLayout(x);H.edgeRouting=!1;H.levelDistance=30;H.sortEdges=!0;C="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==m?(H=new mxCompactTreeLayout(x,!1),H.edgeRouting=!1,H.levelDistance=30,H.sortEdges=!0,C="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==m?(H=new mxRadialTreeLayout(x,
-!1),H.edgeRouting=!1,H.levelDistance=80):"verticalFlow"==m?H=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==m?H=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"circle"==m?H=new mxCircleLayout(x):(H=new mxFastOrganicLayout(x,!1),H.forceConstant=80);if(null!=H){var c=function(l,p){x.getModel().beginUpdate();try{null!=l&&l(),H.execute(x.getDefaultParent(),M)}catch(u){throw u;}finally{l=new mxMorphing(x),l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();
+null!=x.view.getDrawPane()&&(q=x.view.getDrawPane().ownerSVGElement,null!=q&&(q.style.position="absolute"));var B="curved=1;";x.cellRenderer.installCellOverlayListeners=function(l,p,u){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(u.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(z){p.fireEvent(new mxEventObject("pointerdown","event",z,"state",l))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(u.node,"touchstart",function(z){p.fireEvent(new mxEventObject("pointerdown",
+"event",z,"state",l))})};x.getAllConnectionConstraints=function(){return null};x.connectionHandler.marker.highlight.keepOnTop=!1;x.connectionHandler.createEdgeState=function(l){l=x.createEdge(null,null,null,null,null,B);return new mxCellState(this.graph.view,l,this.graph.getCellStyle(l))};var y=x.getDefaultParent(),I=mxUtils.bind(this,function(l){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(u,z){x.connectionHandler.reset();x.clearSelection();
+var E=x.getCellGeometry(l),D;c(function(){D=x.insertVertex(y,null,"Entry",E.x,E.y,80,30,"rounded=1;");I(D);x.view.refresh(D);x.insertEdge(y,null,"",l,D,B)},function(){x.scrollCellToVisible(D)})});p.addListener("pointerdown",function(u,z){u=z.getProperty("event");z=z.getProperty("state");x.popupMenuHandler.hideMenu();x.stopEditing(!1);var E=mxUtils.convertPoint(x.container,mxEvent.getClientX(u),mxEvent.getClientY(u));x.connectionHandler.start(z,E.x,E.y);x.isMouseDown=!0;x.isMouseTrigger=mxEvent.isMouseEvent(u);
+mxEvent.consume(u)});x.addCellOverlay(l,p)});x.getModel().beginUpdate();try{var L=x.insertVertex(y,null,"Start",0,0,80,30,"ellipse");I(L)}finally{x.getModel().endUpdate()}if("horizontalTree"==m){var H=new mxCompactTreeLayout(x);H.edgeRouting=!1;H.levelDistance=30;H.sortEdges=!0;B="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==m?(H=new mxCompactTreeLayout(x,!1),H.edgeRouting=!1,H.levelDistance=30,H.sortEdges=!0,B="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==m?(H=new mxRadialTreeLayout(x,
+!1),H.edgeRouting=!1,H.levelDistance=80):"verticalFlow"==m?H=new mxHierarchicalLayout(x,mxConstants.DIRECTION_NORTH):"horizontalFlow"==m?H=new mxHierarchicalLayout(x,mxConstants.DIRECTION_WEST):"circle"==m?H=new mxCircleLayout(x):(H=new mxFastOrganicLayout(x,!1),H.forceConstant=80);if(null!=H){var c=function(l,p){x.getModel().beginUpdate();try{null!=l&&l(),H.execute(x.getDefaultParent(),L)}catch(u){throw u;}finally{l=new mxMorphing(x),l.addListener(mxEvent.DONE,mxUtils.bind(this,function(){x.getModel().endUpdate();
null!=p&&p()})),l.startAnimation()}},e=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(l,p,u,z,E){e.apply(this,arguments);c()};x.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);c()};x.connectionHandler.addListener(mxEvent.CONNECT,function(){c()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var g=mxUtils.button(mxResources.get("insert"),
function(l){x.clearCellOverlays();var p=x.getModel().getChildren(x.getDefaultParent());l=mxEvent.isAltDown(l)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(x.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,l.x,l.y);l=b.editor.graph.view;var u=l.getBounds(p);null!=u&&(u.x-=l.translate.x,u.y-=l.translate.y,b.editor.graph.scrollRectToVisible(u),b.editor.graph.setSelectionCells(p));b.hideDialog()});d.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
d.appendChild(q);this.graph=x};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==",26,
26);
-var BackgroundImageDialog=function(b,f,m,d,q){function x(){null==n||n==mxConstants.NONE?(U.style.display="none",T.checked=!1):(U.style.backgroundColor=n,U.style.display="",T.checked=!0)}var C=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var I=document.createElement("h2");mxUtils.write(I,mxResources.get("background"));I.style.marginTop="0px";y.appendChild(I);var M=null!=m&&null!=m.originalSrc;I=!1;var H=document.createElement("input");H.style.cssText="margin-right:8px;margin-bottom:8px;";H.setAttribute("value",
-"url");H.setAttribute("type","radio");H.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.width="360px";e.value=M||null==m?"":m.src;var g=document.createElement("select");g.style.width="360px";
-if(null!=b.pages)for(var l=0;l<b.pages.length;l++){var p=document.createElement("option");mxUtils.write(p,b.pages[l].getName()||mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=m&&m.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),I=!0);g.appendChild(p)}M||null!=b.pages&&1!=b.pages.length||(H.style.display="none",c.style.display="none",g.style.display=
-"none");var u=document.createElement("option"),z=!1,E=!1,D=function(B,F){z||null!=B&&E||(c.checked?null!=F&&F(u.selected?null:g.value):""==e.value||b.isOffline()?(P.value="",R.value="",null!=F&&F("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(J){P.value=J.width;R.value=J.height;null!=F&&F(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));P.value="";R.value="";null!=F&&F(null)})))},A=mxUtils.bind(this,function(B){b.importFiles(B,
-0,0,b.maxBackgroundSize,function(F,J,K,k,v,G){e.value=F;D();e.focus()},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var J=0;J<F.length;J++)F[J]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){M?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){H.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");H.setAttribute("checked","checked");
-H.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=y.parentNode,F=null;mxEvent.addListener(B,"dragleave",function(J){null!=F&&(F.parentNode.removeChild(F),F=null);J.stopPropagation();J.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(J){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(B));J.stopPropagation();J.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,function(J){null!=
+var BackgroundImageDialog=function(b,f,m,d,q){function x(){null==n||n==mxConstants.NONE?(U.style.display="none",T.checked=!1):(U.style.backgroundColor=n,U.style.display="",T.checked=!0)}var B=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var I=document.createElement("h2");mxUtils.write(I,mxResources.get("background"));I.style.marginTop="0px";y.appendChild(I);var L=null!=m&&null!=m.originalSrc;I=!1;var H=document.createElement("input");H.style.cssText="margin-right:8px;margin-bottom:8px;";H.setAttribute("value",
+"url");H.setAttribute("type","radio");H.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.width="360px";e.value=L||null==m?"":m.src;var g=document.createElement("select");g.style.width="360px";
+if(null!=b.pages)for(var l=0;l<b.pages.length;l++){var p=document.createElement("option");mxUtils.write(p,b.pages[l].getName()||mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=m&&m.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),I=!0);g.appendChild(p)}L||null!=b.pages&&1!=b.pages.length||(H.style.display="none",c.style.display="none",g.style.display=
+"none");var u=document.createElement("option"),z=!1,E=!1,D=function(C,F){z||null!=C&&E||(c.checked?null!=F&&F(u.selected?null:g.value):""==e.value||b.isOffline()?(Q.value="",R.value="",null!=F&&F("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(J){Q.value=J.width;R.value=J.height;null!=F&&F(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));Q.value="";R.value="";null!=F&&F(null)})))},A=mxUtils.bind(this,function(C){b.importFiles(C,
+0,0,b.maxBackgroundSize,function(F,J,K,k,v,G){e.value=F;D();e.focus()},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var J=0;J<F.length;J++)F[J]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){L?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){H.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");H.setAttribute("checked","checked");
+H.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=y.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(J){null!=F&&(F.parentNode.removeChild(F),F=null);J.stopPropagation();J.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(J){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));J.stopPropagation();J.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(J){null!=
F&&(F.parentNode.removeChild(F),F=null);if(0<J.dataTransfer.files.length)A(J.dataTransfer.files);else if(0<=mxUtils.indexOf(J.dataTransfer.types,"text/uri-list")){var K=J.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(K)&&(e.value=decodeURIComponent(K),D())}J.stopPropagation();J.preventDefault()}),!1)}};y.appendChild(H);y.appendChild(e);mxUtils.br(y);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");y.appendChild(l);
-var P=document.createElement("input");P.setAttribute("type","text");P.style.width="60px";P.style.marginLeft="8px";P.style.marginRight="16px";P.value=null==m||M?"":m.width;y.appendChild(P);mxUtils.write(y,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==m||M?"":m.height;y.appendChild(R);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(e,"change",D);ImageDialog.filePicked=
-function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(e.value=B.url,D()));e.focus()};y.appendChild(c);y.appendChild(g);mxUtils.br(y);mxUtils.br(y);M?(c.setAttribute("checked","checked"),c.checked=!0):(H.setAttribute("checked","checked"),H.checked=!0);!I&&c.checked&&(mxUtils.write(u,mxResources.get("pageNotFound")),u.setAttribute("disabled","disabled"),u.setAttribute("selected","selected"),u.setAttribute("value",
+var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="60px";Q.style.marginLeft="8px";Q.style.marginRight="16px";Q.value=null==m||L?"":m.width;y.appendChild(Q);mxUtils.write(y,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==m||L?"":m.height;y.appendChild(R);mxUtils.br(y);mxUtils.br(y);mxEvent.addListener(e,"change",D);ImageDialog.filePicked=
+function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(e.value=C.url,D()));e.focus()};y.appendChild(c);y.appendChild(g);mxUtils.br(y);mxUtils.br(y);L?(c.setAttribute("checked","checked"),c.checked=!0):(H.setAttribute("checked","checked"),H.checked=!0);!I&&c.checked&&(mxUtils.write(u,mxResources.get("pageNotFound")),u.setAttribute("disabled","disabled"),u.setAttribute("selected","selected"),u.setAttribute("value",
"pageNotFound"),g.appendChild(u),mxEvent.addListener(g,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)}));m=document.createElement("div");m.style.display=q?"inline-flex":"none";m.style.alignItems="center";m.style.cursor="default";m.style.minWidth="40%";m.style.height="20px";var T=document.createElement("input");T.setAttribute("type","checkbox");T.style.margin="0px 10px 0px 4px";T.style.verticalAlign="bottom";T.defaultChecked=d!=mxConstants.NONE&&null!=d;T.checked=T.defaultChecked;
-m.appendChild(T);mxUtils.write(m,mxResources.get("fillColor"));q=m.cloneNode(!1);var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.margin="0px 10px 0px 30px";L.style.verticalAlign="bottom";L.defaultChecked=C.shadowVisible;L.checked=L.defaultChecked;q.appendChild(L);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||L.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(B){mxEvent.getSource(B)!=L&&(L.checked=!L.checked)});
-var U=document.createElement("button");U.style.width="36px";U.style.height="18px";U.style.cursor="pointer";U.style.marginLeft="10px";U.style.backgroundPosition="center center";U.style.backgroundRepeat="no-repeat";U.style.verticalAlign="bottom";U.className="geColorBtn";var n=d;x();mxEvent.addListener(m,"click",function(B){mxEvent.getSource(B)!=T&&(T.checked=!T.checked);n=T.checked?"#ffffff":null;x()});mxEvent.addListener(U,"click",function(B){b.pickColor(n||"none",function(F){n=F;x()});mxEvent.consume(B)});
-m.appendChild(U);y.appendChild(m);y.appendChild(q);mxUtils.br(y);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";C=mxUtils.button(mxResources.get("cancel"),function(){z=!0;b.hideDialog()});C.className="geBtn";b.editor.cancelFirst&&d.appendChild(C);q=mxUtils.button(mxResources.get("reset"),function(){e.value="";P.value="";R.value="";H.checked=!0;n=mxConstants.NONE;x();z=!1});mxEvent.addGestureListeners(q,function(){z=!0});q.className="geBtn";q.width="100";d.appendChild(q);
-if(Graph.fileSupport){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(B){null!=t.files&&(A(t.files),t.type="",t.type="file",t.value="")});t.style.display="none";y.appendChild(t);q=mxUtils.button(mxResources.get("open"),function(){t.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(B){f(""!=B&&null!=B?new mxImage(B,
-P.value,R.value):null,null==B,n,!mxClient.IS_SVG||mxClient.IS_SF?null:L.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(C);y.appendChild(d);this.container=y},ParseDialog=function(b,f,m){function d(g,l,p){var u=g.split("\n");if("plantUmlPng"==l||"plantUmlSvg"==l||"plantUmlTxt"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var z=function(K,k,v,G,N){x=mxEvent.isAltDown(p)?
+m.appendChild(T);mxUtils.write(m,mxResources.get("fillColor"));q=m.cloneNode(!1);var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.margin="0px 10px 0px 30px";M.style.verticalAlign="bottom";M.defaultChecked=B.shadowVisible;M.checked=M.defaultChecked;q.appendChild(M);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||M.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(C){mxEvent.getSource(C)!=M&&(M.checked=!M.checked)});
+var U=document.createElement("button");U.style.width="36px";U.style.height="18px";U.style.cursor="pointer";U.style.marginLeft="10px";U.style.backgroundPosition="center center";U.style.backgroundRepeat="no-repeat";U.style.verticalAlign="bottom";U.className="geColorBtn";var n=d;x();mxEvent.addListener(m,"click",function(C){mxEvent.getSource(C)!=T&&(T.checked=!T.checked);n=T.checked?"#ffffff":null;x()});mxEvent.addListener(U,"click",function(C){b.pickColor(n||"none",function(F){n=F;x()});mxEvent.consume(C)});
+m.appendChild(U);y.appendChild(m);y.appendChild(q);mxUtils.br(y);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";B=mxUtils.button(mxResources.get("cancel"),function(){z=!0;b.hideDialog()});B.className="geBtn";b.editor.cancelFirst&&d.appendChild(B);q=mxUtils.button(mxResources.get("reset"),function(){e.value="";Q.value="";R.value="";H.checked=!0;n=mxConstants.NONE;x();z=!1});mxEvent.addGestureListeners(q,function(){z=!0});q.className="geBtn";q.width="100";d.appendChild(q);
+if(Graph.fileSupport){var t=document.createElement("input");t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(A(t.files),t.type="",t.type="file",t.value="")});t.style.display="none";y.appendChild(t);q=mxUtils.button(mxResources.get("open"),function(){t.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();D(null,function(C){f(""!=C&&null!=C?new mxImage(C,
+Q.value,R.value):null,null==C,n,!mxClient.IS_SVG||mxClient.IS_SF?null:M.checked)})});mxEvent.addGestureListeners(applyBtn,function(){E=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(B);y.appendChild(d);this.container=y},ParseDialog=function(b,f,m){function d(g,l,p){var u=g.split("\n");if("plantUmlPng"==l||"plantUmlSvg"==l||"plantUmlTxt"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var z=function(K,k,v,G,N){x=mxEvent.isAltDown(p)?
x:E.getCenterInsertPoint(new mxRectangle(0,0,G,N));var O=null;E.getModel().beginUpdate();try{O="txt"==k?b.insertAsPreText(v,x.x,x.y):E.insertVertex(null,null,null,x.x,x.y,G,N,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),E.setAttributeForCell(O,"plantUmlData",JSON.stringify({data:K,format:k},null,2))}finally{E.getModel().endUpdate()}null!=O&&(E.setSelectionCell(O),E.scrollCellToVisible(O))},E=b.editor.graph,D="plantUmlTxt"==l?"txt":"plantUmlPng"==
l?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==g&&"svg"==D?window.setTimeout(function(){b.spinner.stop();z(g,D,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(g,D,function(K,k,v){b.spinner.stop();z(g,D,K,k,v)},function(K){b.handleError(K)})}}else if("mermaid"==l||"mermaid2drawio"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var A=0;A<u.length&&(0==u[A].trim().length||"%%"==u[A].substring(0,2));)A++;if("---"==u[A].trim()){do A++;while(A<u.length&&"---"!=u[A].trim());A++}A=u[A].trim().toLowerCase();u=A.indexOf(" ");A=A.substring(0,0<u?u:A.length);var P="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==l&&("graph"==A||"flowchart"==A||"sequencediagram"==A||"classdiagram"==A||"statediagram-v2"==A||"statediagram"==A||"erdiagram"==A||"requirementdiagram"==A||"gitgraph"==A||"mindmap"==A||"journey"==A);E=b.editor.graph;P&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(K){b.spinner.stop();E.setSelectionCells(b.importXml(K,Math.max(x.x,20),Math.max(x.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(g,null,function(K,k,v){if(!P){x=
+295,212)},200):b.generatePlantUmlImage(g,D,function(K,k,v){b.spinner.stop();z(g,D,K,k,v)},function(K){b.handleError(K)})}}else if("mermaid"==l||"mermaid2drawio"==l){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var A=0;A<u.length&&(0==u[A].trim().length||"%%"==u[A].substring(0,2));)A++;if("---"==u[A].trim()){do A++;while(A<u.length&&"---"!=u[A].trim());A++}A=u[A].trim().toLowerCase();u=A.indexOf(" ");A=A.substring(0,0<u?u:A.length);var Q="undefined"!==typeof mxMermaidToDrawio&&
+"mermaid2drawio"==l&&("graph"==A||"flowchart"==A||"sequencediagram"==A||"classdiagram"==A||"statediagram-v2"==A||"statediagram"==A||"erdiagram"==A||"requirementdiagram"==A||"gitgraph"==A||"mindmap"==A||"journey"==A);E=b.editor.graph;Q&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(K){b.spinner.stop();E.setSelectionCells(b.importXml(K,Math.max(x.x,20),Math.max(x.y,20),!0,null,null,!0));E.scrollCellToVisible(E.getSelectionCell())}));b.generateMermaidImage(g,null,function(K,k,v){if(!Q){x=
mxEvent.isAltDown(p)?x:E.getCenterInsertPoint(new mxRectangle(0,0,k,v));b.spinner.stop();var G=null;E.getModel().beginUpdate();try{G=E.insertVertex(null,null,null,x.x,x.y,k,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+K+";"),E.setAttributeForCell(G,"mermaidData",JSON.stringify({data:g},null,2))}finally{E.getModel().endUpdate()}null!=G&&(E.setSelectionCell(G),E.scrollCellToVisible(G))}},function(K){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(K)})}}else if("table"==
-l){l=null;var R=[],T=0,L={};for(A=0;A<u.length;A++){var U=mxUtils.trim(u[A]);if("primary key"==U.substring(0,11).toLowerCase()){var n=U.match(/\((.+)\)/);n&&n[1]&&(L[n[1]]=!0);u.splice(A,1)}else 0<U.toLowerCase().indexOf("primary key")&&(L[U.split(" ")[0]]=!0,u[A]=mxUtils.trim(U.replace(/primary key/i,"")))}for(A=0;A<u.length;A++)if(U=mxUtils.trim(u[A]),"create table"==U.substring(0,12).toLowerCase())U=mxUtils.trim(U.substring(12)),"("==U.charAt(U.length-1)&&(U=mxUtils.trim(U.substring(0,U.length-
-1))),l=new mxCell(U,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),l.vertex=!0,R.push(l),U=b.editor.graph.getPreferredSizeForCell(t),null!=U&&(l.geometry.width=U.width+10);else if(null!=l&&")"==U.charAt(0))T+=l.geometry.width+40,l=null;else if("("!=U&&null!=l){U=U.substring(0,","==U.charAt(U.length-1)?U.length-1:U.length);n=L[U.split(" ")[0]];var t=new mxCell("",new mxGeometry(0,
-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(n?"1":"0")+";");t.vertex=!0;var B=new mxCell(n?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(n?"fontStyle=1;":""));B.vertex=!0;t.insert(B);U=new mxCell(U,new mxGeometry(30,
+l){l=null;var R=[],T=0,M={};for(A=0;A<u.length;A++){var U=mxUtils.trim(u[A]);if("primary key"==U.substring(0,11).toLowerCase()){var n=U.match(/\((.+)\)/);n&&n[1]&&(M[n[1]]=!0);u.splice(A,1)}else 0<U.toLowerCase().indexOf("primary key")&&(M[U.split(" ")[0]]=!0,u[A]=mxUtils.trim(U.replace(/primary key/i,"")))}for(A=0;A<u.length;A++)if(U=mxUtils.trim(u[A]),"create table"==U.substring(0,12).toLowerCase())U=mxUtils.trim(U.substring(12)),"("==U.charAt(U.length-1)&&(U=mxUtils.trim(U.substring(0,U.length-
+1))),l=new mxCell(U,new mxGeometry(T,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),l.vertex=!0,R.push(l),U=b.editor.graph.getPreferredSizeForCell(t),null!=U&&(l.geometry.width=U.width+10);else if(null!=l&&")"==U.charAt(0))T+=l.geometry.width+40,l=null;else if("("!=U&&null!=l){U=U.substring(0,","==U.charAt(U.length-1)?U.length-1:U.length);n=M[U.split(" ")[0]];var t=new mxCell("",new mxGeometry(0,
+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(n?"1":"0")+";");t.vertex=!0;var C=new mxCell(n?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(n?"fontStyle=1;":""));C.vertex=!0;t.insert(C);U=new mxCell(U,new mxGeometry(30,
0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(n?"fontStyle=5;":""));U.vertex=!0;t.insert(U);U=b.editor.graph.getPreferredSizeForCell(U);null!=U&&l.geometry.width<U.width+30&&(l.geometry.width=Math.min(320,Math.max(l.geometry.width,U.width+30)));l.insert(t,n?0:null);l.geometry.height+=30}0<R.length&&(E=b.editor.graph,x=mxEvent.isAltDown(p)?x:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,
!0)),E.setSelectionCells(E.importCells(R,x.x,x.y)),E.scrollCellToVisible(E.getSelectionCell()))}else if("list"==l){if(0<u.length){E=b.editor.graph;l=null;R=[];for(A=t=0;A<u.length;A++)";"!=u[A].charAt(0)&&(0==u[A].length?l=null:null==l?(l=new mxCell(u[A],new mxGeometry(t,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),l.vertex=!0,R.push(l),U=E.getPreferredSizeForCell(l),
null!=U&&l.geometry.width<U.width+10&&(l.geometry.width=U.width+10),t+=l.geometry.width+40):"--"==u[A]?(U=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),U.vertex=!0,l.geometry.height+=U.geometry.height,l.insert(U)):0<u[A].length&&(T=new mxCell(u[A],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
T.vertex=!0,U=E.getPreferredSizeForCell(T),null!=U&&T.geometry.width<U.width&&(T.geometry.width=U.width),l.geometry.width=Math.max(l.geometry.width,T.geometry.width),l.geometry.height+=T.geometry.height,l.insert(T)));if(0<R.length){x=mxEvent.isAltDown(p)?x:E.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0));E.getModel().beginUpdate();try{R=E.importCells(R,x.x,x.y);U=[];for(A=0;A<R.length;A++)U.push(R[A]),U=U.concat(R[A].children);E.fireEvent(new mxEventObject("cellsInserted","cells",U))}finally{E.getModel().endUpdate()}E.setSelectionCells(R);
-E.scrollCellToVisible(E.getSelectionCell())}}}else{t=function(K){var k=F[K];null==k&&(k=new mxCell(K,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,F[K]=k,R.push(k));return k};var F={};R=[];for(A=0;A<u.length;A++)if(";"!=u[A].charAt(0)){var J=u[A].split("->");2<=J.length&&(n=t(J[0]),B=t(J[J.length-1]),J=new mxCell(2<J.length?J[1]:"",new mxGeometry),J.edge=!0,J.geometry.relative=!0,n.insertEdge(J,!0),B.insertEdge(J,!1),R.push(J))}if(0<R.length){u=document.createElement("div");u.style.visibility=
+E.scrollCellToVisible(E.getSelectionCell())}}}else{t=function(K){var k=F[K];null==k&&(k=new mxCell(K,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,F[K]=k,R.push(k));return k};var F={};R=[];for(A=0;A<u.length;A++)if(";"!=u[A].charAt(0)){var J=u[A].split("->");2<=J.length&&(n=t(J[0]),C=t(J[J.length-1]),J=new mxCell(2<J.length?J[1]:"",new mxGeometry),J.edge=!0,J.geometry.relative=!0,n.insertEdge(J,!0),C.insertEdge(J,!1),R.push(J))}if(0<R.length){u=document.createElement("div");u.style.visibility=
"hidden";document.body.appendChild(u);E=new Graph(u);E.getModel().beginUpdate();try{R=E.importCells(R);for(A=0;A<R.length;A++)E.getModel().isVertex(R[A])&&(U=E.getPreferredSizeForCell(R[A]),R[A].geometry.width=Math.max(R[A].geometry.width,U.width),R[A].geometry.height=Math.max(R[A].geometry.height,U.height));A=!0;"horizontalFlow"==l||"verticalFlow"==l?((new mxHierarchicalLayout(E,"horizontalFlow"==l?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(E.getDefaultParent(),R),A=!1):"circle"==
-l?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));A&&(L=new mxParallelEdgeLayout(E),L.spacing=30,L.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();U=[];b.editor.graph.getModel().beginUpdate();try{R=E.getModel().getChildren(E.getDefaultParent()),x=mxEvent.isAltDown(p)?x:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0)),U=b.editor.graph.importCells(R,
+l?(new mxCircleLayout(E)).execute(E.getDefaultParent()):(T=new mxFastOrganicLayout(E),T.disableEdgeStyle=!1,T.forceConstant=180,T.execute(E.getDefaultParent()));A&&(M=new mxParallelEdgeLayout(E),M.spacing=30,M.execute(E.getDefaultParent()))}finally{E.getModel().endUpdate()}E.clearCellOverlays();U=[];b.editor.graph.getModel().beginUpdate();try{R=E.getModel().getChildren(E.getDefaultParent()),x=mxEvent.isAltDown(p)?x:b.editor.graph.getCenterInsertPoint(E.getBoundingBoxFromGeometry(R,!0)),U=b.editor.graph.importCells(R,
x.x,x.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",U))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(U);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());E.destroy();u.parentNode.removeChild(u)}}}function q(){return"list"==y.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==y.value||
"mermaid2drawio"==y.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==y.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==y.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var C=document.createElement("textarea");C.style.boxSizing="border-box";C.style.resize=
-"none";C.style.width="100%";C.style.height="354px";C.style.marginBottom="16px";var y=document.createElement("select");y.className="geBtn";if("formatSql"==m||"mermaid"==m&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var I=document.createElement("option");I.setAttribute("value","list");mxUtils.write(I,mxResources.get("list"));"plantUml"!=m&&"mermaid"!=m&&y.appendChild(I);null!=m&&"fromText"!=m||I.setAttribute("selected","selected");I=document.createElement("option");
-I.setAttribute("value","table");mxUtils.write(I,mxResources.get("formatSql"));"formatSql"==m&&(y.appendChild(I),I.setAttribute("selected","selected"));I=document.createElement("option");I.setAttribute("value","mermaid");mxUtils.write(I,mxResources.get("image"));if("mermaid"==m)if("undefined"!==typeof mxMermaidToDrawio){var M=document.createElement("option");M.setAttribute("value","mermaid2drawio");M.setAttribute("selected","selected");mxUtils.write(M,mxResources.get("diagram"));y.appendChild(M)}else y.style.display=
-"none";y.appendChild(I);I=document.createElement("option");I.setAttribute("value","diagram");mxUtils.write(I,mxResources.get("diagram"));M=document.createElement("option");M.setAttribute("value","circle");mxUtils.write(M,mxResources.get("circle"));var H=document.createElement("option");H.setAttribute("value","horizontalFlow");mxUtils.write(H,mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));
-"plantUml"!=m&&"mermaid"!=m&&(y.appendChild(I),y.appendChild(M),y.appendChild(H),y.appendChild(c));I=document.createElement("option");I.setAttribute("value","plantUmlSvg");mxUtils.write(I,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==m&&I.setAttribute("selected","selected");M=document.createElement("option");M.setAttribute("value","plantUmlPng");mxUtils.write(M,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");H=document.createElement("option");H.setAttribute("value",
-"plantUmlTxt");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==m&&(y.appendChild(I),y.appendChild(M),y.appendChild(H));var e=q();C.value=e;f.appendChild(C);this.init=function(){C.focus()};Graph.fileSupport&&(C.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),C.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=
-g.dataTransfer.files[0];var l=new FileReader;l.onload=function(p){C.value=p.target.result};l.readAsText(g)}},!1));f.appendChild(y);mxEvent.addListener(y,"change",function(){var g=q();if(0==C.value.length||C.value==e)e=g,C.value=e});b.isOffline()||"mermaid"!=m&&"plantUml"!=m||(I=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==m?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),I.className="geBtn",f.appendChild(I));I=mxUtils.button(mxResources.get("close"),
-function(){C.value==e?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});I.className="geBtn";b.editor.cancelFirst&&f.appendChild(I);M=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),d(C.value,y.value,g)}catch(l){b.handleError(l)}});M.className="geBtn gePrimaryBtn";f.appendChild(M);b.editor.cancelFirst||f.appendChild(I);this.container=f},NewDialog=function(b,f,m,d,q,x,C,y,I,M,H,c,e,g,l,p,u,z,E){function D(ja){null!=ja&&(la=Fa=ja?135:140);ja=
-!0;if(null!=Wa)for(;k<Wa.length&&(ja||0!=mxUtils.mod(k,30));){var pa=Wa[k++];pa=t(pa.url,pa.libs,pa.title,pa.tooltip?pa.tooltip:pa.title,pa.select,pa.imgUrl,pa.info,pa.onClick,pa.preview,pa.noImg,pa.clibs,pa.type);ja&&pa.click();ja=!1}}function A(ja,pa,sa,ra,na,ua){if(null!=ja&&mxUtils.isAncestorNode(document.body,ra)){ja=mxUtils.parseXml(ja);ja=Editor.parseDiagramNode(ja.documentElement,null,!0);var Ha=new mxCodec(ja.ownerDocument),Ea=new mxGraphModel;Ha.decode(ja,Ea);b.sidebar.createTooltip(ra,
-Ea.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=na?mxResources.get(na):null,!0,new mxPoint(pa,sa),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ua&&T(ra,null,null,ua,infoObj,clibs)},!0,!1)}}function P(){var ja=document.createElement("div");ja.style.position="absolute";ja.style.overflow=
-"visible";ja.style.left="8px";ja.style.right="8px";ja.style.bottom="8px";ja.style.top="8px";mxUtils.write(ja,mxResources.get("describeYourDiagram")+":");mxUtils.br(ja);var pa=document.createElement("input");pa.setAttribute("type","text");pa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));pa.style.width="100%";pa.style.marginTop="6px";pa.style.marginBottom="4px";pa.style.boxSizing="border-box";ja.appendChild(pa);ja.init=function(){pa.focus()};mxUtils.br(ja);var sa=document.createElement("div");
-sa.style.top="86px";sa.style.left="2px";sa.style.right="2px";sa.style.bottom="2px";sa.style.position="absolute";sa.style.border="1px solid #424242";var ra=document.createElement("div");ra.style.boxSizing="border-box";ra.style.position="relative";ra.style.textAlign="center";ra.style.top="50%";mxUtils.write(ra,mxResources.get("blankDiagram"));sa.appendChild(ra);var na=document.createElement("select");na.className="geBtn";na.style.maxWidth="160px";na.style.marginLeft="0px";ra=document.createElement("option");
-mxUtils.write(ra,mxResources.get("diagramType"));ra.setAttribute("value","");na.appendChild(ra);for(var ua=0;ua<EditorUi.mermaidDiagramTypes.length;ua++){ra=document.createElement("option");var Ha=EditorUi.mermaidDiagramTypes[ua],Ea=Ha;Ha==urlParams["smart-template-type"]&&ra.setAttribute("selected","selected");"erDiagram"==Ea&&(Ea="entityRelationshipDiagram");Ea=mxResources.get(Ea,null,Ea.charAt(0).toUpperCase()+Ea.substring(1).replace(/[A-Z]/g," $&"));ra.setAttribute("value",Ha);mxUtils.write(ra,
-Ea);na.appendChild(ra)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=pa.value,Qa=na.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+(""!=Qa?Qa:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Qa=""!=na.value?" ("+mxUtils.trim(mxUtils.getTextContent(na.options[na.selectedIndex]))+")":"";var Xa="gantt"==na.value||"pie"==na.value||
-"timeline"==na.value||"quadrantchart"==na.value||"c4context"==na.value,Na=pa.value+Qa;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Oa){Xa||(za=ha=Oa,va="Smart Template: "+Na)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Oa,Ia,bb,Za){b.spinner.stop();sa.innerHTML="";var Ya=document.createElement("img");Ya.setAttribute("title",Na);Ya.src="data:image/svg+xml;base64,"+Ia.substring(Ia.indexOf(",")+
-1);Ya.style.cursor="pointer";Ya.style.width="100%";Ya.style.height="100%";sa.appendChild(Ya);Oa=b.createMermaidXml(Oa,EditorUi.defaultMermaidConfig,Ia,bb,Za,Na);var hb="<mxfile><diagram>"+Graph.compress(Oa)+"</diagram></mxfile>";if(Xa||"undefined"===typeof mxMermaidToDrawio)za=ha=Oa;Oa=N.cloneNode(!0);sa.appendChild(Oa);Ia=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};bb=function(gb){S||A(hb,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ya,Na)};mxEvent.addGestureListeners(Ya,
-Ia,null,bb);mxEvent.addGestureListeners(Oa,Ia,null,bb)},function(Oa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Oa)})});La.setAttribute("disabled","disabled");La.className="geBtn gePrimaryBtn";ra=function(){window.setTimeout(function(){""!=pa.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};ua=urlParams["smart-template"];null!=ua&&"1"!=ua&&(pa.value=decodeURIComponent(ua),ra(),"1"==urlParams["smart-template-generate"]&&
-window.setTimeout(function(){La.click()},0));mxEvent.addListener(pa,"change",ra);mxEvent.addListener(pa,"keydown",ra);mxEvent.addListener(pa,"cut",ra);mxEvent.addListener(pa,"paste",ra);mxEvent.addListener(pa,"keydown",function(Pa){13==Pa.keyCode&&La.click()});ra=document.createElement("div");ra.style.height="40px";ra.style.marginTop="4px";ra.style.marginBottom="4px";ra.style.whiteSpace="nowrap";ra.style.overflowX="auto";ra.style.overflowY="hidden";ra.appendChild(na);ra.appendChild(La);ja.appendChild(ra);
-ja.appendChild(sa);return ja}function R(){if(ia&&null!=g)m||b.hideDialog(),g(ia,da,K.value);else if(d)m||b.hideDialog(),d(ha,K.value,fa,ka);else{var ja=K.value;if(null!=ja&&0<ja.length){var pa=function(ra,na,ua){b.createFile(ua,ha,null!=ka&&0<ka.length?ka:null,ra,function(){b.hideDialog()},null,na,null,null!=ba&&0<ba.length?ba:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var sa=new SaveDialog(b,ja,mxUtils.bind(this,function(ra,na,ua){pa(na,ua,ra.value)}),null,null,null,null,b.mode);
-b.showDialog(sa.container,420,150,!0,!1);sa.init()}else b.pickFolder(b.mode,function(ra){pa(b.mode,ra,ja)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function T(ja,pa,sa,ra,na,ua,Ha){return aa!=ja?(null!=aa&&(aa.classList.remove("geTemplateSelected"),aa==wa&&(xa.style.display="none",Da.style.display="",ya.style.visibility="hidden",Ka.style.visibility=null!=za?"visible":"hidden")),ja==wa&&(pa=za,null!=pa?(Ka.style.visibility="visible",Ka.style.visibility=null!=za?"visible":
-"hidden",ya.style.visibility="visible"):(xa.style.display="",ya.style.visibility="hidden",Ka.style.visibility="hidden")),G.removeAttribute("disabled"),ha=pa,ka=sa,ba=ua,aa=ja,ia=ra,fa=Ha,da=na,aa.classList.add("geTemplateSelected"),!0):!1}function L(){xa.style.display="";Da.style.display="none";ya.style.visibility="hidden";Ka.style.visibility="hidden";Aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Aa.select():document.execCommand("selectAll",!1,null)}function U(){Da.style.backgroundImage=
-Ca;Da.style.backgroundSize="contain";xa.style.display="none";Da.style.display="";ya.style.visibility="visible";Ka.style.visibility="visible"}function n(ja){var pa=mxUtils.trim(Aa.value);if(ja||""==pa)null!=va&&(Aa.value=va,U());else{var sa=!1;ja='Write a detailed and complex MermaidJS declaration for "'+(""!=pa?pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,
-function(ra){ra!=b.emptyDiagramXml&&(sa=!0,ha=ra)}));Da.style.backgroundImage="url("+Editor.spinImage+")";Da.style.backgroundSize="12px 12px";Da.style.display="";xa.style.display="none";b.generateOpenAiMermaidDiagram(ja,function(ra,na,ua,Ha){aa==wa&&"none"==xa.style.display&&(Ca="url(data:image/svg+xml;base64,"+na.substring(na.indexOf(",")+1)+")",wa.setAttribute("title",pa),Ka.style.display="",za=ha=ra=sa?ha:b.createMermaidXml(ra,EditorUi.defaultMermaidConfig,na,ua,Ha,pa),va=pa,U())},function(ra){aa==
-wa&&(xa.style.display="",Da.style.display="none",ya.style.visibility="hidden",Ka.style.visibility="hidden",b.handleError(ra))})}}function t(ja,pa,sa,ra,na,ua,Ha,Ea,La,Pa,Qa,Xa){function Na(Sa,db){null==bb?(Za=Sa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(eb){200<=eb.getStatus()&&299>=eb.getStatus()&&(bb=eb.getText());db(bb,Za)}))):db(bb,Za)}function Oa(Sa,db){if(null==ja||O||
-b.sidebar.currentElt==Ia)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=Q){var eb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Q.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Q.naturalWidth+'" height="'+Q.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";A(eb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),sa,ja)}else b.sidebar.currentElt=
-Ia,O=!0,Na(ja,function(jb){if(O&&b.sidebar.currentElt==Ia)try{A(jb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),Ia,db)}catch(kb){b.sidebar.currentElt=null,b.handleError(kb)}O=!1})}var Ia=null;if("generative"!=Xa||null==wa){Ia=document.createElement("div");Ia.className="geTemplate";var bb=null,Za=ja;null!=sa?Ia.setAttribute("title",mxResources.get(sa,null,sa)):null!=ra&&0<ra.length&&Ia.setAttribute("title",ra)}else Ia=wa;var Ya=document.createElement("span");Ya.className="geAdaptiveAsset";mxUtils.write(Ya,
-mxResources.get(sa,null,sa));if(null!=ua){Ia.style.display="inline-flex";Ia.style.justifyContent="center";Ia.style.alignItems="center";La=document.createElement("img");La.setAttribute("src",ua);La.setAttribute("alt",ra);La.style.maxWidth=la+"px";La.style.maxHeight=Fa+"px";Q=La;var hb=ua.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ia.appendChild(La);La.onerror=function(){this.src!=hb?this.src=hb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ia,mxUtils.bind(this,
-function(Sa){T(Ia,null,null,ja,Ha,Qa)}),null,null);mxEvent.addListener(Ia,"dblclick",function(Sa){R();mxEvent.consume(Sa)})}else if(!Pa&&null!=ja&&0<ja.length){var gb=function(Sa){v.spin(oa)&&Na(ja,function(db,eb){v.stop();null!=db&&(T(Ia,db,pa,null,null,Qa,eb),Sa&&R())})};ua=La||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";La=Da.cloneNode(!1);La.style.backgroundImage="url("+ua+")";La.style.display="";Ia.appendChild(La);null!=sa&&Ia.appendChild(Ya);mxEvent.addGestureListeners(Ia,mxUtils.bind(this,
-function(Sa){gb()}),null,null);mxEvent.addListener(Ia,"dblclick",function(Sa){gb(!0);mxEvent.consume(Sa)})}else Ia.appendChild(Ya),"generative"==Xa&&null==wa&&(Ia.appendChild(Da),Ia.appendChild(xa),Ia.appendChild(Ka),Ia.appendChild(ya),wa=Ia),na&&T(Ia),null!=Ea?(mxEvent.addGestureListeners(Ia,null,null,mxUtils.bind(this,function(Sa){T(Ia,null,null,ja,Ha)})),mxEvent.addListener(Ia,"click",Ea)):(mxEvent.addListener(Ia,"click",function(Sa){T(Ia,null,null,ja,Ha)&&"generative"==Xa&&null==za&&L()}),mxEvent.addListener(Ia,
-"dblclick",function(Sa){"generative"!=Xa?R():"none"==xa.style.display&&L();mxEvent.consume(Sa)}));null!=ja&&(ua=N.cloneNode(!0),Ia.appendChild(ua),mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(Sa){S=b.sidebar.currentElt==Ia}),null,null),mxEvent.addListener(ua,"click",mxUtils.bind(this,function(Sa){S||Oa(Sa,null!=sa?sa:ra);mxEvent.consume(Sa)})));oa.appendChild(Ia);return Ia}function B(){function ja(Na,Oa){Na=mxResources.get(Na,null,Na.substring(0,1).toUpperCase()+Na.substring(1));18<Na.length&&
-(Na=Na.substring(0,18)+"&hellip;");return Na+(null!=Oa?" ("+Oa.length+")":"")}function pa(Na,Oa,Ia){mxEvent.addListener(Oa,"click",function(){Ta!=Oa&&(null!=Ta&&(Ta.style.backgroundColor=""),Ta=Oa,Ta.style.backgroundColor=C,oa.scrollTop=0,oa.innerText="",k=0,null!=Ma[Na].content?(oa.appendChild(Ma[Na].content),ha=za,Wa=null,null!=Ma[Na].content.init&&Ma[Na].content.init()):(Wa=Ia?Va[Na][Ia]:Ma[Na],W=null,D(!1)))});"smartTemplate"!=Na||!E&&null==urlParams["smart-template"]||Oa.click()}cb&&(cb=!1,mxEvent.addListener(oa,
-"scroll",function(Na){oa.scrollTop+oa.clientHeight>=oa.scrollHeight&&(D(),mxEvent.consume(Na))}));if(0<fb){var sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,mxResources.get("custom"));qa.appendChild(sa);for(var ra in Ua){var na=document.createElement("div");sa=ra;var ua=Ua[ra];18<sa.length&&(sa=sa.substring(0,18)+"&hellip;");na.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-na.setAttribute("title",sa+" ("+ua.length+")");mxUtils.write(na,na.getAttribute("title"));null!=M&&(na.style.padding=M);qa.appendChild(na);(function(Na,Oa){mxEvent.addListener(na,"click",function(){Ta!=Oa&&(Ta.style.backgroundColor="",Ta=Oa,Ta.style.backgroundColor=C,oa.scrollTop=0,oa.innerText="",k=0,Wa=Ua[Na],W=null,D(!1))})})(ra,na)}sa=document.createElement("div");sa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(sa,"draw.io");qa.appendChild(sa)}for(ra in Ma){sa=
-ua=null;if(null!=Ma[ra].content)na=document.createElement(Ha?"ul":"div"),sa=ja(ra),na.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",na.setAttribute("title",sa),mxUtils.write(na,sa),qa.appendChild(na),sa=na;else{var Ha=Va[ra];sa=na=document.createElement(Ha?"ul":"div");ua=Ma[ra];var Ea=ja(ra,ua);if(null!=Ha){ua=document.createElement("li");var La=document.createElement("div");
-La.className="geTempTreeCaret";La.setAttribute("title",Ea);mxUtils.write(La,Ea);sa=La;ua.appendChild(La);Ea=document.createElement("ul");Ea.className="geTempTreeNested";Ea.style.visibility="hidden";for(var Pa in Ha){var Qa=document.createElement("li"),Xa=ja(Pa,Ha[Pa]);Qa.setAttribute("title",Xa);mxUtils.write(Qa,Xa);pa(ra,Qa,Pa);Ea.appendChild(Qa)}ua.appendChild(Ea);na.className="geTempTree";na.appendChild(ua);(function(Na,Oa){mxEvent.addListener(Oa,"click",function(){Na.style.visibility="visible";
-Na.classList.toggle("geTempTreeActive");Na.classList.toggle("geTempTreeNested")&&setTimeout(function(){Na.style.visibility="hidden"},550);Oa.classList.toggle("geTempTreeCaret-down")})})(Ea,La)}else na.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",na.setAttribute("title",Ea),mxUtils.write(na,Ea);null!=M&&(na.style.padding=M);qa.appendChild(na)}pa(ra,sa);null==Ta&&sa.click()}D(!1)}
-y=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);m=null!=m?m:!0;q=null!=q?q:!1;C=null!=C?C:"light-dark(#ebf2f9, "+Editor.darkColor+")";H=null!=H?H:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";m&&F.appendChild(I);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width=
+"plantUmlSvg"==y.value||"plantUmlTxt"==y.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var x=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var B=document.createElement("textarea");B.style.boxSizing="border-box";B.style.resize=
+"none";B.style.width="100%";B.style.height="354px";B.style.marginBottom="16px";var y=document.createElement("select");y.className="geBtn";if("formatSql"==m||"mermaid"==m&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())y.style.display="none";var I=document.createElement("option");I.setAttribute("value","list");mxUtils.write(I,mxResources.get("list"));"plantUml"!=m&&"mermaid"!=m&&y.appendChild(I);null!=m&&"fromText"!=m||I.setAttribute("selected","selected");I=document.createElement("option");
+I.setAttribute("value","table");mxUtils.write(I,mxResources.get("formatSql"));"formatSql"==m&&(y.appendChild(I),I.setAttribute("selected","selected"));I=document.createElement("option");I.setAttribute("value","mermaid");mxUtils.write(I,mxResources.get("image"));if("mermaid"==m)if("undefined"!==typeof mxMermaidToDrawio){var L=document.createElement("option");L.setAttribute("value","mermaid2drawio");L.setAttribute("selected","selected");mxUtils.write(L,mxResources.get("diagram"));y.appendChild(L)}else y.style.display=
+"none";y.appendChild(I);I=document.createElement("option");I.setAttribute("value","diagram");mxUtils.write(I,mxResources.get("diagram"));L=document.createElement("option");L.setAttribute("value","circle");mxUtils.write(L,mxResources.get("circle"));var H=document.createElement("option");H.setAttribute("value","horizontalFlow");mxUtils.write(H,mxResources.get("horizontalFlow"));var c=document.createElement("option");c.setAttribute("value","verticalFlow");mxUtils.write(c,mxResources.get("verticalFlow"));
+"plantUml"!=m&&"mermaid"!=m&&(y.appendChild(I),y.appendChild(L),y.appendChild(H),y.appendChild(c));I=document.createElement("option");I.setAttribute("value","plantUmlSvg");mxUtils.write(I,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==m&&I.setAttribute("selected","selected");L=document.createElement("option");L.setAttribute("value","plantUmlPng");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");H=document.createElement("option");H.setAttribute("value",
+"plantUmlTxt");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==m&&(y.appendChild(I),y.appendChild(L),y.appendChild(H));var e=q();B.value=e;f.appendChild(B);this.init=function(){B.focus()};Graph.fileSupport&&(B.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),B.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=
+g.dataTransfer.files[0];var l=new FileReader;l.onload=function(p){B.value=p.target.result};l.readAsText(g)}},!1));"plantUml"==m&&(I=document.createElement("div"),I.style.display="inline-block",I.style.color="#c00",I.style.fontSize="12px",I.style.marginRight="16px",I.innerHTML='<a href="https://github.com/jgraph/drawio/discussions/5074" target="_blank" rel="noopener noreferrer" style="color: #c00; text-decoration: underline;">PlantUML is deprecated</a>',f.appendChild(I));f.appendChild(y);mxEvent.addListener(y,
+"change",function(){var g=q();if(0==B.value.length||B.value==e)e=g,B.value=e});b.isOffline()||"mermaid"!=m&&"plantUml"!=m||(I=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==m?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),I.className="geBtn",f.appendChild(I));I=mxUtils.button(mxResources.get("close"),function(){B.value==e?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});I.className="geBtn";b.editor.cancelFirst&&f.appendChild(I);
+L=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),d(B.value,y.value,g)}catch(l){b.handleError(l)}});L.className="geBtn gePrimaryBtn";f.appendChild(L);b.editor.cancelFirst||f.appendChild(I);this.container=f},NewDialog=function(b,f,m,d,q,x,B,y,I,L,H,c,e,g,l,p,u,z,E){function D(ja){null!=ja&&(la=Fa=ja?135:140);ja=!0;if(null!=Wa)for(;k<Wa.length&&(ja||0!=mxUtils.mod(k,30));){var pa=Wa[k++];pa=t(pa.url,pa.libs,pa.title,pa.tooltip?pa.tooltip:pa.title,pa.select,pa.imgUrl,pa.info,
+pa.onClick,pa.preview,pa.noImg,pa.clibs,pa.type);ja&&pa.click();ja=!1}}function A(ja,pa,ra,sa,oa,va){if(null!=ja&&mxUtils.isAncestorNode(document.body,sa)){ja=mxUtils.parseXml(ja);ja=Editor.parseDiagramNode(ja.documentElement,null,!0);var Ia=new mxCodec(ja.ownerDocument),Ea=new mxGraphModel;Ia.decode(ja,Ea);b.sidebar.createTooltip(sa,Ea.root.children,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||
+document.body.clientHeight)-120,800),null!=oa?mxResources.get(oa):null,!0,new mxPoint(pa,ra),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=va&&T(sa,null,null,va,infoObj,clibs)},!0,!1)}}function Q(){var ja=document.createElement("div");ja.style.position="absolute";ja.style.overflow="visible";ja.style.left="8px";ja.style.right="8px";ja.style.bottom="8px";ja.style.top="8px";mxUtils.write(ja,mxResources.get("describeYourDiagram")+":");mxUtils.br(ja);var pa=document.createElement("input");
+pa.setAttribute("type","text");pa.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));pa.style.width="100%";pa.style.marginTop="6px";pa.style.marginBottom="4px";pa.style.boxSizing="border-box";ja.appendChild(pa);ja.init=function(){pa.focus()};mxUtils.br(ja);var ra=document.createElement("div");ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var sa=document.createElement("div");
+sa.style.boxSizing="border-box";sa.style.position="relative";sa.style.textAlign="center";sa.style.top="50%";mxUtils.write(sa,mxResources.get("blankDiagram"));ra.appendChild(sa);var oa=document.createElement("select");oa.className="geBtn";oa.style.maxWidth="160px";oa.style.marginLeft="0px";sa=document.createElement("option");mxUtils.write(sa,mxResources.get("diagramType"));sa.setAttribute("value","");oa.appendChild(sa);for(var va=0;va<EditorUi.mermaidDiagramTypes.length;va++){sa=document.createElement("option");
+var Ia=EditorUi.mermaidDiagramTypes[va],Ea=Ia;Ia==urlParams["smart-template-type"]&&sa.setAttribute("selected","selected");"erDiagram"==Ea&&(Ea="entityRelationshipDiagram");Ea=mxResources.get(Ea,null,Ea.charAt(0).toUpperCase()+Ea.substring(1).replace(/[A-Z]/g," $&"));sa.setAttribute("value",Ia);mxUtils.write(sa,Ea);oa.appendChild(sa)}var La=mxUtils.button(mxResources.get("generate"),function(){var Pa=pa.value,Qa=oa.value.replace(/([A-Z])/g," $1").toLowerCase();Pa="Write the declaration code for a detailed and complex "+
+(""!=Qa?Qa:"graph")+' that shows "'+(""!=Pa?Pa:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Qa=""!=oa.value?" ("+mxUtils.trim(mxUtils.getTextContent(oa.options[oa.selectedIndex]))+")":"";var Xa="gantt"==oa.value||"pie"==oa.value||"timeline"==oa.value||"quadrantchart"==oa.value||"c4context"==oa.value,Na=pa.value+Qa;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Oa){Xa||(za=ha=Oa,ua="Smart Template: "+
+Na)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Pa,function(Oa,Ha,bb,Za){b.spinner.stop();ra.innerHTML="";var Ya=document.createElement("img");Ya.setAttribute("title",Na);Ya.src="data:image/svg+xml;base64,"+Ha.substring(Ha.indexOf(",")+1);Ya.style.cursor="pointer";Ya.style.width="100%";Ya.style.height="100%";ra.appendChild(Ya);Oa=b.createMermaidXml(Oa,EditorUi.defaultMermaidConfig,Ha,bb,Za,Na);var hb="<mxfile><diagram>"+Graph.compress(Oa)+"</diagram></mxfile>";
+if(Xa||"undefined"===typeof mxMermaidToDrawio)za=ha=Oa;Oa=N.cloneNode(!0);ra.appendChild(Oa);Ha=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};bb=function(gb){S||A(hb,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ya,Na)};mxEvent.addGestureListeners(Ya,Ha,null,bb);mxEvent.addGestureListeners(Oa,Ha,null,bb)},function(Oa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Oa)})});La.setAttribute("disabled","disabled");
+La.className="geBtn gePrimaryBtn";sa=function(){window.setTimeout(function(){""!=pa.value?La.removeAttribute("disabled"):La.setAttribute("disabled","disabled")},0)};va=urlParams["smart-template"];null!=va&&"1"!=va&&(pa.value=decodeURIComponent(va),sa(),"1"==urlParams["smart-template-generate"]&&window.setTimeout(function(){La.click()},0));mxEvent.addListener(pa,"change",sa);mxEvent.addListener(pa,"keydown",sa);mxEvent.addListener(pa,"cut",sa);mxEvent.addListener(pa,"paste",sa);mxEvent.addListener(pa,
+"keydown",function(Pa){13==Pa.keyCode&&La.click()});sa=document.createElement("div");sa.style.height="40px";sa.style.marginTop="4px";sa.style.marginBottom="4px";sa.style.whiteSpace="nowrap";sa.style.overflowX="auto";sa.style.overflowY="hidden";sa.appendChild(oa);sa.appendChild(La);ja.appendChild(sa);ja.appendChild(ra);return ja}function R(){if(ia&&null!=g)m||b.hideDialog(),g(ia,da,K.value);else if(d)m||b.hideDialog(),d(ha,K.value,fa,ka);else{var ja=K.value;if(null!=ja&&0<ja.length){var pa=function(sa,
+oa,va){b.createFile(va,ha,null!=ka&&0<ka.length?ka:null,sa,function(){b.hideDialog()},null,oa,null,null!=ba&&0<ba.length?ba:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,ja,mxUtils.bind(this,function(sa,oa,va){pa(oa,va,sa.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(sa){pa(b.mode,sa,ja)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function T(ja,pa,ra,sa,
+oa,va,Ia){return aa!=ja?(null!=aa&&(aa.classList.remove("geTemplateSelected"),aa==wa&&(xa.style.display="none",Da.style.display="",ya.style.visibility="hidden",Ka.style.visibility=null!=za?"visible":"hidden")),ja==wa&&(pa=za,null!=pa?(Ka.style.visibility="visible",Ka.style.visibility=null!=za?"visible":"hidden",ya.style.visibility="visible"):(xa.style.display="",ya.style.visibility="hidden",Ka.style.visibility="hidden")),G.removeAttribute("disabled"),ha=pa,ka=ra,ba=va,aa=ja,ia=sa,fa=Ia,da=oa,aa.classList.add("geTemplateSelected"),
+!0):!1}function M(){xa.style.display="";Da.style.display="none";ya.style.visibility="hidden";Ka.style.visibility="hidden";Aa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Aa.select():document.execCommand("selectAll",!1,null)}function U(){Da.style.backgroundImage=Ca;Da.style.backgroundSize="contain";xa.style.display="none";Da.style.display="";ya.style.visibility="visible";Ka.style.visibility="visible"}function n(ja){var pa=mxUtils.trim(Aa.value);ja||""==pa?null!=ua&&(Aa.value=ua,
+U()):(Da.style.backgroundImage="url("+Editor.spinImage+")",Da.style.backgroundSize="12px 12px",Da.style.display="",xa.style.display="none",b.generateDiagram(pa,mxUtils.bind(this,function(ra,sa){aa==wa&&"none"==xa.style.display&&(Ca="url(data:image/svg+xml;base64,"+sa.substring(sa.indexOf(",")+1)+")",wa.setAttribute("title",pa),Ka.style.display="",za=ha=ra,ua=pa,U())}),mxUtils.bind(this,function(ra){aa==wa&&(xa.style.display="",Da.style.display="none",ya.style.visibility="hidden",Ka.style.visibility=
+"hidden",b.handleError(ra))})))}function t(ja,pa,ra,sa,oa,va,Ia,Ea,La,Pa,Qa,Xa){function Na(Sa,db){null==bb?(Za=Sa,Za=/^https?:\/\//.test(Za)?b.editor.isCorsEnabledForUrl(Za)?Za:PROXY_URL+"?url="+encodeURIComponent(Za):TEMPLATE_PATH+"/"+Za,mxUtils.get(Za,mxUtils.bind(this,function(eb){200<=eb.getStatus()&&299>=eb.getStatus()&&(bb=eb.getText());db(bb,Za)}))):db(bb,Za)}function Oa(Sa,db){if(null==ja||O||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var eb=
+"<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";A(eb,mxEvent.getClientX(Sa),mxEvent.getClientY(Sa),ra,ja)}else b.sidebar.currentElt=Ha,O=!0,Na(ja,function(jb){if(O&&b.sidebar.currentElt==Ha)try{A(jb,mxEvent.getClientX(Sa),
+mxEvent.getClientY(Sa),Ha,db)}catch(kb){b.sidebar.currentElt=null,b.handleError(kb)}O=!1})}var Ha=null;if("generative"!=Xa||null==wa){Ha=document.createElement("div");Ha.className="geTemplate";var bb=null,Za=ja;null!=ra?Ha.setAttribute("title",mxResources.get(ra,null,ra)):null!=sa&&0<sa.length&&Ha.setAttribute("title",sa)}else Ha=wa;var Ya=document.createElement("span");Ya.className="geAdaptiveAsset";mxUtils.write(Ya,mxResources.get(ra,null,ra));if(null!=va){Ha.style.display="inline-flex";Ha.style.justifyContent=
+"center";Ha.style.alignItems="center";La=document.createElement("img");La.setAttribute("src",va);La.setAttribute("alt",sa);La.style.maxWidth=la+"px";La.style.maxHeight=Fa+"px";P=La;var hb=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(La);La.onerror=function(){this.src!=hb?this.src=hb:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Sa){T(Ha,null,null,ja,Ia,Qa)}),null,null);mxEvent.addListener(Ha,"dblclick",
+function(Sa){R();mxEvent.consume(Sa)})}else if(!Pa&&null!=ja&&0<ja.length){var gb=function(Sa){v.spin(na)&&Na(ja,function(db,eb){v.stop();null!=db&&(T(Ha,db,pa,null,null,Qa,eb),Sa&&R())})};va=La||TEMPLATE_PATH+"/"+ja.substring(0,ja.length-4)+".png";La=Da.cloneNode(!1);La.style.backgroundImage="url("+va+")";La.style.display="";Ha.appendChild(La);null!=ra&&Ha.appendChild(Ya);mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Sa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Sa){gb(!0);
+mxEvent.consume(Sa)})}else Ha.appendChild(Ya),"generative"==Xa&&null==wa&&(Ha.appendChild(Da),Ha.appendChild(xa),Ha.appendChild(Ka),Ha.appendChild(ya),wa=Ha),oa&&T(Ha),null!=Ea?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Sa){T(Ha,null,null,ja,Ia)})),mxEvent.addListener(Ha,"click",Ea)):(mxEvent.addListener(Ha,"click",function(Sa){T(Ha,null,null,ja,Ia)&&"generative"==Xa&&null==za&&M()}),mxEvent.addListener(Ha,"dblclick",function(Sa){"generative"!=Xa?R():"none"==xa.style.display&&
+M();mxEvent.consume(Sa)}));null!=ja&&(va=N.cloneNode(!0),Ha.appendChild(va),mxEvent.addGestureListeners(va,mxUtils.bind(this,function(Sa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(va,"click",mxUtils.bind(this,function(Sa){S||Oa(Sa,null!=ra?ra:sa);mxEvent.consume(Sa)})));na.appendChild(Ha);return Ha}function C(){function ja(Na,Oa){Na=mxResources.get(Na,null,Na.substring(0,1).toUpperCase()+Na.substring(1));18<Na.length&&(Na=Na.substring(0,18)+"&hellip;");return Na+(null!=Oa?" ("+Oa.length+
+")":"")}function pa(Na,Oa,Ha){mxEvent.addListener(Oa,"click",function(){Ta!=Oa&&(null!=Ta&&(Ta.style.backgroundColor=""),Ta=Oa,Ta.style.backgroundColor=B,na.scrollTop=0,na.innerText="",k=0,null!=Ma[Na].content?(na.appendChild(Ma[Na].content),ha=za,Wa=null,null!=Ma[Na].content.init&&Ma[Na].content.init()):(Wa=Ha?Va[Na][Ha]:Ma[Na],W=null,D(!1)))});"smartTemplate"!=Na||!E&&null==urlParams["smart-template"]||Oa.click()}cb&&(cb=!1,mxEvent.addListener(na,"scroll",function(Na){na.scrollTop+na.clientHeight>=
+na.scrollHeight&&(D(),mxEvent.consume(Na))}));if(0<fb){var ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));qa.appendChild(ra);for(var sa in Ua){var oa=document.createElement("div");ra=sa;var va=Ua[sa];18<ra.length&&(ra=ra.substring(0,18)+"&hellip;");oa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+oa.setAttribute("title",ra+" ("+va.length+")");mxUtils.write(oa,oa.getAttribute("title"));null!=L&&(oa.style.padding=L);qa.appendChild(oa);(function(Na,Oa){mxEvent.addListener(oa,"click",function(){Ta!=Oa&&(Ta.style.backgroundColor="",Ta=Oa,Ta.style.backgroundColor=B,na.scrollTop=0,na.innerText="",k=0,Wa=Ua[Na],W=null,D(!1))})})(sa,oa)}ra=document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,"draw.io");qa.appendChild(ra)}for(sa in Ma){ra=
+va=null;if(null!=Ma[sa].content)oa=document.createElement(Ia?"ul":"div"),ra=ja(sa),oa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",oa.setAttribute("title",ra),mxUtils.write(oa,ra),qa.appendChild(oa),ra=oa;else{var Ia=Va[sa];ra=oa=document.createElement(Ia?"ul":"div");va=Ma[sa];var Ea=ja(sa,va);if(null!=Ia){va=document.createElement("li");var La=document.createElement("div");
+La.className="geTempTreeCaret";La.setAttribute("title",Ea);mxUtils.write(La,Ea);ra=La;va.appendChild(La);Ea=document.createElement("ul");Ea.className="geTempTreeNested";Ea.style.visibility="hidden";for(var Pa in Ia){var Qa=document.createElement("li"),Xa=ja(Pa,Ia[Pa]);Qa.setAttribute("title",Xa);mxUtils.write(Qa,Xa);pa(sa,Qa,Pa);Ea.appendChild(Qa)}va.appendChild(Ea);oa.className="geTempTree";oa.appendChild(va);(function(Na,Oa){mxEvent.addListener(Oa,"click",function(){Na.style.visibility="visible";
+Na.classList.toggle("geTempTreeActive");Na.classList.toggle("geTempTreeNested")&&setTimeout(function(){Na.style.visibility="hidden"},550);Oa.classList.toggle("geTempTreeCaret-down")})})(Ea,La)}else oa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",oa.setAttribute("title",Ea),mxUtils.write(oa,Ea);null!=L&&(oa.style.padding=L);qa.appendChild(oa)}pa(sa,ra);null==Ta&&ra.click()}D(!1)}
+y=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);m=null!=m?m:!0;q=null!=q?q:!1;B=null!=B?B:"light-dark(#ebf2f9, "+Editor.darkColor+")";H=null!=H?H:EditorUi.templateFile;var F=document.createElement("div");F.style.userSelect="none";F.style.height="100%";I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height="46px";m&&F.appendChild(I);var J=document.createElement("img");J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width=
"40px";J.style.height="40px";J.style.marginRight="10px";J.style.paddingBottom="4px";J.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";
f||y||!m||I.appendChild(J);m&&mxUtils.write(I,(y?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");J=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?J=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?J=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?J=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?J=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?
-J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+J);K.style.marginLeft="10px";K.style.width=f||y?"144px":"244px";this.init=function(){m&&Editor.selectFilename(K);null!=oa.parentNode&&null!=oa.parentNode.parentNode&&mxEvent.addGestureListeners(oa.parentNode.parentNode,mxUtils.bind(this,function(ja){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};m&&(I.appendChild(K),z?K.style.width=
+J=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(J=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+J);K.style.marginLeft="10px";K.style.width=f||y?"144px":"244px";this.init=function(){m&&Editor.selectFilename(K);null!=na.parentNode&&null!=na.parentNode.parentNode&&mxEvent.addGestureListeners(na.parentNode.parentNode,mxUtils.bind(this,function(ja){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};m&&(I.appendChild(K),z?K.style.width=
f||y?"350px":"450px":null!=b.editor.diagramFileTypes&&(z=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),z.style.marginLeft="6px",z.style.width=f||y?"80px":"180px",I.appendChild(z)));z=!1;var k=0,v=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(p||mxResources.get("create"),function(){G.setAttribute("disabled","disabled");R();G.removeAttribute("disabled")});
-G.className="geBtn gePrimaryBtn";var N=document.createElement("img");N.setAttribute("src",Editor.magnifyImage);N.setAttribute("title",mxResources.get("preview"));N.className="geButton geRoundButton";var O=!1,Q=null,S=!1;if(c||e){var V=[],W=null,X=null,Z=null,Y=function(ja){G.setAttribute("disabled","disabled");for(var pa=0;pa<V.length;pa++)V[pa].className=pa==ja?"geBtn gePrimaryBtn":"geBtn"};z=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";F.appendChild(p);y=
-mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){qa.style.display="";Ba.style.display="";oa.style.left="160px";Y(0);oa.scrollTop=0;oa.innerText="";k=0;W!=Wa&&(Wa=W,Ma=X,fb=Z,qa.innerText="",B(),W=null)});V.push(y);p.appendChild(y);var ea=function(ja){qa.style.display="none";Ba.style.display="none";oa.style.left="30px";Y(ja?-1:1);null==W&&(W=Wa);oa.scrollTop=0;oa.innerText="";v.spin(oa);var pa=function(sa,ra,na){k=0;v.stop();Wa=sa;na=na||{};var ua=0,Ha;for(Ha in na)ua+=na[Ha].length;
-if(ra)oa.innerText=ra;else if(0==sa.length&&0==ua)oa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(oa.innerText="",0<ua){qa.style.display="";oa.style.left="160px";qa.innerText="";fb=0;Ma={"draw.io":sa};for(Ha in na)Ma[Ha]=na[Ha];B()}else D(!0)};ja?e(ca.value,pa):c(pa)};c&&(y=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),p.appendChild(y),V.push(y));if(e){y=document.createElement("span");y.style.marginLeft="10px";y.innerText=mxResources.get("search")+
-":";p.appendChild(y);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(ja){13==ja.keyCode&&ea(!0)});p.appendChild(ca);y=mxUtils.button(mxResources.get("search"),function(){ea(!0)});y.className="geBtn";p.appendChild(y)}Y(0)}var ka=null,ba=null,ha=null,aa=null,ia=null,fa=null,da=null,za=null,va=null,oa=document.createElement("div");oa.style.border="1px solid #d3d3d3";oa.style.position="absolute";
-oa.style.left="160px";oa.style.right="34px";p=(m?72:40)+(z?30:0);oa.style.top=p+"px";oa.style.bottom="68px";oa.style.margin="6px 0 0 -1px";oa.style.padding="6px";oa.style.overflow="auto";var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";
+G.className="geBtn gePrimaryBtn";var N=document.createElement("img");N.setAttribute("src",Editor.magnifyImage);N.setAttribute("title",mxResources.get("preview"));N.className="geButton geRoundButton";var O=!1,P=null,S=!1;if(c||e){var V=[],W=null,X=null,Z=null,Y=function(ja){G.setAttribute("disabled","disabled");for(var pa=0;pa<V.length;pa++)V[pa].className=pa==ja?"geBtn gePrimaryBtn":"geBtn"};z=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";F.appendChild(p);y=
+mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){qa.style.display="";Ba.style.display="";na.style.left="160px";Y(0);na.scrollTop=0;na.innerText="";k=0;W!=Wa&&(Wa=W,Ma=X,fb=Z,qa.innerText="",C(),W=null)});V.push(y);p.appendChild(y);var ea=function(ja){qa.style.display="none";Ba.style.display="none";na.style.left="30px";Y(ja?-1:1);null==W&&(W=Wa);na.scrollTop=0;na.innerText="";v.spin(na);var pa=function(ra,sa,oa){k=0;v.stop();Wa=ra;oa=oa||{};var va=0,Ia;for(Ia in oa)va+=oa[Ia].length;
+if(sa)na.innerText=sa;else if(0==ra.length&&0==va)na.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(na.innerText="",0<va){qa.style.display="";na.style.left="160px";qa.innerText="";fb=0;Ma={"draw.io":ra};for(Ia in oa)Ma[Ia]=oa[Ia];C()}else D(!0)};ja?e(ca.value,pa):c(pa)};c&&(y=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ea()}),p.appendChild(y),V.push(y));if(e){y=document.createElement("span");y.style.marginLeft="10px";y.innerText=mxResources.get("search")+
+":";p.appendChild(y);var ca=document.createElement("input");ca.style.marginRight="10px";ca.style.marginLeft="10px";ca.style.width="220px";mxEvent.addListener(ca,"keypress",function(ja){13==ja.keyCode&&ea(!0)});p.appendChild(ca);y=mxUtils.button(mxResources.get("search"),function(){ea(!0)});y.className="geBtn";p.appendChild(y)}Y(0)}var ka=null,ba=null,ha=null,aa=null,ia=null,fa=null,da=null,za=null,ua=null,na=document.createElement("div");na.style.border="1px solid #d3d3d3";na.style.position="absolute";
+na.style.left="160px";na.style.right="34px";p=(m?72:40)+(z?30:0);na.style.top=p+"px";na.style.bottom="68px";na.style.margin="6px 0 0 -1px";na.style.padding="6px";na.style.overflow="auto";var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";
ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");Ba.appendChild(ma);var ta=document.createElement("img");ta.setAttribute("src",Editor.magnifyImage);ta.setAttribute("title",mxResources.get("search"));ta.className="geAdaptiveAsset";ta.style.position="relative";ta.style.cursor="pointer";ta.style.outline="none";ta.style.opacity="0.5";ta.style.height="16px";ta.style.left="-20px";ta.style.top="4px";Ba.appendChild(ta);mxEvent.addListener(ta,"click",function(){ta.getAttribute("src")!=
-Editor.magnifyImage&&(ta.setAttribute("src",Editor.magnifyImage),ta.setAttribute("title",mxResources.get("search")),ma.value="",null!=$a&&($a.click(),$a=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var pa=ma.value;if(""==pa)null!=$a&&($a.click(),$a=null);else{if(null==NewDialog.tagsList[H]){var sa={};for(Qa in Ma)if(null==Ma[Qa].content)for(var ra=Ma[Qa],na=0;na<ra.length;na++){var ua=ra[na];if(null!=ua.tags)for(var Ha=ua.tags.toLowerCase().split(";"),
-Ea=0;Ea<Ha.length;Ea++)null==sa[Ha[Ea]]&&(sa[Ha[Ea]]=[]),sa[Ha[Ea]].push(ua)}NewDialog.tagsList[H]=sa}var La=pa.toLowerCase().split(" ");sa=NewDialog.tagsList[H];if(0<fb&&null==sa.__tagsList__){for(Qa in Ua)for(ra=Ua[Qa],na=0;na<ra.length;na++)for(ua=ra[na],Ha=ua.title.split(" "),Ha.push(Qa),Ea=0;Ea<Ha.length;Ea++){var Pa=Ha[Ea].toLowerCase();null==sa[Pa]&&(sa[Pa]=[]);sa[Pa].push(ua)}sa.__tagsList__=!0}var Qa=[];ra={};for(na=Ha=0;na<La.length;na++)if(0<La[na].length){Pa=sa[La[na]];var Xa={};Qa=[];
-if(null!=Pa)for(Ea=0;Ea<Pa.length;Ea++)ua=Pa[Ea],0==Ha==(null==ra[ua.url])&&(Xa[ua.url]=!0,Qa.push(ua));ra=Xa;Ha++}oa.scrollTop=0;oa.innerText="";k=0;sa=document.createElement("div");sa.style.padding="6px";sa.style.whiteSpace="nowrap";sa.style.overflow="hidden";sa.style.textOverflow="ellipsis";ua=mxResources.get(0==Qa.length?"noResultsFor":"resultsFor",[pa]);sa.setAttribute("title",ua);mxUtils.write(sa,ua);oa.appendChild(sa);null!=Ta&&null==$a&&(Ta.style.backgroundColor="",$a=Ta,Ta=sa);Wa=Qa;W=null;
-D(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ja){""==ma.value?(ta.setAttribute("src",Editor.magnifyImage),ta.setAttribute("title",mxResources.get("search"))):(ta.setAttribute("src",Editor.crossImage),ta.setAttribute("title",mxResources.get("reset")))}));p+=23;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(oa,
+Editor.magnifyImage&&(ta.setAttribute("src",Editor.magnifyImage),ta.setAttribute("title",mxResources.get("search")),ma.value="",null!=$a&&($a.click(),$a=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ja){if(13==ja.keyCode){var pa=ma.value;if(""==pa)null!=$a&&($a.click(),$a=null);else{if(null==NewDialog.tagsList[H]){var ra={};for(Qa in Ma)if(null==Ma[Qa].content)for(var sa=Ma[Qa],oa=0;oa<sa.length;oa++){var va=sa[oa];if(null!=va.tags)for(var Ia=va.tags.toLowerCase().split(";"),
+Ea=0;Ea<Ia.length;Ea++)null==ra[Ia[Ea]]&&(ra[Ia[Ea]]=[]),ra[Ia[Ea]].push(va)}NewDialog.tagsList[H]=ra}var La=pa.toLowerCase().split(" ");ra=NewDialog.tagsList[H];if(0<fb&&null==ra.__tagsList__){for(Qa in Ua)for(sa=Ua[Qa],oa=0;oa<sa.length;oa++)for(va=sa[oa],Ia=va.title.split(" "),Ia.push(Qa),Ea=0;Ea<Ia.length;Ea++){var Pa=Ia[Ea].toLowerCase();null==ra[Pa]&&(ra[Pa]=[]);ra[Pa].push(va)}ra.__tagsList__=!0}var Qa=[];sa={};for(oa=Ia=0;oa<La.length;oa++)if(0<La[oa].length){Pa=ra[La[oa]];var Xa={};Qa=[];
+if(null!=Pa)for(Ea=0;Ea<Pa.length;Ea++)va=Pa[Ea],0==Ia==(null==sa[va.url])&&(Xa[va.url]=!0,Qa.push(va));sa=Xa;Ia++}na.scrollTop=0;na.innerText="";k=0;ra=document.createElement("div");ra.style.padding="6px";ra.style.whiteSpace="nowrap";ra.style.overflow="hidden";ra.style.textOverflow="ellipsis";va=mxResources.get(0==Qa.length?"noResultsFor":"resultsFor",[pa]);ra.setAttribute("title",va);mxUtils.write(ra,va);na.appendChild(ra);null!=Ta&&null==$a&&(Ta.style.backgroundColor="",$a=Ta,Ta=ra);Wa=Qa;W=null;
+D(!1)}mxEvent.consume(ja)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ja){""==ma.value?(ta.setAttribute("src",Editor.magnifyImage),ta.setAttribute("title",mxResources.get("search"))):(ta.setAttribute("src",Editor.crossImage),ta.setAttribute("title",mxResources.get("reset")))}));p+=23;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(na,
"scroll",function(){null!=b.sidebar&&b.sidebar.hideTooltip()});var la=140,Fa=la,wa=null,Ca="url("+Editor.sparklesImage+")",xa=document.createElement("div");xa.className="geGenerateDiagramForm";xa.style.position="absolute";xa.style.width="100%";xa.style.height="100%";var Da=document.createElement("div");Da.className="geTemplatePreview geAdaptiveAsset";Da.style.backgroundImage=Ca;var Aa=document.createElement("textarea");Aa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));Aa.className=
"geGenerateDiagramDescription";var Ja=document.createElement("button");Ja.className="geBtn gePrimaryBtn geGenerateDiagramButton";Ja.setAttribute("disabled","disabled");Ja.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ja,mxResources.get("ok"));var Ka=N.cloneNode(!0);Ka.style.display="none";var Ga=!1;mxEvent.addGestureListeners(Ka,function(ja){Ga=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ja){if(!Ga&&null!=za){var pa="<mxfile><diagram>"+Graph.compress(za)+
-"</diagram></mxfile>";A(pa,mxEvent.getClientX(ja),mxEvent.getClientY(ja),wa,va)}});var ya=N.cloneNode(!0);ya.setAttribute("src",Editor.editImage);ya.setAttribute("title",mxResources.get("edit"));ya.style.visibility="hidden";ya.style.left="0px";p=N.cloneNode(!0);p.setAttribute("src",Editor.helpImage);p.setAttribute("title",mxResources.get("help"));mxEvent.addListener(p,"click",function(ja){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ja)});xa.appendChild(Aa);
-xa.appendChild(Ja);xa.appendChild(p);xa.style.display="none";mxEvent.addListener(ya,"click",L);mxEvent.addListener(Aa,"input",function(){""!=Aa.value?Ja.removeAttribute("disabled"):Ja.setAttribute("disabled","disabled")});mxEvent.addListener(Ja,"click",function(){n()});mxEvent.addListener(Aa,"keydown",function(ja){13!=ja.keyCode||mxEvent.isShiftDown(ja)?27==ja.keyCode&&(n(!0),mxEvent.consume(ja)):(n(),mxEvent.consume(ja))});var Ma={},Va={},Ua={},fb=0,cb=!0,Ta=null,$a=null;Ma.basic=[{title:"blankDiagram"}];
-var Wa=Ma.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ma.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ma.smartTemplate={content:P()});if(!f){var ab=function(){mxUtils.get(Ra,function(ja){if(!ib){ib=!0;ja=ja.getXml().documentElement.firstChild;for(var pa=
-{};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("parsererror"==ja.nodeName)null!=window.console&&console.log("Parser error in "+H+": "+ja.textContent);else if("clibs"==ja.nodeName){for(var sa=ja.getAttribute("name"),ra=ja.getElementsByTagName("add"),na=[],ua=0;ua<ra.length;ua++)na.push(encodeURIComponent(mxUtils.getTextContent(ra[ua])));null!=sa&&0<na.length&&(pa[sa]=na.join(";"))}else if(na=ja.getAttribute("url"),null!=na){ra=ja.getAttribute("section");sa=ja.getAttribute("subsection");if(null==
-ra&&(ua=na.indexOf("/"),ra=na.substring(0,ua),null==sa)){var Ha=na.indexOf("/",ua+1);-1<Ha&&(sa=na.substring(ua+1,Ha))}ua=Ma[ra];null==ua&&(ua=[],Ma[ra]=ua);na=ja.getAttribute("clibs");null!=pa[na]&&(na=pa[na]);na={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:na,tags:ja.getAttribute("tags")};ua.push(na);null!=sa&&(ua=Va[ra],null==ua&&(ua={},Va[ra]=ua),ra=ua[sa],
-null==ra&&(ra=[],ua[sa]=ra),ra.push(na))}ja=ja.nextSibling}v.stop();B()}})};F.appendChild(Ba);F.appendChild(qa);F.appendChild(oa);var ib=!1,Ra=H;/^https?:\/\//.test(Ra)&&!b.editor.isCorsEnabledForUrl(Ra)&&(Ra=PROXY_URL+"?url="+encodeURIComponent(Ra));v.spin(oa);null!=u?u(function(ja,pa){Ua=ja;Z=fb=pa;ab()},ab):ab();X=Ma}mxEvent.addListener(K,"keypress",function(ja){b.dialog.container.firstChild==F&&13==ja.keyCode&&R()});u=document.createElement("div");u.style.marginTop=f?"4px":"16px";u.style.textAlign=
+"</diagram></mxfile>";A(pa,mxEvent.getClientX(ja),mxEvent.getClientY(ja),wa,ua)}});var ya=N.cloneNode(!0);ya.setAttribute("src",Editor.editImage);ya.setAttribute("title",mxResources.get("edit"));ya.style.visibility="hidden";ya.style.left="0px";p=N.cloneNode(!0);p.setAttribute("src",Editor.helpImage);p.setAttribute("title",mxResources.get("help"));mxEvent.addListener(p,"click",function(ja){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ja)});xa.appendChild(Aa);
+xa.appendChild(Ja);xa.appendChild(p);xa.style.display="none";mxEvent.addListener(ya,"click",M);mxEvent.addListener(Aa,"input",function(){""!=Aa.value?Ja.removeAttribute("disabled"):Ja.setAttribute("disabled","disabled")});mxEvent.addListener(Ja,"click",function(){n()});mxEvent.addListener(Aa,"keydown",function(ja){13!=ja.keyCode||mxEvent.isShiftDown(ja)?27==ja.keyCode&&(n(!0),mxEvent.consume(ja)):(n(),mxEvent.consume(ja))});var Ma={},Va={},Ua={},fb=0,cb=!0,Ta=null,$a=null;Ma.basic=[{title:"blankDiagram"}];
+var Wa=Ma.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ma.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ma.smartTemplate={content:Q()});if(!f){var ab=function(){mxUtils.get(Ra,function(ja){if(!ib){ib=!0;ja=ja.getXml().documentElement.firstChild;for(var pa=
+{};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("parsererror"==ja.nodeName)null!=window.console&&console.log("Parser error in "+H+": "+ja.textContent);else if("clibs"==ja.nodeName){for(var ra=ja.getAttribute("name"),sa=ja.getElementsByTagName("add"),oa=[],va=0;va<sa.length;va++)oa.push(encodeURIComponent(mxUtils.getTextContent(sa[va])));null!=ra&&0<oa.length&&(pa[ra]=oa.join(";"))}else if(oa=ja.getAttribute("url"),null!=oa){sa=ja.getAttribute("section");ra=ja.getAttribute("subsection");if(null==
+sa&&(va=oa.indexOf("/"),sa=oa.substring(0,va),null==ra)){var Ia=oa.indexOf("/",va+1);-1<Ia&&(ra=oa.substring(va+1,Ia))}va=Ma[sa];null==va&&(va=[],Ma[sa]=va);oa=ja.getAttribute("clibs");null!=pa[oa]&&(oa=pa[oa]);oa={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title"),tooltip:ja.getAttribute("name")||ja.getAttribute("url"),preview:ja.getAttribute("preview"),clibs:oa,tags:ja.getAttribute("tags")};va.push(oa);null!=ra&&(va=Va[sa],null==va&&(va={},Va[sa]=va),sa=va[ra],
+null==sa&&(sa=[],va[ra]=sa),sa.push(oa))}ja=ja.nextSibling}v.stop();C()}})};F.appendChild(Ba);F.appendChild(qa);F.appendChild(na);var ib=!1,Ra=H;/^https?:\/\//.test(Ra)&&!b.editor.isCorsEnabledForUrl(Ra)&&(Ra=PROXY_URL+"?url="+encodeURIComponent(Ra));v.spin(na);null!=u?u(function(ja,pa){Ua=ja;Z=fb=pa;ab()},ab):ab();X=Ma}mxEvent.addListener(K,"keypress",function(ja){b.dialog.container.firstChild==F&&13==ja.keyCode&&R()});u=document.createElement("div");u.style.marginTop=f?"4px":"16px";u.style.textAlign=
"right";u.style.position="absolute";u.style.left="40px";u.style.bottom="24px";u.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),function(){null!=x&&x();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||q&&null==x||u.appendChild(p);f||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ja=new FilenameDialog(b,"",mxResources.get("create"),function(pa){null!=pa&&0<pa.length&&
-b.editor.loadUrl(b.editor.getProxiedUrl(pa),function(sa){ha=sa;ka=null;templateRealURl=pa;b.hideDialog();R()},function(sa){b.handleError(sa)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",u.appendChild(f));Graph.fileSupport&&l&&(l=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,
+b.editor.loadUrl(b.editor.getProxiedUrl(pa),function(ra){ha=ra;ka=null;templateRealURl=pa;b.hideDialog();R()},function(ra){b.handleError(ra)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ja.container,300,80,!0,!0);ja.init()}),f.className="geBtn",u.appendChild(f));Graph.fileSupport&&l&&(l=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ja=document.createElement("input");ja.setAttribute("multiple","multiple");ja.setAttribute("type","file");mxEvent.addListener(ja,
"change",function(pa){b.openFiles(ja.files,!0);ja.value=""});ja.style.display="none";document.body.appendChild(ja);b.newDlgFileInputElt=ja}b.newDlgFileInputElt.click()}),l.className="geBtn",u.appendChild(l));u.appendChild(G);b.editor.cancelFirst||null!=d||q&&null==x||u.appendChild(p);F.appendChild(u);this.container=F};NewDialog.tagsList={};
-var SaveDialog=function(b,f,m,d,q,x,C,y){function I(B,F,J,K,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,B))if(k=null!=k?k:b.getTitleForService(B),0<=mxUtils.indexOf(T,B)||null!=b.getServiceForName(B)){G=document.createElement("option");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+B),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{var N=B+
-(null!=J?"-"+J:""),O=n[N];null!=O&&null!=O.option&&O.option.parentNode.removeChild(O.option);O=null;if(null!=F){"/"==F.charAt(F.length-1)&&(F=F.substring(0,F.length-1));"/"==F.charAt(0)&&(F=F.substring(1));O=F;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var Q=O.lastIndexOf("/");0<=Q&&(O=O.substring(Q+1))}40<O.length&&(O=O.substring(0,20)+"..."+O.substring(O.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=O?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(O):"");G.setAttribute("title",k+
-(null!=F?" ("+F+")":"")+(null!=J&&decodeURIComponent(J)!=F?" ["+J+"]":""));G.setAttribute("value",N);n[N]={option:G,mode:B,path:F,id:J};SaveDialog.lastValue==N&&null==y?K=!0:null==K&&("root"==v?K=null==y&&b.mode==B||null!=B&&B==y:"pickFolder-"==P.value.substring(0,11)&&(K=!0));K&&G.setAttribute("selected","selected")}P.appendChild(G)}return G}function M(B){b.pickFolder(B,function(F){var J=null;B==App.MODE_GOOGLE&&null!=F.docs&&0<F.docs.length?J={mode:B,path:F.docs[0].name,id:F.docs[0].id}:B==App.MODE_ONEDRIVE&&
-null!=F.value&&0<F.value.length?J={mode:B,path:F.value[0].name,id:OneDriveFile.prototype.getIdOf(F.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=F&&0<F.length&&(J={mode:B,path:decodeURIComponent(F),id:F});null!=J&&(R.style.display="",b.addRecent(J,"Folders",5),F=I(J.mode,J.path,J.id,!0),P.innerHTML="",n={},H(),J=P.selectedIndex,P.value=F.value,0>P.selectedIndex&&(P.selectedIndex=J))},!0,!0,!0,!0)}function H(){var B=b.getRecent("Folders"),F=0;if(null!=B&&0<B.length){for(var J=0;J<B.length;J++)null!=
-I(B[J].mode,B[J].path,B[J].id)&&F++;0<F&&P.appendChild(L.cloneNode(!0))}I(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");I(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(I(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),I(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&I(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);I(App.MODE_GITHUB,null,null,null,null,"pick");I(App.MODE_GITLAB,null,
-null,null,null,"pick");I(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&I(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&I(App.MODE_BROWSER);B&&I("download");Editor.popupsAllowed&&I("_blank",null,null,null,mxResources.get("openInNewWindow"));0<F&&(P.appendChild(L.cloneNode(!0)),F=P.value,P.appendChild(R),
-P.value=F);if("pickFolder-"==P.value.substring(0,11)||"reset"==P.value)F=document.createElement("option"),F.setAttribute("value",""),F.setAttribute("selected","selected"),mxUtils.write(F,mxResources.get("pickFolder")+"..."),P.insertBefore(F,P.firstChild);U=P.value}function c(){if("reset"==P.value)b.resetRecent("Folders"),P.innerHTML="",P.value="",pickFolderOption=null,n={},H();else if("pickFolder-"==P.value.substring(0,11)){var B=P.value.substring(11);P.value=U;M(B)}else if(null!=A&&null!=n[P.value]&&
-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[A.value].extension){B=b.getExtensionForService(n[P.value].mode);var F=D.value;null!=B&&0>f.indexOf(".")&&0>F.indexOf(".")&&(D.value=F+B)}t.innerHTML="";mxUtils.write(t,mxResources.get("download"==P.value||"_blank"==P.value?"ok":"save"));""==P.value?t.setAttribute("disabled","disabled"):t.removeAttribute("disabled")}var e=document.createElement("div");e.style.display="flex";e.style.flexWrap="wrap";e.style.whiteSpace="nowrap";var g=
-document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var l=null,p=null;if(null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";l=document.createElement("div");l.style.display="inline-block";l.style.height="auto";l.style.maxWidth="25%";l.style.margin="auto";var u=document.createElement("img"),
-z=C?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+x+";base64,"+z);u.style.boxSizing="border-box";u.style.maxHeight="50px";u.style.maxWidth="100%";u.style.paddingLeft="10px";l.appendChild(u);mxClient.IS_FF||"image/png"!=x||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(z,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+x+";base64,"+z+'">'],{type:"text/html"})});
-navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(F){b.handleError(F)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(l.setAttribute("title",mxResources.get("openInNewWindow")),l.style.cursor="pointer",mxEvent.addGestureListeners(l,null,null,function(B){mxEvent.isPopupTrigger(B)||b.openInNewWindow(q,x,C)})):l.setAttribute("title",mxResources.get("preview"))}u=document.createElement("div");
-u.style.display="flex";u.style.padding="1px";u.style.alignItems="center";u.style.justifyContent="flex-end";u.style.gridColumn="1";u.style.whiteSpace="nowrap";var E=document.createElement("div");E.style.display="grid";E.style.padding="1px";E.style.alignItems="center";E.style.gridColumn="2";E.style.gridAutoColumns="minmax(0,1fr) auto";E.style.gap="6px";mxUtils.write(u,mxResources.get("saveAs")+":");var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("value",f);D.style.boxSizing=
-"border-box";D.style.width="100%";E.appendChild(D);g.appendChild(u);g.appendChild(E);var A=null;null!=b.editor.diagramFileTypes&&null==x&&(u=u.cloneNode(!1),E=E.cloneNode(!1),mxUtils.write(u,mxResources.get("type")+":"),A=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),A.style.boxSizing="border-box",A.style.width="100%",E.appendChild(A),g.appendChild(u),g.appendChild(E));u=u.cloneNode(!1);E=E.cloneNode(!1);mxUtils.write(u,mxResources.get("where")+":");var P=document.createElement("select");
-P.style.textOverflow="ellipsis";P.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var T=["browser","device","download","_blank"],L=document.createElement("option");L.setAttribute("disabled","disabled");L.innerHTML="-----------------";var U=null,n={},t=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=P.value;var B=n[SaveDialog.lastValue];null!=B&&m(D,B.mode,B.id)},null,"geBtn gePrimaryBtn");
-mxEvent.addListener(D,"keypress",function(B){13==B.keyCode&&t.click()});mxEvent.addListener(P,"change",c);H();c();E.appendChild(P);null!=SaveDialog.lastValue&&null!=n[SaveDialog.lastValue]&&(P.value=SaveDialog.lastValue);g.appendChild(u);g.appendChild(E);e.appendChild(g);null!=l&&e.appendChild(l);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=x?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
-l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(l);null!=p&&g.appendChild(p);g.appendChild(t);b.editor.cancelFirst||g.appendChild(l);e.appendChild(g);this.init=function(){Editor.selectFilename(D)};this.container=e},CreateDialog=function(b,f,m,d,q,x,C,y,I,M,H,c,e,g,l,p,u){function z(U,n,t,B){function F(){mxEvent.addListener(J,"click",function(){var N=t;if(C){var O=A.value,Q=O.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){N=null!=
-N?N:L.value;var S="";N==App.MODE_GOOGLE?S=b.drive.extension:N==App.MODE_GITHUB?S=b.gitHub.extension:N==App.MODE_GITLAB?S=b.gitLab.extension:N==App.MODE_TRELLO?S=b.trello.extension:N==App.MODE_DROPBOX?S=b.dropbox.extension:N==App.MODE_ONEDRIVE?S=b.oneDrive.extension:N==App.MODE_DEVICE&&(S=".drawio");0<=Q&&(O=O.substring(0,Q));A.value=O+S}}E(t)})}var J=document.createElement("a");J.style.overflow="hidden";var K=document.createElement("img");K.src=U;K.setAttribute("border","0");K.setAttribute("align",
-"absmiddle");K.style.width="60px";K.style.height="60px";K.style.paddingBottom="6px";J.style.display="inline-block";J.className="geBaseButton";J.style.position="relative";J.style.margin="4px";J.style.padding="8px 8px 10px 8px";J.style.whiteSpace="nowrap";J.appendChild(K);J.style.color="gray";J.style.fontSize="11px";var k=document.createElement("div");J.appendChild(k);mxUtils.write(k,n);if(null!=B&&null==b[B]){K.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,
-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(J);var G=window.setTimeout(function(){null==b[B]&&(v.stop(),J.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),K.style.visibility="",v.stop(),F())}))}else F();R.appendChild(J);++T==c&&(mxUtils.br(R),T=0)}function E(U){var n=A.value;if(null==U||null!=n&&0<n.length)u&&b.hideDialog(),
-m(n,U,A)}H="1"==urlParams.noDevice?!1:H;C=null!=C?C:!0;y=null!=y?y:!0;c=null!=c?c:4;u=null!=u?u:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var D=document.createElement("h2");mxUtils.write(D,q||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom="24px";x.appendChild(D);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";
-q.style.display="inline-block";x.appendChild(q);var A=document.createElement("input");A.setAttribute("value",f);A.style.width="180px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){Editor.selectFilename(A)};x.appendChild(A);null!=p&&null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,A,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",x.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=e&&null!=g&&"image/"==
-g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){A.style.width="160px";q=document.createElement("img");var P=l?e:btoa(unescape(encodeURIComponent(e)));q.setAttribute("src","data:"+g+";base64,"+P);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");x.appendChild(q);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
-(p=mxUtils.button(mxResources.get("copy"),function(U){U=b.base64ToBlob(P,"image/png");U=new ClipboardItem({"image/png":U,"text/html":new Blob(['<img src="data:'+g+";base64,"+P+'">'],{type:"text/html"})});navigator.clipboard.write([U]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(n){b.handleError(n)}))}),p.style.marginTop="6px",p.className="geBtn");I&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,
-null,null,function(U){mxEvent.isPopupTrigger(U)||E("_blank")}))}mxUtils.br(x);var R=document.createElement("div");R.style.textAlign="center";var T=0;R.style.marginTop="6px";x.appendChild(R);var L=document.createElement("select");L.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),L.appendChild(e),z(IMAGE_PATH+"/google-drive-logo.svg",
-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),L.appendChild(e),b.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),
-mxUtils.write(e,mxResources.get("dropbox")),L.appendChild(e),b.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),L.appendChild(e),z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(e=document.createElement("option"),
-e.setAttribute("value",App.MODE_GITLAB),mxUtils.write(e,mxResources.get("gitlab")),L.appendChild(e),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),L.appendChild(e),z(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||
-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),L.appendChild(e),b.mode!=App.MODE_DEVICE&&y||e.setAttribute("selected","selected"),H&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&(y=document.createElement("option"),y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),L.appendChild(y),
-b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=M&&(H=mxUtils.button(mxResources.get("help"),function(){b.openLink(M)}),H.className="geBtn",y.appendChild(H));H=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});
-H.className="geBtn";b.editor.cancelFirst&&null==d&&y.appendChild(H);null==d&&(e=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),e.className="geBtn",y.appendChild(e));I&&Editor.popupsAllowed&&(I=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),I.className="geBtn",y.appendChild(I));CreateDialog.showDownloadButton&&(I=mxUtils.button(mxResources.get("download"),function(){E("download")}),I.className="geBtn",y.appendChild(I),null!=p&&(I.style.marginTop="6px",
-y.style.marginTop="6px"));null!=p&&(mxUtils.br(y),y.appendChild(p));b.editor.cancelFirst&&null==d||y.appendChild(H);mxEvent.addListener(A,"keypress",function(U){13==U.keyCode?E(App.MODE_DEVICE):27==U.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(y);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,m,d,q){q=null!=q?q:!0;var x=document.createElement("div");x.style.textAlign="center";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var C=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});C.className="geBtn";C.style.marginBottom="8px";C.style.width="280px";x.appendChild(C);mxUtils.br(x);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();
-null!=m&&m();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=C.style.width;x.appendChild(y);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,m,d,q,x,C,y){function I(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}x=null!=x?x:!0;var M=b.editor.graph,H=document.createElement("div");
+var SaveDialog=function(b,f,m,d,q,x,B,y){function I(C,F,J,K,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,C)){k=null!=k?k:b.getTitleForService(C);var N=0<=mxUtils.indexOf(T,C);if(N||null!=b.getServiceForName(C)){G=document.createElement("option");var O="";!N&&b.isOffline()&&(G.setAttribute("disabled","disabled"),O=" ("+mxResources.get("offline")+")");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"..."+O,G.setAttribute("value",
+"pickFolder-"+C),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{N=C+(null!=J?"-"+J:"");var P=n[N];null!=P&&null!=P.option&&P.option.parentNode.removeChild(P.option);P=null;if(null!=F){"/"==F.charAt(F.length-1)&&(F=F.substring(0,F.length-1));"/"==F.charAt(0)&&(F=F.substring(1));P=F;if(C!=App.MODE_GITHUB&&C==App.MODE_GITLAB){var S=P.lastIndexOf("/");0<=S&&(P=P.substring(S+1))}40<P.length&&(P=P.substring(0,20)+"..."+P.substring(P.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+
+(null!=P?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(P):"")+O;G.setAttribute("title",k+(null!=F?" ("+F+")":"")+(null!=J&&decodeURIComponent(J)!=F?" ["+J+"]":""));G.setAttribute("value",N);n[N]={option:G,mode:C,path:F,id:J};SaveDialog.lastValue==N&&null==y&&"disabled"==!G.getAttribute("disabled")?K=!0:null==K&&("root"==v?K=null==y&&b.mode==C||null!=C&&C==y:"pickFolder-"==Q.value.substring(0,11)&&(K=!0));K&&G.setAttribute("selected","selected")}Q.appendChild(G)}}return G}function L(C){b.pickFolder(C,
+function(F){var J=null;C==App.MODE_GOOGLE&&null!=F.docs&&0<F.docs.length?J={mode:C,path:F.docs[0].name,id:F.docs[0].id}:C==App.MODE_ONEDRIVE&&null!=F.value&&0<F.value.length?J={mode:C,path:F.value[0].name,id:OneDriveFile.prototype.getIdOf(F.value[0])}:(C==App.MODE_GITHUB||C==App.MODE_GITLAB)&&null!=F&&0<F.length&&(J={mode:C,path:decodeURIComponent(F),id:F});null!=J&&(R.style.display="",b.addRecent(J,"Folders",5),F=I(J.mode,J.path,J.id,!0),Q.innerHTML="",n={},H(),J=Q.selectedIndex,Q.value=F.value,
+0>Q.selectedIndex&&(Q.selectedIndex=J))},!0,!0,!0,!0)}function H(){var C=b.getRecent("Folders"),F=0;if(null!=C&&0<C.length){for(var J=0;J<C.length;J++)null!=I(C[J].mode,C[J].path,C[J].id)&&F++;0<F&&Q.appendChild(M.cloneNode(!0))}I(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");I(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(I(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),I(App.MODE_ONEDRIVE,null,
+null,null,null,"pick"));null!=b.dropbox&&I(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);I(App.MODE_GITHUB,null,null,null,null,"pick");I(App.MODE_GITLAB,null,null,null,null,"pick");I(App.MODE_TRELLO);C=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&C&&I(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&I(App.MODE_BROWSER);
+C&&I("download");Editor.popupsAllowed&&I("_blank",null,null,null,mxResources.get("openInNewWindow"));0<F&&(Q.appendChild(M.cloneNode(!0)),F=Q.value,Q.appendChild(R),Q.value=F);if("pickFolder-"==Q.value.substring(0,11)||"reset"==Q.value)F=document.createElement("option"),F.setAttribute("value",""),F.setAttribute("selected","selected"),mxUtils.write(F,mxResources.get("pickFolder")+"..."),Q.insertBefore(F,Q.firstChild);U=Q.value}function c(){if("reset"==Q.value)b.resetRecent("Folders"),Q.innerHTML="",
+Q.value="",pickFolderOption=null,n={},H();else if("pickFolder-"==Q.value.substring(0,11)){var C=Q.value.substring(11);Q.value=U;L(C)}else if(null!=A&&null!=n[Q.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[A.value].extension){C=b.getExtensionForService(n[Q.value].mode);var F=D.value;null!=C&&0>f.indexOf(".")&&0>F.indexOf(".")&&(D.value=F+C)}t.innerHTML="";mxUtils.write(t,mxResources.get("download"==Q.value||"_blank"==Q.value?"ok":"save"));""==Q.value?t.setAttribute("disabled",
+"disabled"):t.removeAttribute("disabled")}var e=document.createElement("div");e.style.display="flex";e.style.flexWrap="wrap";e.style.whiteSpace="nowrap";var g=document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var l=null,p=null;if(null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis=
+"75%";l=document.createElement("div");l.style.display="inline-block";l.style.height="auto";l.style.maxWidth="25%";l.style.margin="auto";var u=document.createElement("img"),z=B?q:btoa(unescape(encodeURIComponent(q)));u.setAttribute("src","data:"+x+";base64,"+z);u.style.boxSizing="border-box";u.style.maxHeight="50px";u.style.maxWidth="100%";u.style.paddingLeft="10px";l.appendChild(u);mxClient.IS_FF||"image/png"!=x||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),
+function(){var C=b.base64ToBlob(z,"image/png");C=new ClipboardItem({"image/png":C,"text/html":new Blob(['<img src="data:'+x+";base64,"+z+'">'],{type:"text/html"})});navigator.clipboard.write([C]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(F){b.handleError(F)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(l.setAttribute("title",mxResources.get("openInNewWindow")),l.style.cursor="pointer",
+mxEvent.addGestureListeners(l,null,null,function(C){mxEvent.isPopupTrigger(C)||b.openInNewWindow(q,x,B)})):l.setAttribute("title",mxResources.get("preview"))}u=document.createElement("div");u.style.display="flex";u.style.padding="1px";u.style.alignItems="center";u.style.justifyContent="flex-end";u.style.gridColumn="1";u.style.whiteSpace="nowrap";var E=document.createElement("div");E.style.display="grid";E.style.padding="1px";E.style.alignItems="center";E.style.gridColumn="2";E.style.gridAutoColumns=
+"minmax(0,1fr) auto";E.style.gap="6px";mxUtils.write(u,mxResources.get("saveAs")+":");var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("value",f);D.style.boxSizing="border-box";D.style.width="100%";E.appendChild(D);g.appendChild(u);g.appendChild(E);var A=null;null!=b.editor.diagramFileTypes&&null==x&&(u=u.cloneNode(!1),E=E.cloneNode(!1),mxUtils.write(u,mxResources.get("type")+":"),A=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),A.style.boxSizing="border-box",
+A.style.width="100%",E.appendChild(A),g.appendChild(u),g.appendChild(E));u=u.cloneNode(!1);E=E.cloneNode(!1);mxUtils.write(u,mxResources.get("where")+":");var Q=document.createElement("select");Q.style.textOverflow="ellipsis";Q.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var T=["browser","device","download","_blank"],M=document.createElement("option");M.setAttribute("disabled","disabled");M.innerHTML="-----------------";
+var U=null,n={},t=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=Q.value;var C=n[SaveDialog.lastValue];null!=C&&m(D,C.mode,C.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(D,"keypress",function(C){13==C.keyCode&&t.click()});mxEvent.addListener(Q,"change",c);H();c();E.appendChild(Q);null!=SaveDialog.lastValue&&null!=n[SaveDialog.lastValue]&&(Q.value=SaveDialog.lastValue);g.appendChild(u);g.appendChild(E);e.appendChild(g);null!=l&&e.appendChild(l);g=document.createElement("div");
+g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=x?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(l);null!=p&&g.appendChild(p);g.appendChild(t);b.editor.cancelFirst||g.appendChild(l);e.appendChild(g);this.init=function(){Editor.selectFilename(D)};this.container=e},CreateDialog=
+function(b,f,m,d,q,x,B,y,I,L,H,c,e,g,l,p,u){function z(U,n,t,C){function F(){mxEvent.addListener(J,"click",function(){var N=t;if(B){var O=A.value,P=O.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>P){N=null!=N?N:M.value;var S="";N==App.MODE_GOOGLE?S=b.drive.extension:N==App.MODE_GITHUB?S=b.gitHub.extension:N==App.MODE_GITLAB?S=b.gitLab.extension:N==App.MODE_TRELLO?S=b.trello.extension:N==App.MODE_DROPBOX?S=b.dropbox.extension:N==App.MODE_ONEDRIVE?S=b.oneDrive.extension:N==App.MODE_DEVICE&&(S=".drawio");
+0<=P&&(O=O.substring(0,P));A.value=O+S}}E(t)})}var J=document.createElement("a");J.style.overflow="hidden";var K=document.createElement("img");K.src=U;K.setAttribute("border","0");K.setAttribute("align","absmiddle");K.style.width="60px";K.style.height="60px";K.style.paddingBottom="6px";J.style.display="inline-block";J.className="geBaseButton";J.style.position="relative";J.style.margin="4px";J.style.padding="8px 8px 10px 8px";J.style.whiteSpace="nowrap";J.appendChild(K);J.style.color="gray";J.style.fontSize=
+"11px";var k=document.createElement("div");J.appendChild(k);mxUtils.write(k,n);if(null!=C&&null==b[C]){K.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(J);var G=window.setTimeout(function(){null==b[C]&&(v.stop(),J.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[C]&&(window.clearTimeout(G),
+mxUtils.setOpacity(k,100),K.style.visibility="",v.stop(),F())}))}else F();R.appendChild(J);++T==c&&(mxUtils.br(R),T=0)}function E(U){var n=A.value;if(null==U||null!=n&&0<n.length)u&&b.hideDialog(),m(n,U,A)}H="1"==urlParams.noDevice?!1:H;B=null!=B?B:!0;y=null!=y?y:!0;c=null!=c?c:4;u=null!=u?u:!0;x=document.createElement("div");x.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(x);var D=document.createElement("h2");mxUtils.write(D,q||mxResources.get("create"));D.style.marginTop="0px";D.style.marginBottom=
+"24px";x.appendChild(D);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.style.display="inline-block";x.appendChild(q);var A=document.createElement("input");A.setAttribute("value",f);A.style.width="180px";A.style.marginLeft="10px";A.style.marginBottom="20px";A.style.maxWidth="70%";this.init=function(){Editor.selectFilename(A)};x.appendChild(A);null!=p&&null!=b.editor.diagramFileTypes&&
+(p=FilenameDialog.createFileTypes(b,A,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",x.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=e&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){A.style.width="160px";q=document.createElement("img");var Q=l?e:btoa(unescape(encodeURIComponent(e)));q.setAttribute("src","data:"+g+";base64,"+Q);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";
+q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");x.appendChild(q);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(U){U=b.base64ToBlob(Q,"image/png");U=new ClipboardItem({"image/png":U,"text/html":new Blob(['<img src="data:'+g+";base64,"+Q+'">'],{type:"text/html"})});navigator.clipboard.write([U]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,
+function(n){b.handleError(n)}))}),p.style.marginTop="6px",p.className="geBtn");I&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,null,null,function(U){mxEvent.isPopupTrigger(U)||E("_blank")}))}mxUtils.br(x);var R=document.createElement("div");R.style.textAlign="center";var T=0;R.style.marginTop="6px";x.appendChild(R);var M=document.createElement("select");M.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),
+e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),M.appendChild(e),z(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(e,mxResources.get("oneDrive")),M.appendChild(e),b.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),z(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),M.appendChild(e),b.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),z(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),M.appendChild(e),
+z(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITLAB),mxUtils.write(e,mxResources.get("gitlab")),M.appendChild(e),z(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),M.appendChild(e),z(IMAGE_PATH+
+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),M.appendChild(e),b.mode!=App.MODE_DEVICE&&y||e.setAttribute("selected","selected"),H&&z(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);y&&isLocalStorage&&"0"!=urlParams.browser&&
+(y=document.createElement("option"),y.setAttribute("value",App.MODE_BROWSER),mxUtils.write(y,mxResources.get("browser")),M.appendChild(y),b.mode==App.MODE_BROWSER&&y.setAttribute("selected","selected"),z(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));y=document.createElement("div");y.style.marginTop="26px";y.style.textAlign="center";null!=L&&(H=mxUtils.button(mxResources.get("help"),function(){b.openLink(L)}),H.className="geBtn",y.appendChild(H));H=mxUtils.button(mxResources.get(null!=
+d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});H.className="geBtn";b.editor.cancelFirst&&null==d&&y.appendChild(H);null==d&&(e=mxUtils.button(mxResources.get("decideLater"),function(){E(null)}),e.className="geBtn",y.appendChild(e));I&&Editor.popupsAllowed&&(I=mxUtils.button(mxResources.get("openInNewWindow"),function(){E("_blank")}),I.className="geBtn",y.appendChild(I));CreateDialog.showDownloadButton&&(I=mxUtils.button(mxResources.get("download"),
+function(){E("download")}),I.className="geBtn",y.appendChild(I),null!=p&&(I.style.marginTop="6px",y.style.marginTop="6px"));null!=p&&(mxUtils.br(y),y.appendChild(p));b.editor.cancelFirst&&null==d||y.appendChild(H);mxEvent.addListener(A,"keypress",function(U){13==U.keyCode?E(App.MODE_DEVICE):27==U.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});x.appendChild(y);this.container=x};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,f,m,d,q){q=null!=q?q:!0;var x=document.createElement("div");x.style.textAlign="center";x.style.height="100%";mxUtils.write(x,mxResources.get("fileOpenLocation"));mxUtils.br(x);mxUtils.br(x);var B=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});B.className="geBtn";B.style.marginBottom="8px";B.style.width="280px";x.appendChild(B);mxUtils.br(x);var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();
+null!=m&&m();b.openLink(f,null,!0)});y.className="geBtn gePrimaryBtn";y.style.width=B.style.width;x.appendChild(y);mxUtils.br(x);mxUtils.br(x);mxUtils.write(x,mxResources.get("allowPopups"));this.container=x},ImageDialog=function(b,f,m,d,q,x,B,y){function I(){0<c.value.length?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled");"data:"!=c.value.substring(0,5)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}x=null!=x?x:!0;var L=b.editor.graph,H=document.createElement("div");
mxUtils.write(H,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var c=document.createElement("input");c.setAttribute("value",m);c.setAttribute("type","text");c.setAttribute("spellcheck","false");c.setAttribute("autocorrect","off");c.setAttribute("autocomplete","off");c.setAttribute("autocapitalize","off");c.style.marginTop=
"6px";c.style.width=(Graph.fileSupport?460:340)-20+"px";c.style.backgroundImage="url('"+Editor.crossImage+"')";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="100% 50%";c.style.paddingRight="14px";m=document.createElement("div");m.setAttribute("title",mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(m,"click",function(){c.value="";c.focus()});f.appendChild(c);f.appendChild(m);H.appendChild(f);var e=y,g,l,p=function(A,P,R,T){var L="data:"==A.substring(0,5);!b.isOffline()||L&&"undefined"===typeof chrome?0<A.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(A,function(U){b.spinner.stop();b.hideDialog();var n=!1===T?1:null!=P&&null!=R?Math.max(P/U.width,R/U.height):Math.min(1,Math.min(520/U.width,520/U.height));x&&(A=b.convertDataUri(A));d(A,
-Math.round(Number(U.width)*n),Math.round(Number(U.height)*n),e,g,l)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(A,null,null,e,g,l)):(A=b.convertDataUri(A),P=null==P?120:P,R=null==R?100:R,b.hideDialog(),d(A,P,R,e,g,l))},u=function(A,P){if(null!=A){var R=q?null:M.getModel().getGeometry(M.getSelectionCell());null!=R?p(A,R.width,R.height,P):p(A,null,null,P)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
-if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=H.parentNode,P=null;mxEvent.addListener(A,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){null!=P&&(P.parentNode.removeChild(P),
-P=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(L,U,n,t,B,F,J,K){u(L,K)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var U=0;U<L.length;U++)L[U]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var T=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&u(decodeURIComponent(T))}R.stopPropagation();R.preventDefault()}),
+"')";mxEvent.addListener(m,"click",function(){c.value="";c.focus()});f.appendChild(c);f.appendChild(m);H.appendChild(f);var e=y,g,l,p=function(A,Q,R,T){var M="data:"==A.substring(0,5);!b.isOffline()||M&&"undefined"===typeof chrome?0<A.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(A,function(U){b.spinner.stop();b.hideDialog();var n=!1===T?1:null!=Q&&null!=R?Math.max(Q/U.width,R/U.height):Math.min(1,Math.min(520/U.width,520/U.height));x&&(A=b.convertDataUri(A));d(A,
+Math.round(Number(U.width)*n),Math.round(Number(U.height)*n),e,g,l)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(A,null,null,e,g,l)):(A=b.convertDataUri(A),Q=null==Q?120:Q,R=null==R?100:R,b.hideDialog(),d(A,Q,R,e,g,l))},u=function(A,Q){if(null!=A){var R=q?null:L.getModel().getGeometry(L.getSelectionCell());null!=R?p(A,R.width,R.height,Q):p(A,null,null,Q)}else b.hideDialog(),d(null)};this.init=function(){c.focus();
+if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=H.parentNode,Q=null;mxEvent.addListener(A,"dragleave",function(R){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){null!=Q&&(Q.parentNode.removeChild(Q),
+Q=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(M,U,n,t,C,F,J,K){u(M,K)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var U=0;U<M.length;U++)M[U]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var T=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(T)&&u(decodeURIComponent(T))}R.stopPropagation();R.preventDefault()}),
!1)}};y=document.createElement("div");y.style.marginTop="14px";y.style.textAlign="center";m=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&y.appendChild(m);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url));c.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var z=document.createElement("input");
-z.setAttribute("multiple","multiple");z.setAttribute("type","file");mxEvent.addListener(z,"change",function(A){null!=z.files&&(b.importFiles(z.files,0,0,b.maxImageSize,function(P,R,T,L,U,n){u(P)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var R=0;R<P.length;R++)P[R]()},!0),z.type="",z.type="file",z.value="")});z.style.display="none";document.body.appendChild(z);b.imgDlgFileInputElt=z}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
-f.className="geBtn";y.appendChild(f)}mxEvent.addListener(c,"keypress",function(A){13==A.keyCode&&u(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var A=new CropImageDialog(b,c.value,e,function(P,R,T){e=P;g=R;l=T});b.showDialog(A.container,300,390,!0,!0)});C&&(E.className="geBtn",y.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var A=b.editor.createImageUrlConverter().convert(c.value),
-P=new Image;P.onload=function(){b.editor.convertImageToDataUri(A,function(R){b.confirmImageResize(function(T){b.resizeImage(P,R,mxUtils.bind(this,function(L,U,n){b.spinner.stop();null!=L&&L.length<b.maxImageBytes?(c.value=L,I()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},P.width>b.maxImageSize||P.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};P.onerror=function(){b.spinner.stop();
-b.handleError({message:mxResources.get("fileNotFound")})};P.src=A}});D.className="geBtn";mxEvent.addListener(c,"change",function(A){e=null;I()});I();y.appendChild(D);C=mxUtils.button(mxResources.get("apply"),function(){u(c.value)});C.className="geBtn gePrimaryBtn";y.appendChild(C);b.editor.cancelFirst||y.appendChild(m);Graph.fileSupport&&(y.style.marginTop="120px",H.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",H.style.backgroundPosition="center 65%",H.style.backgroundRepeat="no-repeat",
-C=document.createElement("div"),C.style.position="absolute",C.style.width="420px",C.style.top="58%",C.style.textAlign="center",C.style.fontSize="18px",C.style.color="#a0c3ff",mxUtils.write(C,mxResources.get("dragImagesHere")),H.appendChild(C));H.appendChild(y);this.container=H},LinkDialog=function(b,f,m,d,q,x,C){function y(A,P){var R=document.createElement("option");mxUtils.write(R,mxResources.get(A));R.value=A;E.appendChild(R);D[A]=P}var I=document.createElement("div");I.style.height="100%";mxUtils.write(I,
-mxResources.get("editLink")+":");var M=document.createElement("div");M.className="geUrlLinkContainer";M.style.backgroundColor="transparent";M.style.borderColor="transparent";M.style.whiteSpace="nowrap";M.style.textOverflow="clip";M.style.cursor="default";var H=document.createElement("input");H.setAttribute("placeholder",mxResources.get("dragUrlsHere"));H.setAttribute("type","text");H.style.marginTop="6px";H.style.width="414px";H.style.boxSizing="border-box";H.style.backgroundRepeat="no-repeat";H.style.backgroundPosition=
+z.setAttribute("multiple","multiple");z.setAttribute("type","file");mxEvent.addListener(z,"change",function(A){null!=z.files&&(b.importFiles(z.files,0,0,b.maxImageSize,function(Q,R,T,M,U,n){u(Q)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var R=0;R<Q.length;R++)Q[R]()},!0),z.type="",z.type="file",z.value="")});z.style.display="none";document.body.appendChild(z);b.imgDlgFileInputElt=z}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
+f.className="geBtn";y.appendChild(f)}mxEvent.addListener(c,"keypress",function(A){13==A.keyCode&&u(c.value)});var E=mxUtils.button(mxResources.get("crop"),function(){var A=new CropImageDialog(b,c.value,e,function(Q,R,T){e=Q;g=R;l=T});b.showDialog(A.container,300,390,!0,!0)});B&&(E.className="geBtn",y.appendChild(E));var D=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=c.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var A=b.editor.createImageUrlConverter().convert(c.value),
+Q=new Image;Q.onload=function(){b.editor.convertImageToDataUri(A,function(R){b.confirmImageResize(function(T){b.resizeImage(Q,R,mxUtils.bind(this,function(M,U,n){b.spinner.stop();null!=M&&M.length<b.maxImageBytes?(c.value=M,I()):b.handleError({message:mxResources.get("imageTooBig")})}),T,b.maxImageSize)},Q.width>b.maxImageSize||Q.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};Q.onerror=function(){b.spinner.stop();
+b.handleError({message:mxResources.get("fileNotFound")})};Q.src=A}});D.className="geBtn";mxEvent.addListener(c,"change",function(A){e=null;I()});I();y.appendChild(D);B=mxUtils.button(mxResources.get("apply"),function(){u(c.value)});B.className="geBtn gePrimaryBtn";y.appendChild(B);b.editor.cancelFirst||y.appendChild(m);Graph.fileSupport&&(y.style.marginTop="120px",H.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",H.style.backgroundPosition="center 65%",H.style.backgroundRepeat="no-repeat",
+B=document.createElement("div"),B.style.position="absolute",B.style.width="420px",B.style.top="58%",B.style.textAlign="center",B.style.fontSize="18px",B.style.color="#a0c3ff",mxUtils.write(B,mxResources.get("dragImagesHere")),H.appendChild(B));H.appendChild(y);this.container=H},LinkDialog=function(b,f,m,d,q,x,B){function y(A,Q){var R=document.createElement("option");mxUtils.write(R,mxResources.get(A));R.value=A;E.appendChild(R);D[A]=Q}var I=document.createElement("div");I.style.height="100%";mxUtils.write(I,
+mxResources.get("editLink")+":");var L=document.createElement("div");L.className="geUrlLinkContainer";L.style.backgroundColor="transparent";L.style.borderColor="transparent";L.style.whiteSpace="nowrap";L.style.textOverflow="clip";L.style.cursor="default";var H=document.createElement("input");H.setAttribute("placeholder",mxResources.get("dragUrlsHere"));H.setAttribute("type","text");H.style.marginTop="6px";H.style.width="414px";H.style.boxSizing="border-box";H.style.backgroundRepeat="no-repeat";H.style.backgroundPosition=
"100% 50%";H.style.paddingRight="16px";H.style.marginBottom="4px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.backgroundImage="url("+Editor.crossImage+")";c.className="geAdaptiveAsset";c.style.display="inline-block";c.style.position="relative";c.style.top="3px";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";mxEvent.addListener(c,"click",function(){H.value="";H.focus()});var e=document.createElement("input");
e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var l=document.createElement("select");l.style.width="414px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.margin=
-"0 6p 0 6px";null!=C&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);C=null!=C?C:"_blank";p.setAttribute("title",C);x&&(H.style.width="200px");if(q&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(H.setAttribute("value",f),e.setAttribute("checked","checked"),e.defaultChecked=!0);M.appendChild(e);M.appendChild(H);M.appendChild(c);x&&(M.appendChild(p),mxUtils.write(M,mxResources.get("openInNewWindow")));mxUtils.br(M);M.appendChild(g);
+"0 6p 0 6px";null!=B&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);B=null!=B?B:"_blank";p.setAttribute("title",B);x&&(H.style.width="200px");if(q&&null!=b.pages){null!=f&&Graph.isPageLink(f)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(H.setAttribute("value",f),e.setAttribute("checked","checked"),e.defaultChecked=!0);L.appendChild(e);L.appendChild(H);L.appendChild(c);x&&(L.appendChild(p),mxUtils.write(L,mxResources.get("openInNewWindow")));mxUtils.br(L);L.appendChild(g);
q=!1;for(x=0;x<b.pages.length;x++)c=document.createElement("option"),mxUtils.write(c,b.pages[x].getName()||mxResources.get("pageWithNumber",[x+1])),c.setAttribute("value","data:page/id,"+b.pages[x].getId()),f==c.getAttribute("value")&&(c.setAttribute("selected","selected"),q=!0),l.appendChild(c);if(!q&&g.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value",
-"pageNotFound");l.appendChild(u);mxEvent.addListener(l,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}M.appendChild(l)}else H.setAttribute("value",f),M.appendChild(H),M.appendChild(c);I.appendChild(M);var z=mxUtils.button(m,function(){b.hideDialog();d(g.checked?"pageNotFound"!==l.value?l.value:f:H.value,LinkDialog.selectedDocs,p.checked?C:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){g.checked?l.focus():(H.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(l,"focus",function(){e.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(H,"focus",function(){g.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});if(Graph.fileSupport){var A=I.parentNode,P=null;mxEvent.addListener(A,"dragleave",function(R){null!=P&&(P.parentNode.removeChild(P),P=null);R.stopPropagation();R.preventDefault()});
-mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){try{null!=P&&(P.parentNode.removeChild(P),P=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(H.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),e.setAttribute("checked","checked"),e.checked=!0,z.click())}catch(T){b.handleError(T)}R.stopPropagation();
-R.preventDefault()}),!1)}};m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="right";b.isOffline()||m.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));M=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});M.style.verticalAlign="middle";M.className="geBtn";b.editor.cancelFirst&&m.appendChild(M);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(A){if(A.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=A.docs;
-var P=A.docs[0].url;"application/mxe"==A.docs[0].mimeType||null!=A.docs[0].mimeType&&"application/vnd.jgraph."==A.docs[0].mimeType.substring(0,23)?P="https://www.draw.io/#G"+A.docs[0].id:"application/vnd.google-apps.folder"==A.docs[0].mimeType&&(P="https://drive.google.com/#folders/"+A.docs[0].id);H.value=P;H.focus()}else LinkDialog.selectedDocs=null;H.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};
-q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";E.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(P){LinkDialog.filePicked(P)}).build()}b.linkPicker.setVisible(!0)}))});
-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(A){H.value=A[0].link;H.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(A,P){null!=P&&null!=P.value&&0<P.value.length&&(H.value=P.value[0].webUrl,H.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(A){if(null!=A){A=A.split("/");var P=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");
-H.value="https://github.com/"+P+"/"+R+"/blob/"+T+"/"+A;H.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(A){if(null!=A){A=A.split("/");var P=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");H.value=DRAWIO_GITLAB_URL+"/"+P+"/"+R+"/blob/"+T+"/"+A;H.focus()}})});1<E.children.length&&(m.appendChild(E),mxEvent.addListener(E,"change",function(A){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(H,"keypress",function(A){13==A.keyCode&&z.click()});m.appendChild(z);
-b.editor.cancelFirst||m.appendChild(M);I.appendChild(m);this.container=I},FeedbackDialog=function(b,f,m,d){var q=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize="18px";x.style.marginBottom="18px";q.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(m?"":" ("+mxResources.get("required")+")"));q.appendChild(x);var C=document.createElement("input");C.setAttribute("type",
-"text");C.style.marginTop="6px";C.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var c=H.value+(M.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;c.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(C.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+":\n"+c),function(e){b.spinner.stop();200<=e.getStatus()&&299>=e.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className=
-"geBtn gePrimaryBtn";if(!m){y.setAttribute("disabled","disabled");var I=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(C,"change",function(){0<C.value.length&&0<I.test(C.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(C,"keyup",function(){0<C.value.length&&I.test(C.value)?y.removeAttribute("disabled"):y.setAttribute("disabled",
-"disabled")})}q.appendChild(C);this.init=function(){C.focus()};var M=document.createElement("input");M.setAttribute("type","checkbox");M.setAttribute("checked","checked");M.defaultChecked=!0;m=document.createElement("p");m.style.marginTop="14px";m.appendChild(M);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));m.appendChild(x);mxEvent.addListener(x,"click",function(c){M.checked=!M.checked;mxEvent.consume(c)});q.appendChild(m);x=document.createElement("div");
+"pageNotFound");l.appendChild(u);mxEvent.addListener(l,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}L.appendChild(l)}else H.setAttribute("value",f),L.appendChild(H),L.appendChild(c);I.appendChild(L);var z=mxUtils.button(m,function(){b.hideDialog();d(g.checked?"pageNotFound"!==l.value?l.value:f:H.value,LinkDialog.selectedDocs,p.checked?B:null)});z.style.verticalAlign="middle";z.className="geBtn gePrimaryBtn";this.init=function(){g.checked?l.focus():(H.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(l,"focus",function(){e.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(H,"focus",function(){g.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});if(Graph.fileSupport){var A=I.parentNode,Q=null;mxEvent.addListener(A,"dragleave",function(R){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);R.stopPropagation();R.preventDefault()});
+mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(R){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=b.highlightElement(A));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,function(R){try{null!=Q&&(Q.parentNode.removeChild(Q),Q=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(H.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),e.setAttribute("checked","checked"),e.checked=!0,z.click())}catch(T){b.handleError(T)}R.stopPropagation();
+R.preventDefault()}),!1)}};m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="right";b.isOffline()||m.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.style.verticalAlign="middle";L.className="geBtn";b.editor.cancelFirst&&m.appendChild(L);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(A){if(A.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=A.docs;
+var Q=A.docs[0].url;"application/mxe"==A.docs[0].mimeType||null!=A.docs[0].mimeType&&"application/vnd.jgraph."==A.docs[0].mimeType.substring(0,23)?Q="https://www.draw.io/#G"+A.docs[0].id:"application/vnd.google-apps.folder"==A.docs[0].mimeType&&(Q="https://drive.google.com/#folders/"+A.docs[0].id);H.value=Q;H.focus()}else LinkDialog.selectedDocs=null;H.focus()};var E=document.createElement("select");E.className="geBtn";E.style.position="relative";E.style.top="1px";E.style.maxWidth="120px";var D={};
+q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";E.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&y("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(Q){LinkDialog.filePicked(Q)}).build()}b.linkPicker.setVisible(!0)}))});
+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(A){H.value=A[0].link;H.focus()}})});null!=b.oneDrive&&y("oneDrive",function(){b.oneDrive.pickFile(function(A,Q){null!=Q&&null!=Q.value&&0<Q.value.length&&(H.value=Q.value[0].webUrl,H.focus())},!0)});null!=b.gitHub&&y("github",function(){b.gitHub.pickFile(function(A){if(null!=A){A=A.split("/");var Q=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");
+H.value="https://github.com/"+Q+"/"+R+"/blob/"+T+"/"+A;H.focus()}})});null!=b.gitLab&&y("gitlab",function(){b.gitLab.pickFile(function(A){if(null!=A){A=A.split("/");var Q=A[0],R=A[1],T=A[2];A=A.slice(3,A.length).join("/");H.value=DRAWIO_GITLAB_URL+"/"+Q+"/"+R+"/blob/"+T+"/"+A;H.focus()}})});1<E.children.length&&(m.appendChild(E),mxEvent.addListener(E,"change",function(A){null!=D[E.value]&&(D[E.value](),E.value="")}));mxEvent.addListener(H,"keypress",function(A){13==A.keyCode&&z.click()});m.appendChild(z);
+b.editor.cancelFirst||m.appendChild(L);I.appendChild(m);this.container=I},FeedbackDialog=function(b,f,m,d){var q=document.createElement("div"),x=document.createElement("div");mxUtils.write(x,mxResources.get("sendYourFeedback"));x.style.fontSize="18px";x.style.marginBottom="18px";q.appendChild(x);x=document.createElement("div");mxUtils.write(x,mxResources.get("yourEmailAddress")+(m?"":" ("+mxResources.get("required")+")"));q.appendChild(x);var B=document.createElement("input");B.setAttribute("type",
+"text");B.style.marginTop="6px";B.style.width="600px";var y=mxUtils.button(mxResources.get("sendMessage"),function(){var c=H.value+(L.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;c.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(B.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+":\n"+c),function(e){b.spinner.stop();200<=e.getStatus()&&299>=e.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});y.className=
+"geBtn gePrimaryBtn";if(!m){y.setAttribute("disabled","disabled");var I=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(B,"change",function(){0<B.value.length&&0<I.test(B.value)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")});mxEvent.addListener(B,"keyup",function(){0<B.value.length&&I.test(B.value)?y.removeAttribute("disabled"):y.setAttribute("disabled",
+"disabled")})}q.appendChild(B);this.init=function(){B.focus()};var L=document.createElement("input");L.setAttribute("type","checkbox");L.setAttribute("checked","checked");L.defaultChecked=!0;m=document.createElement("p");m.style.marginTop="14px";m.appendChild(L);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("includeCopyOfMyDiagram"));m.appendChild(x);mxEvent.addListener(x,"click",function(c){L.checked=!L.checked;mxEvent.consume(c)});q.appendChild(m);x=document.createElement("div");
mxUtils.write(x,mxResources.get("feedback"));q.appendChild(x);var H=document.createElement("textarea");H.style.resize="none";H.style.width="600px";H.style.height="140px";H.style.marginTop="6px";H.setAttribute("placeholder",mxResources.get("comments"));q.appendChild(H);m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";b.editor.cancelFirst?(m.appendChild(x),m.appendChild(y)):(m.appendChild(y),
m.appendChild(x));q.appendChild(m);this.container=q};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,f,m){var d=document.createElement("div"),q=document.createElement("h3");q.style.marginTop="3px";mxUtils.write(q,mxResources.get("revisionHistory"));d.appendChild(q);q=document.createElement("div");q.style.position="absolute";q.style.overflow="auto";q.style.width="170px";q.style.height="378px";d.appendChild(q);var x=document.createElement("div");x.style.position="absolute";x.style.left="200px";x.style.width="470px";x.style.height="376px";x.style.overflow="hidden";x.style.borderWidth=
-"1px";x.style.borderStyle="solid";var C=document.createElement("div");C.style.position="absolute";C.style.display="none";C.style.textAlign="center";C.style.padding="8px";C.style.borderRadius="8px";C.style.left="50%";C.style.top="50%";C.style.whiteSpace="nowrap";C.style.transform="translate(-50%, -50%)";C.style.background="inherit";C.style.border="1px solid";x.appendChild(C);mxEvent.disableContextMenu(x);d.appendChild(x);var y=new Graph(x);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=
-!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var I=0,M=null,H=0,c=y.getGlobalVariable;y.getGlobalVariable=function(X){return"page"==X&&null!=M&&null!=M[H]?M[H].getAttribute("name"):"pagenumber"==X?H+1:"pagecount"==X?null!=M?M.length:1:c.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var e=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),l=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},u=0;u<l.length;u++)p[l[u].getAttribute("id")]=l[u];var z=null,E=null,D=null,A=null,P=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&y.zoomIn()},20);P.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&y.zoomOut()},20);R.setAttribute("disabled",
-"disabled");var T=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=D&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);T.setAttribute("disabled","disabled");var L=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));L.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));U.setAttribute("disabled","disabled");var n=x.cloneNode(!1);n.style.pointerEvent="none";x.parentNode.appendChild(n);
-var t=new Graph(n);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var B=document.createElement("div");B.style.textAlign="left";B.style.color="gray";B.style.backgroundColor="transparent";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.style.whiteSpace="nowrap";B.style.cursor="default";B.style.height="100%";B.style.display="inline-flex";B.style.alignItems=
-"center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var F=null;mxEvent.addGestureListeners(L,function(X){try{var Z=null!=M[I]?p[M[I].getAttribute("id")]:null;mxUtils.setOpacity(L,20);C.innerText="";if(null==Z)C.style.display="inline-block",mxUtils.write(C,mxResources.get("pageNotFound"));else{F=B.innerHTML;B.innerHTML=mxResources.get("current");x.style.display="none";n.style.display="";n.style.backgroundColor=x.style.backgroundColor;
-var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,t.getModel());t.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y);t.mathEnabled="1"==Y.getAttribute("math");t.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&t.mathEnabled&&Editor.MathJaxRender(t.container)}}catch(ea){C.style.display="inline-block",C.innerText="",mxUtils.write(C,mxResources.get("pageNotFound")+": "+ea.message)}},null,function(){mxUtils.setOpacity(L,60);C.style.display=
-"none";C.innerText="";"none"==x.style.display&&(x.style.display="",B.innerHTML=F,n.style.display="none")});mxEvent.addListener(U,"click",mxUtils.bind(this,function(X){null!=D&&(X=b.getPagesForNode(D.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
+"1px";x.style.borderStyle="solid";var B=document.createElement("div");B.style.position="absolute";B.style.display="none";B.style.textAlign="center";B.style.padding="8px";B.style.borderRadius="8px";B.style.left="50%";B.style.top="50%";B.style.whiteSpace="nowrap";B.style.transform="translate(-50%, -50%)";B.style.background="inherit";B.style.border="1px solid";x.appendChild(B);mxEvent.disableContextMenu(x);d.appendChild(x);var y=new Graph(x);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=
+!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var I=0,L=null,H=0,c=y.getGlobalVariable;y.getGlobalVariable=function(X){return"page"==X&&null!=L&&null!=L[H]?L[H].getAttribute("name"):"pagenumber"==X?H+1:"pagecount"==X?null!=L?L.length:1:c.apply(this,arguments)};y.getLinkForCell=function(){return null};for(var e=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),l=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},u=0;u<l.length;u++)p[l[u].getAttribute("id")]=l[u];var z=null,E=null,D=null,A=null,Q=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=D&&y.zoomIn()},20);Q.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=D&&y.zoomOut()},20);R.setAttribute("disabled",
+"disabled");var T=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=D&&(1==y.view.scale?(y.maxFitScale=8,y.fit(8)):y.zoomActual(),y.center())},20);T.setAttribute("disabled","disabled");var M=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"));M.setAttribute("disabled","disabled");var U=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"));U.setAttribute("disabled","disabled");var n=x.cloneNode(!1);n.style.pointerEvent="none";x.parentNode.appendChild(n);
+var t=new Graph(n);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!0);t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var C=document.createElement("div");C.style.textAlign="left";C.style.color="gray";C.style.backgroundColor="transparent";C.style.overflow="hidden";C.style.textOverflow="ellipsis";C.style.whiteSpace="nowrap";C.style.cursor="default";C.style.height="100%";C.style.display="inline-flex";C.style.alignItems=
+"center";C.style.flexGrow="1";mxEvent.addListener(C,"click",function(){var X=mxUtils.getTextContent(C);""!=X&&b.alert(X)});var F=null;mxEvent.addGestureListeners(M,function(X){try{var Z=null!=L[I]?p[L[I].getAttribute("id")]:null;mxUtils.setOpacity(M,20);B.innerText="";if(null==Z)B.style.display="inline-block",mxUtils.write(B,mxResources.get("pageNotFound"));else{F=C.innerHTML;C.innerHTML=mxResources.get("current");x.style.display="none";n.style.display="";n.style.backgroundColor=x.style.backgroundColor;
+var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,t.getModel());t.view.scaleAndTranslate(y.view.scale,y.view.translate.x,y.view.translate.y);t.mathEnabled="1"==Y.getAttribute("math");t.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&t.mathEnabled&&Editor.MathJaxRender(t.container)}}catch(ea){B.style.display="inline-block",B.innerText="",mxUtils.write(B,mxResources.get("pageNotFound")+": "+ea.message)}},null,function(){mxUtils.setOpacity(M,60);B.style.display=
+"none";B.innerText="";"none"==x.style.display&&(x.style.display="",C.innerHTML=F,n.style.display="none")});mxEvent.addListener(U,"click",mxUtils.bind(this,function(X){null!=D&&(X=b.getPagesForNode(D.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ea){b.handleError(ea)}})}else b.hideDialog()}catch(ea){b.handleError(ea)}},
null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var J=mxUtils.button(mxResources.get("restore"),function(X){null!=D&&null!=A&&b.confirm(mxResources.get("areYouSure"),function(){null!=m?m(A):b.spinner.spin(document.body,mxResources.get("restoring"))&&(J.setAttribute("disabled","disabled"),g.save(!0,function(Z){b.spinner.stop();J.removeAttribute("disabled");b.replaceFileData(A);b.hideDialog()},function(Z){b.spinner.stop();
J.removeAttribute("disabled");b.clearStatus();b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");var K=document.createElement("select");K.setAttribute("disabled","disabled");K.style.userSelect="none";K.style.maxWidth="100px";K.style.marginLeft="10px";K.style.display="none";var k=null;mxEvent.addListener(K,"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),
function(){null!=D&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(D.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=m&&(v.style.display="none");l=document.createElement("div");l.style.position="absolute";l.style.top="482px";
-l.style.right="28px";l.style.left="32px";l.style.justifyContent="end";l.style.display="flex";var N=document.createElement("div");N.className="geToolbarContainer";N.style.backgroundColor="transparent";N.style.left="32px";N.style.right="32px";N.style.border="none";N.style.top="442px";var O=null;if(null!=f&&0<f.length){x.style.cursor="move";var Q=document.createElement("table");Q.style.borderWidth="1px";Q.style.borderStyle="solid";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width=
-"100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(I=mxUtils.indexOf(b.pages,b.currentPage));for(u=f.length-1;0<=u;u--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ea=function(ka){e.stop();C.innerText="";var ba=mxUtils.parseXml(ka),ha=b.editor.extractGraphModel(ba.documentElement,!0);if(null!=ha){var aa=function(va){null!=va&&(va=ia(Editor.parseDiagramNode(va)));return va},ia=function(va){var oa=va.getAttribute("background");
-if(null==oa||""==oa||oa==mxConstants.NONE)oa=y.defaultPageBackgroundColor;x.style.backgroundColor=mxUtils.getLightDarkColor(oa);(new mxCodec(va.ownerDocument)).decode(va,y.getModel());y.maxFitScale=1;y.fit(8);y.center();y.mathEnabled="1"==va.getAttribute("math");y.setAdaptiveColors(va.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return va};K.style.display="none";K.innerText="";D=ba;A=ka;M=parseSelectFunction=null;H=0;if("mxfile"==ha.nodeName){ba=
-ha.getElementsByTagName("diagram");M=[];for(ka=0;ka<ba.length;ka++)M.push(ba[ka]);H=Math.min(I,M.length-1);0<M.length&&aa(M[H]);if(1<M.length)for(K.removeAttribute("disabled"),K.style.display="",ka=0;ka<M.length;ka++){ba=document.createElement("option");ba.setAttribute("title",fa+" ("+M[ka].getAttribute("id")+")");ba.setAttribute("value",ka);var fa=M[ka].getAttribute("name")||mxResources.get("pageWithNumber",[ka+1]);ha=b.getPageById(M[ka].getAttribute("id"));var da="";if(null!=ha){var za=new DiagramPage(M[ka]);
-b.getHashValueForPages([ha])!=b.getHashValueForPages([za])&&(da=" (M)")}else da=" (X)";mxUtils.write(ba,fa+da);ka==H&&ba.setAttribute("selected","selected");K.appendChild(ba)}k=function(){try{var va=parseInt(K.value);H=I=va;aa(M[va])}catch(oa){K.value=I,b.handleError(oa)}}}else ia(ha);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=fa?fa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));
-P.removeAttribute("disabled");R.removeAttribute("disabled");T.removeAttribute("disabled");L.removeAttribute("disabled");U.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&J.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));mxUtils.setOpacity(P,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(L,60);mxUtils.setOpacity(U,60)}else K.style.display="none",K.innerText="",B.innerText="",C.innerText="",mxUtils.write(B,
-mxResources.get("errorLoadingFile")),mxUtils.write(C,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ca=document.createElement("td");ca.style.padding="6px";ca.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ca,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ca,Z.toLocaleTimeString()):mxUtils.write(ca,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());
-Y.appendChild(ca);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ka){E!=X&&(e.stop(),null!=z&&(z.style.backgroundColor=""),E=X,z=Y,z.style.backgroundColor="light-dark(#ebf2f9, #000000)",A=D=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=y.defaultPageBackgroundColor,
-C.innerText="",y.getModel().clear(),J.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(P,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(L,20),mxUtils.setOpacity(U,20),e.spin(x),X.getXml(function(ba){if(E==
-X)try{ea(ba)}catch(ha){B.innerText=mxResources.get("error")+": "+ha.message}},function(ba){e.stop();K.style.display="none";K.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ka))});mxEvent.addListener(Y,"dblclick",function(ka){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ka)},!1);S.appendChild(Y)}return Y}(f[u]);
-null!=W&&u==f.length-1&&(O=W)}Q.appendChild(S);q.appendChild(Q)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(x.style.display="none",N.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(x.style.display="none",N.style.display="none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
-N.appendChild(B);N.appendChild(L);N.appendChild(R);N.appendChild(T);N.appendChild(P);N.appendChild(K);N.appendChild(U);b.editor.cancelFirst&&l.appendChild(q);l.appendChild(v);null!=g&&g.constructor==DriveFile&&l.appendChild(G);l.appendChild(J);b.editor.cancelFirst||l.appendChild(q);d.appendChild(l);d.appendChild(N);this.container=d},DraftDialog=function(b,f,m,d,q,x,C,y,I){var M=document.createElement("div"),H=document.createElement("div");H.style.marginTop="0px";H.style.whiteSpace="nowrap";H.style.overflow=
-"auto";H.style.lineHeight="normal";mxUtils.write(H,f);M.appendChild(H);var c=document.createElement("select"),e=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,e(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var L=this,U;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){for(U=0;U<I.length;U++)q.apply(L,[U,mxUtils.bind(L,function(){})]);b.hideDialog(!0);n.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(I[c.value].data),
+l.style.right="28px";l.style.left="32px";l.style.justifyContent="end";l.style.display="flex";var N=document.createElement("div");N.className="geToolbarContainer";N.style.backgroundColor="transparent";N.style.left="32px";N.style.right="32px";N.style.border="none";N.style.top="442px";var O=null;if(null!=f&&0<f.length){x.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width=
+"100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(I=mxUtils.indexOf(b.pages,b.currentPage));for(u=f.length-1;0<=u;u--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ea=function(ka){e.stop();B.innerText="";var ba=mxUtils.parseXml(ka),ha=b.editor.extractGraphModel(ba.documentElement,!0);if(null!=ha){var aa=function(ua){null!=ua&&(ua=ia(Editor.parseDiagramNode(ua)));return ua},ia=function(ua){var na=ua.getAttribute("background");
+if(null==na||""==na||na==mxConstants.NONE)na=y.defaultPageBackgroundColor;x.style.backgroundColor=mxUtils.getLightDarkColor(na);(new mxCodec(ua.ownerDocument)).decode(ua,y.getModel());y.maxFitScale=1;y.fit(8);y.center();y.mathEnabled="1"==ua.getAttribute("math");y.setAdaptiveColors(ua.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container);return ua};K.style.display="none";K.innerText="";D=ba;A=ka;L=parseSelectFunction=null;H=0;if("mxfile"==ha.nodeName){ba=
+ha.getElementsByTagName("diagram");L=[];for(ka=0;ka<ba.length;ka++)L.push(ba[ka]);H=Math.min(I,L.length-1);0<L.length&&aa(L[H]);if(1<L.length)for(K.removeAttribute("disabled"),K.style.display="",ka=0;ka<L.length;ka++){ba=document.createElement("option");ba.setAttribute("title",fa+" ("+L[ka].getAttribute("id")+")");ba.setAttribute("value",ka);var fa=L[ka].getAttribute("name")||mxResources.get("pageWithNumber",[ka+1]);ha=b.getPageById(L[ka].getAttribute("id"));var da="";if(null!=ha){var za=new DiagramPage(L[ka]);
+b.getHashValueForPages([ha])!=b.getHashValueForPages([za])&&(da=" (M)")}else da=" (X)";mxUtils.write(ba,fa+da);ka==H&&ba.setAttribute("selected","selected");K.appendChild(ba)}k=function(){try{var ua=parseInt(K.value);H=I=ua;aa(L[ua])}catch(na){K.value=I,b.handleError(na)}}}else ia(ha);fa=X.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");C.innerText="";mxUtils.write(C,(null!=fa?fa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());C.setAttribute("title",Y.getAttribute("title"));
+Q.removeAttribute("disabled");R.removeAttribute("disabled");T.removeAttribute("disabled");M.removeAttribute("disabled");U.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&J.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));mxUtils.setOpacity(Q,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(T,60);mxUtils.setOpacity(M,60);mxUtils.setOpacity(U,60)}else K.style.display="none",K.innerText="",C.innerText="",B.innerText="",mxUtils.write(C,
+mxResources.get("errorLoadingFile")),mxUtils.write(B,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ca=document.createElement("td");ca.style.padding="6px";ca.style.whiteSpace="nowrap";X==f[f.length-1]?mxUtils.write(ca,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ca,Z.toLocaleTimeString()):mxUtils.write(ca,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());
+Y.appendChild(ca);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ka){E!=X&&(e.stop(),null!=z&&(z.style.backgroundColor=""),E=X,z=Y,z.style.backgroundColor="light-dark(#ebf2f9, #000000)",A=D=null,C.removeAttribute("title"),C.innerText=mxResources.get("loading")+"...",x.style.backgroundColor=y.defaultPageBackgroundColor,
+B.innerText="",y.getModel().clear(),J.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(T,20),mxUtils.setOpacity(M,20),mxUtils.setOpacity(U,20),e.spin(x),X.getXml(function(ba){if(E==
+X)try{ea(ba)}catch(ha){C.innerText=mxResources.get("error")+": "+ha.message}},function(ba){e.stop();K.style.display="none";K.innerText="";C.innerText="";mxUtils.write(C,mxResources.get("errorLoadingFile"));mxUtils.write(B,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ka))});mxEvent.addListener(Y,"dblclick",function(ka){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ka)},!1);S.appendChild(Y)}return Y}(f[u]);
+null!=W&&u==f.length-1&&(O=W)}P.appendChild(S);q.appendChild(P)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(x.style.display="none",N.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(x.style.display="none",N.style.display="none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";
+N.appendChild(C);N.appendChild(M);N.appendChild(R);N.appendChild(T);N.appendChild(Q);N.appendChild(K);N.appendChild(U);b.editor.cancelFirst&&l.appendChild(q);l.appendChild(v);null!=g&&g.constructor==DriveFile&&l.appendChild(G);l.appendChild(J);b.editor.cancelFirst||l.appendChild(q);d.appendChild(l);d.appendChild(N);this.container=d},DraftDialog=function(b,f,m,d,q,x,B,y,I){var L=document.createElement("div"),H=document.createElement("div");H.style.marginTop="0px";H.style.whiteSpace="nowrap";H.style.overflow=
+"auto";H.style.lineHeight="normal";mxUtils.write(H,f);L.appendChild(H);var c=document.createElement("select"),e=mxUtils.bind(this,function(){"-1"==c.value?(c.value=c.options[0].value,e(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var M=this,U;return $jscomp.asyncExecutePromiseGeneratorProgram(function(n){for(U=0;U<I.length;U++)q.apply(M,[U,mxUtils.bind(M,function(){})]);b.hideDialog(!0);n.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(E=mxUtils.parseXml(I[c.value].data),
D=b.editor.extractGraphModel(E.documentElement,!0),A=0,this.init())});if(null!=I){c.style.marginLeft="4px";for(f=0;f<I.length;f++){var g=document.createElement("option");g.setAttribute("value",f);var l=new Date(I[f].created),p=new Date(I[f].modified);mxUtils.write(g,l.toLocaleDateString()+" "+l.toLocaleTimeString()+" - "+(l.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());c.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,
-mxResources.get("deleteAll"));c.appendChild(g);H.appendChild(c);mxEvent.addListener(c,"change",e)}null==m&&(m=I[0].data);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.marginTop="10px";u.style.left="40px";u.style.right="40px";u.style.top="46px";u.style.bottom="74px";u.style.overflow="hidden";mxEvent.disableContextMenu(u);M.appendChild(u);var z=new Graph(u);z.setEnabled(!1);z.setPanning(!0);z.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";
-z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var E=mxUtils.parseXml(m),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,P=null,R=z.getGlobalVariable;z.getGlobalVariable=function(L){return"page"==L&&null!=P&&null!=P[A]?P[A].getAttribute("name"):"pagenumber"==L?A+1:"pagecount"==L?null!=P?P.length:1:R.apply(this,arguments)};z.getLinkForCell=function(){return null};m=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){z.zoomIn()},20);H=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){z.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==z.view.scale?(z.maxFitScale=8,z.fit(8)):z.zoomActual();z.center()},20);C=mxUtils.button(C||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var L=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(U){q.apply(L,[c.value,
-mxUtils.bind(L,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,e()):b.hideDialog(!0))})]);U.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});C.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),
-function(){d.apply(this,[c.value])});x.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function L(B){if(null!=B){var F=B.getAttribute("background");if(null==F||""==F||F==mxConstants.NONE)F=
-"light-dark(#ffffff, transparent)";u.style.backgroundColor=F;(new mxCodec(B.ownerDocument)).decode(B,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return B}function U(B){null!=B&&(B=L(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(T,"change",function(B){A=parseInt(T.value);U(P[A]);mxEvent.consume(B)});if("mxfile"==D.nodeName){var n=D.getElementsByTagName("diagram");P=[];for(var t=0;t<n.length;t++)P.push(n[t]);0<P.length&&U(P[A]);T.innerText="";if(1<P.length)for(T.style.display="",t=
-0;t<P.length;t++)n=document.createElement("option"),mxUtils.write(n,P[t].getAttribute("name")||mxResources.get("pageWithNumber",[t+1])),n.setAttribute("value",t),t==A&&n.setAttribute("selected","selected"),T.appendChild(n);else T.style.display="none"}else L(D)};l.appendChild(T);l.appendChild(m);l.appendChild(H);l.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});m.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className=
-"geBtn");b.editor.cancelFirst?(g.appendChild(m),null!=y&&g.appendChild(y),g.appendChild(C),g.appendChild(x)):(g.appendChild(x),g.appendChild(C),null!=y&&g.appendChild(y),g.appendChild(m));M.appendChild(g);M.appendChild(l);this.container=M},FindWindow=function(b,f,m,d,q,x){function C(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var N=0;N<v.length;N++)if("label"!=v[N].nodeName){var O=mxUtils.trim(v[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();
-if(null==k&&0<=O.indexOf(G)||null!=k&&k.test(O))return!0}}return!1}function y(){g?(F.removeAttribute("disabled"),J.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));A.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function I(k,v,G){t.innerText="";var N=H.model.getDescendants(H.model.getRoot()),O=A.value.toLowerCase(),Q=R.checked?new RegExp(O):null,S=null;p=null;c!=O&&(c=O,e=null,l=!1);var V=null==e;if(0<O.length){if(l){l=
+mxResources.get("deleteAll"));c.appendChild(g);H.appendChild(c);mxEvent.addListener(c,"change",e)}null==m&&(m=I[0].data);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.marginTop="10px";u.style.left="40px";u.style.right="40px";u.style.top="46px";u.style.bottom="74px";u.style.overflow="hidden";mxEvent.disableContextMenu(u);L.appendChild(u);var z=new Graph(u);z.setEnabled(!1);z.setPanning(!0);z.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";
+z.panningHandler.ignoreCell=!0;z.panningHandler.useLeftButtonForPanning=!0;z.minFitScale=null;z.maxFitScale=null;z.centerZoom=!0;var E=mxUtils.parseXml(m),D=b.editor.extractGraphModel(E.documentElement,!0),A=0,Q=null,R=z.getGlobalVariable;z.getGlobalVariable=function(M){return"page"==M&&null!=Q&&null!=Q[A]?Q[A].getAttribute("name"):"pagenumber"==M?A+1:"pagecount"==M?null!=Q?Q.length:1:R.apply(this,arguments)};z.getLinkForCell=function(){return null};m=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){z.zoomIn()},20);H=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){z.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==z.view.scale?(z.maxFitScale=8,z.fit(8)):z.zoomActual();z.center()},20);B=mxUtils.button(B||mxResources.get("discard"),function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var M=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(U){q.apply(M,[c.value,
+mxUtils.bind(M,function(){null!=c.parentNode&&(c.options[c.selectedIndex].parentNode.removeChild(c.options[c.selectedIndex]),1<c.options.length?(c.value=c.options[0].value,e()):b.hideDialog(!0))})]);U.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});B.className="geBtn";var T=document.createElement("select");T.style.maxWidth="80px";T.style.position="relative";T.style.top="-2px";T.style.verticalAlign="bottom";T.style.marginRight="6px";T.style.display="none";x=mxUtils.button(x||mxResources.get("edit"),
+function(){d.apply(this,[c.value])});x.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function M(C){if(null!=C){var F=C.getAttribute("background");if(null==F||""==F||F==mxConstants.NONE)F=
+"light-dark(#ffffff, transparent)";u.style.backgroundColor=F;(new mxCodec(C.ownerDocument)).decode(C,z.getModel());z.maxFitScale=1;z.fit(8);z.center()}return C}function U(C){null!=C&&(C=M(Editor.parseDiagramNode(C)));return C}mxEvent.addListener(T,"change",function(C){A=parseInt(T.value);U(Q[A]);mxEvent.consume(C)});if("mxfile"==D.nodeName){var n=D.getElementsByTagName("diagram");Q=[];for(var t=0;t<n.length;t++)Q.push(n[t]);0<Q.length&&U(Q[A]);T.innerText="";if(1<Q.length)for(T.style.display="",t=
+0;t<Q.length;t++)n=document.createElement("option"),mxUtils.write(n,Q[t].getAttribute("name")||mxResources.get("pageWithNumber",[t+1])),n.setAttribute("value",t),t==A&&n.setAttribute("selected","selected"),T.appendChild(n);else T.style.display="none"}else M(D)};l.appendChild(T);l.appendChild(m);l.appendChild(H);l.appendChild(f);m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});m.className="geBtn";y=null!=y?mxUtils.button(mxResources.get("ignore"),y):null;null!=y&&(y.className=
+"geBtn");b.editor.cancelFirst?(g.appendChild(m),null!=y&&g.appendChild(y),g.appendChild(B),g.appendChild(x)):(g.appendChild(x),g.appendChild(B),null!=y&&g.appendChild(y),g.appendChild(m));L.appendChild(g);L.appendChild(l);this.container=L},FindWindow=function(b,f,m,d,q,x){function B(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var N=0;N<v.length;N++)if("label"!=v[N].nodeName){var O=mxUtils.trim(v[N].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();
+if(null==k&&0<=O.indexOf(G)||null!=k&&k.test(O))return!0}}return!1}function y(){g?(F.removeAttribute("disabled"),J.removeAttribute("disabled")):(F.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));A.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function I(k,v,G){t.innerText="";var N=H.model.getDescendants(H.model.getRoot()),O=A.value.toLowerCase(),P=R.checked?new RegExp(O):null,S=null;p=null;c!=O&&(c=O,e=null,l=!1);var V=null==e;if(0<O.length){if(l){l=
!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;e=null;do l=!1,N=b.pages[k],H=b.createTemporaryGraph(H.getStylesheet()),b.updatePageRoot(N),H.model.setRoot(N.root),k=(k+1)%b.pages.length;while(!I(!0,v,G)&&k!=W);e&&(e=null,G?b.editor.graph.model.execute(new SelectPage(b,N)):b.selectPage(N));l=!1;H=b.editor.graph;return I(!0,v,G)}for(X=0;X<N.length;X++){W=H.view.getState(N[X]);v&&(V=V||W==e);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(H.model.isVertex(W.cell)||
-H.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(L.innerHTML=H.sanitizeHtml(H.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([L])):label=H.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&x&&W==e&&(label=label.substr(u),Z=u);var Y=""==P.value;if(null==Q&&(0<=label.indexOf(O)||Y&&C(Q,W.cell,O))||null!=Q&&(Q.test(label)||Y&&C(Q,W.cell,O)))if(x&&(null!=Q?(Y=label.match(Q),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),u=Z+Y.index+
-p.length)):(p=O,u=Z+label.indexOf(O)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==e}}if(null!=S){if(X==N.length&&T.checked)return e=null,l=!0,I(!0,v,G);e=S;H.scrollCellToVisible(e.cell);H.isEnabled()&&!H.isCellLocked(e.cell)?G||H.getSelectionCell()==e.cell&&1==H.getSelectionCount()||H.setSelectionCell(e.cell):H.highlightCell(e.cell)}else{if(!k&&T.checked)return l=!0,I(!0,v,G);H.isEnabled()&&!G&&H.clearSelection()}g=null!=S;x&&!k&&y();return 0==O.length||null!=S}var M=b.actions.get("findReplace"),
-H=b.editor.graph,c=null,e=null,g=!1,l=!1,p=null,u=0,z=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=x?"260px":"200px",A=document.createElement("input");A.setAttribute("placeholder",mxResources.get("find"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=D;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";E.appendChild(A);mxUtils.br(E);if(x){var P=
-document.createElement("input");P.setAttribute("placeholder",mxResources.get("replaceWith"));P.setAttribute("type","text");P.style.marginTop="4px";P.style.marginBottom="6px";P.style.width=D;P.style.fontSize="12px";P.style.borderRadius="4px";P.style.padding="6px";E.appendChild(P);mxUtils.br(E);mxEvent.addListener(P,"input",y)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";E.appendChild(R);D=document.createElement("label");
+H.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(M.innerHTML=H.sanitizeHtml(H.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([M])):label=H.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&x&&W==e&&(label=label.substr(u),Z=u);var Y=""==Q.value;if(null==P&&(0<=label.indexOf(O)||Y&&B(P,W.cell,O))||null!=P&&(P.test(label)||Y&&B(P,W.cell,O)))if(x&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),u=Z+Y.index+
+p.length)):(p=O,u=Z+label.indexOf(O)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==e}}if(null!=S){if(X==N.length&&T.checked)return e=null,l=!0,I(!0,v,G);e=S;H.scrollCellToVisible(e.cell);H.isEnabled()&&!H.isCellLocked(e.cell)?G||H.getSelectionCell()==e.cell&&1==H.getSelectionCount()||H.setSelectionCell(e.cell):H.highlightCell(e.cell)}else{if(!k&&T.checked)return l=!0,I(!0,v,G);H.isEnabled()&&!G&&H.clearSelection()}g=null!=S;x&&!k&&y();return 0==O.length||null!=S}var L=b.actions.get("findReplace"),
+H=b.editor.graph,c=null,e=null,g=!1,l=!1,p=null,u=0,z=1,E=document.createElement("div");E.style.userSelect="none";E.style.overflow="hidden";E.style.padding="10px";E.style.height="100%";var D=x?"260px":"200px",A=document.createElement("input");A.setAttribute("placeholder",mxResources.get("find"));A.setAttribute("type","text");A.style.marginTop="4px";A.style.marginBottom="6px";A.style.width=D;A.style.fontSize="12px";A.style.borderRadius="4px";A.style.padding="6px";E.appendChild(A);mxUtils.br(E);if(x){var Q=
+document.createElement("input");Q.setAttribute("placeholder",mxResources.get("replaceWith"));Q.setAttribute("type","text");Q.style.marginTop="4px";Q.style.marginBottom="6px";Q.style.width=D;Q.style.fontSize="12px";Q.style.borderRadius="4px";Q.style.padding="6px";E.appendChild(Q);mxUtils.br(E);mxEvent.addListener(Q,"input",y)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";E.appendChild(R);D=document.createElement("label");
D.setAttribute("for","geFindWinRegExChck");E.appendChild(D);mxUtils.write(D,mxResources.get("regularExpression"));E.appendChild(D);D=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");D.style.position="relative";D.style.marginLeft="6px";D.style.top="3px";E.appendChild(D);mxUtils.br(E);var T=document.createElement("input");T.setAttribute("id","geFindWinAllPagesChck");T.setAttribute("type","checkbox");T.style.marginRight="4px";E.appendChild(T);D=document.createElement("label");D.setAttribute("for",
-"geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var L=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right="0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";D.style.textAlign="center";E.appendChild(D);var U=mxUtils.button(mxResources.get("reset"),function(){t.innerText="";A.value="";A.style.backgroundColor="";x&&(P.value="",y());c=e=null;l=!1;A.focus()});U.setAttribute("title",
+"geFindWinAllPagesChck");E.appendChild(D);mxUtils.write(D,mxResources.get("allPages"));E.appendChild(D);var M=document.createElement("div");mxUtils.br(E);D=document.createElement("div");D.style.left="0px";D.style.right="0px";D.style.marginTop="6px";D.style.padding="0 6px 0 6px";D.style.textAlign="center";E.appendChild(D);var U=mxUtils.button(mxResources.get("reset"),function(){t.innerText="";A.value="";A.style.backgroundColor="";x&&(Q.value="",y());c=e=null;l=!1;A.focus()});U.setAttribute("title",
mxResources.get("reset"));U.style.float="none";U.style.width="120px";U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn";x||D.appendChild(U);var n=mxUtils.button(mxResources.get("find"),function(){try{A.style.backgroundColor=I()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});n.setAttribute("title",mxResources.get("find")+" (Enter)");n.style.float="none";n.style.width="120px";n.style.marginTop="6px";n.style.marginLeft=
-"8px";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.className="geBtn gePrimaryBtn";D.appendChild(n);var t=document.createElement("div");t.style.marginTop="10px";if(x){var B=function(k,v,G,N,O){if(null==O||"1"!=O.html)return N=k.toLowerCase().indexOf(v,N),0>N?k:k.substr(0,N)+G+k.substr(N+v.length);var Q=k;v=mxUtils.htmlEntities(v,!1,!1,!1);O=[];var S=-1;for(k=k.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",
-S+1));)O.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");N=k.toLowerCase().indexOf(v,N);if(0>N)return Q;Q=N+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,N)+G+k.substr(Q);for(var V=0,W=0;W<O.length;W++){if(O[W]-V<N)k=k.substr(0,O[W])+S[W]+k.substr(O[W]);else{var X=O[W]-V<Q?N+V:O[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},F=mxUtils.button(mxResources.get("replFind"),
-function(){try{if(null!=p&&null!=e){var k=e.cell,v=H.getLabel(k);H.isCellEditable(k)&&H.model.setValue(k,B(v,p,P.value,u-p.length,H.getCurrentCellStyle(k)));A.style.backgroundColor=I(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});F.setAttribute("title",mxResources.get("replFind"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn gePrimaryBtn";F.setAttribute("disabled",
-"disabled");D.appendChild(F);mxUtils.br(D);var J=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=e){var k=e.cell,v=H.getLabel(k);H.model.setValue(k,B(v,p,P.value,u-p.length,H.getCurrentCellStyle(k)));F.setAttribute("disabled","disabled");J.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});J.setAttribute("title",mxResources.get("replace"));J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";
-J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");D.appendChild(J);var K=mxUtils.button(mxResources.get("replaceAll"),function(){t.innerText="";c=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;H.getModel().beginUpdate();try{for(var G=0,N={};I(!1,!0,!0)&&100>G;){var O=e.cell,Q=H.getLabel(O),S=N[O.id];if(S&&S.replAllMrk==z&&S.replAllPos>=u)break;N[O.id]={replAllMrk:z,replAllPos:u};H.isCellEditable(O)&&(H.model.setValue(O,
-B(Q,p,P.value,u-p.length,H.getCurrentCellStyle(O))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(t,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{H.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}z++});K.setAttribute("title",mxResources.get("replaceAll"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
+"8px";n.style.overflow="hidden";n.style.textOverflow="ellipsis";n.className="geBtn gePrimaryBtn";D.appendChild(n);var t=document.createElement("div");t.style.marginTop="10px";if(x){var C=function(k,v,G,N,O){if(null==O||"1"!=O.html)return N=k.toLowerCase().indexOf(v,N),0>N?k:k.substr(0,N)+G+k.substr(N+v.length);var P=k;v=mxUtils.htmlEntities(v,!1,!1,!1);O=[];var S=-1;for(k=k.replace(/<br>/ig,"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",
+S+1));)O.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");N=k.toLowerCase().indexOf(v,N);if(0>N)return P;P=N+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,N)+G+k.substr(P);for(var V=0,W=0;W<O.length;W++){if(O[W]-V<N)k=k.substr(0,O[W])+S[W]+k.substr(O[W]);else{var X=O[W]-V<P?N+V:O[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},F=mxUtils.button(mxResources.get("replFind"),
+function(){try{if(null!=p&&null!=e){var k=e.cell,v=H.getLabel(k);H.isCellEditable(k)&&H.model.setValue(k,C(v,p,Q.value,u-p.length,H.getCurrentCellStyle(k)));A.style.backgroundColor=I(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});F.setAttribute("title",mxResources.get("replFind"));F.style.float="none";F.style.width="120px";F.style.marginTop="6px";F.style.marginLeft="8px";F.style.overflow="hidden";F.style.textOverflow="ellipsis";F.className="geBtn gePrimaryBtn";F.setAttribute("disabled",
+"disabled");D.appendChild(F);mxUtils.br(D);var J=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=e){var k=e.cell,v=H.getLabel(k);H.model.setValue(k,C(v,p,Q.value,u-p.length,H.getCurrentCellStyle(k)));F.setAttribute("disabled","disabled");J.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});J.setAttribute("title",mxResources.get("replace"));J.style.float="none";J.style.width="120px";J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";
+J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");D.appendChild(J);var K=mxUtils.button(mxResources.get("replaceAll"),function(){t.innerText="";c=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;H.getModel().beginUpdate();try{for(var G=0,N={};I(!1,!0,!0)&&100>G;){var O=e.cell,P=H.getLabel(O),S=N[O.id];if(S&&S.replAllMrk==z&&S.replAllPos>=u)break;N[O.id]={replAllMrk:z,replAllPos:u};H.isCellEditable(O)&&(H.model.setValue(O,
+C(P,p,Q.value,u-p.length,H.getCurrentCellStyle(O))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(t,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{H.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}z++});K.setAttribute("title",mxResources.get("replaceAll"));K.style.float="none";K.style.width="120px";K.style.marginTop="6px";K.style.marginLeft="8px";K.style.overflow="hidden";K.style.textOverflow="ellipsis";
K.className="geBtn gePrimaryBtn";K.setAttribute("disabled","disabled");D.appendChild(K);mxUtils.br(D);D.appendChild(U);U=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));U.setAttribute("title",mxResources.get("close"));U.style.float="none";U.style.width="120px";U.style.marginTop="6px";U.style.marginLeft="8px";U.style.overflow="hidden";U.style.textOverflow="ellipsis";U.className="geBtn";D.appendChild(U);mxUtils.br(D);D.appendChild(t)}else U.style.width=
-"90px",n.style.width="90px";mxEvent.addListener(A,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)M.funct();else if(c!=A.value.toLowerCase()||13==k.keyCode)try{A.style.backgroundColor=I()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){A.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&!mxEvent.isShiftDown(k)&&(M.funct(),mxEvent.consume(k))});this.window=
+"90px",n.style.width="90px";mxEvent.addListener(A,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)L.funct();else if(c!=A.value.toLowerCase()||13==k.keyCode)try{A.style.backgroundColor=I()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){A.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(E,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&!mxEvent.isShiftDown(k)&&(L.funct(),mxEvent.consume(k))});this.window=
new mxWindow(mxResources.get("find")+(x?"/"+mxResources.get("replace"):""),E,f,m,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?T.removeAttribute("disabled"):(T.checked=
-!1,T.setAttribute("disabled","disabled"))):H.container.focus()}));b.installResizeHandler(this,!1);this.focus=function(){A.focus()}},FreehandWindow=function(b,f,m,d,q,x){var C=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(x){var I=function(){var g=C.freehand.getStrokeColor(!0);null!=g&&g!=mxConstants.NONE&&1<g.length&&"string"===typeof g&&("default"==g?g=mxResources.get("useBlackAndWhite"):(g="#"==
-g.charAt(0)?g.substring(1).toUpperCase():g,g=ColorDialog.prototype.colorNames[g]),null!=g&&H.setAttribute("title",g))},M=document.createElement("input");M.setAttribute("id","geFreehandBrush");M.setAttribute("type","checkbox");M.checked=C.freehand.isPerfectFreehandMode();M.style.margin="10px 5px 0px 10px";M.style.float="left";y.appendChild(M);C.freehand.setPerfectFreehandMode(M.checked);x=document.createElement("label");x.setAttribute("for","geFreehandBrush");x.style.float="left";x.style.marginTop=
-"10px";y.appendChild(x);mxUtils.write(x,mxResources.get("brush"));y.appendChild(x);var H=document.createElement("tempDiv");H.style.display="block";H.style.width="100%";H.style.height="100%";H.style.borderRadius="2px";H.style.boxSizing="border-box";H.style.border="1px solid black";H.style.backgroundColor=C.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){H.style.backgroundColor=C.freehand.getStrokeColor()});I();x=mxUtils.button("",mxUtils.bind(this,function(g){b.pickColor(C.freehand.getStrokeColor(!0),
-function(l){C.freehand.setStrokeColor(l);H.style.backgroundColor=C.freehand.getStrokeColor();I()},"default");mxEvent.consume(g)}));x.style.position="absolute";x.style.boxSizing="border-box";x.style.padding="2px";x.style.top="8px";x.style.right="8px";x.style.width="28px";x.style.height="18px";x.className="geColorBtn";x.innerText="";x.appendChild(H);y.appendChild(x);x=document.createElement("img");x.setAttribute("title",mxResources.get("settings"));x.setAttribute("src",Editor.gearImage);x.className=
-"geButton";x.style.position="absolute";x.style.boxSizing="border-box";x.style.padding="2px";x.style.top="8px";x.style.right="38px";x.style.width="18px";x.style.height="18px";x.style.opacity="0.6";y.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,function(g){g=C.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",g,function(l){!isNaN(l)&&0<l&&20>=l&&C.freehand.setSmoothing(parseInt(l))})}));mxUtils.br(y);var c=document.createElement("input");c.setAttribute("type",
-"range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",C.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";y.appendChild(c);mxUtils.br(y);x=function(){C.freehand.setPerfectFreehandMode(M.checked);c.style.visibility=M.checked?"visible":"hidden"};mxEvent.addListener(M,"change",x);x();mxEvent.addListener(c,"change",function(){C.freehand.setBrushSize(parseInt(this.value))})}var e=mxUtils.button(mxResources.get("startDrawing"),function(){C.freehand.isDrawing()?
-C.freehand.stopDrawing():C.freehand.startDrawing()});e.setAttribute("title",mxResources.get("startDrawing")+" (X)");e.style.width="90%";e.style.position="relative";e.className="geBtn gePrimaryBtn";y.appendChild(e);this.window=new mxWindow(mxResources.get("freehand"),y,f,m,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);C.addListener("freehandStateChanged",mxUtils.bind(this,function(){e.innerText="";mxUtils.write(e,mxResources.get(C.freehand.isDrawing()?
-"stopDrawing":"startDrawing"));var g=document.createElement("span");g.className="geShortcutKey";g.style.margin="0 2px 4px 0";mxUtils.write(g,"X");e.appendChild(g);e.setAttribute("title",mxResources.get(C.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");e.className="geBtn"+(C.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){C.freehand.isDrawing()&&C.freehand.stopDrawing()}));
-b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,m,d,q){var x=b.editor.graph,C=document.createElement("div");C.style.userSelect="none";C.style.overflow="hidden";C.style.height="100%";var y=document.createElement("div");y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginRight="4px";I.checked=!0;var M=document.createElement("input");M.setAttribute("type",
-"checkbox");M.style.marginRight="4px";M.checked=!0;var H=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(x.isSelectionEmpty()?x.getVerticesAndEdges():x.getSelectionCells(),I.checked,M.checked)}));H.setAttribute("title","Convert Colors");H.className="geBtn gePrimaryBtn";y.appendChild(H);C.appendChild(y);y=y.cloneNode(!1);y.appendChild(M);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));C.appendChild(y);
-y=y.cloneNode(!1);y.appendChild(I);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));C.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),C,f,m,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,m,d,q){function x(){U=
-!0;u.value=n;c.isSelectionEmpty()?(E.setAttribute("disabled","disabled"),"selectionOnly"==u.value&&(u.value="includeCopyOfMyDiagram")):E.removeAttribute("disabled");b.isDiagramEmpty()?(z.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==u.value&&(u.value="help")):z.removeAttribute("disabled");U=!1}function C(B,F,J){var K=document.createElement("button");K.className="geBtn gePrimaryBtn";K.style.padding="4px";K.style.height="auto";K.style.position="relative";"flex"==J?(K.style.overflow=
-"hidden",K.style.textOverflow="ellipsis",K.style.whiteSpace="nowrap",K.style.margin="0px",K.style.flexGrow="1"):(K.style.display="block",K.style.margin="8px",K.style.left="50%",K.style.transform="translateX(-50%)");mxUtils.write(K,B);K.setAttribute("title",B);mxEvent.addListener(K,"click",F);return K}function y(B){var F=document.createElement("div");F.style.display="block";F.style.position="relative";F.style.backgroundColor="#e0e0e0";F.style.borderRadius="4px";F.style.wordWrap="break-word";F.style.textAlign=
-"left";F.style.padding="6px";F.style.margin="12px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,B);g.appendChild(F);return F}function I(B){var F=B.indexOf("<mxGraphModel "),J=B.indexOf("</mxGraphModel>");0>F&&(F=B.indexOf("<mxGraphModel>"));if(0<=F&&J>F){var K=mxUtils,k=K.trim,v=B.substring(0,F),G=v.indexOf("```");0<=G&&(v=v.substring(v,0,G+6));K=k.call(K,v);F=B.substring(F,J+15);k=mxUtils;v=k.trim;B=B.substring(J+15);J=B.lastIndexOf("```");0<=J&&(B=B.substring(J+3));return[K,F,v.call(k,
-B)]}return null}function M(B){var F=y(B);F.style.cursor="pointer";F.style.marginBottom="2px";F.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(F,"click",function(V){L.value=B;L.focus()});var J=y("");J.style.marginTop="2px";var K=b.currentPage,k=B,v=[],G=null;if("includeCopyOfMyDiagram"==u.value||"selectionOnly"==u.value){var N=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==u.value&&(N.isObjectIgnored=function(V){return V.constructor==mxCell&&!c.model.isRoot(V)&&!c.model.isLayer(V)&&
-!c.isCellSelected(V)&&!c.isAncestorSelected(V)});G=N.encode(c.getModel());N.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==u.value?(k=A.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=B?B:"something random")+
-'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var O={model:Editor.gptModel,messages:v},Q=0;for(v=0;v<O.messages.length;v++)Q+=O.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){J.innerHTML="";mxUtils.write(J,
-mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+Q+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";J.appendChild(V);J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(O),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ea,ca){ea.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);
-ea.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ea){W.clear();J.innerHTML="";mxUtils.write(J,ea.message);J.appendChild(C(mxResources.get("tryAgain"),S));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ea)}),Y=mxUtils.bind(this,function(ea){var ca=I(ea),ka=null!=ca?b.stringToCells(ca[1]):null;if(null!=ka&&0<ka.length){ea=document.createElement("div");ea.style.display="inline-block";ea.style.position="relative";
+!1,T.setAttribute("disabled","disabled"))):H.container.focus()}));b.installResizeHandler(this,!1);this.focus=function(){A.focus()}},FreehandWindow=function(b,f,m,d,q,x){var B=b.editor.graph,y=document.createElement("div");y.style.textAlign="center";y.style.userSelect="none";y.style.overflow="hidden";y.style.height="100%";if(x){var I=function(){var g=B.freehand.getStrokeColor(!0);null!=g&&g!=mxConstants.NONE&&1<g.length&&"string"===typeof g&&("default"==g?g=mxResources.get("useBlackAndWhite"):(g="#"==
+g.charAt(0)?g.substring(1).toUpperCase():g,g=ColorDialog.prototype.colorNames[g]),null!=g&&H.setAttribute("title",g))},L=document.createElement("input");L.setAttribute("id","geFreehandBrush");L.setAttribute("type","checkbox");L.checked=B.freehand.isPerfectFreehandMode();L.style.margin="10px 5px 0px 10px";L.style.float="left";y.appendChild(L);B.freehand.setPerfectFreehandMode(L.checked);x=document.createElement("label");x.setAttribute("for","geFreehandBrush");x.style.float="left";x.style.marginTop=
+"10px";y.appendChild(x);mxUtils.write(x,mxResources.get("brush"));y.appendChild(x);var H=document.createElement("tempDiv");H.style.display="block";H.style.width="100%";H.style.height="100%";H.style.borderRadius="2px";H.style.boxSizing="border-box";H.style.border="1px solid black";H.style.backgroundColor=B.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){H.style.backgroundColor=B.freehand.getStrokeColor()});I();x=mxUtils.button("",mxUtils.bind(this,function(g){b.pickColor(B.freehand.getStrokeColor(!0),
+function(l){B.freehand.setStrokeColor(l);H.style.backgroundColor=B.freehand.getStrokeColor();I()},"default");mxEvent.consume(g)}));x.style.position="absolute";x.style.boxSizing="border-box";x.style.padding="2px";x.style.top="8px";x.style.right="8px";x.style.width="28px";x.style.height="18px";x.className="geColorBtn";x.innerText="";x.appendChild(H);y.appendChild(x);x=document.createElement("img");x.setAttribute("title",mxResources.get("settings"));x.setAttribute("src",Editor.gearImage);x.className=
+"geButton";x.style.position="absolute";x.style.boxSizing="border-box";x.style.padding="2px";x.style.top="8px";x.style.right="38px";x.style.width="18px";x.style.height="18px";x.style.opacity="0.6";y.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,function(g){g=B.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",g,function(l){!isNaN(l)&&0<l&&20>=l&&B.freehand.setSmoothing(parseInt(l))})}));mxUtils.br(y);var c=document.createElement("input");c.setAttribute("type",
+"range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",B.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";y.appendChild(c);mxUtils.br(y);x=function(){B.freehand.setPerfectFreehandMode(L.checked);c.style.visibility=L.checked?"visible":"hidden"};mxEvent.addListener(L,"change",x);x();mxEvent.addListener(c,"change",function(){B.freehand.setBrushSize(parseInt(this.value))})}var e=mxUtils.button(mxResources.get("startDrawing"),function(){B.freehand.isDrawing()?
+B.freehand.stopDrawing():B.freehand.startDrawing()});e.setAttribute("title",mxResources.get("startDrawing")+" (X)");e.style.width="90%";e.style.position="relative";e.className="geBtn gePrimaryBtn";y.appendChild(e);this.window=new mxWindow(mxResources.get("freehand"),y,f,m,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);B.addListener("freehandStateChanged",mxUtils.bind(this,function(){e.innerText="";mxUtils.write(e,mxResources.get(B.freehand.isDrawing()?
+"stopDrawing":"startDrawing"));var g=document.createElement("span");g.className="geShortcutKey";g.style.margin="0 2px 4px 0";mxUtils.write(g,"X");e.appendChild(g);e.setAttribute("title",mxResources.get(B.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");e.className="geBtn"+(B.freehand.isDrawing()?" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){B.freehand.isDrawing()&&B.freehand.stopDrawing()}));
+b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,f,m,d,q){var x=b.editor.graph,B=document.createElement("div");B.style.userSelect="none";B.style.overflow="hidden";B.style.height="100%";var y=document.createElement("div");y.style.display="flex";y.style.alignItems="center";y.style.justifyContent="center";y.style.paddingTop="20px";var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginRight="4px";I.checked=!0;var L=document.createElement("input");L.setAttribute("type",
+"checkbox");L.style.marginRight="4px";L.checked=!0;var H=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(x.isSelectionEmpty()?x.getVerticesAndEdges():x.getSelectionCells(),I.checked,L.checked)}));H.setAttribute("title","Convert Colors");H.className="geBtn gePrimaryBtn";y.appendChild(H);B.appendChild(y);y=y.cloneNode(!1);y.appendChild(L);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("background"));B.appendChild(y);
+y=y.cloneNode(!1);y.appendChild(I);y.style.paddingTop="8px";mxUtils.write(y,mxResources.get("labels"));B.appendChild(y);this.window=new mxWindow(mxResources.get("adaptiveColors"),B,f,m,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,f,m,d,q){function x(){U=
+!0;u.value=n;c.isSelectionEmpty()?(E.setAttribute("disabled","disabled"),"selectionOnly"==u.value&&(u.value="includeCopyOfMyDiagram")):E.removeAttribute("disabled");b.isDiagramEmpty()?(z.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==u.value&&(u.value="help")):z.removeAttribute("disabled");U=!1}function B(C,F,J){var K=document.createElement("button");K.className="geBtn gePrimaryBtn";K.style.padding="4px";K.style.height="auto";K.style.position="relative";"flex"==J?(K.style.overflow=
+"hidden",K.style.textOverflow="ellipsis",K.style.whiteSpace="nowrap",K.style.margin="0px",K.style.flexGrow="1"):(K.style.display="block",K.style.margin="8px",K.style.left="50%",K.style.transform="translateX(-50%)");mxUtils.write(K,C);K.setAttribute("title",C);mxEvent.addListener(K,"click",F);return K}function y(C){var F=document.createElement("div");F.style.display="block";F.style.position="relative";F.style.backgroundColor="#e0e0e0";F.style.borderRadius="4px";F.style.wordWrap="break-word";F.style.textAlign=
+"left";F.style.padding="6px";F.style.margin="12px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,C);g.appendChild(F);return F}function I(C){var F=C.indexOf("<mxGraphModel "),J=C.indexOf("</mxGraphModel>");0>F&&(F=C.indexOf("<mxGraphModel>"));if(0<=F&&J>F){var K=mxUtils,k=K.trim,v=C.substring(0,F),G=v.indexOf("```");0<=G&&(v=v.substring(v,0,G+6));K=k.call(K,v);F=C.substring(F,J+15);k=mxUtils;v=k.trim;C=C.substring(J+15);J=C.lastIndexOf("```");0<=J&&(C=C.substring(J+3));return[K,F,v.call(k,
+C)]}return null}function L(C){var F=y(C);F.style.cursor="pointer";F.style.marginBottom="2px";F.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(F,"click",function(V){M.value=C;M.focus()});var J=y("");J.style.marginTop="2px";var K=b.currentPage,k=C,v=[],G=null;if("includeCopyOfMyDiagram"==u.value||"selectionOnly"==u.value){var N=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==u.value&&(N.isObjectIgnored=function(V){return V.constructor==mxCell&&!c.model.isRoot(V)&&!c.model.isLayer(V)&&
+!c.isCellSelected(V)&&!c.isAncestorSelected(V)});G=N.encode(c.getModel());N.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==u.value?(k=A.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=C?C:"something random")+
+'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var O={model:Editor.gptModel,messages:v},P=0;for(v=0;v<O.messages.length;v++)P+=O.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){J.innerHTML="";mxUtils.write(J,
+mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+P+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";J.appendChild(V);J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(O),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ea,ca){ea.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);
+ea.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ea){W.clear();J.innerHTML="";mxUtils.write(J,ea.message);J.appendChild(B(mxResources.get("tryAgain"),S));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ea)}),Y=mxUtils.bind(this,function(ea){var ca=I(ea),ka=null!=ca?b.stringToCells(ca[1]):null;if(null!=ka&&0<ka.length){ea=document.createElement("div");ea.style.display="inline-block";ea.style.position="relative";
ea.style.transform="translateX(-50%)";ea.style.padding="6px";ea.style.left="50%";var ba=mxUtils.parseXml(ca[1]),ha=new mxCodec(ba),aa=new mxGraphModel;ha.decode(ba.documentElement,aa);var ia=null;null!=G&&(ba=new mxCodec(G.ownerDocument),ia=new mxGraphModel,ba.decode(G,ia));ba=mxUtils.bind(this,function(fa){c.model.beginUpdate();try{if(null!=ia&&null!=b.getPageIndex(K)){b.selectPage(K);var da=b.diffCells(ia.root,aa.root);b.patchPage(K,da,null,!0)}else{var za=aa.getChildren(aa.getChildAt(aa.getRoot(),
0));c.setSelectionCells(c.importCells(za))}}finally{c.model.endUpdate()}mxEvent.consume(fa)});ha=c.getBoundingBoxFromGeometry(ka);null!=ha?(ea.style.cursor="move",ea.appendChild(b.sidebar.createVertexTemplateFromCells(ka,ha.width,ha.height,"",!0,null,!0,!0,ba,160,120))):(ea.style.padding="14px",mxUtils.write(ea,mxResources.get("noPreview")));J.innerHTML="";F=J;0<ca[0].length&&(mxUtils.write(F,ca[0]),mxUtils.br(F));F.appendChild(ea);ka=document.createElement("div");ka.style.display="flex";ka.style.gap=
-"6px";ka.style.margin="6px";ka.appendChild(C(mxResources.get("tryAgain"),S,"flex"));ka.appendChild(C(mxResources.get(null!=G?"apply":"insert"),ba,"flex"));J.appendChild(ka);0<ca[2].length&&(mxUtils.br(F),mxUtils.write(F,ca[2]));F.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else J.innerHTML="",F=J,mxUtils.write(F,ea),J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ea){if(W.clear())try{if(200<=ea.getStatus()&&299>=ea.getStatus()){var ca=
-JSON.parse(ea.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",O,"response:",ca);var ka=mxUtils.trim(ca.choices[0].message.content);if("create"==u.value){var ba=b.extractMermaidDeclaration(ka);null!=ba?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(ba,null,function(){},function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ka),J.appendChild(C(mxResources.get("tryAgain"),S)))}else Y(ka)}else{var ha="Error: "+ea.getStatus();try{var aa=
-JSON.parse(ea.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(ha=aa.error.message)}catch(ia){}J.innerHTML="";mxUtils.write(J,ha);J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){J.innerHTML="";mxUtils.write(J,W.message);J.appendChild(C(mxResources.get("tryAgain"),S));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function H(){""!=mxUtils.trim(L.value)&&(M(L.value),L.value="")}var c=b.editor.graph,e=document.createElement("div");
+"6px";ka.style.margin="6px";ka.appendChild(B(mxResources.get("tryAgain"),S,"flex"));ka.appendChild(B(mxResources.get(null!=G?"apply":"insert"),ba,"flex"));J.appendChild(ka);0<ca[2].length&&(mxUtils.br(F),mxUtils.write(F,ca[2]));F.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else J.innerHTML="",F=J,mxUtils.write(F,ea),J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ea){if(W.clear())try{if(200<=ea.getStatus()&&299>=ea.getStatus()){var ca=
+JSON.parse(ea.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",O,"response:",ca);var ka=mxUtils.trim(ca.choices[0].message.content);if("create"==u.value){var ba=b.extractMermaidDeclaration(ka);null!=ba?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(ba,null,function(){},function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ka),J.appendChild(B(mxResources.get("tryAgain"),S)))}else Y(ka)}else{var ha="Error: "+ea.getStatus();try{var aa=
+JSON.parse(ea.getText());null!=aa&&null!=aa.error&&null!=aa.error.message&&(ha=aa.error.message)}catch(ia){}J.innerHTML="";mxUtils.write(J,ha);J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){J.innerHTML="";mxUtils.write(J,W.message);J.appendChild(B(mxResources.get("tryAgain"),S));J.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function H(){""!=mxUtils.trim(M.value)&&(L(M.value),M.value="")}var c=b.editor.graph,e=document.createElement("div");
e.style.textAlign="center";e.style.overflow="hidden";e.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";e.appendChild(g);var l=document.createElement("div");l.style.position="absolute";l.style.boxSizing="border-box";l.style.borderRadius="4px";l.style.border="1px solid lightgray";l.style.margin="8px 8px 16px 8px";l.style.padding="8px";l.style.left="0px";l.style.right=
"0px";l.style.bottom="0px";l.style.padding="6px";l.style.height="80px";var p=document.createElement("div");p.style.display="flex";p.style.gap="6px";p.style.marginBottom="6px";var u=document.createElement("select");u.style.textOverflow="ellipsis";u.style.flexGrow="1";u.style.padding="4px";u.style.minWidth="0";l.appendChild(p);var z=document.createElement("option");z.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));u.appendChild(z);var E=document.createElement("option");
E.setAttribute("value","selectionOnly");mxUtils.write(E,mxResources.get("selectionOnly"));u.appendChild(E);p.appendChild(u);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var D=document.createElement("option");D.setAttribute("value","create");mxUtils.write(D,mxResources.get("create"));u.appendChild(D)}D=document.createElement("option");D.setAttribute("value","help");mxUtils.write(D,mxResources.get("help"));u.appendChild(D);D=document.createElement("option");D.setAttribute("value",
-"reset");mxUtils.write(D,mxResources.get("reset"));u.appendChild(D);var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var P=document.createElement("option"),R=EditorUi.mermaidDiagramTypes[D],T=R;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));P.setAttribute("value",R);mxUtils.write(P,
-T);A.appendChild(P)}p.appendChild(A);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100%";L.style.outline="none";L.style.border="none";L.style.background="transparent";L.style.padding="8px 26px 8px 8px";L.style.boxSizing="border-box";p.appendChild(L);D=document.createElement("img");D.setAttribute("src",Editor.sendImage);D.setAttribute("title",mxResources.get("sendMessage"));
-D.className="geAdaptiveAsset";D.style.position="relative";D.style.cursor="pointer";D.style.opacity="0.5";D.style.height="19px";D.style.left="-24px";D.style.top="5px";D.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(D);l.appendChild(p);c.isSelectionEmpty()?b.isDiagramEmpty()?u.value="help":u.value="includeCopyOfMyDiagram":u.value="selectionOnly";var U=!1,n=u.value,t=function(){L.setAttribute("placeholder",mxResources.get("create"==u.value?"describeYourDiagram":"askMeAnything"));
-"create"==u.value?(u.style.width="",A.style.display=""):(u.style.width="100%",A.style.display="none")};t();mxEvent.addListener(u,"change",function(){U||("reset"==u.value?(u.value=n,g.innerHTML=""):n=u.value,t())});c.selectionModel.addListener(mxEvent.CHANGE,x);c.getModel().addListener(mxEvent.CHANGE,x);x();mxEvent.addListener(D,"click",H);mxEvent.addListener(L,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||H()});e.appendChild(l);this.window=new mxWindow(mxResources.get("chatWindowTitle"),
-e,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(x)}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();L.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,m,d,q){var x=b.editor.graph,C=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)C=
-b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(I,M){if(x.isEnabled()){var H=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=c.split(" ");for(var e=[],g=[],l=0;l<c.length;l++){var p=mxUtils.trim(c[l]);""!=p&&(g.push(p),0>mxUtils.indexOf(I,p)&&e.push(p))}x.isSelectionEmpty()?M(I.concat(e)):x.addTagsForCells(x.getSelectionCells(),
-g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(H.container,320,80,!0,!0);H.init()}},C);C=y.div;this.window=new mxWindow(mxResources.get("tags"),C,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){y.refresh();this.window.fit()}));b.installResizeHandler(this,
-!0)},AuthDialog=function(b,f,m,d){var q=document.createElement("div");q.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var C="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
-f==b.dropbox?(C=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(C=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(C=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
-[C]));var I=document.createElement("input");I.setAttribute("type","checkbox");C=mxUtils.button(mxResources.get("authorize"),function(){d(I.checked)});C.insertBefore(y,C.firstChild);C.style.marginTop="6px";C.className="geBigButton";C.style.fontSize="18px";C.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(C);m&&(m=document.createElement("p"),m.style.marginTop="20px",m.appendChild(I),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),m.appendChild(x),
-q.appendChild(m),I.checked=!0,I.defaultChecked=!0,mxEvent.addListener(x,"click",function(M){I.checked=!I.checked;mxEvent.consume(M)}));this.container=q},MoreShapesDialog=function(b,f,m){m=null!=m?m:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var C=b.sidebar.customEntries[x]||{},y={title:b.getResource(C.title),entries:[]},I=0;null!=C.entries&&I<C.entries.length;I++){var M=C.entries[I];y.entries.push({id:M.id,
-title:b.getResource(M.title),desc:b.getResource(M.desc),image:M.preview})}0<y.entries.length&&q.push(y)}for(x=0;x<m.length;x++)if(null==b.sidebar.enabledLibraries)q.push(m[x]);else{y={title:m[x].title,entries:[]};for(I=0;I<m[x].entries.length;I++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,m[x].entries[I].id)&&y.entries.push(m[x].entries[I]);0<y.entries.length&&q.push(y)}m=q;if(f){x=mxUtils.bind(this,function(R){for(var T=0;T<R.length;T++)(function(L){var U=l.cloneNode(!1);U.style.fontWeight="bold";
-U.style.backgroundColor="light-dark(#e5e5e5, #505759)";U.style.padding="6px 0px 6px 20px";mxUtils.write(U,L.title);H.appendChild(U);for(var n=0;n<L.entries.length;n++)(function(t){var B=l.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",t.title+" ("+t.id+")");var F=document.createElement("input");F.setAttribute("type","checkbox");F.checked=b.sidebar.isEntryVisible(t.id);
-F.defaultChecked=F.checked;B.appendChild(F);mxUtils.write(B," "+t.title);H.appendChild(B);var J=function(K){if(null==K||"INPUT"!=mxEvent.getSource(K).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=t.desc){var k=document.createElement("pre");k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,t.desc);c.appendChild(k)}null!=t.imageCallback?t.imageCallback(c):
-null!=t.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",t.image),c.appendChild(k)):null==t.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=e&&(e.style.backgroundColor="");e=B;e.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=K&&mxEvent.consume(K)}};mxEvent.addListener(B,"click",J);mxEvent.addListener(B,"dblclick",function(K){F.checked=!F.checked;mxEvent.consume(K)});
-g.push(function(){return F.checked?t.id:null});0==T&&0==n&&J()})(L.entries[n])})(R[T])});I=document.createElement("div");I.className="geDialogTitle";mxUtils.write(I,mxResources.get("shapes"));I.style.position="absolute";I.style.top="0px";I.style.left="0px";I.style.lineHeight="40px";I.style.height="40px";I.style.right="0px";var H=document.createElement("div"),c=document.createElement("div");H.style.position="absolute";H.style.top="40px";H.style.left="0px";H.style.width="202px";H.style.bottom="60px";
+"reset");mxUtils.write(D,mxResources.get("reset"));u.appendChild(D);var A=document.createElement("select");A.style.textOverflow="ellipsis";A.style.flexGrow="1";A.style.padding="4px";A.style.minWidth="0";for(D=0;D<EditorUi.mermaidDiagramTypes.length;D++){var Q=document.createElement("option"),R=EditorUi.mermaidDiagramTypes[D],T=R;"erDiagram"==T&&(T="entityRelationshipDiagram");T=mxResources.get(T,null,T.charAt(0).toUpperCase()+T.substring(1).replace(/[A-Z]/g," $&"));Q.setAttribute("value",R);mxUtils.write(Q,
+T);A.appendChild(Q)}p.appendChild(A);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var M=document.createElement("input");M.setAttribute("type","text");M.style.width="100%";M.style.outline="none";M.style.border="none";M.style.background="transparent";M.style.padding="8px 26px 8px 8px";M.style.boxSizing="border-box";p.appendChild(M);D=document.createElement("img");D.setAttribute("src",Editor.sendImage);D.setAttribute("title",mxResources.get("sendMessage"));
+D.className="geAdaptiveAsset";D.style.position="relative";D.style.cursor="pointer";D.style.opacity="0.5";D.style.height="19px";D.style.left="-24px";D.style.top="5px";D.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(D);l.appendChild(p);c.isSelectionEmpty()?b.isDiagramEmpty()?u.value="help":u.value="includeCopyOfMyDiagram":u.value="selectionOnly";var U=!1,n=u.value,t=function(){M.setAttribute("placeholder",mxResources.get("create"==u.value?"describeYourDiagram":"askMeAnything"));
+"create"==u.value?(u.style.width="",A.style.display=""):(u.style.width="100%",A.style.display="none")};t();mxEvent.addListener(u,"change",function(){U||("reset"==u.value?(u.value=n,g.innerHTML=""):n=u.value,t())});c.selectionModel.addListener(mxEvent.CHANGE,x);c.getModel().addListener(mxEvent.CHANGE,x);x();mxEvent.addListener(D,"click",H);mxEvent.addListener(M,"keydown",function(C){13!=C.keyCode||mxEvent.isShiftDown(C)||H()});e.appendChild(l);this.window=new mxWindow(mxResources.get("chatWindowTitle"),
+e,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){c.getModel().removeListener(x)}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();M.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,f,m,d,q){var x=b.editor.graph,B=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)B=
+b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var y=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(I,L){if(x.isEnabled()){var H=new FilenameDialog(b,"",mxResources.get("add"),function(c){b.hideDialog();if(null!=c&&0<c.length){c=c.split(" ");for(var e=[],g=[],l=0;l<c.length;l++){var p=mxUtils.trim(c[l]);""!=p&&(g.push(p),0>mxUtils.indexOf(I,p)&&e.push(p))}x.isSelectionEmpty()?L(I.concat(e)):x.addTagsForCells(x.getSelectionCells(),
+g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(H.container,320,80,!0,!0);H.init()}},B);B=y.div;this.window=new mxWindow(mxResources.get("tags"),B,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){y.refresh();this.window.fit()}));b.installResizeHandler(this,
+!0)},AuthDialog=function(b,f,m,d){var q=document.createElement("div");q.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("authorizationRequired"));var B="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):
+f==b.dropbox?(B=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(B=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg",y.style.width="32px"):f==b.trello&&(B=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",
+[B]));var I=document.createElement("input");I.setAttribute("type","checkbox");B=mxUtils.button(mxResources.get("authorize"),function(){d(I.checked)});B.insertBefore(y,B.firstChild);B.style.marginTop="6px";B.className="geBigButton";B.style.fontSize="18px";B.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(B);m&&(m=document.createElement("p"),m.style.marginTop="20px",m.appendChild(I),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberMe")),m.appendChild(x),
+q.appendChild(m),I.checked=!0,I.defaultChecked=!0,mxEvent.addListener(x,"click",function(L){I.checked=!I.checked;mxEvent.consume(L)}));this.container=q},MoreShapesDialog=function(b,f,m){m=null!=m?m:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var x=0;x<b.sidebar.customEntries.length;x++){for(var B=b.sidebar.customEntries[x]||{},y={title:b.getResource(B.title),entries:[]},I=0;null!=B.entries&&I<B.entries.length;I++){var L=B.entries[I];y.entries.push({id:L.id,
+title:b.getResource(L.title),desc:b.getResource(L.desc),image:L.preview})}0<y.entries.length&&q.push(y)}for(x=0;x<m.length;x++)if(null==b.sidebar.enabledLibraries)q.push(m[x]);else{y={title:m[x].title,entries:[]};for(I=0;I<m[x].entries.length;I++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,m[x].entries[I].id)&&y.entries.push(m[x].entries[I]);0<y.entries.length&&q.push(y)}m=q;if(f){x=mxUtils.bind(this,function(R){for(var T=0;T<R.length;T++)(function(M){var U=l.cloneNode(!1);U.style.fontWeight="bold";
+U.style.backgroundColor="light-dark(#e5e5e5, #505759)";U.style.padding="6px 0px 6px 20px";mxUtils.write(U,M.title);H.appendChild(U);for(var n=0;n<M.entries.length;n++)(function(t){var C=l.cloneNode(!1);C.style.cursor="pointer";C.style.padding="4px 0px 4px 20px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.textOverflow="ellipsis";C.setAttribute("title",t.title+" ("+t.id+")");var F=document.createElement("input");F.setAttribute("type","checkbox");F.checked=b.sidebar.isEntryVisible(t.id);
+F.defaultChecked=F.checked;C.appendChild(F);mxUtils.write(C," "+t.title);H.appendChild(C);var J=function(K){if(null==K||"INPUT"!=mxEvent.getSource(K).nodeName){c.style.textAlign="center";c.style.padding="0px";c.style.color="";c.innerText="";if(null!=t.desc){var k=document.createElement("pre");k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,t.desc);c.appendChild(k)}null!=t.imageCallback?t.imageCallback(c):
+null!=t.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",t.image),c.appendChild(k)):null==t.desc&&(c.style.padding="20px",c.style.color="rgb(179, 179, 179)",mxUtils.write(c,mxResources.get("noPreview")));null!=e&&(e.style.backgroundColor="");e=C;e.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=K&&mxEvent.consume(K)}};mxEvent.addListener(C,"click",J);mxEvent.addListener(C,"dblclick",function(K){F.checked=!F.checked;mxEvent.consume(K)});
+g.push(function(){return F.checked?t.id:null});0==T&&0==n&&J()})(M.entries[n])})(R[T])});I=document.createElement("div");I.className="geDialogTitle";mxUtils.write(I,mxResources.get("shapes"));I.style.position="absolute";I.style.top="0px";I.style.left="0px";I.style.lineHeight="40px";I.style.height="40px";I.style.right="0px";var H=document.createElement("div"),c=document.createElement("div");H.style.position="absolute";H.style.top="40px";H.style.left="0px";H.style.width="202px";H.style.bottom="60px";
H.style.overflow="auto";c.style.position="absolute";c.style.left="202px";c.style.right="0px";c.style.top="40px";c.style.bottom="60px";c.style.overflow="auto";c.style.borderLeftStyle="solid";c.style.borderLeftWidth="1px";c.style.textAlign="center";var e=null,g=[],l=document.createElement("div");l.style.position="relative";l.style.left="0px";l.style.right="0px";x(m);d.style.padding="30px";d.appendChild(I);d.appendChild(H);d.appendChild(c);m=document.createElement("div");m.className="geDialogFooter";
m.style.position="absolute";m.style.paddingRight="16px";m.style.left="0px";m.style.right="0px";m.style.bottom="0px";m.style.height="60px";m.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;p.defaultChecked=p.checked;m.appendChild(p);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("labels"));x.style.paddingRight="20px";m.appendChild(x);mxEvent.addListener(x,
"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var u=document.createElement("input");u.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)x=document.createElement("span"),x.style.paddingRight="20px",x.appendChild(u),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),u.style.position="relative",u.style.top="1px",u.checked=!0,u.defaultChecked=!0,mxEvent.addListener(x,"click",function(R){mxEvent.getSource(R)!=u&&(u.checked=!u.checked,mxEvent.consume(R))}),
-m.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],T=0;T<g.length;T++){var L=g[T].apply(this,arguments);null!=L&&R.push(L)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<R.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(R,
+m.appendChild(x);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],T=0;T<g.length;T++){var M=g[T].apply(this,arguments);null!=M&&R.push(M)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(T=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=T&&0<R.splice(T,1).length)&&b.toggleScratchpad(),T=mxUtils.indexOf(R,
"search"),mxSettings.settings.search=0<=T&&0<R.splice(T,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),u.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),u.checked,!0);b.setSidebarTitles(p.checked,u.checked)});I.className="geBtn gePrimaryBtn"}else{var z=document.createElement("table");x=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";I=document.createElement("tr");z.style.width="100%";f=document.createElement("td");q=document.createElement("td");
-C=document.createElement("td");var E=mxUtils.bind(this,function(R,T,L){var U=document.createElement("input");U.type="checkbox";z.appendChild(U);U.checked=b.sidebar.isEntryVisible(L);var n=document.createElement("span");mxUtils.write(n,T);T=document.createElement("div");T.style.display="block";T.appendChild(U);T.appendChild(n);mxEvent.addListener(n,"click",function(t){U.checked=!U.checked;mxEvent.consume(t)});R.appendChild(T);return function(){return U.checked?L:null}});I.appendChild(f);I.appendChild(q);
-I.appendChild(C);x.appendChild(I);z.appendChild(x);g=[];var D=0;for(x=0;x<m.length;x++)for(I=0;I<m[x].entries.length;I++)D++;var A=[f,q,C],P=0;for(x=0;x<m.length;x++)(function(R){for(var T=0;T<R.entries.length;T++){var L=R.entries[T];g.push(E(A[Math.floor(P/(D/3))],L.title,L.id));P++}})(m[x]);d.appendChild(z);m=document.createElement("div");m.style.marginTop="18px";m.style.textAlign="center";u=document.createElement("input");isLocalStorage&&(u.setAttribute("type","checkbox"),u.checked=!0,u.defaultChecked=
-!0,m.appendChild(u),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),m.appendChild(x),mxEvent.addListener(x,"click",function(R){u.checked=!u.checked;mxEvent.consume(R)}));d.appendChild(m);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";I=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],T=0;T<g.length;T++){var L=g[T].apply(this,arguments);null!=L&&R.push(L)}b.sidebar.showEntries(0<R.length?
-R.join(";"):"",u.checked);b.hideDialog()});I.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right"}b.editor.cancelFirst?(m.appendChild(x),m.appendChild(I)):(m.appendChild(I),m.appendChild(x));d.appendChild(m);this.container=d},PluginsDialog=function(b,f,m,d){function q(){I=!0;if(0==y.length)C.innerText=mxResources.get("noPlugins");else{C.innerText="";for(var g=0;g<y.length;g++){var l=document.createElement("span");l.style.display="flex";
-l.style.alignItems="center";l.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));l.appendChild(p);mxUtils.write(l,y[g]);C.appendChild(l);mxUtils.br(C);mxEvent.addListener(p,"click",function(u){return function(){b.confirm(mxResources.get("delete")+' "'+y[u]+'"?',function(){null!=m&&m(y[u]);
-y.splice(u,1);q()})}}(g))}}}var x=document.createElement("div"),C=document.createElement("div");C.style.height="180px";C.style.overflow="auto";var y=mxSettings.getPlugins().slice(),I=!1;x.appendChild(C);q();I=!1;var M=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(g){g&&0>mxUtils.indexOf(y,g)&&y.push(g);q()})}:function(){var g=document.createElement("div"),l=document.createElement("span");l.style.marginTop="6px";mxUtils.write(l,mxResources.get("builtinPlugins")+": ");g.appendChild(l);
-var p=document.createElement("select");p.style.width="150px";for(l=0;l<App.publicPlugin.length;l++){var u=document.createElement("option");mxUtils.write(u,App.publicPlugin[l]);u.value=App.publicPlugin[l];p.appendChild(u)}g.appendChild(p);mxUtils.br(g);mxUtils.br(g);l=mxUtils.button(mxResources.get("custom")+"...",function(){var z=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var A=E[D],P=App.pluginRegistry[A];
-null!=P&&(A=P);0<A.length&&0>mxUtils.indexOf(y,A)&&y.push(A)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(z.container,300,80,!0,!0);z.init()});l.className="geBtn";ALLOW_CUSTOM_PLUGINS||(l.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var z=App.pluginRegistry[p.value];0>mxUtils.indexOf(y,z)&&(y.push(z),q())}),null,null,null,l);b.showDialog(g.container,360,100,!0,!0)});M.className="geBtn";var H=mxUtils.button(mxResources.get("cancel"),
+B=document.createElement("td");var E=mxUtils.bind(this,function(R,T,M){var U=document.createElement("input");U.type="checkbox";z.appendChild(U);U.checked=b.sidebar.isEntryVisible(M);var n=document.createElement("span");mxUtils.write(n,T);T=document.createElement("div");T.style.display="block";T.appendChild(U);T.appendChild(n);mxEvent.addListener(n,"click",function(t){U.checked=!U.checked;mxEvent.consume(t)});R.appendChild(T);return function(){return U.checked?M:null}});I.appendChild(f);I.appendChild(q);
+I.appendChild(B);x.appendChild(I);z.appendChild(x);g=[];var D=0;for(x=0;x<m.length;x++)for(I=0;I<m[x].entries.length;I++)D++;var A=[f,q,B],Q=0;for(x=0;x<m.length;x++)(function(R){for(var T=0;T<R.entries.length;T++){var M=R.entries[T];g.push(E(A[Math.floor(Q/(D/3))],M.title,M.id));Q++}})(m[x]);d.appendChild(z);m=document.createElement("div");m.style.marginTop="18px";m.style.textAlign="center";u=document.createElement("input");isLocalStorage&&(u.setAttribute("type","checkbox"),u.checked=!0,u.defaultChecked=
+!0,m.appendChild(u),x=document.createElement("span"),mxUtils.write(x," "+mxResources.get("rememberThisSetting")),m.appendChild(x),mxEvent.addListener(x,"click",function(R){u.checked=!u.checked;mxEvent.consume(R)}));d.appendChild(m);x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});x.className="geBtn";I=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],T=0;T<g.length;T++){var M=g[T].apply(this,arguments);null!=M&&R.push(M)}b.sidebar.showEntries(0<R.length?
+R.join(";"):"",u.checked);b.hideDialog()});I.className="geBtn gePrimaryBtn";m=document.createElement("div");m.style.marginTop="26px";m.style.textAlign="right"}b.editor.cancelFirst?(m.appendChild(x),m.appendChild(I)):(m.appendChild(I),m.appendChild(x));d.appendChild(m);this.container=d},PluginsDialog=function(b,f,m,d){function q(){I=!0;if(0==y.length)B.innerText=mxResources.get("noPlugins");else{B.innerText="";for(var g=0;g<y.length;g++){var l=document.createElement("span");l.style.display="flex";
+l.style.alignItems="center";l.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));l.appendChild(p);mxUtils.write(l,y[g]);B.appendChild(l);mxUtils.br(B);mxEvent.addListener(p,"click",function(u){return function(){b.confirm(mxResources.get("delete")+' "'+y[u]+'"?',function(){null!=m&&m(y[u]);
+y.splice(u,1);q()})}}(g))}}}var x=document.createElement("div"),B=document.createElement("div");B.style.height="180px";B.style.overflow="auto";var y=mxSettings.getPlugins().slice(),I=!1;x.appendChild(B);q();I=!1;var L=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(g){g&&0>mxUtils.indexOf(y,g)&&y.push(g);q()})}:function(){var g=document.createElement("div"),l=document.createElement("span");l.style.marginTop="6px";mxUtils.write(l,mxResources.get("builtinPlugins")+": ");g.appendChild(l);
+var p=document.createElement("select");p.style.width="150px";for(l=0;l<App.publicPlugin.length;l++){var u=document.createElement("option");mxUtils.write(u,App.publicPlugin[l]);u.value=App.publicPlugin[l];p.appendChild(u)}g.appendChild(p);mxUtils.br(g);mxUtils.br(g);l=mxUtils.button(mxResources.get("custom")+"...",function(){var z=new FilenameDialog(b,"",mxResources.get("add"),function(E){b.hideDialog();if(null!=E&&0<E.length){E=E.split(";");for(var D=0;D<E.length;D++){var A=E[D],Q=App.pluginRegistry[A];
+null!=Q&&(A=Q);0<A.length&&0>mxUtils.indexOf(y,A)&&y.push(A)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(z.container,300,80,!0,!0);z.init()});l.className="geBtn";ALLOW_CUSTOM_PLUGINS||(l.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var z=App.pluginRegistry[p.value];0>mxUtils.indexOf(y,z)&&(y.push(z),q())}),null,null,null,l);b.showDialog(g.container,360,100,!0,!0)});L.className="geBtn";var H=mxUtils.button(mxResources.get("cancel"),
function(){b.hideDialog()});H.className="geBtn";var c=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){I?(mxSettings.setPlugins(y),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});c.className="geBtn gePrimaryBtn";var e=document.createElement("div");e.style.marginTop="14px";e.style.textAlign="right";b.isOffline()||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||e.appendChild(H),
-e.appendChild(M),e.appendChild(c)):(e.appendChild(M),e.appendChild(c),d||e.appendChild(H));x.appendChild(e);this.container=x},CropImageDialog=function(b,f,m,d){function q(){var R=u.checked,T=z.checked,L=g.geometry,U=I.width,n=I.height,t=(300-U)/2,B=(300-n)/2;L.x<t?(L.width-=t-L.x,L.x=t):L.x+L.width>t+U&&(L.width=t+U-L.x,L.x=Math.min(L.x,t+U));L.y<B?(L.height-=B-L.y,L.y=B):L.y+L.height>B+n&&(L.height=B+n-L.y,L.y=Math.min(L.y,B+n));var F=(L.x-t)/U*100;U=100-(L.x+L.width-t)/U*100;t=(L.y-B)/n*100;L=100-
-(L.y+L.height-B)/n*100;return"inset("+mxUtils.format(t)+"% "+mxUtils.format(U)+"% "+mxUtils.format(L)+"% "+mxUtils.format(F)+"%"+(R?" round "+e+"%":T?" round 50%":"")+")"}function x(R){null!=H&&(!0!==R&&(H.model.setGeometry(g,c.clone()),e=5,D.value=e),H.model.setStyle(g,l+q()),H.selectAll(),E.style.visibility=u.checked?"visible":"hidden")}var C=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent=
-"center";y.style.alignItems="center";y.style.position="absolute";var I=document.createElement("img");I.onload=function(){function R(){H.model.setStyle(g,l+q())}H=new Graph(M);H.autoExtend=!1;H.autoScroll=!1;H.setGridEnabled(!1);H.setEnabled(!0);H.setPanning(!1);H.setConnectable(!1);H.getRubberband().setEnabled(!1);H.graphHandler.allowLivePreview=!1;var T=H.createVertexHandler;H.createVertexHandler=function(){var Q=T.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=m)try{if("inset"==m.substring(0,
-5)){var L=g.geometry,U=I.width,n=I.height,t=(300-U)/2,B=(300-n)/2,F=m.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),J=parseFloat(F[0]),K=parseFloat(F[1]),k=parseFloat(F[2]),v=parseFloat(F[3]);isFinite(J)&&isFinite(K)&&isFinite(k)&&isFinite(v)?(L.x=v/100*U+t,L.y=J/100*n+B,L.width=(100-K)/100*U+t-L.x,L.height=(100-k)/100*n+B-L.y,"round"==F[4]?"50%"==F[5]?z.setAttribute("checked","checked"):(e=parseInt(F[5]),D.value=e,u.setAttribute("checked","checked"),E.style.visibility="visible"):p.setAttribute("checked",
-"checked")):m=null}else m=null}catch(Q){}g.style=l+(m?m:q());g.vertex=!0;H.addCell(g,null,null,null,null);H.selectAll();H.addListener(mxEvent.CELLS_MOVED,R);H.addListener(mxEvent.CELLS_RESIZED,R);var G=H.graphHandler.mouseUp,N=H.graphHandler.mouseDown;H.graphHandler.mouseUp=function(){G.apply(this,arguments);M.style.backgroundColor="#fff9"};H.graphHandler.mouseDown=function(){N.apply(this,arguments);M.style.backgroundColor=""};H.dblClick=function(){};var O=H.getSelectionModel().changeSelection;H.getSelectionModel().changeSelection=
-function(){O.call(this,[g],[g])}};I.onerror=function(){I.onload=null;I.src=Editor.errorImage};I.setAttribute("src",f);I.style.maxWidth="300px";I.style.maxHeight="300px";y.appendChild(I);C.appendChild(y);var M=document.createElement("div");M.style.width="300px";M.style.height="300px";M.style.overflow="hidden";M.style.backgroundColor="#fff9";C.appendChild(M);var H=null,c=new mxGeometry(100,100,100,100),e=5,g=new mxCell("",c.clone(),""),l="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+
-f.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";C.appendChild(p);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));C.appendChild(f);var u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingRounded");u.setAttribute("name",
-"croppingShape");u.style.margin="5px";C.appendChild(u);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));C.appendChild(f);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingEllipse");z.setAttribute("name","croppingShape");z.style.margin="5px";C.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));C.appendChild(f);
-mxEvent.addListener(p,"change",x);mxEvent.addListener(u,"change",x);mxEvent.addListener(z,"change",x);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var D=document.createElement("input");D.setAttribute("type","range");D.setAttribute("min","1");D.setAttribute("max","49");D.setAttribute("value",e);D.setAttribute("title",mxResources.get("arcSize"));E.appendChild(D);C.appendChild(E);mxEvent.addListener(D,"change",function(){e=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){d(q(),g.geometry.width,g.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("reset"),function(){d(null,I.width,I.height);b.hideDialog()});A.className="geBtn";var P=document.createElement("div");P.style.marginTop="10px";P.style.textAlign="right";b.editor.cancelFirst?(P.appendChild(f),P.appendChild(A),P.appendChild(y)):(P.appendChild(A),P.appendChild(y),
-P.appendChild(f));C.appendChild(P);this.container=C},EditGeometryDialog=function(b,f){var m=b.editor.graph,d=1==f.length?m.getCellGeometry(f[0]):null,q=document.createElement("div"),x=document.createElement("table"),C=document.createElement("tbody"),y=document.createElement("tr"),I=document.createElement("td"),M=document.createElement("td");x.style.paddingLeft="6px";mxUtils.write(I,mxResources.get("relative")+":");var H=document.createElement("input");H.setAttribute("type","checkbox");null!=d&&d.relative&&
-(H.setAttribute("checked","checked"),H.defaultChecked=!0);this.init=function(){H.focus()};M.appendChild(H);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";M.appendChild(c);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");
-I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d?d.y:"";M.appendChild(e);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width=
-"100px";g.value=null!=d&&null!=d.offset?d.offset.x:"";M.appendChild(g);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("dy")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d&&null!=d.offset?d.offset.y:"";M.appendChild(l);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");
-M=document.createElement("td");mxUtils.write(I,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";M.appendChild(p);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=
-d?d.height:"";M.appendChild(u);y.appendChild(I);y.appendChild(M);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");M=document.createElement("td");mxUtils.write(I,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=1==f.length?mxUtils.getValue(m.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";M.appendChild(z);y.appendChild(I);y.appendChild(M);C.appendChild(y);x.appendChild(C);q.appendChild(x);
+e.appendChild(L),e.appendChild(c)):(e.appendChild(L),e.appendChild(c),d||e.appendChild(H));x.appendChild(e);this.container=x},CropImageDialog=function(b,f,m,d){function q(){var R=u.checked,T=z.checked,M=g.geometry,U=I.width,n=I.height,t=(300-U)/2,C=(300-n)/2;M.x<t?(M.width-=t-M.x,M.x=t):M.x+M.width>t+U&&(M.width=t+U-M.x,M.x=Math.min(M.x,t+U));M.y<C?(M.height-=C-M.y,M.y=C):M.y+M.height>C+n&&(M.height=C+n-M.y,M.y=Math.min(M.y,C+n));var F=(M.x-t)/U*100;U=100-(M.x+M.width-t)/U*100;t=(M.y-C)/n*100;M=100-
+(M.y+M.height-C)/n*100;return"inset("+mxUtils.format(t)+"% "+mxUtils.format(U)+"% "+mxUtils.format(M)+"% "+mxUtils.format(F)+"%"+(R?" round "+e+"%":T?" round 50%":"")+")"}function x(R){null!=H&&(!0!==R&&(H.model.setGeometry(g,c.clone()),e=5,D.value=e),H.model.setStyle(g,l+q()),H.selectAll(),E.style.visibility=u.checked?"visible":"hidden")}var B=document.createElement("div"),y=document.createElement("div");y.style.height="300px";y.style.width="300px";y.style.display="inline-flex";y.style.justifyContent=
+"center";y.style.alignItems="center";y.style.position="absolute";var I=document.createElement("img");I.onload=function(){function R(){H.model.setStyle(g,l+q())}H=new Graph(L);H.autoExtend=!1;H.autoScroll=!1;H.setGridEnabled(!1);H.setEnabled(!0);H.setPanning(!1);H.setConnectable(!1);H.getRubberband().setEnabled(!1);H.graphHandler.allowLivePreview=!1;var T=H.createVertexHandler;H.createVertexHandler=function(){var P=T.apply(this,arguments);P.livePreview=!1;return P};if(null!=m)try{if("inset"==m.substring(0,
+5)){var M=g.geometry,U=I.width,n=I.height,t=(300-U)/2,C=(300-n)/2,F=m.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),J=parseFloat(F[0]),K=parseFloat(F[1]),k=parseFloat(F[2]),v=parseFloat(F[3]);isFinite(J)&&isFinite(K)&&isFinite(k)&&isFinite(v)?(M.x=v/100*U+t,M.y=J/100*n+C,M.width=(100-K)/100*U+t-M.x,M.height=(100-k)/100*n+C-M.y,"round"==F[4]?"50%"==F[5]?z.setAttribute("checked","checked"):(e=parseInt(F[5]),D.value=e,u.setAttribute("checked","checked"),E.style.visibility="visible"):p.setAttribute("checked",
+"checked")):m=null}else m=null}catch(P){}g.style=l+(m?m:q());g.vertex=!0;H.addCell(g,null,null,null,null);H.selectAll();H.addListener(mxEvent.CELLS_MOVED,R);H.addListener(mxEvent.CELLS_RESIZED,R);var G=H.graphHandler.mouseUp,N=H.graphHandler.mouseDown;H.graphHandler.mouseUp=function(){G.apply(this,arguments);L.style.backgroundColor="#fff9"};H.graphHandler.mouseDown=function(){N.apply(this,arguments);L.style.backgroundColor=""};H.dblClick=function(){};var O=H.getSelectionModel().changeSelection;H.getSelectionModel().changeSelection=
+function(){O.call(this,[g],[g])}};I.onerror=function(){I.onload=null;I.src=Editor.errorImage};I.setAttribute("src",f);I.style.maxWidth="300px";I.style.maxHeight="300px";y.appendChild(I);B.appendChild(y);var L=document.createElement("div");L.style.width="300px";L.style.height="300px";L.style.overflow="hidden";L.style.backgroundColor="#fff9";B.appendChild(L);var H=null,c=new mxGeometry(100,100,100,100),e=5,g=new mxCell("",c.clone(),""),l="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+
+f.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";B.appendChild(p);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));B.appendChild(f);var u=document.createElement("input");u.setAttribute("type","radio");u.setAttribute("id","croppingRounded");u.setAttribute("name",
+"croppingShape");u.style.margin="5px";B.appendChild(u);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));B.appendChild(f);var z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingEllipse");z.setAttribute("name","croppingShape");z.style.margin="5px";B.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));B.appendChild(f);
+mxEvent.addListener(p,"change",x);mxEvent.addListener(u,"change",x);mxEvent.addListener(z,"change",x);var E=document.createElement("div");E.style.textAlign="center";E.style.visibility="hidden";var D=document.createElement("input");D.setAttribute("type","range");D.setAttribute("min","1");D.setAttribute("max","49");D.setAttribute("value",e);D.setAttribute("title",mxResources.get("arcSize"));E.appendChild(D);B.appendChild(E);mxEvent.addListener(D,"change",function(){e=this.value;x(!0)});f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog()});f.className="geBtn";y=mxUtils.button(mxResources.get("apply"),function(){d(q(),g.geometry.width,g.geometry.height);b.hideDialog()});y.className="geBtn gePrimaryBtn";var A=mxUtils.button(mxResources.get("reset"),function(){d(null,I.width,I.height);b.hideDialog()});A.className="geBtn";var Q=document.createElement("div");Q.style.marginTop="10px";Q.style.textAlign="right";b.editor.cancelFirst?(Q.appendChild(f),Q.appendChild(A),Q.appendChild(y)):(Q.appendChild(A),Q.appendChild(y),
+Q.appendChild(f));B.appendChild(Q);this.container=B},EditGeometryDialog=function(b,f){var m=b.editor.graph,d=1==f.length?m.getCellGeometry(f[0]):null,q=document.createElement("div"),x=document.createElement("table"),B=document.createElement("tbody"),y=document.createElement("tr"),I=document.createElement("td"),L=document.createElement("td");x.style.paddingLeft="6px";mxUtils.write(I,mxResources.get("relative")+":");var H=document.createElement("input");H.setAttribute("type","checkbox");null!=d&&d.relative&&
+(H.setAttribute("checked","checked"),H.defaultChecked=!0);this.init=function(){H.focus()};L.appendChild(H);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("left")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.x:"";L.appendChild(c);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");
+I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d?d.y:"";L.appendChild(e);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width=
+"100px";g.value=null!=d&&null!=d.offset?d.offset.x:"";L.appendChild(g);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("dy")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=d&&null!=d.offset?d.offset.y:"";L.appendChild(l);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");
+L=document.createElement("td");mxUtils.write(I,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";L.appendChild(p);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=
+d?d.height:"";L.appendChild(u);y.appendChild(I);y.appendChild(L);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");L=document.createElement("td");mxUtils.write(I,mxResources.get("rotation")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=1==f.length?mxUtils.getValue(m.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";L.appendChild(z);y.appendChild(I);y.appendChild(L);B.appendChild(y);x.appendChild(B);q.appendChild(x);
d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var E=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();m.getModel().beginUpdate();try{for(var D=0;D<f.length;D++){var A=m.getCellGeometry(f[D]);null!=A&&(A=A.clone(),m.isCellMovable(f[D])&&(A.relative=H.checked,0<mxUtils.trim(c.value).length&&(A.x=Number(c.value)),0<mxUtils.trim(e.value).length&&(A.y=Number(e.value)),0<mxUtils.trim(g.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.x=
Number(g.value)),0<mxUtils.trim(l.value).length&&(null==A.offset&&(A.offset=new mxPoint),A.offset.y=Number(l.value))),m.isCellResizable(f[D])&&(0<mxUtils.trim(p.value).length&&(A.width=Number(p.value)),0<mxUtils.trim(u.value).length&&(A.height=Number(u.value))),m.getModel().setGeometry(f[D],A));0<mxUtils.trim(z.value).length&&m.setCellStyles(mxConstants.STYLE_ROTATION,Number(z.value),[f[D]])}}finally{m.getModel().endUpdate()}});E.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(D){13==
-D.keyCode&&E.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(E)):(x.appendChild(E),x.appendChild(d));q.appendChild(x);this.container=q},LibraryDialog=function(b,f,m,d,q,x,C){function y(L){for(L=document.elementFromPoint(L.clientX,L.clientY);null!=L&&L.parentNode!=l;)L=L.parentNode;var U=null;if(null!=L){var n=l.firstChild;for(U=0;null!=n&&n!=L;)n=n.nextSibling,U++}return U}function I(L,U,n,t,B,F,J,K,
-k){try{if(b.spinner.stop(),null==U||"image/"==U.substring(0,6))if(null==L&&null!=J||null==u[L]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};l.style.backgroundImage="";p.style.display="none";var G=B,N=F;if(B>b.maxImageSize||F>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/
-Math.max(1,B)),b.maxImageSize/Math.max(1,F));B*=O;F*=O}G>N?(N=Math.round(100*N/G),G=100):(G=Math.round(100*G/N),N=100);var Q=document.createElement("div");Q.setAttribute("draggable","true");Q.style.display="inline-block";Q.style.position="relative";Q.style.padding="0 12px";Q.style.cursor="move";mxUtils.setPrefixedStyle(Q.style,"transition","transform .1s ease-in-out");if(null!=L){var S=document.createElement("img");S.setAttribute("src",A.convert(L));S.style.width=G+"px";S.style.height=N+"px";S.style.margin=
-"10px";S.style.paddingBottom=Math.floor((100-N)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";Q.appendChild(S)}else if(null!=J){var V=b.stringToCells("<"==J.xml.charAt(0)?J.xml:Graph.decompress(J.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,Q,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),Q.firstChild.style.display="inline-block",Q.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");
-W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ha,aa){mxEvent.addListener(W,"click",function(ia){u[ha]=null;for(var fa=0;fa<c.length;fa++)if(null!=c[fa].data&&c[fa].data==ha||null!=c[fa].xml&&null!=aa&&c[fa].xml==aa.xml){c.splice(fa,1);break}Q.parentNode.removeChild(ba);
-0==c.length&&(l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(Q,L,J);Q.appendChild(W);Q.style.marginBottom="30px";var X=document.createElement("div");X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign=
-"center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=L?(Z={data:L,w:B,h:F,title:k},null!=K&&(Z.aspect=K),u[L]=S,c.push(Z)):null!=J&&(J.aspect="fixed",c.push(J),Z=J);mxEvent.addListener(X,"keydown",function(ba){13==ba.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(ba))});v();Q.appendChild(X);mxEvent.addListener(X,"mousedown",function(ba){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(ba)});V=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
+D.keyCode&&E.click()});x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="right";b.editor.cancelFirst?(x.appendChild(d),x.appendChild(E)):(x.appendChild(E),x.appendChild(d));q.appendChild(x);this.container=q},LibraryDialog=function(b,f,m,d,q,x,B){function y(M){for(M=document.elementFromPoint(M.clientX,M.clientY);null!=M&&M.parentNode!=l;)M=M.parentNode;var U=null;if(null!=M){var n=l.firstChild;for(U=0;null!=n&&n!=M;)n=n.nextSibling,U++}return U}function I(M,U,n,t,C,F,J,K,
+k){try{if(b.spinner.stop(),null==U||"image/"==U.substring(0,6))if(null==M&&null!=J||null==u[M]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};l.style.backgroundImage="";p.style.display="none";var G=C,N=F;if(C>b.maxImageSize||F>b.maxImageSize){var O=Math.min(1,Math.min(b.maxImageSize/
+Math.max(1,C)),b.maxImageSize/Math.max(1,F));C*=O;F*=O}G>N?(N=Math.round(100*N/G),G=100):(G=Math.round(100*G/N),N=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding="0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=M){var S=document.createElement("img");S.setAttribute("src",A.convert(M));S.style.width=G+"px";S.style.height=N+"px";S.style.margin=
+"10px";S.style.paddingBottom=Math.floor((100-N)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";P.appendChild(S)}else if(null!=J){var V=b.stringToCells("<"==J.xml.charAt(0)?J.xml:Graph.decompress(J.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");
+W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(ba){mxEvent.consume(ba)});(function(ba,ha,aa){mxEvent.addListener(W,"click",function(ia){u[ha]=null;for(var fa=0;fa<c.length;fa++)if(null!=c[fa].data&&c[fa].data==ha||null!=c[fa].xml&&null!=aa&&c[fa].xml==aa.xml){c.splice(fa,1);break}P.parentNode.removeChild(ba);
+0==c.length&&(l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(P,M,J);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign=
+"center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=M?(Z={data:M,w:C,h:F,title:k},null!=K&&(Z.aspect=K),u[M]=S,c.push(Z)):null!=J&&(J.aspect="fixed",c.push(J),Z=J);mxEvent.addListener(X,"keydown",function(ba){13==ba.keyCode&&null!=D&&(D(),D=null,mxEvent.consume(ba))});v();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(ba){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(ba)});V=function(ba){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||
9<document.documentMode)){var ha=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(aa){null!=aa&&(Z.title=aa,v())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(ba)}else if("true"!=X.getAttribute("contentEditable")){null!=D&&(D(),D=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,
-"user-select","text");X.focus();document.execCommand("selectAll",!1,null);D=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(ba)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(Q,"dblclick",V);l.appendChild(Q);mxEvent.addListener(Q,"dragstart",function(ba){null==D&&(null==L&&null!=J&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=J.xml&&ba.dataTransfer.setData("Text",J.xml),z=y(ba),
-mxClient.IS_GC&&(Q.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(Q,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(Q,"dragend",function(ba){"hidden"==W.style.visibility&&(W.style.visibility="",X.style.visibility="");z=null;mxUtils.setOpacity(Q,100);mxUtils.setPrefixedStyle(Q.style,"transform",null)})}else P||(P=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(G=
-mxUtils.parseXml(L),"mxlibrary"==G.documentElement.nodeName){N=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=N&&0<N.length)for(var Y=0;Y<N.length;Y++)null!=N[Y].xml?I(null,null,0,0,0,0,N[Y]):I(N[Y].data,null,0,0,N[Y].w,N[Y].h,null,"fixed",N[Y].title);B=!0}else if("mxfile"==G.documentElement.nodeName){var ea=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ea.length;Y++){var ca=Editor.getDiagramNodeXml(ea[Y]);V=b.stringToCells(ca);if(0<V.length){var ka=b.editor.graph.getBoundingBoxFromGeometry(V);
-null!=ka&&I(null,null,0,0,0,0,{xml:ca,w:ka.width,h:ka.height})}}B=!0}}catch(ba){null!=window.console&&console.error("Error in library dialog: "+ba)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}return null}function M(L){L.dataTransfer.dropEffect=null!=z?"move":"copy";L.stopPropagation();L.preventDefault()}function H(L){L.stopPropagation();L.preventDefault();P=!1;E=y(L);if(null!=z)null!=
-E&&E<l.children.length?(c.splice(E>z?E-1:E,0,c.splice(z,1)[0]),l.insertBefore(l.children[z],l.children[E])):(c.push(c.splice(z,1)[0]),l.appendChild(l.children[z]));else if(0<L.dataTransfer.files.length)b.importFiles(L.dataTransfer.files,0,0,b.maxImageSize,R(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var U=decodeURIComponent(L.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(U)||/(\.png)($|\?)/i.test(U)||/(\.gif)($|\?)/i.test(U)||/(\.svg)($|\?)/i.test(U))&&b.loadImage(U,
-function(n){I(U,null,0,0,n.width,n.height);l.scrollTop=l.scrollHeight})}L.stopPropagation();L.preventDefault()}var c=[];m=document.createElement("div");m.style.height="100%";var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.height="40px";m.appendChild(e);mxUtils.write(e,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",f);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";
+"user-select","text");X.focus();document.execCommand("selectAll",!1,null);D=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(ba)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(P,"dblclick",V);l.appendChild(P);mxEvent.addListener(P,"dragstart",function(ba){null==D&&(null==M&&null!=J&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=J.xml&&ba.dataTransfer.setData("Text",J.xml),z=y(ba),
+mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(ba){"hidden"==W.style.visibility&&(W.style.visibility="",X.style.visibility="");z=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else Q||(Q=!0,b.handleError({message:mxResources.get("fileExists")}));else{C=!1;try{if(G=
+mxUtils.parseXml(M),"mxlibrary"==G.documentElement.nodeName){N=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=N&&0<N.length)for(var Y=0;Y<N.length;Y++)null!=N[Y].xml?I(null,null,0,0,0,0,N[Y]):I(N[Y].data,null,0,0,N[Y].w,N[Y].h,null,"fixed",N[Y].title);C=!0}else if("mxfile"==G.documentElement.nodeName){var ea=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ea.length;Y++){var ca=Editor.getDiagramNodeXml(ea[Y]);V=b.stringToCells(ca);if(0<V.length){var ka=b.editor.graph.getBoundingBoxFromGeometry(V);
+null!=ka&&I(null,null,0,0,0,0,{xml:ca,w:ka.width,h:ka.height})}}C=!0}}catch(ba){null!=window.console&&console.error("Error in library dialog: "+ba)}C||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}return null}function L(M){M.dataTransfer.dropEffect=null!=z?"move":"copy";M.stopPropagation();M.preventDefault()}function H(M){M.stopPropagation();M.preventDefault();Q=!1;E=y(M);if(null!=z)null!=
+E&&E<l.children.length?(c.splice(E>z?E-1:E,0,c.splice(z,1)[0]),l.insertBefore(l.children[z],l.children[E])):(c.push(c.splice(z,1)[0]),l.appendChild(l.children[z]));else if(0<M.dataTransfer.files.length)b.importFiles(M.dataTransfer.files,0,0,b.maxImageSize,R(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var U=decodeURIComponent(M.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(U)||/(\.png)($|\?)/i.test(U)||/(\.gif)($|\?)/i.test(U)||/(\.svg)($|\?)/i.test(U))&&b.loadImage(U,
+function(n){I(U,null,0,0,n.width,n.height);l.scrollTop=l.scrollHeight})}M.stopPropagation();M.preventDefault()}var c=[];m=document.createElement("div");m.style.height="100%";var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.height="40px";m.appendChild(e);mxUtils.write(e,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",f);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";
null==q||q.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};e.appendChild(g);Editor.enableUncompressedLibraries&&(g.style.width="420px",f=document.createElement("input"),f.setAttribute("type","checkbox"),f.style.marginRight="10px",e.appendChild(f),mxUtils.write(e,mxResources.get("compressed")));var l=document.createElement("div");
l.style.borderWidth="1px 0px 1px 0px";l.style.borderColor="#d3d3d3";l.style.borderStyle="solid";l.style.marginTop="6px";l.style.overflow="auto";l.style.height="340px";l.style.backgroundPosition="center center";l.style.backgroundRepeat="no-repeat";0==c.length&&Graph.fileSupport&&(l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";
-p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));m.appendChild(p);var u={},z=null,E=null,D=null;e=function(L){"true"!=mxEvent.getSource(L).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(L))};mxEvent.addListener(l,"mousedown",e);mxEvent.addListener(l,"pointerdown",e);mxEvent.addListener(l,"touchstart",e);var A=new mxUrlConverter,P=!1;if(null!=d)for(e=0;e<d.length;e++)f=d[e],I(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(l,"dragleave",
-function(L){p.style.cursor="";for(var U=mxEvent.getSource(L);null!=U;){if(U==l||U==p){L.stopPropagation();L.preventDefault();break}U=U.parentNode}});var R=function(L){return function(U,n,t,B,F,J,K,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){I(G,n,t,B,F,J,K,"fixed",mxEvent.isAltDown(L)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(U,v.name)?b.isExternalDataComms()?b.parseFile(v,
-mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(I(G.responseText,n,t,B,F,J,K,"fixed",mxEvent.isAltDown(L)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),l.scrollTop=l.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(I(U,n,t,B,F,J,K,"fixed",mxEvent.isAltDown(L)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),l.scrollTop=l.scrollHeight)}};mxEvent.addListener(l,"dragover",M);
-mxEvent.addListener(l,"drop",H);mxEvent.addListener(p,"dragover",M);mxEvent.addListener(p,"drop",H);m.appendChild(l);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),
-function(){b.getPublicUrl(q,function(L){if(null!=L){var U=b.getSearch("create title mode url drive splash state clibs ui".split(" "));U+=(0==U.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(L);L=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+U,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(L.container,450,240,!0);L.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),
-mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",d.appendChild(f));f=mxUtils.button(mxResources.get("export"),function(){var L=b.createLibraryDataFromImages(c),U=g.value;/(\.xml)$/i.test(U)||(U+=".xml");b.isLocalFileSave()?b.saveLocalFile(L,U,"text/xml",null,null,null!=C?C:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(U)+
-"&format=xml&xml="+encodeURIComponent(L))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";d.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");T.setAttribute("type","file");mxEvent.addListener(T,"change",function(L){P=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(U,n,t,B,F,J,K,k,v){null!=T.files&&(R(L)(U,n,t,B,F,J,K,k,v),T.type="",T.type="file",T.value="")});l.scrollTop=
-l.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}f=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";d.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=D&&(D(),D=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(L,U,n){P=!1;if(null!=L){if("data:image/"==L.substring(0,11)){var t=L.indexOf(",");0<t&&(L=
-L.substring(0,t)+";base64,"+L.substring(t+1))}I(L,null,0,0,U,n);l.scrollTop=l.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";d.appendChild(f);this.saveBtnClickHandler=function(L,U,n,t){b.saveLibrary(L,U,n,t)};f=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(g.value,c,q,x)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";d.appendChild(f);b.editor.cancelFirst||d.appendChild(e);m.appendChild(d);
-this.container=m},EditShapeDialog=function(b,f,m,d,q){d=null!=d?d:300;q=null!=q?q:120;var x=document.createElement("table"),C=document.createElement("tbody");x.style.cellPadding="4px";var y=document.createElement("tr");var I=document.createElement("td");I.setAttribute("colspan","2");I.style.fontSize="10pt";mxUtils.write(I,m);y.appendChild(I);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");var M=document.createElement("textarea");M.style.outline="none";M.style.resize=
-"none";M.style.width=d-200+"px";M.style.height=q+"px";this.textarea=M;this.init=function(){M.focus();M.scrollTop=0};I.appendChild(M);y.appendChild(I);I=document.createElement("td");m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.top="6px";m.style.width="200px";m.style.height=q+4+"px";m.style.overflow="hidden";m.style.marginBottom="16px";mxEvent.disableContextMenu(m);I.appendChild(m);var H=new Graph(m);H.setEnabled(!1);var c=b.editor.graph.cloneCell(f);
-H.addCells([c]);m=H.view.getState(c);var e="";null!=m.shape&&null!=m.shape.stencil&&(e=mxUtils.getPrettyXml(m.shape.stencil.desc));mxUtils.write(M,e||"");m=H.getGraphBounds();q=Math.min(160/m.width,(q-40)/m.height);H.view.scaleAndTranslate(q,20/q-m.x,20/q-m.y);y.appendChild(I);C.appendChild(y);y=document.createElement("tr");I=document.createElement("td");I.setAttribute("colspan","2");I.style.paddingTop="2px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",I.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&I.appendChild(q);var g=function(l,p,u){var z=M.value,E=mxUtils.parseXml(z);z=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));m.appendChild(p);var u={},z=null,E=null,D=null;e=function(M){"true"!=mxEvent.getSource(M).getAttribute("contentEditable")&&null!=D&&(D(),D=null,mxEvent.consume(M))};mxEvent.addListener(l,"mousedown",e);mxEvent.addListener(l,"pointerdown",e);mxEvent.addListener(l,"touchstart",e);var A=new mxUrlConverter,Q=!1;if(null!=d)for(e=0;e<d.length;e++)f=d[e],I(f.data,null,0,0,f.w,f.h,f,f.aspect,f.title);mxEvent.addListener(l,"dragleave",
+function(M){p.style.cursor="";for(var U=mxEvent.getSource(M);null!=U;){if(U==l||U==p){M.stopPropagation();M.preventDefault();break}U=U.parentNode}});var R=function(M){return function(U,n,t,C,F,J,K,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){I(G,n,t,C,F,J,K,"fixed",mxEvent.isAltDown(M)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(U,v.name)?b.isExternalDataComms()?b.parseFile(v,
+mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(I(G.responseText,n,t,C,F,J,K,"fixed",mxEvent.isAltDown(M)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),l.scrollTop=l.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(I(U,n,t,C,F,J,K,"fixed",mxEvent.isAltDown(M)?null:K.substring(0,K.lastIndexOf(".")).replace(/_/g," ")),l.scrollTop=l.scrollHeight)}};mxEvent.addListener(l,"dragover",L);
+mxEvent.addListener(l,"drop",H);mxEvent.addListener(p,"dragover",L);mxEvent.addListener(p,"drop",H);m.appendChild(l);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(f=mxUtils.button(mxResources.get("link"),
+function(){b.getPublicUrl(q,function(M){if(null!=M){var U=b.getSearch("create title mode url drive splash state clibs ui".split(" "));U+=(0==U.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(M);M=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+U,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(M.container,450,240,!0);M.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),
+mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),f.className="geBtn",d.appendChild(f));f=mxUtils.button(mxResources.get("export"),function(){var M=b.createLibraryDataFromImages(c),U=g.value;/(\.xml)$/i.test(U)||(U+=".xml");b.isLocalFileSave()?b.saveLocalFile(M,U,"text/xml",null,null,null!=B?B:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(U)+
+"&format=xml&xml="+encodeURIComponent(M))).simulate(document,"_blank")});f.setAttribute("id","btnDownload");f.className="geBtn";d.appendChild(f);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var T=document.createElement("input");T.setAttribute("multiple","multiple");T.setAttribute("type","file");mxEvent.addListener(T,"change",function(M){Q=!1;b.importFiles(T.files,0,0,b.maxImageSize,function(U,n,t,C,F,J,K,k,v){null!=T.files&&(R(M)(U,n,t,C,F,J,K,k,v),T.type="",T.type="file",T.value="")});l.scrollTop=
+l.scrollHeight});T.style.display="none";document.body.appendChild(T);b.libDlgFileInputElt=T}f=mxUtils.button(mxResources.get("import"),function(){null!=D&&(D(),D=null);b.libDlgFileInputElt.click()});f.setAttribute("id","btnAddImage");f.className="geBtn";d.appendChild(f)}f=mxUtils.button(mxResources.get("addImages"),function(){null!=D&&(D(),D=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(M,U,n){Q=!1;if(null!=M){if("data:image/"==M.substring(0,11)){var t=M.indexOf(",");0<t&&(M=
+M.substring(0,t)+";base64,"+M.substring(t+1))}I(M,null,0,0,U,n);l.scrollTop=l.scrollHeight}})});f.setAttribute("id","btnAddImageUrl");f.className="geBtn";d.appendChild(f);this.saveBtnClickHandler=function(M,U,n,t){b.saveLibrary(M,U,n,t)};f=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=D&&(D(),D=null);this.saveBtnClickHandler(g.value,c,q,x)}));f.setAttribute("id","btnSave");f.className="geBtn gePrimaryBtn";d.appendChild(f);b.editor.cancelFirst||d.appendChild(e);m.appendChild(d);
+this.container=m},EditShapeDialog=function(b,f,m,d,q){d=null!=d?d:300;q=null!=q?q:120;var x=document.createElement("table"),B=document.createElement("tbody");x.style.cellPadding="4px";var y=document.createElement("tr");var I=document.createElement("td");I.setAttribute("colspan","2");I.style.fontSize="10pt";mxUtils.write(I,m);y.appendChild(I);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");var L=document.createElement("textarea");L.style.outline="none";L.style.resize=
+"none";L.style.width=d-200+"px";L.style.height=q+"px";this.textarea=L;this.init=function(){L.focus();L.scrollTop=0};I.appendChild(L);y.appendChild(I);I=document.createElement("td");m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.top="6px";m.style.width="200px";m.style.height=q+4+"px";m.style.overflow="hidden";m.style.marginBottom="16px";mxEvent.disableContextMenu(m);I.appendChild(m);var H=new Graph(m);H.setEnabled(!1);var c=b.editor.graph.cloneCell(f);
+H.addCells([c]);m=H.view.getState(c);var e="";null!=m.shape&&null!=m.shape.stencil&&(e=mxUtils.getPrettyXml(m.shape.stencil.desc));mxUtils.write(L,e||"");m=H.getGraphBounds();q=Math.min(160/m.width,(q-40)/m.height);H.view.scaleAndTranslate(q,20/q-m.x,20/q-m.y);y.appendChild(I);B.appendChild(y);y=document.createElement("tr");I=document.createElement("td");I.setAttribute("colspan","2");I.style.paddingTop="2px";I.style.whiteSpace="nowrap";I.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",I.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&I.appendChild(q);var g=function(l,p,u){var z=L.value,E=mxUtils.parseXml(z);z=mxUtils.getPrettyXml(E.documentElement);E=E.documentElement.getElementsByTagName("parsererror");if(null!=E&&0<E.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
mxResources.get("ok"));else if(u&&b.hideDialog(),E=!l.model.contains(p),!u||E||z!=e){z=Graph.compress(z);l.getModel().beginUpdate();try{if(E){var D=b.editor.graph.getFreeInsertPoint();p.geometry.x=D.x;p.geometry.y=D.y;l.addCell(p)}l.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+z+")",[p])}catch(A){throw A;}finally{l.getModel().endUpdate()}E&&(l.setSelectionCell(p),l.scrollCellToVisible(p))}};m=mxUtils.button(mxResources.get("preview"),function(){g(H,c,!1)});m.className="geBtn";I.appendChild(m);
-m=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,f,!0)});m.className="geBtn gePrimaryBtn";I.appendChild(m);b.editor.cancelFirst||I.appendChild(q);y.appendChild(I);C.appendChild(y);x.appendChild(C);this.container=x},CustomDialog=function(b,f,m,d,q,x,C,y,I,M,H,c){var e=document.createElement("div");e.appendChild(f);var g=document.createElement("div");g.style.marginTop=null!=c?c:"30px";g.style.textAlign="right";null!=C&&g.appendChild(C);b.isOffline()||null==x||g.appendChild(b.createHelpIcon(x));
-f=mxUtils.button(I||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&g.appendChild(f);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){M||b.hideDialog(null,null,this.container);if(null!=m){var l=m();if("string"===typeof l){b.showError(mxResources.get("error"),l);return}}M&&b.hideDialog(null,null,this.container)}));g.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(f);
+m=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,f,!0)});m.className="geBtn gePrimaryBtn";I.appendChild(m);b.editor.cancelFirst||I.appendChild(q);y.appendChild(I);B.appendChild(y);x.appendChild(B);this.container=x},CustomDialog=function(b,f,m,d,q,x,B,y,I,L,H,c){var e=document.createElement("div");e.appendChild(f);var g=document.createElement("div");g.style.marginTop=null!=c?c:"30px";g.style.textAlign="right";null!=B&&g.appendChild(B);b.isOffline()||null==x||g.appendChild(b.createHelpIcon(x));
+f=mxUtils.button(I||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});f.className="geBtn";y&&(f.style.display="none");b.editor.cancelFirst&&g.appendChild(f);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){L||b.hideDialog(null,null,this.container);if(null!=m){var l=m();if("string"===typeof l){b.showError(mxResources.get("error"),l);return}}L&&b.hideDialog(null,null,this.container)}));g.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(f);
if(null!=H)for(y=0;y<H.length;y++)(function(l,p,u){l=mxUtils.button(l,function(z){p(z)});null!=u&&l.setAttribute("title",u);l.className="geBtn";g.appendChild(l)})(H[y][0],H[y][1],H[y][2]);e.appendChild(g);this.cancelBtn=f;this.okButton=q;this.container=e},BtnDialog=function(b,f,m,d){var q=document.createElement("div");q.style.textAlign="center";var x=document.createElement("p");x.style.fontSize="16pt";x.style.padding="0px";x.style.margin="0px";x.style.color="gray";mxUtils.write(x,mxResources.get("done"));
-var C="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(C=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(C=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(C=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(C=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
-(C=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(C=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[C],"You are now authorized in {1}"));m=mxUtils.button(m,d);m.insertBefore(y,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(m);this.container=q},FontDialog=function(b,
-f,m,d,q){function x(D){this.style.border="";13==D.keyCode&&E.click()}var C=document.createElement("table"),y=document.createElement("tbody");C.style.marginTop="8px";var I=document.createElement("tr");var M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.fontWeight="bold";var H=document.createElement("input");H.style.cssText="margin-right:8px;margin-bottom:8px;";H.setAttribute("value","sysfonts");H.setAttribute("type","radio");H.setAttribute("name",
-"current-fontdialog");H.setAttribute("id","fontdialog-sysfonts");M.appendChild(H);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));M.appendChild(c);I.appendChild(M);y.appendChild(I);I=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+
-":");I.appendChild(M);var e=document.createElement("input");"s"==d&&e.setAttribute("value",f);e.style.marginLeft="4px";e.style.width="250px";e.className="dlg_fontName_s";M=document.createElement("td");M.appendChild(e);I.appendChild(M);y.appendChild(I);I=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value",
-"googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");M.appendChild(g);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",null,"Google Fonts"));M.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=b.createHelpIcon("https://fonts.google.com/"),M.appendChild(c);I.appendChild(M);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(I);I=document.createElement("tr");
-M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+":");I.appendChild(M);var l=document.createElement("input");"g"==d&&l.setAttribute("value",f);l.style.marginLeft="4px";l.style.width="250px";l.className="dlg_fontName_g";M=document.createElement("td");M.appendChild(l);I.appendChild(M);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(I);I=document.createElement("tr");
-M=document.createElement("td");M.colSpan=2;M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-webfonts");M.appendChild(p);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",
-null,"Web Fonts"));M.appendChild(c);I.appendChild(M);Editor.enableWebFonts&&y.appendChild(I);I=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontname",null,"Font Name")+":");I.appendChild(M);var u=document.createElement("input");"w"==d&&(Editor.enableWebFonts?u.setAttribute("value",f):e.setAttribute("value",f));u.style.marginLeft="4px";u.style.width="250px";
-u.className="dlg_fontName_w";M=document.createElement("td");M.appendChild(u);I.appendChild(M);Editor.enableWebFonts&&y.appendChild(I);I=document.createElement("tr");M=document.createElement("td");M.style.whiteSpace="nowrap";M.style.fontSize="10pt";M.style.width="120px";M.style.paddingLeft="15px";mxUtils.write(M,mxResources.get("fontUrl",null,"Font URL")+":");I.appendChild(M);var z=document.createElement("input");z.setAttribute("value",m||"");z.style.marginLeft="4px";z.style.width="250px";z.className=
-"dlg_fontUrl";M=document.createElement("td");M.appendChild(z);I.appendChild(M);Editor.enableWebFonts&&y.appendChild(I);this.init=function(){var D=e;"g"==d?D=l:"w"==d&&Editor.enableWebFonts&&(D=u);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};I=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="20px";M.style.whiteSpace="nowrap";M.setAttribute("align","right");b.isOffline()||M.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));
-f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});f.className="geBtn";b.editor.cancelFirst&&M.appendChild(f);var E=mxUtils.button(mxResources.get("apply"),function(){if(H.checked){var D=e.value;var A="s"}else if(g.checked){D=l.value;var P=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");A="g"}else p.checked&&(D=u.value,P=z.value,A="w");var R=D;var T=P,L=A,U=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,n=C.querySelector(".dlg_fontName_"+
-L);null==n||null!=R&&0!=R.length?(n=C.querySelector(".dlg_fontUrl"),null==n||"w"!=L||U.test(T)?R=!0:(n.style.border="1px solid red",R=!1)):(n.style.border="1px solid red",R=!1);R&&(q(D,P,A),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",x);mxEvent.addListener(l,"keypress",x);mxEvent.addListener(u,"keypress",x);mxEvent.addListener(z,"keypress",x);mxEvent.addListener(e,"focus",function(){H.setAttribute("checked","checked");H.checked=!0});mxEvent.addListener(l,"focus",
-function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(u,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(z,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});M.appendChild(E);b.editor.cancelFirst||M.appendChild(f);I.appendChild(M);y.appendChild(I);C.appendChild(y);this.container=C};
+var B="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";f==b.drive?(B=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(B=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(B=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(B=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
+(B=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(B=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[B],"You are now authorized in {1}"));m=mxUtils.button(m,d);m.insertBefore(y,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";m.style.fontSize="18px";m.style.padding="14px";q.appendChild(x);q.appendChild(b);q.appendChild(m);this.container=q},FontDialog=function(b,
+f,m,d,q){function x(D){this.style.border="";13==D.keyCode&&E.click()}var B=document.createElement("table"),y=document.createElement("tbody");B.style.marginTop="8px";var I=document.createElement("tr");var L=document.createElement("td");L.colSpan=2;L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.fontWeight="bold";var H=document.createElement("input");H.style.cssText="margin-right:8px;margin-bottom:8px;";H.setAttribute("value","sysfonts");H.setAttribute("type","radio");H.setAttribute("name",
+"current-fontdialog");H.setAttribute("id","fontdialog-sysfonts");L.appendChild(H);var c=document.createElement("label");c.setAttribute("for","fontdialog-sysfonts");mxUtils.write(c,mxResources.get("sysFonts",null,"System Fonts"));L.appendChild(c);I.appendChild(L);y.appendChild(I);I=document.createElement("tr");L=document.createElement("td");L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.width="120px";L.style.paddingLeft="15px";mxUtils.write(L,mxResources.get("fontname",null,"Font Name")+
+":");I.appendChild(L);var e=document.createElement("input");"s"==d&&e.setAttribute("value",f);e.style.marginLeft="4px";e.style.width="250px";e.className="dlg_fontName_s";L=document.createElement("td");L.appendChild(e);I.appendChild(L);y.appendChild(I);I=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value",
+"googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");L.appendChild(g);c=document.createElement("label");c.setAttribute("for","fontdialog-googlefonts");mxUtils.write(c,mxResources.get("googleFonts",null,"Google Fonts"));L.appendChild(c);if(!b.isOffline()||EditorUi.isElectronApp)c=b.createHelpIcon("https://fonts.google.com/"),L.appendChild(c);I.appendChild(L);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(I);I=document.createElement("tr");
+L=document.createElement("td");L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.width="120px";L.style.paddingLeft="15px";mxUtils.write(L,mxResources.get("fontname",null,"Font Name")+":");I.appendChild(L);var l=document.createElement("input");"g"==d&&l.setAttribute("value",f);l.style.marginLeft="4px";l.style.width="250px";l.className="dlg_fontName_g";L=document.createElement("td");L.appendChild(l);I.appendChild(L);"0"!=urlParams.isGoogleFontsEnabled&&y.appendChild(I);I=document.createElement("tr");
+L=document.createElement("td");L.colSpan=2;L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id","fontdialog-webfonts");L.appendChild(p);c=document.createElement("label");c.setAttribute("for","fontdialog-webfonts");mxUtils.write(c,mxResources.get("webfonts",
+null,"Web Fonts"));L.appendChild(c);I.appendChild(L);Editor.enableWebFonts&&y.appendChild(I);I=document.createElement("tr");L=document.createElement("td");L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.width="120px";L.style.paddingLeft="15px";mxUtils.write(L,mxResources.get("fontname",null,"Font Name")+":");I.appendChild(L);var u=document.createElement("input");"w"==d&&(Editor.enableWebFonts?u.setAttribute("value",f):e.setAttribute("value",f));u.style.marginLeft="4px";u.style.width="250px";
+u.className="dlg_fontName_w";L=document.createElement("td");L.appendChild(u);I.appendChild(L);Editor.enableWebFonts&&y.appendChild(I);I=document.createElement("tr");L=document.createElement("td");L.style.whiteSpace="nowrap";L.style.fontSize="10pt";L.style.width="120px";L.style.paddingLeft="15px";mxUtils.write(L,mxResources.get("fontUrl",null,"Font URL")+":");I.appendChild(L);var z=document.createElement("input");z.setAttribute("value",m||"");z.style.marginLeft="4px";z.style.width="250px";z.className=
+"dlg_fontUrl";L=document.createElement("td");L.appendChild(z);I.appendChild(L);Editor.enableWebFonts&&y.appendChild(I);this.init=function(){var D=e;"g"==d?D=l:"w"==d&&Editor.enableWebFonts&&(D=u);D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};I=document.createElement("tr");L=document.createElement("td");L.colSpan=2;L.style.paddingTop="20px";L.style.whiteSpace="nowrap";L.setAttribute("align","right");b.isOffline()||L.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));
+f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});f.className="geBtn";b.editor.cancelFirst&&L.appendChild(f);var E=mxUtils.button(mxResources.get("apply"),function(){if(H.checked){var D=e.value;var A="s"}else if(g.checked){D=l.value;var Q=Editor.GOOGLE_FONTS+encodeURIComponent(D).replace(/%20/g,"+");A="g"}else p.checked&&(D=u.value,Q=z.value,A="w");var R=D;var T=Q,M=A,U=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,n=B.querySelector(".dlg_fontName_"+
+M);null==n||null!=R&&0!=R.length?(n=B.querySelector(".dlg_fontUrl"),null==n||"w"!=M||U.test(T)?R=!0:(n.style.border="1px solid red",R=!1)):(n.style.border="1px solid red",R=!1);R&&(q(D,Q,A),b.hideDialog())});E.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",x);mxEvent.addListener(l,"keypress",x);mxEvent.addListener(u,"keypress",x);mxEvent.addListener(z,"keypress",x);mxEvent.addListener(e,"focus",function(){H.setAttribute("checked","checked");H.checked=!0});mxEvent.addListener(l,"focus",
+function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(u,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(z,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});L.appendChild(E);b.editor.cancelFirst||L.appendChild(f);I.appendChild(L);y.appendChild(I);B.appendChild(y);this.container=B};
function AspectDialog(b,f,m,d,q){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:m||[]};f=document.createElement("div");var x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("pages"));f.appendChild(x);m=document.createElement("div");m.className="geAspectDlgList";f.appendChild(m);x=document.createElement("h5");x.style.margin="0 0 10px";mxUtils.write(x,mxResources.get("layers"));f.appendChild(x);x=document.createElement("div");x.className="geAspectDlgList";
-f.appendChild(x);this.pagesContainer=m;this.layersContainer=x;this.ui=b;m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=q&&q()});x.className="geBtn";b.editor.cancelFirst&&m.appendChild(x);var C=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));m.appendChild(C);C.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||m.appendChild(x);C.setAttribute("disabled","disabled");this.okBtn=C;f.appendChild(m);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+f.appendChild(x);this.pagesContainer=m;this.layersContainer=x;this.ui=b;m=document.createElement("div");m.style.marginTop="16px";m.style.textAlign="center";x=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=q&&q()});x.className="geBtn";b.editor.cancelFirst&&m.appendChild(x);var B=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));m.appendChild(B);B.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||m.appendChild(x);B.setAttribute("disabled","disabled");this.okBtn=B;f.appendChild(m);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
AspectDialog.prototype.createViewer=function(b,f,m,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var q=new Graph(b);q.setTooltips(!1);q.setEnabled(!1);q.setPanning(!1);q.minFitScale=null;q.maxFitScale=null;q.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var x=f.getAttribute("background");if(null==x||""==x||x==mxConstants.NONE)x=null!=d?d:"#ffffff";b.style.backgroundColor=x;d=new mxCodec(f.ownerDocument);b=q.getModel();d.decode(f,b);f=b.getChildCount(b.root);
-d=null==m;for(x=0;x<f;x++){var C=b.getChildAt(b.root,x);b.setVisible(C,d||m==C.id)}q.maxFitScale=1;q.fit(0);q.center()}return q};
+d=null==m;for(x=0;x<f;x++){var B=b.getChildAt(b.root,x);b.setVisible(B,d||m==B.id)}q.maxFitScale=1;q.fit(0);q.center()}return q};
AspectDialog.prototype.createPageItem=function(b,f,m){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var q=this.createViewer(d.childNodes[0],m);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=q.model;x=x.getChildCells(x.getRoot());for(var C=0;C<x.length;C++)this.createLayerItem(x[C],b,q,m)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var x=q.model;x=x.getChildCells(x.getRoot());for(var B=0;B<x.length;B++)this.createLayerItem(x[B],b,q,m)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
AspectDialog.prototype.createLayerItem=function(b,f,m,d){f=m.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?
(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b,f){function m(A){var P=M;M=function(R,T){try{A(function(){P(R,T)},T)}catch(L){T(L)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var x=b.getCurrentFile(),C=null!=x&&null!=x.getTitle()?x.getTitle():b.defaultFilename,y=/(\.png)$/i.test(C),I=/(\.svg)$/i.test(C),M=function(A,P){A()},H=null!=x?x.isLocked():!1;var c=document.createElement("tr");var e=document.createElement("td");
-e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("locked")+":");c.appendChild(e);var g=document.createElement("input");g.setAttribute("type","checkbox");H&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(g);c.appendChild(e);q.appendChild(c);this.init=function(){g.focus()};m(function(A,P){null!=b.fileNode&&H!=g.checked?window.setTimeout(function(){null!=
-x&&x.setLocked(g.checked);A()},0):A()});if(y||I){C=1;y=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(C=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(y=parseInt(c.getAttribute("border"))));c=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("zoom")+":");c.appendChild(e);var l=document.createElement("input");l.setAttribute("value",100*C+"%");l.style.marginLeft="4px";l.style.width="100%";
+var FilePropertiesDialog=function(b,f){function m(A){var Q=L;L=function(R,T){try{A(function(){Q(R,T)},T)}catch(M){T(M)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var x=b.getCurrentFile(),B=null!=x&&null!=x.getTitle()?x.getTitle():b.defaultFilename,y=/(\.png)$/i.test(B),I=/(\.svg)$/i.test(B),L=function(A,Q){A()},H=null!=x?x.isLocked():!1;var c=document.createElement("tr");var e=document.createElement("td");
+e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("locked")+":");c.appendChild(e);var g=document.createElement("input");g.setAttribute("type","checkbox");H&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(g);c.appendChild(e);q.appendChild(c);this.init=function(){g.focus()};m(function(A,Q){null!=b.fileNode&&H!=g.checked?window.setTimeout(function(){null!=
+x&&x.setLocked(g.checked);A()},0):A()});if(y||I){B=1;y=0;c=b.fileNode;null!=c&&(c.hasAttribute("scale")&&(B=parseFloat(c.getAttribute("scale"))),c.hasAttribute("border")&&(y=parseInt(c.getAttribute("border"))));c=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("zoom")+":");c.appendChild(e);var l=document.createElement("input");l.setAttribute("value",100*B+"%");l.style.marginLeft="4px";l.style.width="100%";
e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(l);c.appendChild(e);q.appendChild(c);c=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("borderWidth")+":");c.appendChild(e);var p=document.createElement("input");p.setAttribute("value",y);p.style.marginLeft="4px";p.style.width="100%";e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(p);c.appendChild(e);q.appendChild(c);
-this.init=this.init||function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};m(function(A,P){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=x&&x.fileChanged());A()})}else if(!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C)){var u=null!=x?x.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");e=document.createElement("td");
-e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("compressed")+":");c.appendChild(e);var z=document.createElement("input");z.setAttribute("type","checkbox");u&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(z);c.appendChild(e);q.appendChild(c);this.init=this.init||function(){z.focus()};m(function(A,P){null!=b.fileNode&&u!=
+this.init=this.init||function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null)};m(function(A,Q){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(l.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=x&&x.fileChanged());A()})}else if(!/(\.html)$/i.test(B)&&!/(\.svg)$/i.test(B)){var u=null!=x?x.isCompressed():Editor.defaultCompressed;c=document.createElement("tr");e=document.createElement("td");
+e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("compressed")+":");c.appendChild(e);var z=document.createElement("input");z.setAttribute("type","checkbox");u&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(z);c.appendChild(e);q.appendChild(c);this.init=this.init||function(){z.focus()};m(function(A,Q){null!=b.fileNode&&u!=
z.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",z.checked?"true":"false");null!=x&&(x.compressionChanged(z.checked),x.fileChanged());A()},0):A()})}if(null!=x&&x.isRealtimeOptional()){c=document.createElement("tr");e=document.createElement("td");e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.fontSize="10pt";mxUtils.write(e,mxResources.get("realtimeCollaboration")+":");c.appendChild(e);var E=document.createElement("input");E.setAttribute("type",
-"checkbox");var D=x.isRealtimeEnabled();if(D="disabled"!=b.drive.getCustomProperty(x.desc,"collaboration"))E.setAttribute("checked","checked"),E.defaultChecked=!0;m(function(A,P){E.checked!=D?x.setRealtimeEnabled(E.checked,A,P):A()});this.init=null!=this.init?this.init:function(){E.focus()};e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(E);e.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(e);q.appendChild(c)}null!=x&&
-"draw.io"==b.getServiceName()&&0<x.getSize()&&"1"!=urlParams.embed&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize="10pt",mxUtils.write(e,mxResources.get("size")+":"),c.appendChild(e),e=b.formatFileSize(x.getSize()),C=document.createElement("input"),C.setAttribute("title",e),C.setAttribute("value",e),C.setAttribute("disabled","disabled"),C.style.marginLeft="4px",C.style.width="100%",
-e=document.createElement("td"),e.style.whiteSpace="nowrap",e.appendChild(C),c.appendChild(e),q.appendChild(c));null!=f&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize="10pt",mxUtils.write(e,mxResources.get("publicDiagramUrl")+":"),c.appendChild(e),C=document.createElement("a"),C.setAttribute("href",f),C.setAttribute("title",f),C.style.whiteSpace="nowrap",C.style.overflow="hidden",
-C.style.textOverflow="ellipsis",C.style.display="block",C.style.margin="2px 0px 2px 8px",C.style.fontSize="10pt",mxUtils.write(C,f),mxEvent.addListener(C,"click",function(A){b.openLink(f);mxEvent.consume(A)}),e=document.createElement("td"),e.appendChild(C),c.appendChild(e),q.appendChild(c));null!=x&&null!=x.fileObject&&null!=x.fileObject.path&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize=
-"10pt",mxUtils.write(e,mxResources.get("pathFilename")+":"),c.appendChild(e),C=document.createElement("input"),C.setAttribute("title",x.fileObject.path),C.setAttribute("value",x.fileObject.path),C.setAttribute("disabled","disabled"),C.style.marginLeft="4px",C.style.width="100%",e=document.createElement("td"),e.appendChild(C),c.appendChild(e),q.appendChild(c));this.init=null!=this.init?this.init:function(){};C=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-M(function(){b.spinner.stop();b.hideDialog()},function(A){b.spinner.stop();b.handleError(A,mxResources.get("error"))})});C.className="geBtn gePrimaryBtn";c=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="20px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&e.appendChild(y);e.appendChild(C);b.editor.cancelFirst||e.appendChild(y);c.appendChild(e);
-q.appendChild(c);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,f){function m(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function x(B,F,J){B=new mxCell("",new mxGeometry(B,F,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");B.vertex=!0;B.cp=!0;B.constObj=J;return c.addCell(B)}function C(B){B=c.getSelectionCells();c.deleteCells(B)}
-function y(){var B=parseInt(L.value)||0;B=0>B?0:100<B?100:B;L.value=B;var F=parseInt(n.value)||0;F=0>F?0:100<F?100:F;n.value=F;var J=parseInt(U.value)||0,K=parseInt(t.value)||0;J=new mxConnectionConstraint(new mxPoint(B/100,F/100),!1,null,J,K);B=c.getConnectionPoint(l,J);F=c.getSelectionCell();if(null!=F){F.constObj=J;J=F.geometry.clone();K=c.view.scale;var k=c.view.translate;J.x=(B.x-3*K)/K-k.x;J.y=(B.y-3*K)/K-k.y;c.model.setGeometry(F,J)}}function I(B){if(B.constObj)return{x:B.constObj.point.x,
-y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var F=0,J=0,K=e.geometry,k=mxUtils.format((B.geometry.x+3-K.x)/K.width);B=mxUtils.format((B.geometry.y+3-K.y)/K.height);0>k?(F=k*K.width,k=0):1<k&&(F=(k-1)*K.width,k=1);0>B?(J=B*K.height,B=0):1<B&&(J=(B-1)*K.height,B=1);return{x:k,y:B,dx:parseInt(F),dy:parseInt(J)}}function M(B){if(1==c.getSelectionCount()){var F=c.getSelectionCell();B&&(F.constObj=null);B=I(F);L.value=100*B.x;n.value=100*B.y;U.value=B.dx;t.value=B.dy;T.style.visibility=""}else T.style.visibility=
-"hidden"}var H=document.createElement("div");H.style.width="350px";H.style.height="350px";H.style.overflow="hidden";H.style.border="1px solid lightGray";H.style.boxSizing="border-box";mxEvent.disableContextMenu(H);d.appendChild(H);var c=new Graph(H);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;H=f.geometry;var e=new mxCell(f.value,
-new mxGeometry(0,0,H.width,H.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");e.vertex=!0;c.addCell(e);c.dblClick=function(B,F){if(null!=F&&F!=e)c.setSelectionCell(F);else{F=mxUtils.convertPoint(c.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=c.view.scale;var J=c.view.translate;c.setSelectionCell(x((F.x-3*B)/B-J.x,(F.y-3*B)/B-J.y))}};q=new mxKeyHandler(c);q.bindKey(46,C);q.bindKey(8,C);c.getRubberband().isForceRubberbandEvent=
-function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==e)};c.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=c.isCellSelectable;c.isCellSelectable=function(B){return B==e?!1:g.apply(this,arguments)};c.getLinkForCell=function(){return null};var l=c.view.getState(e);H=c.getAllConnectionConstraints(l);for(var p=0;null!=H&&p<H.length;p++){var u=c.getConnectionPoint(l,H[p]);x(u.x-3,u.y-3,H[p])}c.fit(8);c.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){c.zoomIn()});u=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var z=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(B){!isNaN(B)&&0<B&&(c.setGridSize(B),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(B){mxEvent.isShiftDown(B)?
-E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var A=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),C);mxUtils.setOpacity(A,10);H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.paddingTop="6px";H.appendChild(p);H.appendChild(u);H.appendChild(z);H.appendChild(D);H.appendChild(A);d.appendChild(H);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("value",
-"1");P.style.width="45px";P.style.position="relative";P.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";u=["left","right","top","bottom"];for(p=0;p<u.length;p++)z=u[p],D=document.createElement("option"),mxUtils.write(D,mxResources.get(z)),D.value=z,R.appendChild(D);p=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(P.value);B=1>B?1:100<B?100:B;P.value=B;for(var F=R.value,J=e.geometry,K=[],k=0;k<B;k++){switch(F){case "left":var v=J.x;var G=
-J.y+(k+1)*J.height/(B+1);break;case "right":v=J.x+J.width;G=J.y+(k+1)*J.height/(B+1);break;case "top":v=J.x+(k+1)*J.width/(B+1);G=J.y;break;case "bottom":v=J.x+(k+1)*J.width/(B+1),G=J.y+J.height}K.push(x(v-3,G-3))}c.setSelectionCells(K)});p.style.marginLeft="auto";H.appendChild(p);H.appendChild(P);H.appendChild(R);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";H=document.createElement("span");mxUtils.write(H,mxResources.get("dx"));
-T.appendChild(H);var L=document.createElement("input");L.setAttribute("type","number");L.setAttribute("min","0");L.setAttribute("max","100");L.style.width="45px";L.style.margin="0 4px 0 4px";T.appendChild(L);mxUtils.write(T,"%");var U=document.createElement("input");U.setAttribute("type","number");U.style.width="45px";U.style.margin="0 4px 0 4px";T.appendChild(U);mxUtils.write(T,"pt");H=document.createElement("span");mxUtils.write(H,mxResources.get("dy"));H.style.marginLeft="12px";T.appendChild(H);
-var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";T.appendChild(n);mxUtils.write(T,"%");var t=document.createElement("input");t.setAttribute("type","number");t.style.width="45px";t.style.margin="0 4px 0 4px";T.appendChild(t);mxUtils.write(T,"pt");d.appendChild(T);M();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(A,60):
-mxUtils.setOpacity(A,10);M()});c.addListener(mxEvent.CELLS_MOVED,M);mxEvent.addListener(L,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(U,"change",y);mxEvent.addListener(t,"change",y);H=mxUtils.button(mxResources.get("cancel"),function(){m();b.hideDialog()});H.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var B=c.model.cells,F=[],J=[],K;for(K in B){var k=B[K];k.cp&&J.push(I(k))}J.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-
-G.dx:v.dy-G.dy});for(B=0;B<J.length;B++)0<B&&J[B].x==J[B-1].x&&J[B].y==J[B-1].y&&J[B].dx==J[B-1].dx&&J[B].dy==J[B-1].dy||F.push("["+J[B].x+","+J[B].y+",0,"+J[B].dx+","+J[B].dy+"]");b.editor.graph.setCellStyles("points","["+F.join(",")+"]",[f]);m();b.hideDialog()});p.className="geBtn gePrimaryBtn";u=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);m();b.hideDialog()});u.className="geBtn";z=document.createElement("div");z.style.marginTop="10px";z.style.textAlign=
+"checkbox");var D=x.isRealtimeEnabled();if(D="disabled"!=b.drive.getCustomProperty(x.desc,"collaboration"))E.setAttribute("checked","checked"),E.defaultChecked=!0;m(function(A,Q){E.checked!=D?x.setRealtimeEnabled(E.checked,A,Q):A()});this.init=null!=this.init?this.init:function(){E.focus()};e=document.createElement("td");e.style.whiteSpace="nowrap";e.appendChild(E);e.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));c.appendChild(e);q.appendChild(c)}null!=x&&
+"draw.io"==b.getServiceName()&&0<x.getSize()&&"1"!=urlParams.embed&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize="10pt",mxUtils.write(e,mxResources.get("size")+":"),c.appendChild(e),e=b.formatFileSize(x.getSize()),B=document.createElement("input"),B.setAttribute("title",e),B.setAttribute("value",e),B.setAttribute("disabled","disabled"),B.style.marginLeft="4px",B.style.width="100%",
+e=document.createElement("td"),e.style.whiteSpace="nowrap",e.appendChild(B),c.appendChild(e),q.appendChild(c));null!=f&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize="10pt",mxUtils.write(e,mxResources.get("publicDiagramUrl")+":"),c.appendChild(e),B=document.createElement("a"),B.setAttribute("href",f),B.setAttribute("title",f),B.style.whiteSpace="nowrap",B.style.overflow="hidden",
+B.style.textOverflow="ellipsis",B.style.display="block",B.style.margin="2px 0px 2px 8px",B.style.fontSize="10pt",mxUtils.write(B,f),mxEvent.addListener(B,"click",function(A){b.openLink(f);mxEvent.consume(A)}),e=document.createElement("td"),e.appendChild(B),c.appendChild(e),q.appendChild(c));null!=x&&null!=x.fileObject&&null!=x.fileObject.path&&(c=document.createElement("tr"),e=document.createElement("td"),e.style.whiteSpace="nowrap",e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.fontSize=
+"10pt",mxUtils.write(e,mxResources.get("pathFilename")+":"),c.appendChild(e),B=document.createElement("input"),B.setAttribute("title",x.fileObject.path),B.setAttribute("value",x.fileObject.path),B.setAttribute("disabled","disabled"),B.style.marginLeft="4px",B.style.width="100%",e=document.createElement("td"),e.appendChild(B),c.appendChild(e),q.appendChild(c));this.init=null!=this.init?this.init:function(){};B=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+L(function(){b.spinner.stop();b.hideDialog()},function(A){b.spinner.stop();b.handleError(A,mxResources.get("error"))})});B.className="geBtn gePrimaryBtn";c=document.createElement("tr");e=document.createElement("td");e.colSpan=2;e.style.paddingTop="20px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst&&e.appendChild(y);e.appendChild(B);b.editor.cancelFirst||e.appendChild(y);c.appendChild(e);
+q.appendChild(c);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,f){function m(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function x(C,F,J){var K="shape=image;points=[];rotatable=0;resizable=0;connectable=0;editable=0;image="+b.convertDataUri(mxConstraintHandler.prototype.pointImage.src)+";";C=new mxCell("",new mxGeometry(C,F,6,6),K);C.vertex=!0;C.cp=!0;C.constObj=J;return c.addCell(C)}function B(C){C=c.getSelectionCells();
+c.deleteCells(C)}function y(){var C=parseInt(M.value)||0;C=0>C?0:100<C?100:C;M.value=C;var F=parseInt(n.value)||0;F=0>F?0:100<F?100:F;n.value=F;var J=parseInt(U.value)||0,K=parseInt(t.value)||0;J=new mxConnectionConstraint(new mxPoint(C/100,F/100),!1,null,J,K);C=c.getConnectionPoint(l,J);F=c.getSelectionCell();if(null!=F){F.constObj=J;J=F.geometry.clone();K=c.view.scale;var k=c.view.translate;J.x=(C.x-3*K)/K-k.x;J.y=(C.y-3*K)/K-k.y;c.model.setGeometry(F,J)}}function I(C){if(C.constObj)return{x:C.constObj.point.x,
+y:C.constObj.point.y,dx:C.constObj.dx,dy:C.constObj.dy};var F=0,J=0,K=e.geometry,k=mxUtils.format((C.geometry.x+3-K.x)/K.width);C=mxUtils.format((C.geometry.y+3-K.y)/K.height);0>k?(F=k*K.width,k=0):1<k&&(F=(k-1)*K.width,k=1);0>C?(J=C*K.height,C=0):1<C&&(J=(C-1)*K.height,C=1);return{x:k,y:C,dx:parseInt(F),dy:parseInt(J)}}function L(C){if(1==c.getSelectionCount()){var F=c.getSelectionCell();C&&(F.constObj=null);C=I(F);M.value=100*C.x;n.value=100*C.y;U.value=C.dx;t.value=C.dy;T.style.visibility=""}else T.style.visibility=
+"hidden"}var H=document.createElement("div");H.style.width="350px";H.style.height="350px";H.style.overflow="hidden";H.style.borderStyle="solid";H.style.borderWidth="1px";H.style.boxSizing="border-box";mxEvent.disableContextMenu(H);d.appendChild(H);var c=new Graph(H);c.transparentBackground=!1;c.autoExtend=!1;c.autoScroll=!1;c.setGridEnabled(!1);c.setEnabled(!0);c.setPanning(!0);c.setConnectable(!1);c.setTooltips(!1);c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;c.maxFitScale=2;H=f.geometry;
+var e=new mxCell(f.value,new mxGeometry(0,0,H.width,H.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;opacity=50;");e.vertex=!0;c.addCell(e);c.dblClick=function(C,F){if(null!=F&&F!=e)c.setSelectionCell(F);else{F=mxUtils.convertPoint(c.container,mxEvent.getClientX(C),mxEvent.getClientY(C));mxEvent.consume(C);C=c.view.scale;var J=c.view.translate;c.setSelectionCell(x((F.x-3*C)/C-J.x,(F.y-3*C)/C-J.y))}};q=new mxKeyHandler(c);q.bindKey(46,B);q.bindKey(8,B);c.getRubberband().isForceRubberbandEvent=
+function(C){return 0==C.evt.button&&(null==C.getCell()||C.getCell()==e)};c.panningHandler.isForcePanningEvent=function(C){return 2==C.evt.button};var g=c.isCellSelectable;c.isCellSelectable=function(C){return C==e?!1:g.apply(this,arguments)};c.getLinkForCell=function(){return null};var l=c.view.getState(e);H=c.getAllConnectionConstraints(l);for(var p=0;null!=H&&p<H.length;p++){var u=c.getConnectionPoint(l,H[p]);x(u.x-3,u.y-3,H[p])}c.fit(8);c.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){c.zoomIn()});u=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){c.zoomOut()});var z=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==c.view.scale?(c.maxFitScale=8,c.fit(8)):c.zoomActual();c.center()}),E=function(){b.prompt(mxResources.get("gridSize"),c.gridSize,function(C){!isNaN(C)&&0<C&&(c.setGridSize(C),c.setGridEnabled(!0),c.refresh())})},D=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(C){mxEvent.isShiftDown(C)?
+E():(c.setGridEnabled(!c.isGridEnabled()),c.refresh())});mxEvent.addListener(D,"dblclick",E);var A=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),B);mxUtils.setOpacity(A,10);H=document.createElement("div");H.style.display="flex";H.style.alignItems="center";H.style.paddingTop="6px";H.appendChild(p);H.appendChild(u);H.appendChild(z);H.appendChild(D);H.appendChild(A);d.appendChild(H);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.setAttribute("value",
+"1");Q.style.width="45px";Q.style.position="relative";Q.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";u=["left","right","top","bottom"];for(p=0;p<u.length;p++)z=u[p],D=document.createElement("option"),mxUtils.write(D,mxResources.get(z)),D.value=z,R.appendChild(D);p=mxUtils.button(mxResources.get("add"),function(){var C=parseInt(Q.value);C=1>C?1:100<C?100:C;Q.value=C;for(var F=R.value,J=e.geometry,K=[],k=0;k<C;k++){switch(F){case "left":var v=J.x;var G=
+J.y+(k+1)*J.height/(C+1);break;case "right":v=J.x+J.width;G=J.y+(k+1)*J.height/(C+1);break;case "top":v=J.x+(k+1)*J.width/(C+1);G=J.y;break;case "bottom":v=J.x+(k+1)*J.width/(C+1),G=J.y+J.height}K.push(x(v-3,G-3))}c.setSelectionCells(K)});p.style.marginLeft="auto";H.appendChild(p);H.appendChild(Q);H.appendChild(R);var T=document.createElement("div");T.style.margin="4px 0px 8px 0px";T.style.whiteSpace="nowrap";T.style.height="24px";H=document.createElement("span");mxUtils.write(H,mxResources.get("dx"));
+T.appendChild(H);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";T.appendChild(M);mxUtils.write(T,"%");var U=document.createElement("input");U.setAttribute("type","number");U.style.width="45px";U.style.margin="0 4px 0 4px";T.appendChild(U);mxUtils.write(T,"pt");H=document.createElement("span");mxUtils.write(H,mxResources.get("dy"));H.style.marginLeft="12px";T.appendChild(H);
+var n=document.createElement("input");n.setAttribute("type","number");n.setAttribute("min","0");n.setAttribute("max","100");n.style.width="45px";n.style.margin="0 4px 0 4px";T.appendChild(n);mxUtils.write(T,"%");var t=document.createElement("input");t.setAttribute("type","number");t.style.width="45px";t.style.margin="0 4px 0 4px";T.appendChild(t);mxUtils.write(T,"pt");d.appendChild(T);L();c.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<c.getSelectionCount()?mxUtils.setOpacity(A,60):
+mxUtils.setOpacity(A,10);L()});c.addListener(mxEvent.CELLS_MOVED,L);mxEvent.addListener(M,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(U,"change",y);mxEvent.addListener(t,"change",y);H=mxUtils.button(mxResources.get("cancel"),function(){m();b.hideDialog()});H.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var C=c.model.cells,F=[],J=[],K;for(K in C){var k=C[K];k.cp&&J.push(I(k))}J.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-
+G.dx:v.dy-G.dy});for(C=0;C<J.length;C++)0<C&&J[C].x==J[C-1].x&&J[C].y==J[C-1].y&&J[C].dx==J[C-1].dx&&J[C].dy==J[C-1].dy||F.push("["+J[C].x+","+J[C].y+",0,"+J[C].dx+","+J[C].dy+"]");b.editor.graph.setCellStyles("points","["+F.join(",")+"]",[f]);m();b.hideDialog()});p.className="geBtn gePrimaryBtn";u=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[f]);m();b.hideDialog()});u.className="geBtn";z=document.createElement("div");z.style.marginTop="10px";z.style.textAlign=
"right";b.isOffline()||z.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&z.appendChild(H);z.appendChild(u);z.appendChild(p);b.editor.cancelFirst||z.appendChild(H);d.appendChild(z)};this.destroy=m;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -12785,33 +12783,33 @@ type:"bool",defVal:!1,isVisible:function(k,v){k=0<k.vertices.length?v.editorUi.e
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(k,v){var G=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==G||G==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var N=G.sets||[];G=G.options||this.getDefaultOptions();for(var O=0;O<N.length;O++){var Q=N[O];switch(Q.type){case "path":null!=G.stroke&&this._drawToContext(k,Q,G);break;case "fillPath":this._drawToContext(k,Q,G);break;case "fillSketch":this.fillSketch(k,Q,G)}}};v.fillSketch=function(G,N,O){var Q=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=O.fillWeight;
-0>X&&(X=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,N,O);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(Q);k.setStrokeAlpha(V)};v._drawToContext=function(G,N,O){G.begin();for(var Q=0;Q<N.ops.length;Q++){var S=N.ops[Q],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===N.type&&
-O.filled?G.fill():G.stroke()};return v};(function(){function k(Q,S,V){this.canvas=Q;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var N=G.sets||[];G=G.options||this.getDefaultOptions();for(var O=0;O<N.length;O++){var P=N[O];switch(P.type){case "path":null!=G.stroke&&this._drawToContext(k,P,G);break;case "fillPath":this._drawToContext(k,P,G);break;case "fillSketch":this.fillSketch(k,P,G)}}};v.fillSketch=function(G,N,O){var P=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=O.fillWeight;
+0>X&&(X=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,N,O);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(P);k.setStrokeAlpha(V)};v._drawToContext=function(G,N,O){G.begin();for(var P=0;P<N.ops.length;P++){var S=N.ops[P],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===N.type&&
+O.filled?G.fill():G.stroke()};return v};(function(){function k(P,S,V){this.canvas=P;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(Q,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
-mxConstants.NONE;Q=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(P,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;P=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",
W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==S?-1:S;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=Q||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?
-"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-k.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};k.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(Q,S,V,W){this.passThrough?
-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(Q,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(Q,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,V,W,X,Z,Y);if(null!=ea)for(var ca=0;ca<ea.length;ca+=
-6)this.curveTo(ea[ca],ea[ca+1],ea[ca+2],ea[ca+3],ea[ca+4],ea[ca+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(Q,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(Q,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=
-function(Q,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+X,S),this.lineTo(Q+V-X,S),this.quadTo(Q+V,S,Q+V,S+Z),this.lineTo(Q+V,S+W-Z),this.quadTo(Q+V,S+W,Q+V-X,S+W),this.lineTo(Q+X,S+W),this.quadTo(Q,S+W,Q,S+W-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+X,S))};k.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=
-Q[S];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?
+S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=P||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?
+"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+k.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};k.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(P,S,V,W){this.passThrough?
+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(P,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(P,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,V,W,X,Z,Y);if(null!=ea)for(var ca=0;ca<ea.length;ca+=
+6)this.curveTo(ea[ca],ea[ca+1],ea[ca+2],ea[ca+3],ea[ca+4],ea[ca+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(P,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(P,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=
+function(P,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+X,S),this.lineTo(P+V-X,S),this.quadTo(P+V,S,P+V,S+Z),this.lineTo(P+V,S+W-Z),this.quadTo(P+V,S+W,P+V-X,S+W),this.lineTo(P+X,S+W),this.quadTo(P,S+W,P,S+W-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+X,S))};k.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=
+P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;
-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new k(Q,Editor.createRoughCanvas(Q),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,V,W,X){null!=Q.handJiggle&&Q.handJiggle.passThrough||G.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==k&&!this.outline){Q.save();
-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=Q.setStrokeColor;Q.setStrokeColor=function(){};var ea=Q.setFillColor;Q.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;N.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=ea;Q.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;Q.restore();V&&null!=W&&(Q.addTolerance=function(){})}N.apply(this,arguments);Q.addTolerance=
-S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,V,W,X,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==k?(Q.handJiggle.passThrough=!0,O.apply(this,arguments),Q.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),
-{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=N&&0<N.length)for(var Q=0;Q<N.length;Q++)if("mxgraph"==N[Q].getAttribute("class")){O.push(N[Q]);break}0<O.length&&(N=O[0].getAttribute("data-mxgraph"),null!=N?(O=JSON.parse(N),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(N=mxUtils.getTextContent(O[0]),N=Graph.decompress(N,
+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(P){return new k(P,Editor.createRoughCanvas(P),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,V,W,X){null!=P.handJiggle&&P.handJiggle.passThrough||G.apply(this,arguments)};var N=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==k&&!this.outline){P.save();
+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=P.setStrokeColor;P.setStrokeColor=function(){};var ea=P.setFillColor;P.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;N.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ea;P.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;P.restore();V&&null!=W&&(P.addTolerance=function(){})}N.apply(this,arguments);P.addTolerance=
+S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,V,W,X,Z){null!=P.handJiggle&&P.handJiggle.constructor==k?(P.handJiggle.passThrough=!0,O.apply(this,arguments),P.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),
+{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var N=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=N&&0<N.length)for(var P=0;P<N.length;P++)if("mxgraph"==N[P].getAttribute("class")){O.push(N[P]);break}0<O.length&&(N=O[0].getAttribute("data-mxgraph"),null!=N?(O=JSON.parse(N),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(N=mxUtils.getTextContent(O[0]),N=Graph.decompress(N,
null,G),0<N.length&&(k=mxUtils.parseXml(N),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(N=k.getAttribute("content"),null!=N&&"<"!=N.charAt(0)&&"%"!=N.charAt(0)&&(N=unescape(window.atob?atob(N):Base64.decode(cont,N))),null!=N&&"%"==N.charAt(0)&&(N=decodeURIComponent(N)),null!=N&&0<N.length)k=mxUtils.parseXml(N).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(N=k.getElementsByTagName("diagram"),0<
N.length&&(O=N[Math.max(0,Math.min(N.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,G)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,G){Editor.validateDiagramNode(k);var N=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<N.length?(v=Graph.decompress(N,null,v),null!=v&&0<v.length&&(O=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],G&&(O=Editor.parseDiagramNode(O,v,
!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(O,!0)),O=v.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),G=null;0<v.length?G=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(G=mxUtils.getXml(k[0])));return G};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,G=new mxGraphModel;
k.appendChild(v.encode(G))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var G=k.indexOf("EmbeddedFile");if(-1<G){var N=k.indexOf("stream",G)+9;if(0<k.substring(G,N).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",N-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,O)),{to:"string"})}}for(G=k.indexOf("/ObjStm");0<G;){N=
-k.indexOf("stream",G)+9;O=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,O)),{to:"string"});O=N.indexOf("/Subject <");if(0<O){G=N.substring(O+14,N.indexOf(">",O));if(null!=G){v=G;G=[];for(N=0;N<v.length;N+=2)O=v.substr(N,2),"00"!=O&&G.push(String.fromCharCode(parseInt(O,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";O=N=0;for(var Q=[],S=null;O<k.length;){var V=k.charCodeAt(O);O+=1;10!=V&&(G+=String.fromCharCode(V));
-V=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var W=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(W>O){v=k.substring(O,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],Q[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=Q&&(v=Editor.extractGraphModelFromXref(Q));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=
+k.indexOf("stream",G)+9;O=k.indexOf("endstream",N-1);N=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(N,O)),{to:"string"});O=N.indexOf("/Subject <");if(0<O){G=N.substring(O+14,N.indexOf(">",O));if(null!=G){v=G;G=[];for(N=0;N<v.length;N+=2)O=v.substr(N,2),"00"!=O&&G.push(String.fromCharCode(parseInt(O,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";O=N=0;for(var P=[],S=null;O<k.length;){var V=k.charCodeAt(O);O+=1;10!=V&&(G+=String.fromCharCode(V));
+V=="/Subject (%3Cmxfile".charCodeAt(N)?N++:N=0;if(19==N){var W=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(W>O){v=k.substring(O,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],P[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=P&&(v=Editor.extractGraphModelFromXref(P));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=
v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),G=k.substring(1,k.length-1))))));return G};Editor.extractParserError=function(k,v){var G=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(G=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(G=mxUtils.getTextContent(v[0])));return null!=
G?mxUtils.trim(G):G};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,G)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=
k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=
@@ -12841,37 +12839,37 @@ this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxC
typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){N=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var N=null;Editor.doMathJaxRender=function(S){try{null==N?(MathJax.typesetClear([S]),MathJax.typeset([S]),G()):N!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(N=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+
W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};
Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");
-if(null!=v&&0<v.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",k);v[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",G=[""],N=0,O=!0,Q;k=$jscomp.makeIterator(k);for(Q=k.next();!Q.done;Q=k.next())Q=Q.value,'"'===Q?(O&&Q===v&&(G[N]+=Q),O=!O):","===Q&&O?Q=G[++N]="":G[N]+=Q,v=Q;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
+if(null!=v&&0<v.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",k);v[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",G=[""],N=0,O=!0,P;k=$jscomp.makeIterator(k);for(P=k.next();!P.done;P=k.next())P=P.value,'"'===P?(O&&P===v&&(G[N]+=P),O=!O):","===P&&O?P=G[++N]="":G[N]+=P,v=P;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(N){null!=N&&navigator.onLine&&("http://"!=N.substring(0,7)&&"https://"!=N.substring(0,8)||N.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&
-G.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,N,O){try{var Q=!0,S=window.setTimeout(mxUtils.bind(this,function(){Q=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,G,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&
-!O)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);Q&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);Q&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(Q)try{N=null!=N&&O?N:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(N,N);X.height=W.height*N;X.width=W.width*N;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};
-W.onerror=function(){window.clearTimeout(S);Q&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,N){function O(){0<Q.length?Q.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var Q=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){Q.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=N.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ea=
-S[Y];null==ea?this.convertImageToDataUri(Y,function(ca){null!=ca&&(S[Y]=ca,Z.setAttribute(W,ca));O()},null,Editor.svgRasterScale):(Z.setAttribute(W,ea),O())}else null!=Y&&Z.setAttribute(W,Y),O()}}catch(ca){O()}}))})(V[X])});G("image","xlink:href");G("img","src");O()};Editor.base64Encode=function(k){for(var v="",G=0,N=k.length,O,Q,S;G<N;){O=k.charCodeAt(G++)&255;if(G==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4);v+="==";break}Q=k.charCodeAt(G++);if(G==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(Q&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
-3)<<4|(Q&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};Editor.prototype.loadUrl=function(k,v,G,N,O,Q,S,V){try{var W=!S&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){200<=Z.getStatus()&&299>=
-Z.getStatus()?null!=v&&(Z=Z.getText(),W&&(Q=null!=Q?Q:"data:image/png;base64,",Z=Q+Editor.base64Encode(Z)),v(Z)):null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){O&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};
+G.isCorsEnabledForUrl(N)?"chrome-extension://"!=N.substring(0,19)&&(N=v.apply(this,arguments)):N=PROXY_URL+"?url="+encodeURIComponent(N));return N};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,N,O){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=N?this.convertImageToDataUri(k,v,G,N,!0):v(k)});if(/(\.svg)$/i.test(k)&&
+!O)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);P&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{N=null!=N&&O?N:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(N,N);X.height=W.height*N;X.width=W.width*N;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};
+W.onerror=function(){window.clearTimeout(S);P&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,N){function O(){0<P.length?P.shift()():v(k)}null==N&&(N=this.createImageUrlConverter());var P=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=N.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ea=
+S[Y];null==ea?this.convertImageToDataUri(Y,function(ca){null!=ca&&(S[Y]=ca,Z.setAttribute(W,ca));O()},null,Editor.svgRasterScale):(Z.setAttribute(W,ea),O())}else null!=Y&&Z.setAttribute(W,Y),O()}}catch(ca){O()}}))})(V[X])});G("image","xlink:href");G("img","src");O()};Editor.base64Encode=function(k){for(var v="",G=0,N=k.length,O,P,S;G<N;){O=k.charCodeAt(G++)&255;if(G==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);v+="==";break}P=k.charCodeAt(G++);if(G==N){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};Editor.prototype.loadUrl=function(k,v,G,N,O,P,S,V){try{var W=!S&&(N||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){200<=Z.getStatus()&&299>=
+Z.getStatus()?null!=v&&(Z=Z.getText(),W&&(P=null!=P?P:"data:image/png;base64,",Z=P+Editor.base64Encode(Z)),v(Z)):null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){O&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};
Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),N=JSON.parse(G);null!=N&&null!=N.error&&null!=N.error.message&&(v=N.error.message+" ("+v+")")}catch(O){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var N=null!=k?k.lastIndexOf("/"):-1;0<=N&&(k=k.substring(0,N+1));N=document.getElementsByTagName("base");var O=null;null!=N&&0<N.length&&
-(O=N[0].getAttribute("href"));for(var Q=1;Q<G.length;Q++)if(N=G[Q].indexOf(")"),0<N){var S=Editor.trimCssUrl(G[Q].substring(0,N));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[Q].substring(N))}else v.push(G[Q])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));G(k,
-v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==N){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var Q=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",Q);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+7,G[k].indexOf(")",
+(O=N[0].getAttribute("href"));for(var P=1;P<G.length;P++)if(N=G[P].indexOf(")"),0<N){var S=Editor.trimCssUrl(G[P].substring(0,N));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[P].substring(N))}else v.push(G[P])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));G(k,
+v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),N=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==N){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var P=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",P);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+7,G[k].indexOf(")",
V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;N++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==
-S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ea){this.cachedFonts[W]=ea;N--;O()}),mxUtils.bind(this,function(ea){N--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,Q)),S)}O()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=
-v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(G.join(""),k)}),Q=0;Q<v.length;Q++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?
-null==this.cachedGoogleFonts[V]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");N--;O()}),mxUtils.bind(this,function(W){N--;G.push("@import url("+V+");\n");O()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[Q].name,v[Q].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),
-G=0;G<v.length;G++){var N=mxUtils.getTextContent(v[G]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var O=[],Q=0;Q<N.length;Q++)"@import"==N[Q].substring(0,7)?v.push(N[Q]):O.push(N[Q]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");
-k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var N=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=function(k,v,G,N,O,Q,S,V,W,X,Z,Y,ea,ca,ka,ba,ha,aa){try{Q=
-null!=Q?Q:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ea=null!=ea?ea:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=N);null==ia&&0==W&&(ia="dark"==ba&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ea,ca,null,S,null,null,null,X,null,ba,ha,aa),mxUtils.bind(this,function(fa){try{var da=new Image;da.onload=mxUtils.bind(this,function(){try{var va=function(){mxClient.IS_SF?window.setTimeout(function(){ta.drawImage(da,0,0);k(oa,fa)},
-0):(ta.drawImage(da,0,0),k(oa,fa))},oa=document.createElement("canvas"),Ba=parseInt(fa.getAttribute("width")),ma=parseInt(fa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=Q?Math.min(1,Math.min(3*v/(4*ma),v/Ba)):v/Ba);V=this.getMaxCanvasScale(Ba,ma,V);Ba=Math.ceil(V*Ba);ma=Math.ceil(V*ma);oa.setAttribute("width",Ba);oa.setAttribute("height",ma);var ta=oa.getContext("2d");if(null!=ia){var qa=mxUtils.getLightDarkColor(ia);ta.beginPath();ta.rect(0,0,Ba,ma);ta.fillStyle="dark"==ba&&"none"!=Y.getAdaptiveColors()?
-qa.dark:qa.light;ta.fill()}1!=V&&ta.scale(V,V);if(ka){var la=Y.view,Fa=la.scale;la.scale=1;var wa=btoa(unescape(encodeURIComponent(la.createSvgGrid(la.gridColor))));la.scale=Fa;wa="data:image/svg+xml;base64,"+wa;var Ca=Y.gridSize*la.gridSteps*V,xa=Y.getGraphBounds(),Da=la.translate.x*Fa,Aa=la.translate.y*Fa,Ja=Da+(xa.x-Da)/Fa-ea,Ka=Aa+(xa.y-Aa)/Fa-ea,Ga=new Image;Ga.onload=function(){try{for(var ya=-Math.round(Ca-mxUtils.mod((Da-Ja)*V,Ca)),Ma=-Math.round(Ca-mxUtils.mod((Aa-Ka)*V,Ca));ya<Ba;ya+=Ca)for(var Va=
-Ma;Va<ma;Va+=Ca)ta.drawImage(Ga,ya/V,Va/V);va()}catch(Ua){null!=O&&O(Ua)}};Ga.onerror=function(ya){null!=O&&O(ya)};Ga.src=wa}else va()}catch(ya){null!=O&&O(ya)}});da.onerror=function(va){null!=O&&O(va)};X&&this.graph.addSvgShadow(fa);this.graph.mathEnabled&&this.addMathCss(fa);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(fa,this.resolvedFontCss),da.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}catch(va){null!=O&&O(va)}});this.embedExtFonts(mxUtils.bind(this,
-function(va){try{null!=va&&this.addFontCss(fa,va),this.loadFonts(za)}catch(oa){null!=O&&O(oa)}}))}catch(va){null!=O&&O(va)}}),G,Z)}catch(fa){null!=O&&O(fa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var x=q,C=0;8>C;C++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[q]=x;Editor.updateCRC=function(k,v,G,N){for(var O=0;O<N;O++)k=Editor.crcTable[(k^v.charCodeAt(G+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^
--1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,N,O){function Q(Z,Y){var ea=W;W+=Y;return Z.substring(ea,W)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(Q(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(Q(k,4),"IHDR"!=Q(k,4))null!=
-O&&O();else{Q(k,17);O=k.substring(0,W);do{var X=S(k);if("IDAT"==Q(k,4)){O=k.substring(0,W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(N/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,G,0,G.length);O+=V(G.length)+v+G+V(N^4294967295);O+=k.substring(W-8,k.length);break}O+=k.substring(W-8,W-4+X);Q(k,X);Q(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,
+S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ea){this.cachedFonts[W]=ea;N--;O()}),mxUtils.bind(this,function(ea){N--;O()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,P)),S)}O()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=
+v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],N=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==N&&this.embedCssFonts(G.join(""),k)}),P=0;P<v.length;P++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?
+null==this.cachedGoogleFonts[V]?(N++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");N--;O()}),mxUtils.bind(this,function(W){N--;G.push("@import url("+V+");\n");O()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[P].name,v[P].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),
+G=0;G<v.length;G++){var N=mxUtils.getTextContent(v[G]);0>N.indexOf("mxPageSelector")&&0<N.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),N=v.split("\n");v=[];for(var O=[],P=0;P<N.length;P++)"@import"==N[P].substring(0,7)?v.push(N[P]):O.push(N[P]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");
+k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var N=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(N/k,N/v))};Editor.prototype.exportToCanvas=function(k,v,G,N,O,P,S,V,W,X,Z,Y,ea,ca,ka,ba,ha,aa){try{P=
+null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ea=null!=ea?ea:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=N);null==ia&&0==W&&(ia="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(Y.getSvg(null,null,ea,ca,null,S,null,null,null,X,null,ba,ha,aa),mxUtils.bind(this,function(fa){try{var da=new Image;da.onload=mxUtils.bind(this,function(){try{var ua=function(){mxClient.IS_SF?window.setTimeout(function(){ta.drawImage(da,0,0);k(na,fa)},0):(ta.drawImage(da,0,
+0),k(na,fa))},na=document.createElement("canvas"),Ba=parseInt(fa.getAttribute("width")),ma=parseInt(fa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=P?Math.min(1,Math.min(3*v/(4*ma),v/Ba)):v/Ba);V=this.getMaxCanvasScale(Ba,ma,V);Ba=Math.ceil(V*Ba);ma=Math.ceil(V*ma);na.setAttribute("width",Ba);na.setAttribute("height",ma);var ta=na.getContext("2d");if(null!=ia){var qa=mxUtils.getLightDarkColor(ia);ta.beginPath();ta.rect(0,0,Ba,ma);ta.fillStyle="dark"==ba&&"none"!=Y.getAdaptiveColors()?qa.dark:
+qa.light;ta.fill()}1!=V&&ta.scale(V,V);if(ka){var la=Y.view,Fa=la.scale;la.scale=1;var wa=btoa(unescape(encodeURIComponent(la.createSvgGrid(la.gridColor))));la.scale=Fa;wa="data:image/svg+xml;base64,"+wa;var Ca=Y.gridSize*la.gridSteps*V,xa=Y.getGraphBounds(),Da=la.translate.x*Fa,Aa=la.translate.y*Fa,Ja=Da+(xa.x-Da)/Fa-ea,Ka=Aa+(xa.y-Aa)/Fa-ea,Ga=new Image;Ga.onload=function(){try{for(var ya=-Math.round(Ca-mxUtils.mod((Da-Ja)*V,Ca)),Ma=-Math.round(Ca-mxUtils.mod((Aa-Ka)*V,Ca));ya<Ba;ya+=Ca)for(var Va=
+Ma;Va<ma;Va+=Ca)ta.drawImage(Ga,ya/V,Va/V);ua()}catch(Ua){null!=O&&O(Ua)}};Ga.onerror=function(ya){null!=O&&O(ya)};Ga.src=wa}else ua()}catch(ya){null!=O&&O(ya)}});da.onerror=function(ua){null!=O&&O(ua)};X&&this.graph.addSvgShadow(fa);this.graph.mathEnabled&&this.addMathCss(fa);var za=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(fa,this.resolvedFontCss),da.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}catch(ua){null!=O&&O(ua)}});this.embedExtFonts(mxUtils.bind(this,
+function(ua){try{null!=ua&&this.addFontCss(fa,ua),this.loadFonts(za)}catch(na){null!=O&&O(na)}}))}catch(ua){null!=O&&O(ua)}}),G,Z)}catch(fa){null!=O&&O(fa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var x=q,B=0;8>B;B++)x=1==(x&1)?3988292384^x>>>1:x>>>1,Editor.crcTable[q]=x;Editor.updateCRC=function(k,v,G,N){for(var O=0;O<N;O++)k=Editor.crcTable[(k^v.charCodeAt(G+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^
+-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,N,O){function P(Z,Y){var ea=W;W+=Y;return Z.substring(ea,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(P(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(P(k,4),"IHDR"!=P(k,4))null!=
+O&&O();else{P(k,17);O=k.substring(0,W);do{var X=S(k);if("IDAT"==P(k,4)){O=k.substring(0,W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(N/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N,v,0,4);N=Editor.updateCRC(N,G,0,G.length);O+=V(G.length)+v+G+V(N^4294967295);O+=k.substring(W-8,k.length);break}O+=k.substring(W-8,W-4+X);P(k,X);P(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,
!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var I=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){I.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
-function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var M=Format.prototype.init;Format.prototype.init=function(){M.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var H=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?H.apply(this,arguments):
+function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var L=Format.prototype.init;Format.prototype.init=function(){L.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var H=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?H.apply(this,arguments):
this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var N=v.getCurrentFile();null!=N&&N.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},
-function(Q){v.editor.setAutosave(Q);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(Q){this.listener=function(){Q(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(Q){v.actions.get("mathematicalTypesetting").funct()},
-{install:function(Q){this.listener=function(){Q(G.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(O);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&O.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+function(P){v.editor.setAutosave(P);v.editor.autosave&&N.isModified()&&N.fileChanged()},{install:function(P){this.listener=function(){P(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(P){v.actions.get("mathematicalTypesetting").funct()},
+{install:function(P){this.listener=function(){P(G.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(O);(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&O.appendChild(v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,
@@ -12898,32 +12896,32 @@ font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#
StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));e.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=
this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);g.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,N){function O(ta,qa,la,Fa,wa){if(null!=la.valueChanged)la.valueChanged(qa,wa);else{ea.getModel().beginUpdate();try{wa=[];var Ca=[];if(null!=la.index){for(var xa=[],Da=la.parentRow.nextSibling;Da&&Da.getAttribute("data-pName")==
ta;)xa.push(Da.getAttribute("data-pValue")),Da=Da.nextSibling;la.index<xa.length?null!=Fa?xa.splice(Fa,1):xa[la.index]=qa:xa.push(qa);null!=la.size&&xa.length>la.size&&(xa=xa.slice(0,la.size));qa=xa.join(",");null!=la.countProperty&&(ea.setCellStyles(la.countProperty,xa.length,ea.getSelectionCells()),wa.push(la.countProperty),Ca.push(xa.length))}ea.setCellStyles(ta,qa,ea.getSelectionCells());wa.push(ta);Ca.push(qa);if(null!=la.dependentProps)for(ta=0;ta<la.dependentProps.length;ta++){var Aa=la.dependentPropsDefVal[ta],
-Ja=la.dependentPropsVals[ta];if(Ja.length>qa)Ja=Ja.slice(0,qa);else for(var Ka=Ja.length;Ka<qa;Ka++)Ja.push(Aa);Ja=Ja.join(",");ea.setCellStyles(la.dependentProps[ta],Ja,ea.getSelectionCells());wa.push(la.dependentProps[ta]);Ca.push(Ja)}if("function"==typeof la.onChange)la.onChange(ea,qa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",wa,"values",Ca,"cells",ea.getSelectionCells()))}finally{ea.getModel().endUpdate()}}}function Q(ta,qa,la){var Fa=mxUtils.getOffset(k,!0),wa=mxUtils.getOffset(ta,
+Ja=la.dependentPropsVals[ta];if(Ja.length>qa)Ja=Ja.slice(0,qa);else for(var Ka=Ja.length;Ka<qa;Ka++)Ja.push(Aa);Ja=Ja.join(",");ea.setCellStyles(la.dependentProps[ta],Ja,ea.getSelectionCells());wa.push(la.dependentProps[ta]);Ca.push(Ja)}if("function"==typeof la.onChange)la.onChange(ea,qa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",wa,"values",Ca,"cells",ea.getSelectionCells()))}finally{ea.getModel().endUpdate()}}}function P(ta,qa,la){var Fa=mxUtils.getOffset(k,!0),wa=mxUtils.getOffset(ta,
!0);qa.style.position="absolute";qa.style.left=wa.x-Fa.x+"px";qa.style.top=wa.y-Fa.y+"px";qa.style.width=ta.offsetWidth+"px";qa.style.height=ta.offsetHeight-(la?4:0)+"px";qa.style.zIndex=5}function S(ta,qa,la){function Fa(Ca){if(null==Ca||Ca==mxConstants.NONE)wa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ca)wa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ca);mxUtils.isLightDarkColor(Ca)&&xa.light!=xa.dark?wa.style.background="linear-gradient(to right bottom, "+
xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":wa.style.background=Ca}}var wa=document.createElement("div");wa.style.width="32px";wa.style.height="8px";wa.style.margin="2px";wa.style.borderStyle="solid";wa.style.borderWidth="1px";Fa(qa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ca){this.editorUi.pickColor(qa,function(xa){O(ta,xa,la);Fa(xa)});mxEvent.consume(Ca)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className=
"geColorBtn";btn.appendChild(wa);return btn}function V(ta,qa,la,Fa,wa,Ca,xa){null!=qa&&(qa=qa.split(","),ca.push({name:ta,values:qa,type:la,defVal:Fa,countProperty:wa,parentRow:Ca,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Da){for(var Aa=Ca,Ja=0;null!=Aa.nextSibling;)if(Aa.nextSibling.getAttribute("data-pName")==ta)Aa=Aa.nextSibling,Ja++;else break;var Ka={type:la,parentRow:Ca,index:Ja,isDeletable:!0,defVal:Fa,countProperty:wa};Ja=Z(ta,"",Ka,0==Ja%2,xa);O(ta,Fa,Ka);
Aa.parentNode.insertBefore(Ja,Aa.nextSibling);mxEvent.consume(Da)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ta,qa,la,Fa,wa,Ca,xa){if(0<wa){var Da=Array(wa);qa=null!=qa?qa.split(","):[];for(var Aa=0;Aa<wa;Aa++)Da[Aa]=null!=qa[Aa]?qa[Aa]:null!=Fa?Fa:"";ca.push({name:ta,values:Da,type:la,defVal:Fa,parentRow:Ca,flipBkg:xa,size:wa})}return document.createElement("div")}function X(ta,qa,la){var Fa=document.createElement("input");Fa.type="checkbox";
Fa.checked="1"==qa;mxEvent.addListener(Fa,"change",function(){O(ta,Fa.checked?"1":"0",la)});return Fa}function Z(ta,qa,la,Fa,wa){var Ca=la.dispName,xa=la.type,Da=document.createElement("tr");Da.className="gePropRow"+(wa?"Dark":"")+(Fa?"Alt":"")+" gePropNonHeaderRow";Da.setAttribute("data-pName",ta);Da.setAttribute("data-pValue",qa);Fa=!1;null!=la.index&&(Da.setAttribute("data-index",la.index),Ca=(null!=Ca?Ca:"")+"["+la.index+"]",Fa=!0);var Aa=document.createElement("td");Aa.className="gePropRowCell";
Ca=mxResources.get(Ca,null,Ca);mxUtils.write(Aa,Ca);Aa.setAttribute("title",Ca);Fa&&(Aa.style.textAlign="right");Da.appendChild(Aa);Aa=document.createElement("td");Aa.className="gePropRowCell";Aa.setAttribute("title",null!=qa?qa:mxResources.get("none"));if("color"==xa)Aa.appendChild(S(ta,qa,la));else if("bool"==xa||"boolean"==xa)Aa.appendChild(X(ta,qa,la));else if("enum"==xa){var Ja=la.enumList;for(wa=0;wa<Ja.length;wa++)if(Ca=Ja[wa],Ca.val==qa){mxUtils.write(Aa,mxResources.get(Ca.dispName,null,Ca.dispName));
-break}mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(){var Ka=document.createElement("select"),Ga=null;Q(Aa,Ka);for(var ya=0;ya<Ja.length;ya++){var Ma=Ja[ya],Va=document.createElement("option");Va.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Va,mxResources.get(Ma.dispName,null,Ma.dispName));Ka.appendChild(Va);null==Ma.val&&(Va.value="null",Ga=Va)}Ka.value=null==qa&&null!=Ga?"null":qa;k.appendChild(Ka);mxEvent.addListener(Ka,"change",function(){var Ua=mxUtils.htmlEntities(Ka.value);if(Ka[Ka.selectedIndex]==
+break}mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(){var Ka=document.createElement("select"),Ga=null;P(Aa,Ka);for(var ya=0;ya<Ja.length;ya++){var Ma=Ja[ya],Va=document.createElement("option");Va.value=mxUtils.htmlEntities(Ma.val);mxUtils.write(Va,mxResources.get(Ma.dispName,null,Ma.dispName));Ka.appendChild(Va);null==Ma.val&&(Va.value="null",Ga=Va)}Ka.value=null==qa&&null!=Ga?"null":qa;k.appendChild(Ka);mxEvent.addListener(Ka,"change",function(){var Ua=mxUtils.htmlEntities(Ka.value);if(Ka[Ka.selectedIndex]==
Ga||"null"==Ua.value)Ua=null;O(ta,Ua,la)});Ka.focus();mxEvent.addListener(Ka,"blur",function(){k.removeChild(Ka)})}))}else"dynamicArr"==xa?Aa.appendChild(V(ta,qa,la.subType,la.subDefVal,la.countProperty,Da,wa)):"staticArr"==xa?Aa.appendChild(W(ta,qa,la.subType,la.subDefVal,la.size,Da,wa)):"readOnly"==xa?(wa=document.createElement("input"),wa.setAttribute("readonly",""),wa.value=qa,wa.style.borderWidth="0px","id"==ta?(wa.style.width="190px",wa.style.position="relative",wa.style.right="6px",wa.style.float=
"right",wa.style.background="none",wa.style.textAlign="right",Da.firstChild.setAttribute("colspan","2"),wa.setAttribute("title",qa),Da.firstChild.appendChild(wa)):(wa.style.width="96px",Aa.appendChild(wa))):(Aa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(qa)),mxEvent.addListener(Aa,"click",mxUtils.bind(Y,function(){function Ka(){var ya=Ga.value;ya=0==ya.length&&"string"!=xa&&"numbers"!=xa?0:ya;la.allowAuto&&(null!=ya.trim&&"auto"==ya.trim().toLowerCase()?(ya="auto",xa="string"):(ya=parseFloat(ya),
-ya=isNaN(ya)?0:ya));null!=la.min&&ya<la.min?ya=la.min:null!=la.max&&ya>la.max&&(ya=la.max);var Ma=null;try{Ma="numbers"==xa?ya.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(ya):ya)+"")}catch(Va){}O(ta,Ma,la,null,Ga)}var Ga=document.createElement("input");Q(Aa,Ga,!0);Ga.value=decodeURIComponent(qa);Ga.className="gePropEditor";"int"!=xa&&"float"!=xa||la.allowAuto||(Ga.type="number",Ga.step="int"==xa?"1":"any",null!=la.min&&(Ga.min=parseFloat(la.min)),null!=la.max&&(Ga.max=
+ya=isNaN(ya)?0:ya));null!=la.min&&ya<la.min?ya=la.min:null!=la.max&&ya>la.max&&(ya=la.max);var Ma=null;try{Ma="numbers"==xa?ya.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(ya):ya)+"")}catch(Va){}O(ta,Ma,la,null,Ga)}var Ga=document.createElement("input");P(Aa,Ga,!0);Ga.value=decodeURIComponent(qa);Ga.className="gePropEditor";"int"!=xa&&"float"!=xa||la.allowAuto||(Ga.type="number",Ga.step="int"==xa?"1":"any",null!=la.min&&(Ga.min=parseFloat(la.min)),null!=la.max&&(Ga.max=
parseFloat(la.max)));k.appendChild(Ga);mxEvent.addListener(Ga,"keypress",function(ya){13==ya.keyCode&&Ka()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ka()})})));la.isDeletable&&(wa=mxUtils.button("-",mxUtils.bind(Y,function(Ka){O(ta,"",la,la.index);mxEvent.consume(Ka)})),wa.style.height="16px",wa.style.width="25px",wa.style.float="right",wa.className="geColorBtn",Aa.appendChild(wa));Da.appendChild(Aa);return Da}var Y=this,ea=this.editorUi.editor.graph,ca=[],ka=document.createElement("table");
ka.className="geProperties geFullWidthElement";var ba=document.createElement("tr");ba.className="gePropHeader";var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="16px";ha.style.backgroundRepeat="no-repeat";ha.style.backgroundPosition="-2px 50%";ha.style.backgroundSize="20px";mxUtils.write(ha,mxResources.get("property"));ba.style.cursor="pointer";var aa=function(){var ta=ka.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ha.style.backgroundImage=
"url('"+Editor.arrowRightImage+"')";var qa="none";for(var la=k.childNodes.length-1;0<=la;la--)try{var Fa=k.childNodes[la],wa=Fa.nodeName.toUpperCase();"INPUT"!=wa&&"SELECT"!=wa||k.removeChild(Fa)}catch(Ca){}}else ha.style.backgroundImage="url('"+Editor.arrowDownImage+"')",qa="";for(la=0;la<ta.length;la++)ta[la].style.display=qa};mxEvent.addListener(ba,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;aa()});ba.appendChild(ha);var ia=document.createElement("th");ia.className=
"gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));ba.appendChild(ia);ka.appendChild(ba);var fa=ia=!1;ba=null;1==G.vertices.length&&0==G.edges.length?ba=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(ba=G.edges[0].id);null==ba||N||ka.appendChild(Z("id",mxUtils.htmlEntities(ba),{dispName:"id",type:"readOnly"},!0,!1));for(var da in v)if(N=v[da],!N.primary&&("function"!=typeof N.isVisible||N.isVisible(G,this))){var za=null!=N.getValue?N.getValue():null!=
-G.style[da]?mxUtils.htmlEntities(G.style[da]+""):null!=N.getDefaultValue?N.getDefaultValue(G,this):N.defVal;if("separator"==N.type)fa=!fa;else{if("staticArr"==N.type)N.size=parseInt(G.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var va=N.dependentProps,oa=[],Ba=[];for(ba=0;ba<va.length;ba++){var ma=G.style[va[ba]];Ba.push(v[va[ba]].subDefVal);oa.push(null!=ma?ma.split(","):[])}N.dependentPropsDefVal=Ba;N.dependentPropsVals=oa}ka.appendChild(Z(da,za,N,ia,fa));
+G.style[da]?mxUtils.htmlEntities(G.style[da]+""):null!=N.getDefaultValue?N.getDefaultValue(G,this):N.defVal;if("separator"==N.type)fa=!fa;else{if("staticArr"==N.type)N.size=parseInt(G.style[N.sizeProperty]||v[N.sizeProperty].defVal)||0;else if(null!=N.dependentProps){var ua=N.dependentProps,na=[],Ba=[];for(ba=0;ba<ua.length;ba++){var ma=G.style[ua[ba]];Ba.push(v[ua[ba]].subDefVal);na.push(null!=ma?ma.split(","):[])}N.dependentPropsDefVal=Ba;N.dependentPropsVals=na}ka.appendChild(Z(da,za,N,ia,fa));
ia=!ia}}for(ba=0;ba<ca.length;ba++)for(N=ca[ba],v=N.parentRow,G=0;G<N.values.length;G++)da=Z(N.name,N.values[G],{type:N.type,parentRow:N.parentRow,isDeletable:N.isDeletable,index:G,defVal:N.defVal,countProperty:N.countProperty,size:N.size},0==G%2,N.flipBkg),v.parentNode.insertBefore(da,v.nextSibling),v=da;k.appendChild(ka);aa();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=this.editorUi,G=v.editor.graph,N=document.createElement("div");N.style.padding=
-"6px 20px 0 24px";k.appendChild(N);var O=document.createElement("div");O.className="geSwitcher";O.style.padding="4px 18px 6px 0px";for(var Q=[],S=0;S<this.defaultColorSchemes.length;S++){var V=document.createElement("div");V.className="geSwitcherDot";mxUtils.bind(this,function(ea){mxEvent.addListener(V,"click",mxUtils.bind(this,function(){W(ea)}))})(S);Q.push(V);O.appendChild(V)}var W=mxUtils.bind(this,function(ea){null!=Q[ea]&&(null!=this.format.currentScheme&&null!=Q[this.format.currentScheme]&&
-(Q[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,X(this.defaultColorSchemes[this.format.currentScheme]),Q[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(G.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:
-"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";G.replaceDefaultColors(new mxCell,ca);var ka=mxUtils.bind(this,function(ha){var aa=mxUtils.button("",mxUtils.bind(this,function(da){G.getModel().beginUpdate();try{for(var za=v.getSelectionState().cells,va=0;va<za.length;va++){var oa=G.getModel().getStyle(za[va]);null!=ha?(mxEvent.isShiftDown(da)||(oa=""==ha.fill||null==ha.fill?mxUtils.setStyle(oa,mxConstants.STYLE_FILLCOLOR,null):
-mxUtils.setStyle(oa,mxConstants.STYLE_FILLCOLOR,ha.fill),oa=""==ha.gradient||null==ha.gradient?mxUtils.setStyle(oa,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(oa,mxConstants.STYLE_GRADIENTCOLOR,ha.gradient),mxEvent.isControlDown(da)||mxClient.IS_MAC&&mxEvent.isMetaDown(da)||!G.getModel().isVertex(za[va])||(oa=""==ha.font||null==ha.font?mxUtils.setStyle(oa,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(oa,mxConstants.STYLE_FONTCOLOR,ha.font))),mxEvent.isAltDown(da)||(oa=""==ha.stroke||
-null==ha.fill?mxUtils.setStyle(oa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(oa,mxConstants.STYLE_STROKECOLOR,ha.stroke))):(oa=mxUtils.setStyle(oa,mxConstants.STYLE_FILLCOLOR,null),oa=mxUtils.setStyle(oa,mxConstants.STYLE_STROKECOLOR,null),oa=mxUtils.setStyle(oa,mxConstants.STYLE_GRADIENTCOLOR,null),G.getModel().isVertex(za[va])&&(oa=mxUtils.setStyle(oa,mxConstants.STYLE_FONTCOLOR,null)));G.getModel().setStyle(za[va],oa)}}finally{G.getModel().endUpdate()}}));aa.className="geStyleButton";
+"6px 20px 0 24px";k.appendChild(N);var O=document.createElement("div");O.className="geSwitcher";O.style.padding="4px 18px 6px 0px";for(var P=[],S=0;S<this.defaultColorSchemes.length;S++){var V=document.createElement("div");V.className="geSwitcherDot";mxUtils.bind(this,function(ea){mxEvent.addListener(V,"click",mxUtils.bind(this,function(){W(ea)}))})(S);P.push(V);O.appendChild(V)}var W=mxUtils.bind(this,function(ea){null!=P[ea]&&(null!=this.format.currentScheme&&null!=P[this.format.currentScheme]&&
+(P[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,X(this.defaultColorSchemes[this.format.currentScheme]),P[this.format.currentScheme].style.background="#84d7ff")}),X=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(G.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:
+"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";G.replaceDefaultColors(new mxCell,ca);var ka=mxUtils.bind(this,function(ha){var aa=mxUtils.button("",mxUtils.bind(this,function(da){G.getModel().beginUpdate();try{for(var za=v.getSelectionState().cells,ua=0;ua<za.length;ua++){var na=G.getModel().getStyle(za[ua]);null!=ha?(mxEvent.isShiftDown(da)||(na=""==ha.fill||null==ha.fill?mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null):
+mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,ha.fill),na=""==ha.gradient||null==ha.gradient?mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,ha.gradient),mxEvent.isControlDown(da)||mxClient.IS_MAC&&mxEvent.isMetaDown(da)||!G.getModel().isVertex(za[ua])||(na=""==ha.font||null==ha.font?mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,ha.font))),mxEvent.isAltDown(da)||(na=""==ha.stroke||
+null==ha.fill?mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,ha.stroke))):(na=mxUtils.setStyle(na,mxConstants.STYLE_FILLCOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_STROKECOLOR,null),na=mxUtils.setStyle(na,mxConstants.STYLE_GRADIENTCOLOR,null),G.getModel().isVertex(za[ua])&&(na=mxUtils.setStyle(na,mxConstants.STYLE_FONTCOLOR,null)));G.getModel().setStyle(za[ua],na)}}finally{G.getModel().endUpdate()}}));aa.className="geStyleButton";
aa.style.width="36px";aa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";aa.style.margin="0px 6px 6px 0px";if(null!=ha){var ia="1px solid";null!=ha.border&&(ia=ha.border);if(null!=ha.gradient)aa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ha.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ha.gradient).cssText+" 100%)";else if(ha.fill==mxConstants.NONE)aa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ha.fill||""==ha.fill)aa.style.backgroundColor=
mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var fa=mxUtils.getLightDarkColor(ha.fill);aa.style.backgroundImage="linear-gradient(to right bottom, "+fa.cssText+" 50%, "+fa.light+" 50.3%)"}null==ha.stroke||ha.stroke==mxConstants.NONE?aa.style.border=ia+" transparent":""==ha.stroke?aa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(fa=mxUtils.getLightDarkColor(ha.stroke),aa.style.border=
ia+" "+fa.cssText,aa.style.borderRightColor=fa.light,aa.style.borderBottomColor=aa.style.borderRightColor);null!=ha.title&&aa.setAttribute("title",ha.title)}else ia=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),fa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),aa.style.backgroundColor=ia,aa.style.border="1px solid "+fa;aa.style.borderRadius="0";N.appendChild(aa);null!=ha&&null!=ha.gradient&&(ia=aa.cloneNode(!1),ia.style.backgroundImage="linear-gradient(light-dark(transparent, "+
-mxUtils.getLightDarkColor(ha.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ha.gradient).light+") 100%)",ia.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ia.style.backgroundColor="transparent",N.appendChild(ia),ia.style.marginLeft="-42px",mxEvent.addListener(ia,"click",function(){aa.click()}))});N.innerText="";if(null!=ea)for(var ba=0;ba<ea.length;ba++)0<ba&&0==mxUtils.mod(ba,4)&&mxUtils.br(N),ka(ea[ba])});null==this.format.currentScheme?W(Math.min(Q.length-1,Editor.isDarkMode()?
+mxUtils.getLightDarkColor(ha.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ha.gradient).light+") 100%)",ia.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",ia.style.backgroundColor="transparent",N.appendChild(ia),ia.style.marginLeft="-42px",mxEvent.addListener(ia,"click",function(){aa.click()}))});N.innerText="";if(null!=ea)for(var ba=0;ba<ea.length;ba++)0<ba&&0==mxUtils.mod(ba,4)&&mxUtils.br(N),ka(ea[ba])});null==this.format.currentScheme?W(Math.min(P.length-1,Editor.isDarkMode()?
1:"1"==urlParams.sketch?5:0)):W(this.format.currentScheme);S=10>=this.defaultColorSchemes.length?43:23;var Z=document.createElement("div");Z.className="geButton";Z.style.cssText="position:absolute;left:0px;bottom:"+S+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){W(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Y=document.createElement("div");Y.className="geButton";Y.style.cssText="position:absolute;left:186px;bottom:"+
S+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(Z),k.appendChild(Y));mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){W(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));X(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(O)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+
@@ -12932,52 +12930,52 @@ function(k,v,G){if(null!=k&&0<k.length&&null!=v&&0<v.length){var N=k.toLowerCase
G):G()),null!=v&&v.appendChild(O.elt)):null!=G&&G()}else null!=G&&G()}else null!=G&&G();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var G=k[v].getAttribute("data-font-src");if(null!=G){var N="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=N&&Graph.addFont(N,G)}}};Graph.processFontStyle=function(k){if(null!=
k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var G=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=G)try{Graph.addFont(G,decodeURIComponent(v))}catch(N){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";
Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(O){v=O}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",
-function(O){v=null});this.isMouseInsertPoint=function(){return null!=v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var Q=this.graph.getCellStyle(O);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
-S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var u=mxSvgCanvas2D.prototype.updateTextNodes;
-mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,N,O,Q,S,V,W,X,Z,Y){u.apply(this,arguments);Graph.processFontAttributes(Y)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,N){function O(){for(var ba=V.getSelectionCells(),ha=[],aa=0;aa<ba.length;aa++)V.isCellVisible(ba[aa])&&ha.push(ba[aa]);V.setSelectionCells(ha)}function Q(ba){V.setHiddenTags(ba?
-[]:W.slice());O();V.refresh()}function S(ba,ha){Z.innerText="";if(0<ba.length){var aa=document.createElement("table");aa.setAttribute("cellpadding","2");aa.style.boxSizing="border-box";aa.style.tableLayout="fixed";aa.style.width="100%";var ia=document.createElement("tbody");if(null!=ba&&0<ba.length)for(var fa=0;fa<ba.length;fa++)(function(da){function za(){var qa=V.getCellsForTags([da],null,null,!0);V.isEnabled()?V.setSelectionCells(qa):V.highlightCells(qa,null,null,70)}var va=0>mxUtils.indexOf(V.hiddenTags,
-da),oa=document.createElement("tr"),Ba=document.createElement("td");Ba.style.align="center";Ba.style.width="16px";var ma=document.createElement("img");ma.setAttribute("src",va?Editor.visibleImage:Editor.hiddenImage);ma.setAttribute("title",mxResources.get(va?"hideIt":"show",[da]));mxUtils.setOpacity(ma,va?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";Ba.appendChild(ma);
-mxEvent.addListener(ma,"click",function(qa){mxEvent.isShiftDown(qa)?Q(0<=mxUtils.indexOf(V.hiddenTags,da)):(V.toggleHiddenTag(da),O(),V.refresh());mxEvent.consume(qa)});oa.appendChild(Ba);Ba=document.createElement("td");Ba.style.align="center";Ba.style.width="16px";ma=document.createElement("img");ma.setAttribute("src",Editor.selectImage);ma.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ma,va?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor=
-"pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(qa){Q(!0);za();mxEvent.consume(qa)});Ba.appendChild(ma);oa.appendChild(Ba);Ba=document.createElement("td");Ba.style.overflow="hidden";Ba.style.whiteSpace="nowrap";Ba.style.textOverflow="ellipsis";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.setAttribute("title",da);a=document.createElement("a");mxUtils.write(a,da);a.style.textOverflow="ellipsis";a.style.position=
-"relative";mxUtils.setOpacity(a,va?100:40);Ba.appendChild(a);mxEvent.addListener(Ba,"click",function(qa){if(mxEvent.isShiftDown(qa))Q(!0),za();else if(va&&0<V.hiddenTags.length)Q(!0);else{var la=W.slice(),Fa=mxUtils.indexOf(la,da);la.splice(Fa,1);V.setHiddenTags(la);O();V.refresh()}mxEvent.consume(qa)});oa.appendChild(Ba);if(V.isEnabled()){Ba=document.createElement("td");Ba.style.verticalAlign="middle";Ba.style.textAlign="center";Ba.style.width="18px";if(null==ha){Ba.style.align="center";Ba.style.width=
-"16px";ma=document.createElement("img");ma.setAttribute("src",Editor.trashImage);ma.setAttribute("title",mxResources.get("removeIt",[da]));mxUtils.setOpacity(ma,va?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(qa){var la=mxUtils.indexOf(W,da);0<=la&&W.splice(la,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[da]);
+function(O){v=null});this.isMouseInsertPoint=function(){return null!=v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var P=this.graph.getCellStyle(O);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
+S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=P.marginTop||0;S.marginBottom=P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var u=mxSvgCanvas2D.prototype.updateTextNodes;
+mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,N,O,P,S,V,W,X,Z,Y){u.apply(this,arguments);Graph.processFontAttributes(Y)};var z=mxText.prototype.redraw;mxText.prototype.redraw=function(){z.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,N){function O(){for(var ba=V.getSelectionCells(),ha=[],aa=0;aa<ba.length;aa++)V.isCellVisible(ba[aa])&&ha.push(ba[aa]);V.setSelectionCells(ha)}function P(ba){V.setHiddenTags(ba?
+[]:W.slice());O();V.refresh()}function S(ba,ha){Z.innerText="";if(0<ba.length){var aa=document.createElement("table");aa.setAttribute("cellpadding","2");aa.style.boxSizing="border-box";aa.style.tableLayout="fixed";aa.style.width="100%";var ia=document.createElement("tbody");if(null!=ba&&0<ba.length)for(var fa=0;fa<ba.length;fa++)(function(da){function za(){var qa=V.getCellsForTags([da],null,null,!0);V.isEnabled()?V.setSelectionCells(qa):V.highlightCells(qa,null,null,70)}var ua=0>mxUtils.indexOf(V.hiddenTags,
+da),na=document.createElement("tr"),Ba=document.createElement("td");Ba.style.align="center";Ba.style.width="16px";var ma=document.createElement("img");ma.setAttribute("src",ua?Editor.visibleImage:Editor.hiddenImage);ma.setAttribute("title",mxResources.get(ua?"hideIt":"show",[da]));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";Ba.appendChild(ma);
+mxEvent.addListener(ma,"click",function(qa){mxEvent.isShiftDown(qa)?P(0<=mxUtils.indexOf(V.hiddenTags,da)):(V.toggleHiddenTag(da),O(),V.refresh());mxEvent.consume(qa)});na.appendChild(Ba);Ba=document.createElement("td");Ba.style.align="center";Ba.style.width="16px";ma=document.createElement("img");ma.setAttribute("src",Editor.selectImage);ma.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor=
+"pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(qa){P(!0);za();mxEvent.consume(qa)});Ba.appendChild(ma);na.appendChild(Ba);Ba=document.createElement("td");Ba.style.overflow="hidden";Ba.style.whiteSpace="nowrap";Ba.style.textOverflow="ellipsis";Ba.style.verticalAlign="middle";Ba.style.cursor="pointer";Ba.setAttribute("title",da);a=document.createElement("a");mxUtils.write(a,da);a.style.textOverflow="ellipsis";a.style.position=
+"relative";mxUtils.setOpacity(a,ua?100:40);Ba.appendChild(a);mxEvent.addListener(Ba,"click",function(qa){if(mxEvent.isShiftDown(qa))P(!0),za();else if(ua&&0<V.hiddenTags.length)P(!0);else{var la=W.slice(),Fa=mxUtils.indexOf(la,da);la.splice(Fa,1);V.setHiddenTags(la);O();V.refresh()}mxEvent.consume(qa)});na.appendChild(Ba);if(V.isEnabled()){Ba=document.createElement("td");Ba.style.verticalAlign="middle";Ba.style.textAlign="center";Ba.style.width="18px";if(null==ha){Ba.style.align="center";Ba.style.width=
+"16px";ma=document.createElement("img");ma.setAttribute("src",Editor.trashImage);ma.setAttribute("title",mxResources.get("removeIt",[da]));mxUtils.setOpacity(ma,ua?75:25);ma.className="geAdaptiveAsset";ma.style.verticalAlign="middle";ma.style.cursor="pointer";ma.style.width="16px";if(v||Editor.isDarkMode())ma.style.filter="invert(100%)";mxEvent.addListener(ma,"click",function(qa){var la=mxUtils.indexOf(W,da);0<=la&&W.splice(la,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[da]);
V.refresh();mxEvent.consume(qa)});Ba.appendChild(ma)}else{var ta=document.createElement("input");ta.setAttribute("type","checkbox");ta.style.margin="0px";ta.defaultChecked=null!=ha&&0<=mxUtils.indexOf(ha,da);ta.checked=ta.defaultChecked;ta.style.background="transparent";ta.setAttribute("title",mxResources.get(ta.defaultChecked?"removeIt":"add",[da]));mxEvent.addListener(ta,"change",function(qa){ta.checked?V.addTagsForCells(V.getSelectionCells(),[da]):V.removeTagsForCells(V.getSelectionCells(),[da]);
-mxEvent.consume(qa)});Ba.appendChild(ta)}oa.appendChild(Ba)}ia.appendChild(oa)})(ba[fa]);aa.appendChild(ia);Z.appendChild(aa)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top=
+mxEvent.consume(qa)});Ba.appendChild(ta)}na.appendChild(Ba)}ia.appendChild(na)})(ba[fa]);aa.appendChild(ia);Z.appendChild(aa)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top=
"0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});var Y=mxUtils.bind(this,function(ba,ha){if(k()){ba=V.getAllTags();for(ha=0;ha<ba.length;ha++)0>mxUtils.indexOf(W,ba[ha])&&W.push(ba[ha]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,Y);V.model.addListener(mxEvent.CHANGE,Y);V.addListener(mxEvent.REFRESH,Y);var ea=document.createElement("div");ea.className=
"geToolbarContainer geDialogToolbar";ea.style.position="absolute";ea.style.display="flex";ea.style.bottom="0px";ea.style.left="0px";ea.style.right="0px";ea.style.height="32px";ea.style.overflow="hidden";ea.style.padding="3px 4px 4px 4px";ea.style.borderWidth="1px 0px 0px 0px";ea.style.borderStyle="solid";ea.style.whiteSpace="nowrap";if(V.isEnabled()){Z.style.bottom="32px";var ca=document.createElement("a");ca.className="geButton";var ka=ca.cloneNode(!1);ka.style.backgroundImage="url("+Editor.visibleImage+
")";ka.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ka,"click",function(ba){V.setHiddenTags([]);mxEvent.isShiftDown(ba)||(W=V.hiddenTags.slice());O();V.refresh();mxEvent.consume(ba)});ea.appendChild(ka);null!=G&&(ca=ca.cloneNode(!1),ca.style.backgroundImage="url("+Editor.plusImage+")",ca.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ca,"click",function(ba){G(W,function(ha){W=ha;Y()});mxEvent.consume(ba)}),ea.appendChild(ca));X.appendChild(ea)}null!=N&&ea.appendChild(N);
-return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,Q=0;Q<N.length;Q++)N[Q].getAttribute("face")==G&&(O=!0,N[Q].setAttribute("face",k),null!=v?N[Q].setAttribute("data-font-src",
-v):N[Q].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=
+return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,P=0;P<N.length;P++)N[P].getAttribute("face")==G&&(O=!0,N[P].setAttribute("face",k),null!=v?N[P].setAttribute("data-font-src",
+v):N[P].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var E=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return E.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=
k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=D.apply(this,arguments);null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,N,O,Q,S,V,W,X,Z,Y,ea,ca,ka,ba){var ha=A.apply(this,arguments);if(null!=Y){var aa=ha.getAttribute("style");null==aa&&(aa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ha.setAttribute("style",aa+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();
-if(Z&&0<ia.length){var fa=ha.ownerDocument;aa=null!=fa.createElementNS?fa.createElementNS(mxConstants.NS_SVG,"style"):fa.createElement("style");null!=fa.setAttributeNS?aa.setAttributeNS("type","text/css"):aa.setAttribute("type","text/css");for(var da="",za="",va=0;va<ia.length;va++){var oa=ia[va].name,Ba=ia[va].url;Graph.isCssFontUrl(Ba)?da+="@import url("+Graph.rewriteGoogleFontUrl(Ba)+");\n":za+='@font-face {\nfont-family: "'+oa+'";\nsrc: url("'+Ba+'");\n}\n'}aa.appendChild(fa.createTextNode(da+
-za));ha.getElementsByTagName("defs")[0].appendChild(aa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ha);this.mathEnabled&&(document.body.appendChild(ha),Editor.MathJaxRender(ha),ha.parentNode.removeChild(ha),aa=ha.ownerDocument.getElementById("MJX-SVG-styles"),null!=aa&&ha.getElementsByTagName("defs")[0].appendChild(aa.cloneNode(!0)));return ha};var P=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){P.apply(this,
+(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,N,O,P,S,V,W,X,Z,Y,ea,ca,ka,ba){var ha=A.apply(this,arguments);if(null!=Y){var aa=ha.getAttribute("style");null==aa&&(aa="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;ha.setAttribute("style",aa+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();
+if(Z&&0<ia.length){var fa=ha.ownerDocument;aa=null!=fa.createElementNS?fa.createElementNS(mxConstants.NS_SVG,"style"):fa.createElement("style");null!=fa.setAttributeNS?aa.setAttributeNS("type","text/css"):aa.setAttribute("type","text/css");for(var da="",za="",ua=0;ua<ia.length;ua++){var na=ia[ua].name,Ba=ia[ua].url;Graph.isCssFontUrl(Ba)?da+="@import url("+Graph.rewriteGoogleFontUrl(Ba)+");\n":za+='@font-face {\nfont-family: "'+na+'";\nsrc: url("'+Ba+'");\n}\n'}aa.appendChild(fa.createTextNode(da+
+za));ha.getElementsByTagName("defs")[0].appendChild(aa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ha);this.mathEnabled&&(document.body.appendChild(ha),Editor.MathJaxRender(ha),ha.parentNode.removeChild(ha),aa=ha.ownerDocument.getElementById("MJX-SVG-styles"),null!=aa&&ha.getElementsByTagName("defs")[0].appendChild(aa.cloneNode(!0)));return ha};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Q.apply(this,
arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var T=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return T.apply(this,arguments)};
mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var G=k.view.scale,N=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==N&&v.scale==G||(v.bounds=k,v.value=N,v.scale=
-G,v.redraw())}};var L=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();L.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var U=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){U.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=
+G,v.redraw())}};var M=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();M.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var U=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){U.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=
function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=
-!0;var N=!1,O=0,Q=0,S=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<O&&O--;0==O&&X()}),X=mxUtils.bind(this,function(){if(Q<k.length){var Z=this.stoppingCustomActions,Y=k[Q++],ea=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
+!0;var N=!1,O=0,P=0,S=mxUtils.bind(this,function(){N||(N=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<O&&O--;0==O&&X()}),X=mxUtils.bind(this,function(){if(P<k.length){var Z=this.stoppingCustomActions,Y=k[P++],ea=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=
this.pendingExecuteNextAction=null;W()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,
!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ea=ea.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ea=ea.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ca=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ca),1);this.setCellsVisible(ca,!0)}null!=Y.hide&&(S(),ca=this.getCellsForAction(Y.hide,
!0),Graph.setOpacityForNodes(this.getNodesForCells(ca),0),this.setCellsVisible(ca,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ca=[];null!=Y.select&&this.isEnabled()&&(ca=this.getCellsForAction(Y.select),this.setSelectionCells(ca));
null!=Y.highlight&&(ca=this.getCellsForAction(Y.highlight),this.highlightCells(ca,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ca=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ca.length&&this.scrollCellToVisible(ca[0]);null!=G&&null!=Y.explore&&Graph.exploreFromCell(this,G,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ka=Y.tags.toggle;0==ka.length&&(ka=this.getAllTags());for(ca=0;ca<ka.length;ca++)this.toggleHiddenTag(ka[ca])}ka=
null;null!=Y.tags.hidden&&(null==ka&&(ka=[]),ka=ka.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ka&&(ka=[]);var ba=this.getAllTags();for(ca=0;ca<ba.length;ca++)0>mxUtils.indexOf(Y.tags.visible,ba[ca])&&0>mxUtils.indexOf(ka,ba[ca])&&ka.push(ba[ca])}null!=ka&&this.setHiddenTags(ka);this.refresh()}0<ea.length&&(O++,this.executeAnimations(ea,W,Z?1:Y.steps,Z?0:Y.delay));0==O?X():V()}else this.stoppingCustomActions=this.executingCustomActions=!1,V(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=
-function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var O=N.getElementsByTagName("a"),Q=!1,S=0;S<O.length;S++)G=O[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(k,G)),Q=!0);Q&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=
+function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var N=document.createElement("div");N.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var O=N.getElementsByTagName("a"),P=!1,S=0;S<O.length;S++)G=O[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(k,G)),P=!0);P&&this.labelChanged(v,N.innerHTML)}};Graph.prototype.updateCustomLink=
function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(N){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var N=v[G],O;for(O in N)this.updateCustomLinkAction(k,N[O],"cells"),this.updateCustomLinkAction(k,N[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var N=
-[],O=0;O<v[G].length;O++)if("*"==v[G][O])N.push(v[G][O]);else{var Q=k[v[G][O]];null!=Q?""!=Q&&N.push(Q):N.push(v[G][O])}v[G]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&G.push(v[N]);v=G}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(Q){return Q!=
+[],O=0;O<v[G].length;O++)if("*"==v[G][O])N.push(v[G][O]);else{var P=k[v[G][O]];null!=P?""!=P&&N.push(P):N.push(v[G][O])}v[G]=N}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],N=0;N<v.length;N++)0>k.excludeCells.indexOf(v[N].id)&&G.push(v[N]);v=G}return v};Graph.prototype.getCellsById=function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var N=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(P){return P!=
N},N))}else{var O=this.model.getCell(k[G]);null!=O&&v.push(O)}return v};var n=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return n.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,G,N){var O=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,Q++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==
-this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<Q;Z++)null!=S[W[Z]]&&X++;X=X==Q}X&&(1!=N||this.isCellVisible(v[V]))&&O.push(v[V])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],N=0;N<k.length;N++){var O=this.getTagsForCell(k[N]);
-G=[];if(0<O.length){O=O.split(" ");for(var Q={},S=0;S<O.length;S++)if(null==v||null!=v[O[S]])Q[O[S]]=!0,G.push(O[S]);v=Q}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},N=0;N<k.length;N++){var O=this.getTagsForCell(k[N]);if(0<O.length){O=O.split(" ");for(var Q=0;Q<O.length;Q++)null==G[O[Q]]&&(G[O[Q]]=!0,v.push(O[Q]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<
-k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var N=this.getTagsForCell(k[G]),O=N.split(" "),Q=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(O,V)&&(N=0<N.length?N+" "+V:V,Q=!0)}Q&&this.setAttributeForCell(k[G],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var N=this.getTagsForCell(k[G]);if(0<N.length){for(var O=
-N.split(" "),Q=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(O,v[S]);0<=V&&(O.splice(V,1),Q=!0)}Q&&this.setAttributeForCell(k[G],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(k,v,G,N){for(var O=0;O<k.length;O++)this.highlightCell(k[O],v,G,N)};Graph.prototype.highlightCell=function(k,v,G,N,O){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var Q=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),Q=new mxCellHighlight(this,v,O,!1),null!=N&&(Q.opacity=N),Q.highlight(k),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,
-"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},G));return Q};Graph.prototype.addSvgShadow=function(k,v,G,N){G=null!=G?G:!1;N=null!=N?N:!0;var O=k.ownerDocument,Q=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in",
-"SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",
-this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in",
-"SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=S[0];O.appendChild(Q);G||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
-6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=null!=v?v:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),v&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,G,N){var O=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,P++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==
+this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<P;Z++)null!=S[W[Z]]&&X++;X=X==P}X&&(1!=N||this.isCellVisible(v[V]))&&O.push(v[V])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],N=0;N<k.length;N++){var O=this.getTagsForCell(k[N]);
+G=[];if(0<O.length){O=O.split(" ");for(var P={},S=0;S<O.length;S++)if(null==v||null!=v[O[S]])P[O[S]]=!0,G.push(O[S]);v=P}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},N=0;N<k.length;N++){var O=this.getTagsForCell(k[N]);if(0<O.length){O=O.split(" ");for(var P=0;P<O.length;P++)null==G[O[P]]&&(G[O[P]]=!0,v.push(O[P]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<
+k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var N=this.getTagsForCell(k[G]),O=N.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(O,V)&&(N=0<N.length?N+" "+V:V,P=!0)}P&&this.setAttributeForCell(k[G],"tags",N)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var N=this.getTagsForCell(k[G]);if(0<N.length){for(var O=
+N.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(O,v[S]);0<=V&&(O.splice(V,1),P=!0)}P&&this.setAttributeForCell(k[G],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(k,v,G,N){for(var O=0;O<k.length;O++)this.highlightCell(k[O],v,G,N)};Graph.prototype.highlightCell=function(k,v,G,N,O){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var P=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),P=new mxCellHighlight(this,v,O,!1),null!=N&&(P.opacity=N),P.highlight(k),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,
+"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},G));return P};Graph.prototype.addSvgShadow=function(k,v,G,N){G=null!=G?G:!1;N=null!=N?N:!0;var O=k.ownerDocument,P=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");P.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in",
+"SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",
+this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in",
+"SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=S[0];O.appendChild(P);G||(v=null!=v?v:k.getElementsByTagName("g")[0],null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&N&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=null!=v?v:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),v&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),v=0;do var G=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(G),"locked","0"));null!=G&&this.setDefaultParent(G)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+
"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=
[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/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+
@@ -12991,8 +12989,8 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,
-2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var t=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,N,O,Q,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return t.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,G,N,O,Q){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,
-this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G,N){function O(){ka.value=Math.max(1,Math.min(Z,Math.max(parseInt(ka.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(Z,Math.min(parseInt(ka.value),parseInt(ca.value))))}function Q(Ga){k.lastPrintPagesRadioChecked=ea.checked;k.lastPrintSelectionOnlyChecked=ha.checked;k.lastPrintCropRadioChecked=ia.checked;k.lastPrintFitRadioChecked=fa.checked;ea.checked&&ca.value<ka.value?(k.lastPrintPagesFromInput=ca.value,
+2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var t=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,N,O,P,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return t.apply(this,arguments)};var C=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,v,G,N,O,P){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke));return C.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G,N){function O(){ka.value=Math.max(1,Math.min(Z,Math.max(parseInt(ka.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(Z,Math.min(parseInt(ka.value),parseInt(ca.value))))}function P(Ga){k.lastPrintPagesRadioChecked=ea.checked;k.lastPrintSelectionOnlyChecked=ha.checked;k.lastPrintCropRadioChecked=ia.checked;k.lastPrintFitRadioChecked=fa.checked;ea.checked&&ca.value<ka.value?(k.lastPrintPagesFromInput=ca.value,
k.lastPrintPagesToInput=ka.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);Ca.value=Math.max(1,Math.min(1600,parseInt(Ca.value)))+"%";k.lastPrintZoom=Ca.value;k.lastPrintBorder=wa.value;k.lastPrintGrid=xa.checked;k.lastPrintTransparent=Da.checked;k.lastPrintInclude=Aa.checked;k.lastPrintSheetsAcross=la.value;k.lastPrintSheetsDown=Fa.value;var ya={};ya.border=parseInt(wa.value);ya.scale=parseInt(Ca.value)/100;ya.grid=xa.checked;ya.transparent=Da.checked;ya.includeCopy=Aa.checked;
ya.sheetsAcross=parseInt(la.value);ya.sheetsDown=parseInt(Fa.value);ya.pagesFrom=parseInt(ca.value);ya.pagesTo=parseInt(ka.value);ya.allPages=Y.checked;ya.selection=ha.checked;ya.pageView=aa.checked;ya.crop=ia.checked;ya.fit=fa.checked;return null!=G?G(!Ga,ya):k.print(!Ga,ya)}var S=k.editor.graph,V=document.createElement("div"),W=document.createElement("h3");W.style.width="100%";W.style.textAlign="center";W.style.marginTop="0px";mxUtils.write(W,v||mxResources.get("print"));V.appendChild(W);var X=
1,Z=1;W=document.createElement("div");W.style.whiteSpace="nowrap";var Y=document.createElement("input");Y.style.marginRight="8px";Y.style.marginBottom="8px";Y.setAttribute("type","radio");Y.setAttribute("name","pages-printdialog");W.appendChild(Y);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){Y.checked=!0});W.appendChild(v);mxUtils.br(W);var ea=Y.cloneNode(!0);W.appendChild(ea);v=document.createElement("span");mxUtils.write(v,
@@ -13002,22 +13000,22 @@ function(Ga){ca.value=X;ka.value=X;ea.checked=!0});ba.setAttribute("title",mxRes
"pages-printdialog");ha.setAttribute("type",1==Z?"checkbox":"radio");ha.style.marginRight="8px";S.isSelectionEmpty()&&ha.setAttribute("disabled","disabled");S.isEnabled()&&(W.appendChild(ha),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),W.appendChild(v));(S.isEnabled()||1<Z)&&V.appendChild(W);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?ea.checked=!0:!S.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?ha.checked=!0:Y.checked=!0;S.isSelectionEmpty()||mxEvent.addListener(v,
"click",function(){ha.checked=!ha.checked});S=document.createElement("div");S.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");S.appendChild(aa);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));S.appendChild(v);mxEvent.addListener(S,"click",function(){aa.checked=!0});V.appendChild(S);S=document.createElement("div");S.style.whiteSpace=
"nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");S.appendChild(ia);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));S.appendChild(v);mxEvent.addListener(S,"click",function(){ia.checked=!0});V.appendChild(S);S=document.createElement("div");S.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.style.marginBottom="8px";fa.style.marginRight=
-"8px";fa.setAttribute("type","radio");fa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(fa);S.appendChild(v);W=document.createElement("table");W.style.display="inline-block";W.style.borderSpacing="0";ba=document.createElement("tbody");var da=document.createElement("tr"),za=da.cloneNode(!0),va=document.createElement("td"),oa=va.cloneNode(!0),Ba=va.cloneNode(!0),ma=va.cloneNode(!0),ta=
-va.cloneNode(!0),qa=va.cloneNode(!0);va.style.textAlign="right";ma.style.textAlign="right";mxUtils.write(va,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(Ga){mxEvent.getSource(Ga)!=fa&&(fa.checked=!fa.checked)});var la=document.createElement("input");la.style.margin="0 2px";la.style.boxSizing="border-box";la.setAttribute("value",k.lastPrintSheetsAcross||"1");la.setAttribute("min","1");la.setAttribute("type","number");la.style.width="40px";oa.appendChild(la);v=document.createElement("span");
+"8px";fa.setAttribute("type","radio");fa.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(fa);S.appendChild(v);W=document.createElement("table");W.style.display="inline-block";W.style.borderSpacing="0";ba=document.createElement("tbody");var da=document.createElement("tr"),za=da.cloneNode(!0),ua=document.createElement("td"),na=ua.cloneNode(!0),Ba=ua.cloneNode(!0),ma=ua.cloneNode(!0),ta=
+ua.cloneNode(!0),qa=ua.cloneNode(!0);ua.style.textAlign="right";ma.style.textAlign="right";mxUtils.write(ua,mxResources.get("fitTo"));mxEvent.addListener(S,"click",function(Ga){mxEvent.getSource(Ga)!=fa&&(fa.checked=!fa.checked)});var la=document.createElement("input");la.style.margin="0 2px";la.style.boxSizing="border-box";la.setAttribute("value",k.lastPrintSheetsAcross||"1");la.setAttribute("min","1");la.setAttribute("type","number");la.style.width="40px";na.appendChild(la);v=document.createElement("span");
mxUtils.write(v,mxResources.get("fitToSheetsAcross"));Ba.appendChild(v);mxUtils.write(ma,mxResources.get("fitToBy"));var Fa=la.cloneNode(!0);Fa.setAttribute("value",k.lastPrintSheetsDown||"1");ta.appendChild(Fa);mxEvent.addListener(la,"click",function(Ga){fa.checked=!0;mxEvent.consume(Ga)});mxEvent.addListener(Fa,"click",function(Ga){fa.checked=!0;mxEvent.consume(Ga)});k.lastPrintCropRadioChecked?ia.checked=!0:k.lastPrintFitRadioChecked?fa.checked=!0:aa.checked=!0;v=document.createElement("span");
-mxUtils.write(v,mxResources.get("fitToSheetsDown"));qa.appendChild(v);da.appendChild(va);da.appendChild(oa);da.appendChild(Ba);za.appendChild(ma);za.appendChild(ta);za.appendChild(qa);ba.appendChild(da);ba.appendChild(za);W.appendChild(ba);S.appendChild(W);V.appendChild(S);S=document.createElement("div");S.style.borderTop="1px solid lightGray";S.style.whiteSpace="nowrap";S.style.paddingTop="12px";S.style.marginTop="12px";S.style.paddingLeft="8px";mxUtils.write(S,mxResources.get("borderWidth")+":");
+mxUtils.write(v,mxResources.get("fitToSheetsDown"));qa.appendChild(v);da.appendChild(ua);da.appendChild(na);da.appendChild(Ba);za.appendChild(ma);za.appendChild(ta);za.appendChild(qa);ba.appendChild(da);ba.appendChild(za);W.appendChild(ba);S.appendChild(W);V.appendChild(S);S=document.createElement("div");S.style.borderTop="1px solid lightGray";S.style.whiteSpace="nowrap";S.style.paddingTop="12px";S.style.marginTop="12px";S.style.paddingLeft="8px";mxUtils.write(S,mxResources.get("borderWidth")+":");
var wa=document.createElement("input");wa.setAttribute("type","number");wa.setAttribute("min","0");wa.style.width="40px";wa.style.marginLeft="4px";wa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;S.appendChild(wa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");S.appendChild(v);var Ca=document.createElement("input");Ca.style.width="60px";Ca.style.marginLeft="4px";Ca.value=null!=k.lastPrintZoom?k.lastPrintZoom:
"100%";S.appendChild(Ca);mxUtils.br(S);var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="12px";xa.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;S.appendChild(xa);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));S.appendChild(v);mxEvent.addListener(v,"click",function(Ga){xa.checked=!0;mxEvent.consume(Ga)});var Da=document.createElement("input");Da.setAttribute("type","checkbox");
Da.style.marginTop="10px";Da.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(S.appendChild(Da),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),S.appendChild(v),mxEvent.addListener(v,"click",function(Ga){Da.checked=!0;mxEvent.consume(Ga)}));var Aa=document.createElement("input");Aa.setAttribute("type","checkbox");Aa.style.marginTop="10px";Aa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;
null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(S),S.appendChild(Aa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),S.appendChild(v),mxEvent.addListener(v,"click",function(Ga){Aa.checked=!0;mxEvent.consume(Ga)}));V.appendChild(S);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign="right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
-S=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});S.className="geBtn";k.editor.cancelFirst&&v.appendChild(S);PrintDialog.previewEnabled&&null==G&&(W=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),Q(!1)}catch(Ga){k.handleError(Ga)}}),W.className="geBtn",v.appendChild(W));N=null!=N?N:null!=G?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),Q(!0)}catch(Ga){k.handleError(Ga)}});N.className=
+S=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});S.className="geBtn";k.editor.cancelFirst&&v.appendChild(S);PrintDialog.previewEnabled&&null==G&&(W=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),P(!1)}catch(Ga){k.handleError(Ga)}}),W.className="geBtn",v.appendChild(W));N=null!=N?N:null!=G?"export":PrintDialog.previewEnabled?"print":"ok";N=mxUtils.button(mxResources.get(N),function(){try{k.hideDialog(),P(!0)}catch(Ga){k.handleError(Ga)}});N.className=
"geBtn gePrimaryBtn";v.appendChild(N);k.editor.cancelFirst||v.appendChild(S);V.appendChild(v);if(k.editor.isChromelessView()){var Ja=function(){Editor.isDarkMode()?(V.classList.add("geDarkMode"),V.style.colorScheme="dark"):(V.classList.remove("geDarkMode"),V.style.colorScheme="light")};k.addListener("darkModeChanged",Ja);Ja();var Ka=function(Ga,ya){Ga=ya.getProperty("dialog");V.parentNode==Ga.container&&(k.editor.removeListener(Ka),k.removeListener(Ja))};k.editor.addListener("hideDialog",Ka)}this.container=
V};var F=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else F.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),
this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var J=document.createElement("canvas"),K=new Image;K.onload=function(){try{J.getContext("2d").drawImage(K,0,0);var k=J.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(v){}};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(k){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.5";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -13027,7 +13025,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var e=[],g=0;g<c.length;g++)e.push(c[g]);for(g=0;g<e.length;g++)EditorUi.replaceSvgImage(e[g])};EditorUi.replaceSvgImage=function(c){try{var e=null;e=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var g=EditorUi.getSvgSubtree(e);if(null!=g&&"svg"==g.nodeName){g.setAttribute("x",c.getAttribute("x"));g.setAttribute("y",c.getAttribute("y"));g.setAttribute("width",c.getAttribute("width"));g.setAttribute("height",c.getAttribute("height"));g.style.fontFamily=
"initial";var l=mxUtils.createElementNs(g.ownerDocument,mxConstants.NS_SVG,"g");l.appendChild(g);c.hasAttribute("transform")&&l.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(l,c)}}catch(p){}};EditorUi.getSvgSubtree=function(c){var e=Graph.getSvgFromDataUri(c);c=null;if(null!=e){c=Graph.sanitizeNode(mxUtils.parseXml(e).documentElement);e=c.getElementsByTagName("style");if(0<e.length){var g="svg-image-"+Editor.guid();c.setAttribute("id",g);for(var l=document.implementation.createHTMLDocument(""),
-p=document.createElement("style"),u=0;u<e.length;u++){p.textContent=e[u].textContent;l.body.appendChild(p);for(var z="",E=0;E<p.sheet.cssRules.length;E++){var D=p.sheet.cssRules[E];if(null!=D.selectorText){for(var A=D.selectorText.split(","),P=0;P<A.length;P++)A[P]="#"+g+" "+A[P];D.selectorText=A.join(",")}z+=D.cssText+"\n"}e[u].textContent=z}}e=c.getElementsByTagName("*");for(g=0;g<e.length;g++)e[g].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+p=document.createElement("style"),u=0;u<e.length;u++){p.textContent=e[u].textContent;l.body.appendChild(p);for(var z="",E=0;E<p.sheet.cssRules.length;E++){var D=p.sheet.cssRules[E];if(null!=D.selectorText){for(var A=D.selectorText.split(","),Q=0;Q<A.length;Q++)A[Q]="#"+g+" "+A[Q];D.selectorText=A.join(",")}z+=D.cssText+"\n"}e[u].textContent=z}}e=c.getElementsByTagName("*");for(g=0;g<e.length;g++)e[g].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(p){}try{var e=document.createElement("canvas"),
@@ -13037,10 +13035,10 @@ EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};Editor
function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var e=this.editor.graph;e.mathEnabled=c;null!=e.view.backgroundImage&&(e.view.backgroundImage.destroy(),e.view.backgroundImage=null);this.editor.updateGraphComponents();e.refresh();e.defaultMathEnabled=
c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};
EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,g){var l=null==c||null==e;g=null!=g?g:24;var p=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
-hwaccel:!1,zIndex:2E9}),u=this.timeout,z=p.spin,E=null,D=null,A=mxUtils.bind(this,function(T){null!=T&&T()}),P=this;p.spin=function(T,L,U,n){n=null!=n?n:u;var t=!1;if(!this.active){var B=Date.now();null!=U&&(E=window.setTimeout(function(){p.stop();E=null;U({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},n));l&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=
-P.diagramContainer,c=T.scrollLeft+T.clientWidth/2,e=T.scrollTop+T.clientHeight/2);z.call(this,T);"1"==urlParams.embedInline&&null!=p.el&&(p.el.style.marginTop=T.scrollTop+"px",p.el.style.marginLeft=T.scrollLeft+"px");this.active=!0;null!=L&&(t=document.createElement("div"),t.className="geSpinnerStatus",t.style.position="absolute",t.style.whiteSpace="nowrap",t.style.background="#4B4243",t.style.color="white",t.style.fontFamily=Editor.defaultHtmlFont,t.style.fontSize="9pt",t.style.padding="6px",t.style.paddingLeft=
-"10px",t.style.paddingRight="10px",t.style.zIndex=2E9,t.style.left=Math.max(0,c)+"px",t.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(t.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(t.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=L.substring(L.length-3,L.length)&&"!"!=L.charAt(L.length-1)&&(L+="..."),t.innerText=L,T.appendChild(t),p.status=t);this.pause=mxUtils.bind(this,function(){var F=
-A;this.active&&(n=Math.max(0,n-(Date.now()-B)),F=mxUtils.bind(this,function(J){this.spin(T,L,U,n);if(null!=J)try{J(),D=mxUtils.bind(this,function(){this.spin(T,L,U,n);try{J()}catch(K){null!=U&&U(K)}})}catch(K){null!=U&&U(K)}}));this.stop();return F});t=!0}return t};var R=p.stop;p.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status),p.status=null)};p.pause=function(){return A};
+hwaccel:!1,zIndex:2E9}),u=this.timeout,z=p.spin,E=null,D=null,A=mxUtils.bind(this,function(T){null!=T&&T()}),Q=this;p.spin=function(T,M,U,n){n=null!=n?n:u;var t=!1;if(!this.active){var C=Date.now();null!=U&&(E=window.setTimeout(function(){p.stop();E=null;U({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},n));l&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);T==document.body&&"1"==urlParams.embedInline&&(T=
+Q.diagramContainer,c=T.scrollLeft+T.clientWidth/2,e=T.scrollTop+T.clientHeight/2);z.call(this,T);"1"==urlParams.embedInline&&null!=p.el&&(p.el.style.marginTop=T.scrollTop+"px",p.el.style.marginLeft=T.scrollLeft+"px");this.active=!0;null!=M&&(t=document.createElement("div"),t.className="geSpinnerStatus",t.style.position="absolute",t.style.whiteSpace="nowrap",t.style.background="#4B4243",t.style.color="white",t.style.fontFamily=Editor.defaultHtmlFont,t.style.fontSize="9pt",t.style.padding="6px",t.style.paddingLeft=
+"10px",t.style.paddingRight="10px",t.style.zIndex=2E9,t.style.left=Math.max(0,c)+"px",t.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(t.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(t.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(t.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=M.substring(M.length-3,M.length)&&"!"!=M.charAt(M.length-1)&&(M+="..."),t.innerText=M,T.appendChild(t),p.status=t);this.pause=mxUtils.bind(this,function(){var F=
+A;this.active&&(n=Math.max(0,n-(Date.now()-C)),F=mxUtils.bind(this,function(J){this.spin(T,M,U,n);if(null!=J)try{J(),D=mxUtils.bind(this,function(){this.spin(T,M,U,n);try{J()}catch(K){null!=U&&U(K)}})}catch(K){null!=U&&U(K)}}));this.stop();return F});t=!0}return t};var R=p.stop;p.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status),p.status=null)};p.pause=function(){return A};
return p};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&
177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&
120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,l=this.editor.graph,p=this;e.getFunction=function(u){if(l.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var z=p.getSelectedPageIndex();if(mxEvent.isShiftDown(u)){if(37==u.keyCode)return function(){0<z&&p.movePage(z,z-1)};if(38==u.keyCode)return function(){0<
@@ -13049,13 +13047,13 @@ z&&p.movePage(z,0)};if(39==u.keyCode)return function(){z<p.pages.length-1&&p.mov
l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var p=mxUtils.parseXml(c),u=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=u?mxUtils.getXml(u):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};
EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var g=null!=c?this.editor.extractGraphModel(c,!0):null;null!=g&&(c=g);if(null!=c){g=this.editor.graph;g.model.beginUpdate();try{var l=null!=this.pages?this.pages.slice():null,p=c.getElementsByTagName("diagram");if(1<p.length||1==p.length&&p[0].hasAttribute("name")){this.fileNode=c;this.pages=
null!=this.pages?this.pages:[];for(var u=p.length-1;0<=u;u--){var z=this.updatePageRoot(new DiagramPage(p[u]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[u+1]));g.model.execute(new ChangePage(this,z,0==u?z:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,
-this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(u=0;u<l.length;u++)g.model.execute(new ChangePage(this,l[u],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,l,p,u,z,E,D,A,P,R,T){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;D=null!=D?D:!0;P=null!=
-P?P:!Editor.defaultCompressed;var L=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var U="_blank";else L=U=l;if(null==c)return"";var n=c;if("mxfile"!=n.nodeName.toLowerCase()){if(P){var t=c.ownerDocument.createElement("diagram");t.setAttribute("name",mxResources.get("pageWithNumber",[1]));t.setAttribute("id",Editor.guid());t.appendChild(c)}else{t=Graph.zapGremlins(mxUtils.getXml(c));n=Graph.compress(t);if(Graph.decompress(n)!=t)return t;t=c.ownerDocument.createElement("diagram");
+this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=l)for(u=0;u<l.length;u++)g.model.execute(new ChangePage(this,l[u],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;D=null!=D?D:!0;Q=null!=
+Q?Q:!Editor.defaultCompressed;var M=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var U="_blank";else M=U=l;if(null==c)return"";var n=c;if("mxfile"!=n.nodeName.toLowerCase()){if(Q){var t=c.ownerDocument.createElement("diagram");t.setAttribute("name",mxResources.get("pageWithNumber",[1]));t.setAttribute("id",Editor.guid());t.appendChild(c)}else{t=Graph.zapGremlins(mxUtils.getXml(c));n=Graph.compress(t);if(Graph.decompress(n)!=t)return t;t=c.ownerDocument.createElement("diagram");
t.setAttribute("name",mxResources.get("pageWithNumber",[1]));t.setAttribute("id",Editor.guid());mxUtils.setTextContent(t,n)}n=c.ownerDocument.createElement("mxfile");n.appendChild(t)}A?(n=n.cloneNode(!0),n.removeAttribute("modified"),n.removeAttribute("host"),n.removeAttribute("agent"),n.removeAttribute("etag"),n.removeAttribute("userAgent"),n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.removeAttribute("userAgent"),n.removeAttribute("modified"),n.removeAttribute("version"),
n.removeAttribute("editor"),n.removeAttribute("pages"),n.removeAttribute("type"),n.removeAttribute("etag"),mxClient.IS_CHROMEAPP?n.setAttribute("host","Chrome"):EditorUi.isElectronApp?n.setAttribute("host","Electron"):n.setAttribute("host",window.location.hostname),n.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),n.setAttribute("version",EditorUi.VERSION),1<n.getElementsByTagName("diagram").length&&null!=this.pages&&n.setAttribute("pages",this.pages.length));
-null!=R&&(n=n.cloneNode(!0),n.setAttribute("scale",R));null!=T&&(n=n.cloneNode(!0),n.setAttribute("border",T));c=P?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!u&&!p&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))c=this.getHtml2(mxUtils.getXml(n),e,null!=g?g.getTitle():null,U,L);else if(u||!p&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),g=this.getSvgFileProperties(n),c=this.getEmbeddedSvg(c,e,l,null,E,D,L,null,null,g.scale,
-g.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,g,l){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.defaultCompressed;var p=this.editor.getGraphXml(c,l);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel"),P=0<A.length?A[0]:null;A=D;null==P&&g?(P=mxUtils.getNodeValue(D),0<P.length&&(P=Graph.decompress(P),null!=P&&0<P.length&&(A=D.cloneNode(!1),A.appendChild(mxUtils.parseXml(P).documentElement)))):
-null==P||g?A=D.cloneNode(!0):(A=D.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(P)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(p),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var u=this.pages[e],z=u.node;if(u!=this.currentPage)if(u.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,E,null,
+null!=R&&(n=n.cloneNode(!0),n.setAttribute("scale",R));null!=T&&(n=n.cloneNode(!0),n.setAttribute("border",T));c=Q?mxUtils.getPrettyXml(n):mxUtils.getXml(n);if(!u&&!p&&(z||null!=g&&/(\.html)$/i.test(g.getTitle())))c=this.getHtml2(mxUtils.getXml(n),e,null!=g?g.getTitle():null,U,M);else if(u||!p&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),g=this.getSvgFileProperties(n),c=this.getEmbeddedSvg(c,e,l,null,E,D,M,null,null,g.scale,
+g.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,g,l){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.defaultCompressed;var p=this.editor.getGraphXml(c,l);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(D){var A=D.getElementsByTagName("mxGraphModel"),Q=0<A.length?A[0]:null;A=D;null==Q&&g?(Q=mxUtils.getNodeValue(D),0<Q.length&&(Q=Graph.decompress(Q),null!=Q&&0<Q.length&&(A=D.cloneNode(!1),A.appendChild(mxUtils.parseXml(Q).documentElement)))):
+null==Q||g?A=D.cloneNode(!0):(A=D.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(Q)));p.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(p),p=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var u=this.pages[e],z=u.node;if(u!=this.currentPage)if(u.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(u.root));this.editor.graph.saveViewState(u.viewState,E,null,
l);EditorUi.removeChildNodes(z);z.appendChild(E);delete u.needsUpdate}else l&&(this.updatePageRoot(u),null!=u.viewState.backgroundImage&&(null!=u.viewState.backgroundImage.originalSrc?u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.originalSrc,u):Graph.isPageLink(u.viewState.backgroundImage.src)&&(u.viewState.backgroundImage=this.createImageForPageLink(u.viewState.backgroundImage.src,u))),null!=u.viewState.backgroundImage&&null!=u.viewState.backgroundImage.originalSrc&&
(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(u.root)),this.editor.graph.saveViewState(u.viewState,E,null,l),z=z.cloneNode(!1),z.appendChild(E)));c(z)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],l=0;l<c.length;l++){var p=c.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?g.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?g.push(String.fromCharCode(97+Math.round(25*
Math.random()))):/\s/.test(p)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var g=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(g)}catch(u){c[EditorUi.DIFF_INSERT][e].data=
@@ -13063,9 +13061,9 @@ u.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var l in c[EditorUi.DIFF_UPDATE]
delete p.cells[u]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(p.cells)&&delete p.cells);mxUtils.isEmptyObject(p)&&delete c[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=
0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=
e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),
-this.clearStatus(),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){this.spinner.stop();e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,l,p,u,z,E,D,A,P,R,T){p=null!=p?p:!0;u=null!=u?u:!1;A=null!=A?A:!Editor.defaultCompressed;var L=
-this.editor.graph;if((e||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var U=L.getGlobalVariable;L=this.createTemporaryGraph(L.getStylesheet());L.setBackgroundImage=this.editor.graph.setBackgroundImage;L.background=this.editor.graph.background;var n=null!=this.pages?this.pages[0]:null;null==n||this.currentPage==n?L.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&null!=n.viewState&&L.setBackgroundImage(n.viewState.backgroundImage);
-L.getGlobalVariable=function(t){return"page"==t&&null!=n?n.getName():"pagenumber"==t?1:U.apply(this,arguments)};document.body.appendChild(L.container);null!=n&&L.model.setRoot(n.root)}z=null!=z?z:this.getXmlFileData(p,u,A,P);D=null!=D?D:this.getCurrentFile();c=this.createFileData(z,L,D,window.location.href,c,e,g,l,p,E,A,R,T);L!=this.editor.graph&&L.container.parentNode.removeChild(L.container);return c};EditorUi.prototype.getHtml=function(c,e,g,l,p,u){u=null!=u?u:!0;var z=null,E=EditorUi.drawHost+
+this.clearStatus(),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){this.spinner.stop();e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){p=null!=p?p:!0;u=null!=u?u:!1;A=null!=A?A:!Editor.defaultCompressed;var M=
+this.editor.graph;if((e||!c&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var U=M.getGlobalVariable;M=this.createTemporaryGraph(M.getStylesheet());M.setBackgroundImage=this.editor.graph.setBackgroundImage;M.background=this.editor.graph.background;var n=null!=this.pages?this.pages[0]:null;null==n||this.currentPage==n?M.setBackgroundImage(this.editor.graph.backgroundImage):null!=n.viewState&&null!=n.viewState&&M.setBackgroundImage(n.viewState.backgroundImage);
+M.getGlobalVariable=function(t){return"page"==t&&null!=n?n.getName():"pagenumber"==t?1:U.apply(this,arguments)};document.body.appendChild(M.container);null!=n&&M.model.setRoot(n.root)}z=null!=z?z:this.getXmlFileData(p,u,A,Q);D=null!=D?D:this.getCurrentFile();c=this.createFileData(z,M,D,window.location.href,c,e,g,l,p,E,A,R,T);M!=this.editor.graph&&M.container.parentNode.removeChild(M.container);return c};EditorUi.prototype.getHtml=function(c,e,g,l,p,u){u=null!=u?u:!0;var z=null,E=EditorUi.drawHost+
"/js/embed-static.min.js";if(null!=e){z=u?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var D=e.view.scale;u=Math.floor(z.x/D-e.view.translate.x);D=Math.floor(z.y/D-e.view.translate.y);z=e.background;null==p&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",u);c.setAttribute("y0",D)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),
c.setAttribute("links","1"),null!=l&&c.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";l=Graph.compress(c);Graph.decompress(l)!=c&&(l=encodeURIComponent(c));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>draw.io</title>\n")+
(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+l+"</div>\n</div>\n"+(null==p?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+
@@ -13074,268 +13072,269 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Edit
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+p+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),g={},0<c.length)){var l=this.getHashObject(),p=null;this.fileNode=e;this.pages=[];for(var u=0;u<c.length;u++){null==c[u].getAttribute("id")&&c[u].setAttribute("id",u);e=new DiagramPage(c[u]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[u+1]));this.pages.push(e);
if(null==l.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=l.pageId&&e.getId()==l.pageId)p=e;if(null==g[e.getId()])g[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=null!=p?p:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(u=0;u<z.length;u++)e[z[u]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(u=0;u<D.length;u++){var A=D[u];E.setVisible(A,e[A.id]||!1)}}catch(P){}};EditorUi.prototype.getBaseFilename=
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(u=0;u<z.length;u++)e[z[u]]=!0;var E=this.editor.graph.getModel(),D=E.getChildren(E.root);for(u=0;u<D.length;u++){var A=D[u];E.setVisible(A,e[A.id]||!1)}}catch(Q){}};EditorUi.prototype.getBaseFilename=
function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=
-function(c,e,g,l,p,u,z,E,D,A,P,R,T,L,U,n){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename(!p),B=t+("xml"==c||"pdf"==c&&P?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,e);this.saveData(B,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(B,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?B=t+".png":"jpeg"==c&&(B=t+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(G,N){try{return this.createDownloadRequest(G,c,l,N,z,p,E,D,A,P,R,void 0,void 0,!u,T,L,U,n)}catch(O){this.handleError(O)}}));else{var J=null,K=mxUtils.bind(this,function(G){G.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",G,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(J)}))});if("svg"==c){var k=this.editor.graph.background;
-if(z||k==mxConstants.NONE)k=null;var v=this.editor.graph.getSvg(k,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(v);this.editor.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(G){this.spinner.stop();K(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(G))})))}else B=t+".svg",J=this.getFileData(!1,!0,null,mxUtils.bind(this,function(G){this.spinner.stop();K(G)}),l)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,l,p,u,z,E,D,
-A,P,R,T,L,U,n,t,B){c=this.downloadRequestBuilder(c,e,g,l,p,u,z,E,D,A,P,R,T,L,U,n,t,B);e="";for(var F in c)g=c[F],null!=g&&(e+=F+"="+encodeURIComponent(g)+"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,g,l,p,u,z,E,D,A,P,R,T,L,U,n,t,B){var F=this.editor.graph,J=F.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var K=null,k=null,v=null;if(!EditorUi.isElectronApp&&(J.width*
-J.height>MAX_AREA||g.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==e&&(null!=P?(K=P.from,k=P.to):0==u&&(v="1"));"xmlpng"==e&&(A="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){K=u;break}u=F.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=u&&u!=mxConstants.NONE||(u="#ffffff"):u=mxConstants.NONE;p={globalVars:F.getExportVariables()};D&&(p.grid={size:F.gridSize,
-steps:F.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:F.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return{format:e,from:K,to:k,allPages:v,bg:null!=u?u:mxConstants.NONE,base64:l,embedXml:A,xml:g,filename:null!=c?c:"",extras:JSON.stringify(p),scale:z,border:E,pageMargin:U,w:R&&isFinite(R)?R:null,h:T&&isFinite(T)?T:null,crop:null!=L&&L?"1":"0",fit:null!=n&&n?"1":"0",sheetsAcross:t,sheetsDown:B}};EditorUi.prototype.setMode=
+function(c,e,g,l,p,u,z,E,D,A,Q,R,T,M,U,n){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var t=this.getBaseFilename(!p),C=t+("xml"==c||"pdf"==c&&Q?".drawio":"")+"."+c;if("xml"==c){var F=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,e);this.saveData(C,c,F,"text/xml")}else if("html"==c)F=this.getHtml2(this.getFileData(!0),this.editor.graph,t),this.saveData(C,c,F,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?C=t+".png":"jpeg"==c&&(C=t+".jpg"),this.saveRequest(C,c,mxUtils.bind(this,function(G,N){try{return this.createDownloadRequest(G,c,l,N,z,p,E,D,A,Q,R,void 0,void 0,!u,T,M,U,n)}catch(O){this.handleError(O)}}));else{var J=null,K=mxUtils.bind(this,function(G){G.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",G,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(J)}))});if("svg"==c){var k=this.editor.graph.background;
+if(z||k==mxConstants.NONE)k=null;var v=this.editor.graph.getSvg(k,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(v);this.editor.convertImages(v,mxUtils.bind(this,mxUtils.bind(this,function(G){this.spinner.stop();K(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(G))})))}else C=t+".svg",J=this.getFileData(!1,!0,null,mxUtils.bind(this,function(G){this.spinner.stop();K(G)}),l)}}catch(G){this.handleError(G)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,l,p,u,z,E,D,
+A,Q,R,T,M,U,n,t,C){c=this.downloadRequestBuilder(c,e,g,l,p,u,z,E,D,A,Q,R,T,M,U,n,t,C);e="";for(var F in c)g=c[F],null!=g&&(e+=F+"="+encodeURIComponent(g)+"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,g,l,p,u,z,E,D,A,Q,R,T,M,U,n,t,C){var F=this.editor.graph,J=F.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==u?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var K=null,k=null,v=null;if(!EditorUi.isElectronApp&&(J.width*
+J.height>MAX_AREA||g.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==e&&(null!=Q?(K=Q.from,k=Q.to):0==u&&(v="1"));"xmlpng"==e&&(A="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(u=0;u<this.pages.length;u++)if(this.pages[u]==this.currentPage){K=u;break}u=F.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!p?p||null!=u&&u!=mxConstants.NONE||(u="#ffffff"):u=mxConstants.NONE;p={globalVars:F.getExportVariables()};D&&(p.grid={size:F.gridSize,
+steps:F.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:F.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return{format:e,from:K,to:k,allPages:v,bg:null!=u?u:mxConstants.NONE,base64:l,embedXml:A,xml:g,filename:null!=c?c:"",extras:JSON.stringify(p),scale:z,border:E,pageMargin:U,w:R&&isFinite(R)?R:null,h:T&&isFinite(T)?T:null,crop:null!=M&&M?"1":"0",fit:null!=n&&n?"1":"0",sheetsAcross:t,sheetsDown:C}};EditorUi.prototype.setMode=
function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var g=c.lastIndexOf("#");if(0<g){c=decodeURIComponent(c.substring(g+1));try{e=JSON.parse(c)}catch(l){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&
null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var g=e.lastIndexOf("#");0<g&&(e=e.substring(0,g));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(l){}0<g&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};
EditorUi.prototype.loadDescriptor=function(c,e,g){var l=window.location.hash,p=mxUtils.bind(this,function(z){var E=null!=c.data?c.data:"";null!=z&&0<z.length&&(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return l};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(T){this.editor.undoManager.clear();this.editor.setModified(!1);
-this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?parseInt(c.interval):6E4,A=null,P=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(L){T===this.currentPage&&(200<=L.getStatus()&&300>=L.getStatus()?(this.updateDiagram(L.getText()),R()):this.handleError({message:mxResources.get("error")+" "+L.getStatus()}))}),mxUtils.bind(this,function(L){this.handleError(L)}))}),R=
-mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(P,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();P()}));R();P()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var u=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(u,mxUtils.bind(this,function(z){p(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(J){var K=new mxCellOverlay(J.image||p.warningImage,J.tooltip,J.align,J.valign,
+this.clearStatus()}));if(null!=c.update){var D=null!=c.interval?parseInt(c.interval):6E4,A=null,Q=mxUtils.bind(this,function(){var T=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(M){T===this.currentPage&&(200<=M.getStatus()&&300>=M.getStatus()?(this.updateDiagram(M.getText()),R()):this.handleError({message:mxResources.get("error")+" "+M.getStatus()}))}),mxUtils.bind(this,function(M){this.handleError(M)}))}),R=
+mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(Q,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){R();Q()}));R();Q()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var u=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(u,mxUtils.bind(this,function(z){p(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)}))}else p("")};EditorUi.prototype.updateDiagram=function(c){function e(J){var K=new mxCellOverlay(J.image||p.warningImage,J.tooltip,J.align,J.valign,
J.offset);K.addListener(mxEvent.CLICK,function(k,v){l.alert(J.tooltip)});return K}var g=null,l=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,u=p.getModel();u.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=u.getCell(c.getAttribute("id"));if(null!=E){try{var D=c.getAttribute("value");if(null!=D){var A=mxUtils.parseXml(D).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))u.setValue(E,
-A);else for(var P=A.attributes,R=0;R<P.length;R++)p.setAttributeForCell(E,P[R].nodeName,0<P[R].nodeValue.length?P[R].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+E.id+": "+J)}try{var T=c.getAttribute("style");null!=T&&p.model.setStyle(E,T)}catch(J){null!=window.console&&console.log("Error in style for "+E.id+": "+J)}try{var L=c.getAttribute("icon");if(null!=L){var U=0<L.length?JSON.parse(L):null;null!=U&&U.append||p.removeCellOverlays(E);null!=U&&p.addCellOverlay(E,
-e(U))}}catch(J){null!=window.console&&console.log("Error in icon for "+E.id+": "+J)}try{var n=c.getAttribute("geometry");if(null!=n){n=JSON.parse(n);var t=p.getCellGeometry(E);if(null!=t){t=t.clone();for(key in n){var B=parseFloat(n[key]);"dx"==key?t.x+=B:"dy"==key?t.y+=B:"dw"==key?t.width+=B:"dh"==key?t.height+=B:t[key]=parseFloat(n[key])}p.model.setGeometry(E,t)}}}catch(J){null!=window.console&&console.log("Error in icon for "+E.id+": "+J)}}}else if("model"==c.nodeName){for(var F=c.firstChild;null!=
+A);else for(var Q=A.attributes,R=0;R<Q.length;R++)p.setAttributeForCell(E,Q[R].nodeName,0<Q[R].nodeValue.length?Q[R].nodeValue:null)}}catch(J){null!=window.console&&console.log("Error in value for "+E.id+": "+J)}try{var T=c.getAttribute("style");null!=T&&p.model.setStyle(E,T)}catch(J){null!=window.console&&console.log("Error in style for "+E.id+": "+J)}try{var M=c.getAttribute("icon");if(null!=M){var U=0<M.length?JSON.parse(M):null;null!=U&&U.append||p.removeCellOverlays(E);null!=U&&p.addCellOverlay(E,
+e(U))}}catch(J){null!=window.console&&console.log("Error in icon for "+E.id+": "+J)}try{var n=c.getAttribute("geometry");if(null!=n){n=JSON.parse(n);var t=p.getCellGeometry(E);if(null!=t){t=t.clone();for(key in n){var C=parseFloat(n[key]);"dx"==key?t.x+=C:"dy"==key?t.y+=C:"dw"==key?t.width+=C:"dh"==key?t.height+=C:t[key]=parseFloat(n[key])}p.model.setGeometry(E,t)}}}catch(J){null!=window.console&&console.log("Error in icon for "+E.id+": "+J)}}}else if("model"==c.nodeName){for(var F=c.firstChild;null!=
F&&F.nodeType!=mxConstants.NODETYPE_ELEMENT;)F=F.nextSibling;null!=F&&(new mxCodec(c.firstChild)).decode(F,u)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(p.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{u.endUpdate()}null!=
z&&this.chromelessResize&&this.chromelessResize(!0,z)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var l=g.lastIndexOf(".");0<=l&&(c=g.substring(l),g=g.substring(0,l));if(e){e=g;var p=new Date;g=p.getFullYear();l=p.getMonth()+1;var u=p.getDate(),z=p.getHours(),E=p.getMinutes();p=p.getSeconds();g=e+(" "+(g+"-"+l+"-"+u+"-"+z+"-"+E+"-"+p))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.logIfModified=
function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(g){}};EditorUi.prototype.fileLoaded=function(c,e,g){var l=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var p=!1;this.hideDialog();null!=l&&(l.removeListener(this.descriptorChangedListener),this.logIfModified(l,!0),l.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var u=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=l&&
-this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();e||this.showSplash()});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();
-delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||
-this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=g&&g();this.editor.fireEvent(new mxEventObject("fileLoaded"));p=!0;if(!this.isOffline()&&null!=c.getMode()){var z="1"==urlParams.sketch?"sketch":uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",
-[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=l?this.fileLoaded(l)||u():u()});e?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else u();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var g=
-0,l=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var u=0;u<c.length;u++){this.updatePageRoot(c[u]);var z=c[u].node.cloneNode(!1);z.removeAttribute("name");l.root=c[u].root;var E=p.encode(l);this.editor.graph.saveViewState(c[u].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");z.appendChild(E);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+
-this.hashValue(z,function(D,A,P,R){return!R||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?R&&"mxCell"==D.nodeName&&"previous"==A?null:P:Math.round(P)},e)<<0}return g};EditorUi.prototype.hashValue=function(c,e,g){var l=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(l^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);
-for(var p=0;p<c.attributes.length;p++){var u=c.attributes[p].name,z=null!=e?e(c,u,c.attributes[p].value,!0):c.attributes[p].value;null!=z&&(l^=this.hashValue(u,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)l=(l<<5)-l+this.hashValue(c.childNodes[p],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;l^=e}return l};EditorUi.prototype.descriptorChanged=function(){};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,l,p,u,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
-EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c,null,2));e.appendChild(g);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
-".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,e){var g=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!e){null==c&&(e=this.sidebar.palettes["L.scratchpad"],null==e&&(e=this.sidebar.palettes.search),null!=e&&(c=e[e.length-1].nextSibling));
-c=null!=c?c:g.firstChild.nextSibling.nextSibling;e=g.lastChild;var l=e.previousSibling;g.insertBefore(e,c);g.insertBefore(l,e)}};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,l,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
-function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,g,l){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var p=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var u=0;u<this.openLibraries.length;u++)if(this.openLibraries[u].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[u],
-this.openLibraries);break}p={file:c,images:e,title:g,expand:l};this.openLibraries.push(p)}else this.scratchpad=c;u=this.sidebar.palettes[c.getHash()];u=null!=u?u[u.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,E=mxUtils.bind(this,function(B,F){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),F.appendChild(z)):this.addLibraryEntries(B,F)});null!=this.sidebar&&null!=
-e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(c.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(B){E(e,B)}));null!=p&&(p.div=D);this.repositionLibrary(u,"L.scratchpad"!=c.getHash());l=D.parentNode.previousSibling;g=l.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=c.title&&l.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+g);var A=document.createElement("div");A.style.backgroundColor=
-"inherit";l.style.position="relative";var P=document.createElement("img");P.className="geLibraryButton";P.setAttribute("src",Editor.crossImage);P.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=c.title||this.closableScratchpad)A.appendChild(P),mxEvent.addListener(P,"click",mxUtils.bind(this,function(B){if(!mxEvent.isConsumed(B)){var F=mxUtils.bind(this,function(){null!=p&&mxUtils.remove(p,this.openLibraries);this.closeLibrary(c)});null!=R?this.confirm(mxResources.get("allChangesLost"),
-null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F();mxEvent.consume(B)}}));if(c.isEditable()){var T=this.editor.graph,L=null;g=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),D,e,c,c.getMode());mxEvent.consume(B)});var U=mxUtils.bind(this,function(B){c.setModified(!0);c.isAutosave()?(null!=L&&null!=L.parentNode&&L.parentNode.removeChild(L),L=P.cloneNode(!1),L.setAttribute("src",Editor.spinImage),L.setAttribute("title",mxResources.get("saving")),L.style.cursor=
-"default",L.style.marginRight="2px",L.style.marginTop="-2px",A.insertBefore(L,A.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=L&&null!=L.parentNode&&L.parentNode.removeChild(L)})):null==R&&(R=P.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),A.insertBefore(R,A.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(F){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==
-R||c.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(F)})))}),n=mxUtils.bind(this,function(B,F,J,K){B=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(B)));for(var k=0;k<B.length;k++){var v=T.getCellGeometry(B[k]);null!=v&&v.translate(-F.x,-F.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(B,F.width,F.height,K||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));F={xml:B,w:F.width,h:F.height};null!=
-K&&(F.title=K);e.push(F);U(J);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),t=mxUtils.bind(this,function(B){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(B),T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var F=T.getSelectionCells(),J=T.view.getBounds(F);if(null!=J&&0<J.width&&0<J.height){var K=T.view.scale;J.x/=K;J.y/=K;J.width/=K;J.height/=K;J.x-=
-T.view.translate.x;J.y-=T.view.translate.y;n(F,J)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(B){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),
-T.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,t(B),mxEvent.consume(B))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(B){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility=
-"visible"),D.style.backgroundColor="",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(B){D.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(B){D.style.cursor="";D.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(F,J,K,k,v,G,N,O,Q){if(null!=F&&"image/"==J.substring(0,6))F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(F),F=[new mxCell("",new mxGeometry(0,0,v,G),F)],F[0].vertex=!0,n(F,new mxRectangle(0,0,v,G),B,mxEvent.isAltDown(B)?null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var S=!1,V=mxUtils.bind(this,
-function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));E(Z,D);e=e.concat(Z);U(B);this.spinner.stop();S=!0}catch(ka){}else if("mxfile"==W.documentElement.nodeName)try{var Y=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<Y.length;Z++){var ea=this.stringToCells(Editor.getDiagramNodeXml(Y[Z])),ca=
-this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&n(ea,new mxRectangle(0,0,ca.width,ca.height),B)}S=!0}catch(ka){null!=window.console&&console.log("error in drop handler:",ka)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)});null!=Q&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(Q,function(W){V(W,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,
-N)&&null!=Q?this.isExternalDataComms()?this.parseFile(Q,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?V(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):V(F,J)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(D,"dragleave",
-function(B){D.style.cursor="";D.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));P=P.cloneNode(!1);P.setAttribute("src",Editor.editImage);P.setAttribute("title",mxResources.get("edit"));A.insertBefore(P,A.firstChild);mxEvent.addListener(P,"click",g);g=P.cloneNode(!1);g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));A.insertBefore(g,A.firstChild);mxEvent.addListener(g,"click",t);".scratchpad"==c.title&&(this.addSelectionToScratchpad=t);this.isOffline()||
-".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(g=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),g.className="geLibraryButton",A.insertBefore(g,A.firstChild))}l.appendChild(A);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++)try{var l=c[g],p=l.data;if(null!=p){p="data:"==p.substring(0,5)?this.convertDataUri(p):p;var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==l.aspect&&(u+="aspect=fixed;");u=u+"image="+p+";";null!=l.style&&(u+=l.style);e.appendChild(this.sidebar.createVertexTemplate(u,l.w,l.h,"",l.title||"",!1,null,!0))}else if(null!=l.xml){var z=this.stringToCells("<"==l.xml.charAt(0)?l.xml:Graph.decompress(l.xml)),E=0==z.length?mxResources.get("drawingEmpty"):null!=l.title?l.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,l.w,l.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),
-u=this.sidebar.createVertexTemplateFromCells(null,l.w,l.h,E,!0,null,!0),e.appendChild(u)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=
-function(c,e,g,l,p,u,z){c=new ImageDialog(this,c,e,g,l,p,u,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,g,l,p,u){var z=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=z?JSON.stringify(JSON.parse(z),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=u&&u(E),E==z)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(e,JSON.stringify(D))}else localStorage.removeItem(e);
-this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(A){this.handleError(A)}}),null,mxResources.get("close"),null,null,null,!0,null,null,p,g,l);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,g,l){c=null!=c?c:mxUtils.bind(this,function(p,u,z,E){u||(p=new ChangePageSetup(this,l?z:null,p),p.ignoreColor=!l,null!=E&&l&&(p.shadowVisible=E),this.editor.graph.model.execute(p))});c=new BackgroundImageDialog(this,c,
-e,g,l);this.showDialog(c.container,400,l?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,l,p){c=new LibraryDialog(this,c,e,g,l,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var m=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=m.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
-e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,g,l,p,u,z){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=
-D||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var A=mxResources.get("ok"),P=null;e=null!=e?e:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),P=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){z=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?
-" ("+this.drive.user.email+")":""),!1);var R=null!=p?null:null!=u?u:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(e,
-z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=l&&l()}),P,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){t.innerText="";for(var B=0;B<L.length;B++){var F=document.createElement("option");mxUtils.write(F,L[B].displayName);F.value=B;t.appendChild(F);F=document.createElement("option");F.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(F,"<"+L[B].email+">");F.setAttribute("disabled","disabled");
-t.appendChild(F)}F=document.createElement("option");mxUtils.write(F,mxResources.get("addAccount"));F.value=L.length;t.appendChild(F)}var L=this.drive.getUsersList(),U=document.createElement("div"),n=document.createElement("div");n.style.marginBottom="6px";mxUtils.write(n,mxResources.get("changeUser")+": ");U.appendChild(n);var t=document.createElement("select");t.style.width="100%";T();mxEvent.addListener(t,"change",mxUtils.bind(this,function(){var B=t.value,F=L.length!=B;F&&this.drive.setUser(L[B]);
-this.drive.authorize(F,mxUtils.bind(this,function(){F||(L=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(J){this.handleError(J)}),!0)}));U.appendChild(t);U=new CustomDialog(this,U,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(U.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),520,150);return}}null!=D.message?z=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):
-mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?z=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(z=mxUtils.htmlEntities(D,!1)))}p=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):
-null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),p=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,p=D.alternateAction.funct);this.showError(e,z,A,g,P,null,null,c,p,null,null,null,l?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,
-g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,l,p,u){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=g&&g()},l,p,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,u);c.init()};EditorUi.prototype.showBanner=function(c,e,g,l,p,u,z,E,D){u=!1;if(!(this.bannerShowing||this["hideBanner"+
-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var A=p?500:1E3,P=document.createElement("div");P.className="geBtn gePrimaryBtn geBanner"+(p?" geSmallBanner":"");P.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(P.style,"transform",z);mxUtils.setPrefixedStyle(P.style,"transition","all "+A+"ms ease");null!=D&&mxUtils.setPrefixedStyle(P.style,"transform-origin",D);if(!p){var R=
-document.createElement("img");R.setAttribute("src",IMAGE_PATH+"/logo.png");R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";P.appendChild(R);R=document.createElement("img");R.setAttribute("src",Dialog.prototype.closeImage);R.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));R.setAttribute("border","0");R.style.cssText=(p?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-P.appendChild(R)}mxUtils.write(P,e);document.body.appendChild(P);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var T=document.createElement("input");T.setAttribute("type","checkbox");T.setAttribute("id","geDoNotShowAgainCheckbox");T.style.marginRight="6px";if(!l){e.appendChild(T);var L=document.createElement("label");L.setAttribute("for","geDoNotShowAgainCheckbox");
-mxUtils.write(L,mxResources.get("doNotShowAgain"));e.appendChild(L);P.style.paddingBottom=p?"16px":"30px";P.appendChild(e)}var U=mxUtils.bind(this,function(){null!=P.parentNode&&(P.parentNode.removeChild(P),this.bannerShowing=!1,T.checked||l)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=R&&mxEvent.addListener(R,"click",mxUtils.bind(this,function(t){mxEvent.consume(t);U()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,
-"transform",z);window.setTimeout(mxUtils.bind(this,function(){U()}),A)});mxEvent.addListener(P,"click",mxUtils.bind(this,function(t){var B=mxEvent.getSource(t);B!=T&&B!=L?(null!=g&&g(),U(),mxEvent.consume(t)):n()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(P.style,"transform",E)}),A/2);window.setTimeout(n,p?4E3:3E4);u=!0}return u};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
-EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,l){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<l&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,l,p){var u="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=e?".drawio":
-"")+"."+u;c=this.createImageDataUri(c,e,g,p);this.saveData(l,u,c.substring(c.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(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));
-this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,l,p,u){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=l?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==
-g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,l);else{var z=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-u=65==(E?parseInt(E[2],10):!1)?!1:u}if(u||this.isOffline()){z.href=URL.createObjectURL(l?this.base64ToBlob(c,g):new Blob([c],{type:g}));u?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(D){}}else this.createEchoRequest(c,e,g,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,l,p,u){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
-c+(null!=g?"&mime="+g:"")+(null!=p?"&format="+p:"")+(null!=u?"&base64="+u:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(l?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,g,l,p,u,z,E){u=null!=u?u:!1;z=null!=z?z:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(P,R,T,L){try{if("_blank"==R)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,c);this.showDialog(U.container,
-450,240,!0,!0);U.init()}else{var n=window.open("about:blank");null==n?mxUtils.popup(c,!0):(n.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),n.document.close())}else if(R==App.MODE_DEVICE||"download"==R)this.doSaveLocalFile(c,P,g,l,null,E);else if(null!=P&&0<P.length){var t=mxUtils.bind(this,function(B){try{this.exportFile(c,P,g,l,R,B)}catch(F){this.handleError(F)}});null!=L?t(L):this.pickFolder(R,t)}}catch(B){this.handleError(B)}});p=[];u||p.push(App.MODE_BROWSER);z||p.push("_blank");
-var A=new SaveDialog(this,e,mxUtils.bind(this,function(P,R,T){D(P.value,R,P,T);this.hideDialog(null,null,A.container)}),p,c,g,l);this.showDialog(A.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));A.init()};EditorUi.prototype.openInNewWindow=function(c,e,g){var l=window.open("about:blank");if(null==l||null==l.document)mxUtils.popup(c,!0);else{var p="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var u=mxUtils.parseXml(c).documentElement.style.backgroundColor;
-""!=u&&(p="background: "+u+";")}p='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+p+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(u=g?c:btoa(unescape(encodeURIComponent(c))),l.document.write(p+'<img style="max-width:100%;" src="data:'+e+";base64,"+u+'"/></body></html>')):l.document.write(p+c+"</body></html>"):l.document.write(p+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");l.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;
-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(l){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.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,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 p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";
-this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();
-e.style.display=0<l.length?"":"none"}))}d.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=c(mxUtils.bind(this,function(l){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);else{this.exportDialog=document.createElement("div");var u=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,80);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",p);this.editor.exportToCanvas(mxUtils.bind(this,function(E){z.stop();this.exportDialog.style.width=
-"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",D);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+
-1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,l,p){this.isLocalFileSave()?this.saveLocalFile(g,
-c,l,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(u,z){return this.createEchoRequest(g,u,l,p,e,z)}),g,p,l)};EditorUi.prototype.saveRequest=function(c,e,g,l,p,u,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,function(A,P,R,T){if("_blank"==P||null!=A&&0<A.length){var L=g("_blank"==P?null:A,P==App.MODE_DEVICE||"download"==P||null==P||"_blank"==P?"0":"1");null!=L&&(P==App.MODE_DEVICE||"download"==P||"_blank"==P?L.simulate(document,"_blank"):(R=mxUtils.bind(this,
-function(U){u=null!=u?u:"pdf"==e?"application/pdf":"image/"+e;if(null!=l)try{this.exportFile(l,A,u,!0,P,U)}catch(n){this.handleError(n)}else this.spinner.spin(document.body,mxResources.get("saving"))&&L.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=L.getStatus()&&299>=L.getStatus())try{this.exportFile(L.getText(),A,u,!0,P,U)}catch(n){this.handleError(n)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}))}),
-null!=T?R(T):this.pickFolder(P,R)))}});p=[App.MODE_BROWSER];z||p.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(A,P,R){E(A.value,P,A,R);this.hideDialog(null,null,D.container)}),p,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,
-g,l,p,u){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,l,p,u,z,E,D,A,P,R,T,L){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(c,e,g,l,p,u,z,E,D,A,P,R,T,L)}));this.handleError(O)})))try{var U=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:U;var n=e?null:this.editor.graph.background;n==mxConstants.NONE&&(n=null);null==n&&0==e&&(n=this.editor.graph.shapeBackgroundColor);var t=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var B=mxUtils.lightDarkColorSupported,F=mxUtils.preferDarkColor;if("light"==P||"dark"==P)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==P;var J=this.editor.graph.createSvgImageExport(p),K=this.editor.graph.getSvg(n,
-c,z,E,null,g,null,J,"blank"==A?"_blank":"self"==A?"_top":null,null,!T,P,R);mxUtils.lightDarkColorSupported=B;mxUtils.preferDarkColor=F;this.editor.graph.addForeignObjectWarning=t;l&&this.editor.graph.addSvgShadow(K);var k=this.getBaseFilename()+(p?".drawio":"")+".svg";L=null!=L?L:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
-function(){mxUtils.popup(O)}))});var v=mxUtils.bind(this,function(O){this.spinner.stop();p&&O.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,null,null,c,z));L(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(K);var G=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&u&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&T?this.replaceAlternateContent(O,
-P,v):v(O)}),N=mxUtils.bind(this,function(O){u&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,G,this.thumbImageCache)):G(O)});T?this.embedFonts(K,N):(this.editor.addFontCss(K),N(K))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(c,e,g){function l(R,T,L,U,n){var t=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");t.setAttribute("x",T);t.setAttribute("y",L+.5);t.setAttribute("width",
-U.width);t.setAttribute("height",U.height);null==t.setAttributeNS?t.setAttribute("xlink:href",n):t.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",n);R.replaceChild(t,R.lastChild);E()}function p(){if(z<P.length)P[z++](p)}var u="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)u+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&g(c)}),D={},A={},P=[];for(z=0;z<e.length;z++)mxUtils.bind(this,function(R){var T=R.getElementsByTagName("div");
-if(0<T.length)try{var L=T[0].cloneNode(!0),U=parseInt(L.style.marginLeft),n=parseInt(L.style.paddingTop),t=L.getElementsByTagName("div")[1],B=T=!1,F=L.style.alignItems,J=L.style.justifyContent;if(null!=L.style.writingMode){var K=L.style.writingMode;B="vertical-"==K.substring(0,9);T="-rl"==K.substring(K.length-3)}var k=!B&&"1px"==L.style.width||B&&"1px"==L.style.height;if(!B&&"1px"==L.style.height||B&&"1px"==L.style.width)L.style.alignItems=B&&T?"unsafe flex-end":"unsafe flex-start";k&&(L.style.justifyContent=
-"unsafe flex-start");L.style.paddingTop="";L.style.marginLeft="";var v=L.outerHTML,G=D[v];null==G&&(L.style.position="absolute",L.style.visibility="hidden",document.body.appendChild(L),K=1,K="1px"==L.style.width?t.offsetWidth:parseInt(L.style.width),k=1,k="1px"==L.style.height?t.offsetHeight:parseInt(L.style.height),document.body.removeChild(L),G=new mxRectangle(U,n,K,k),D[v]=G);"1px"==L.style.height&&("unsafe center"==F?n-=G.height/2:"unsafe flex-end"==F&&(n-=G.height));if("1px"==L.style.width)if(!B&&
-"unsafe center"==J||B&&"unsafe center"==F)U-=G.width/2;else if(!B&&"unsafe flex-end"==J||B&&(!T&&"unsafe flex-end"==F||T&&"unsafe flex-start"==F))U-=G.width;G=new mxRectangle(U,n,G.width,G.height+parseInt(t.style.fontSize)/4);P.push(mxUtils.bind(this,function(N){var O=A[v];null==O?Graph.htmlToPng(v,G.width,G.height,mxUtils.bind(this,function(Q){l(R,U,n,G,Q);A[v]=Q;N()}),u):(l(R,U,n,G,O),N())}))}catch(N){E()}else E()})(e[z]);0==counter&&g(c);z=0;p()};EditorUi.prototype.addRadiobox=function(c,e,g,l,
-p,u,z){return this.addCheckbox(c,g,l,p,u,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,l,p,u,z,E){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();D.id=z;null!=E&&D.setAttribute("name",E);g&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);l&&D.setAttribute("disabled","disabled");u&&(c.appendChild(D),g=document.createElement("label"),mxUtils.write(g,e),
-g.setAttribute("for",z),c.appendChild(g),p||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";l=document.createElement("option");
-l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));u.appendChild(l);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");u.appendChild(z);c.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var E=new FilenameDialog(this,p,mxResources.get("ok"),function(D){null!=D?(p=D,z.setAttribute("title",D)):(u.value="blank",z.removeAttribute("title"))},mxResources.get("url"),
-null,null,null,null,function(){u.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":p:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var E=document.createElement("div");
-E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=u):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight=
-"10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));l.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),
-mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(e));c.appendChild(l);mxUtils.write(c,mxResources.get("borderColor")+":");var u="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(E)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||
-mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return u},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,l,p,u){u=null!=u?u:[];g&&(u.push("lightbox=1"),"auto"!=c&&u.push("target="+c),null!=e&&e!=mxConstants.NONE&&u.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=l&&0<l.length&&u.push("edit="+encodeURIComponent(l)),p&&u.push("layers=1"),this.editor.graph.foldingEnabled&&
-u.push("nav=1"));return u};EditorUi.prototype.createLink=function(c,e,g,l,p,u,z,E,D,A,P,R,T){var L=this.getCurrentFile();D=this.createUrlParameters(c,e,l,p,u,D);c=!0;null!=z?g="#U"+encodeURIComponent(z):E||null==L||""==L.getHash()?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+L.getHash(),c=!1);c&&null!=L&&null!=L.getTitle()&&L.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(L.getTitle()));
-A&&1<g.length&&(D.push("open="+g.substring(1)),g="");P&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());R&&D.push("transparent=1");null!=T&&D.push("dark="+T);return(l&&(null!=z||null!=L&&L.getMode()!=App.MODE_GITHUB&&L.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=
-function(c,e,g,l,p,u,z,E,D,A,P,R,T){this.getBasenames();var L={};""!=p&&p!=mxConstants.NONE&&(L.highlight=p);"auto"!==l&&(L.target=l);A||(L.lightbox=!1);L.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(L.zoom=g/100);g=[];z&&(g.push("pages"),L.resize=!0,null!=this.pages&&null!=this.currentPage&&(L.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),L.resize=!0);E&&g.push("layers");D&&g.push("tags");null!=T&&(L["dark-mode"]=T);0<g.length&&(A&&g.push("lightbox"),
-L.toolbar=g.join(" "));null!=P&&0<P.length&&(L.edit=P);null!=c?L.url=c:L.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(L))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";R(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,l){var p=document.createElement("div");p.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(u);var z=document.createElement("div");z.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");u=E.cloneNode(!0);u.setAttribute("value","copy");z.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(D);mxUtils.br(z);z.appendChild(E);D=
-document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));z.appendChild(D);var A=this.getCurrentFile();null==g&&null!=A&&A.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),z.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId(),A)})));u.setAttribute("checked","checked");null==
-g&&E.setAttribute("disabled","disabled");p.appendChild(z);z=380;var P=this.addLinkSection(p),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";R.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value",
-"auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");R.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("appearance")+":");p.appendChild(R);mxUtils.br(p);z+=26;var T=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value="100%";p.appendChild(L);
-var U=this.addCheckbox(p,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var n=n=this.addCheckbox(p,mxResources.get("allPages"),D,!D),t=this.addCheckbox(p,mxResources.get("layers"),!0),B=this.addCheckbox(p,mxResources.get("tags"),!0),F=this.addCheckbox(p,mxResources.get("lightbox"),!0),J=null;if(EditorUi.enableHtmlEditOption){J=this.addEditButton(p,F);var K=J.getEditInput();K.style.marginBottom="16px";z+=50;mxEvent.addListener(F,"change",function(){F.checked?K.removeAttribute("disabled"):
-K.setAttribute("disabled","disabled");K.checked&&F.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,function(){l(E.checked?g:null,T.checked,L.value,P.getTarget(),P.getColor(),U.checked,n.checked,t.checked,B.checked,F.checked,null!=J?J.getLink():null,null!=R?R.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,l,p,
-u,z,E,D,A,P){var R=document.createElement("div");R.style.whiteSpace="nowrap";var T=document.createElement("h3");mxUtils.write(T,c||mxResources.get("publish"));T.style.width="100%";T.style.textAlign="center";T.style.marginTop="2px";T.style.marginBottom="20px";R.appendChild(T);var L=document.createElement("select");c=30;L.className="geBtn";L.style.marginBottom="8px";L.style.marginLeft="0px";L.style.width="100%";L.style.boxSizing="border-box";if(null==E||""==E.getHash())p=null!=p?p:"https://www.drawio.com/doc/faq/publish-diagram-as-link",
-T=document.createElement("option"),mxUtils.write(T,mxResources.get("makeCopy")),T.setAttribute("value","copy"),L.appendChild(T);T=document.createElement("option");mxUtils.write(T,mxResources.get("authorizationRequired"));T.setAttribute("value","auth");L.appendChild(T);null!=E&&""!=E.getHash()||T.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");L.appendChild(E);null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",
-z),L.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));R.appendChild(L);mxUtils.br(R);L.focus();var U=null,n=null;if(null!=e||null!=g)c+=30,mxUtils.write(R,mxResources.get("width")+":"),U=document.createElement("input"),U.setAttribute("type","text"),U.style.marginRight="16px",U.style.width="50px",U.style.marginLeft="6px",U.style.marginRight="16px",U.style.marginBottom="10px",U.value="100%",R.appendChild(U),
-mxUtils.write(R,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=g+"px",R.appendChild(n),mxUtils.br(R);var t=this.addLinkSection(R,l),B=A?this.addCheckbox(R,mxResources.get("transparentBackground"),!1):null;null!=B&&(c+=20);var F=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():
-"",16<e.length&&(e=e.substring(0,16)+"..."),F=this.addCheckbox(R,mxResources.get("selectedPage")+": "+e));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft="8px";J.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));J.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));J.appendChild(e);e=document.createElement("option");e.setAttribute("value",
-"auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");J.appendChild(e);P&&(mxUtils.write(R,mxResources.get("appearance")+":"),R.appendChild(J),mxUtils.br(R),c+=30);var K=this.addCheckbox(R,mxResources.get("lightbox"),!0,null,null,!l),k=this.addEditButton(R,K),v=k.getEditInput();l&&(v.style.marginLeft=K.style.marginLeft,K.style.display="none",c-=20);var G=this.addCheckbox(R,mxResources.get("layers"),!0);G.style.marginLeft=v.style.marginLeft;G.style.marginTop="8px";
-var N=this.addCheckbox(R,mxResources.get("tags"),!0);N.style.marginLeft=v.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(K,"change",function(){K.checked?(G.removeAttribute("disabled"),v.removeAttribute("disabled"),N.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));v.checked&&K.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled",
-"disabled")});l=new CustomDialog(this,R,mxUtils.bind(this,function(){D(t.getTarget(),t.getColor(),null==F?!1:F.checked,K.checked,k.getLink(),G.checked,null!=U?U.value:null,null!=n?n.value:null,N.checked,L.value,null!=B?B.checked:!1,J.value)}),null,mxResources.get("create"),p,u);this.showDialog(l.container,340,296+c,!0,!0);null!=U?(U.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?U.select():document.execCommand("selectAll",!1,null)):null==L.parentNode;t.focus()};EditorUi.prototype.showRemoteExportDialog=
-function(c,e,g,l,p){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";u.appendChild(z);if(p){mxUtils.write(u,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||
-"100%";u.appendChild(E);mxUtils.write(u,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var A=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),P=l?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;
-var R=l?null:this.addCheckbox(u,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=R&&(R.style.marginBottom="16px");c=new CustomDialog(this,u,mxUtils.bind(this,function(){var T=parseInt(E.value)/100||1,L=parseInt(D.value)||0;g(!A.checked,null!=P?P.checked:!1,null!=R?R.checked:!1,T,L)}),null,c,e);this.showDialog(c.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,l,p,u,z,E,D){z=null!=z?z:Editor.defaultIncludeDiagram;
-var A=document.createElement("div");A.style.whiteSpace="nowrap";var P=this.editor.graph,R="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(T);mxUtils.write(A,mxResources.get("zoom")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.style.marginRight="12px";L.value=this.lastExportZoom||
-"100%";A.appendChild(L);mxUtils.write(A,mxResources.get("borderWidth")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.marginRight="16px";U.style.width="60px";U.style.marginLeft="4px";U.value=this.lastExportBorder||"0";A.appendChild(U);mxUtils.br(A);var n=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,P.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled",
-"disabled");t.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(T=0;T<c.length;T++)if(!P.isSelectionEmpty()||"selectionOnly"!=c[T]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(c[T]));F.setAttribute("value",c[T]);B.appendChild(F)}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(B),mxUtils.br(A),R+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==
-B.value&&(n.checked=!0)})):u&&(A.appendChild(t),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),R+=30,mxEvent.addListener(n,"change",function(){n.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));P.isSelectionEmpty()?D&&(n.style.display="none",n.nextSibling.style.display="none",n.nextSibling.nextSibling.style.display="none",R-=30):(B.value="diagram",t.setAttribute("checked","checked"),t.defaultChecked=!0,mxEvent.addListener(n,"change",function(){B.value=n.checked?
-"selectionOnly":"diagram"}));var J=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),K=document.createElement("select");K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginTop="16px";u=document.createElement("option");u.setAttribute("value","light");mxUtils.write(u,mxResources.get("light"));K.appendChild(u);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));K.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?
-(u=document.createElement("option"),u.setAttribute("value","auto"),mxUtils.write(u,mxResources.get("automatic")),u.setAttribute("selected","selected"),K.appendChild(u)):Editor.isDarkMode()?D.setAttribute("selected","selected"):u.setAttribute("selected","selected");mxUtils.write(A,mxResources.get("appearance")+":");A.appendChild(K);mxUtils.br(A);R+=26;var k=this.addCheckbox(A,mxResources.get("shadow"),P.shadowVisible),v=null;if("png"==E||"jpeg"==E||"webp"==E)v=this.addCheckbox(A,mxResources.get("grid"),
-!1,this.isOffline()||!this.canvasSupported,!1,!0),R+=30;var G=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram")+":",z,null,null,"jpeg"!=E&&"webp"!=E),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){G.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},P=document.createElement("option"),P.setAttribute("value","allPages"),mxUtils.write(P,mxResources.get("allPages")),N.appendChild(P),P=document.createElement("option"),
-P.setAttribute("value","currentPage"),mxUtils.write(P,mxResources.get("currentPage")),N.appendChild(P),G.style.marginBottom="12px",N.style.marginBottom="16px",A.appendChild(N),mxUtils.br(A),R+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(G,"change",z),z()):G.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var Q=document.createElement("input");Q.style.marginBottom=
-"16px";Q.style.marginRight="8px";Q.setAttribute("type","checkbox");e&&(O.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,A.appendChild(O),mxUtils.write(A,mxResources.get("embedImages")),mxUtils.br(A),Q.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,A.appendChild(Q),mxUtils.write(A,mxResources.get("embedFonts")),mxUtils.br(A),R+=50);var S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";u=document.createElement("option");u.setAttribute("value",
-"auto");mxUtils.write(u,mxResources.get("automatic"));S.appendChild(u);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));S.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));S.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==E&&(mxUtils.write(A,mxResources.get("links")+
-":"),A.appendChild(S),A.appendChild(z),mxUtils.br(A),mxUtils.br(A),R+=50);g=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=U.value;this.lastExportZoom=L.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=Q.checked;this.lastEmbedInclude=N.value;p(L.value,J.checked,!n.checked,k.checked,G.checked,O.checked&&e,U.value,t.checked,("png"==E||"svg"==E)&&"currentPage"==N.value,S.value,null!=v?v.checked:null,null!=K?K.value:null,B.value,Q.checked)}),null,g,l);this.showDialog(g.container,
-340,R,!0,!0,null,null,null,null,!0);L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,l,p){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(E)}var D=this.addCheckbox(u,mxResources.get("fit"),
-!0),A=this.addCheckbox(u,mxResources.get("shadow"),z.shadowVisible&&l,!l),P=this.addCheckbox(u,g),R=this.addCheckbox(u,mxResources.get("lightbox"),!0),T=this.addEditButton(u,R),L=T.getEditInput(),U=1<z.model.getChildCount(z.model.getRoot()),n=this.addCheckbox(u,mxResources.get("layers"),U,!U);n.style.marginLeft=L.style.marginLeft;n.style.marginBottom="12px";n.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?(U&&n.removeAttribute("disabled"),L.removeAttribute("disabled")):
-(n.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"));L.checked&&R.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,u,mxUtils.bind(this,function(){c(D.checked,A.checked,P.checked,R.checked,T.getLink(),n.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,l,p,u,z,E){function D(L){var U=" ",n="";l&&(U=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=P?"&page="+P:"")+(p?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");c&&(n+="max-width:100%;");var t="";g&&(t=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');z('<img src="'+L+'"'+t+(""!=n?' style="'+n+'"':"")+U+"/>")}var A=this.editor.graph.getGraphBounds(),P=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(L){var U=l?this.getFileData(!0):null;L=
-this.createImageDataUri(L,U,"png");D(L)}),null,null,null,mxUtils.bind(this,function(L){E({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),A.width*A.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var R="";g&&(R="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+R+"&xml="+encodeURIComponent(e));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&
-299>=T.getStatus()?D("data:image/png;base64,"+T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,l,p,u,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var P=D[A].getAttribute("href");null!=P&&"#"==P.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}l&&
+this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fname.innerText="");this.clearStatus();this.updateUi();e||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",
+this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=g&&g();this.editor.fireEvent(new mxEventObject("fileLoaded"));p=!0;if(!this.isOffline()&&null!=c.getMode()){var z="1"==urlParams.sketch?"sketch":
+uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+z})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),
+title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(D){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=l?this.fileLoaded(l)||u():u()});e?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,
+function(){this.hideDialog();var D=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else u();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,l=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var u=0;u<c.length;u++){this.updatePageRoot(c[u]);var z=c[u].node.cloneNode(!1);z.removeAttribute("name");l.root=c[u].root;
+var E=p.encode(l);this.editor.graph.saveViewState(c[u].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");z.appendChild(E);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(z,function(D,A,Q,R){return!R||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?R&&"mxCell"==D.nodeName&&"previous"==A?null:Q:Math.round(Q)},e)<<0}return g};EditorUi.prototype.hashValue=
+function(c,e,g){var l=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(l^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var u=c.attributes[p].name,z=null!=e?e(c,u,c.attributes[p].value,!0):c.attributes[p].value;null!=z&&(l^=this.hashValue(u,e,g)+this.hashValue(z,e,g))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)l=
+(l<<5)-l+this.hashValue(c.childNodes[p],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;l^=e}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,l,p,u,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
+(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var g=e.createElement("mxlibrary");
+mxUtils.setTextContent(g,JSON.stringify(c,null,2));e.appendChild(g);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};
+EditorUi.prototype.repositionLibrary=function(c,e){var g=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!e){null==c&&(e=this.sidebar.palettes["L.scratchpad"],null==e&&(e=this.sidebar.palettes.search),null!=e&&(c=e[e.length-1].nextSibling));c=null!=c?c:g.firstChild.nextSibling.nextSibling;e=g.lastChild;var l=e.previousSibling;g.insertBefore(e,c);g.insertBefore(l,e)}};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==
+g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,l,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,g,l){if(null!=this.sidebar){c.constructor!=LocalLibrary&&
+mxSettings.addCustomLibrary(c.getHash());var p=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var u=0;u<this.openLibraries.length;u++)if(this.openLibraries[u].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[u],this.openLibraries);break}p={file:c,images:e,title:g,expand:l};this.openLibraries.push(p)}else this.scratchpad=c;u=this.sidebar.palettes[c.getHash()];u=null!=u?u[u.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());
+var z=null,E=mxUtils.bind(this,function(C,F){0==C.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),F.appendChild(z)):this.addLibraryEntries(C,F)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(c.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(C){E(e,C)}));null!=p&&
+(p.div=D);this.repositionLibrary(u,"L.scratchpad"!=c.getHash());l=D.parentNode.previousSibling;g=l.getAttribute("title");null!=g&&0<g.length&&".scratchpad"!=c.title&&l.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+g);var A=document.createElement("div");A.style.backgroundColor="inherit";l.style.position="relative";var Q=document.createElement("img");Q.className="geLibraryButton";Q.setAttribute("src",Editor.crossImage);Q.setAttribute("title",mxResources.get("close"));var R=null;if(".scratchpad"!=
+c.title||this.closableScratchpad)A.appendChild(Q),mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){if(!mxEvent.isConsumed(C)){var F=mxUtils.bind(this,function(){null!=p&&mxUtils.remove(p,this.openLibraries);this.closeLibrary(c)});null!=R?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F();mxEvent.consume(C)}}));if(c.isEditable()){var T=this.editor.graph,M=null;g=mxUtils.bind(this,function(C){this.showLibraryDialog(c.getTitle(),
+D,e,c,c.getMode());mxEvent.consume(C)});var U=mxUtils.bind(this,function(C){c.setModified(!0);c.isAutosave()?(null!=M&&null!=M.parentNode&&M.parentNode.removeChild(M),M=Q.cloneNode(!1),M.setAttribute("src",Editor.spinImage),M.setAttribute("title",mxResources.get("saving")),M.style.cursor="default",M.style.marginRight="2px",M.style.marginTop="-2px",A.insertBefore(M,A.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=M&&null!=M.parentNode&&M.parentNode.removeChild(M)})):
+null==R&&(R=Q.cloneNode(!1),R.setAttribute("src",Editor.saveImage),R.setAttribute("title",mxResources.get("save")),A.insertBefore(R,A.firstChild),mxEvent.addListener(R,"click",mxUtils.bind(this,function(F){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==R||c.isModified()||(R.parentNode.removeChild(R),R=null)});mxEvent.consume(F)})))}),n=mxUtils.bind(this,function(C,F,J,K){C=T.cloneCells(mxUtils.sortCells(T.model.getTopmostCells(C)));for(var k=0;k<C.length;k++){var v=
+T.getCellGeometry(C[k]);null!=v&&v.translate(-F.x,-F.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,F.width,F.height,K||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));F={xml:C,w:F.width,h:F.height};null!=K&&(F.title=K);e.push(F);U(J);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),t=mxUtils.bind(this,function(C){if(T.isSelectionEmpty())T.getRubberband().isActive()?(T.getRubberband().execute(C),
+T.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var F=T.getSelectionCells(),J=T.view.getBounds(F);if(null!=J&&0<J.width&&0<J.height){var K=T.view.scale;J.x/=K;J.y/=K;J.width/=K;J.height/=K;J.x-=T.view.translate.x;J.y-=T.view.translate.y;n(F,J)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,
+function(C){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler.first&&(T.graphHandler.suspend(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",T.panningManager.stop(),T.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){T.isMouseDown&&null!=T.panningManager&&null!=T.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,T.panningManager.stop(),
+T.graphHandler.reset(),T.isMouseDown=!1,T.autoScroll=!0,t(C),mxEvent.consume(C))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(C){T.isMouseDown&&null!=T.graphHandler.first&&(T.graphHandler.resume(),null!=T.graphHandler.hint&&(T.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",T.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect=
+"copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(F,J,K,k,v,G,N,O,P){if(null!=F&&"image/"==J.substring(0,6))F="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(F),F=[new mxCell("",
+new mxGeometry(0,0,v,G),F)],F[0].vertex=!0,n(F,new mxRectangle(0,0,v,G),C,mxEvent.isAltDown(C)?null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var S=!1,V=mxUtils.bind(this,function(W,X){null!=W&&"application/pdf"==X&&(X=Editor.extractGraphModelFromPdf(W),null!=X&&0<X.length&&(W=X));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var Z=JSON.parse(mxUtils.getTextContent(W.documentElement));
+E(Z,D);e=e.concat(Z);U(C);this.spinner.stop();S=!0}catch(ka){}else if("mxfile"==W.documentElement.nodeName)try{var Y=W.documentElement.getElementsByTagName("diagram");for(Z=0;Z<Y.length;Z++){var ea=this.stringToCells(Editor.getDiagramNodeXml(Y[Z])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&n(ea,new mxRectangle(0,0,ca.width,ca.height),C)}S=!0}catch(ka){null!=window.console&&console.log("error in drop handler:",ka)}S||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)});null!=P&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(P,function(W){V(W,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,N)&&null!=P?this.isExternalDataComms()?this.parseFile(P,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?V(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):V(F,J)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));Q=Q.cloneNode(!1);Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("edit"));A.insertBefore(Q,A.firstChild);mxEvent.addListener(Q,"click",g);g=Q.cloneNode(!1);
+g.setAttribute("src",Editor.plusImage);g.setAttribute("title",mxResources.get("add"));A.insertBefore(g,A.firstChild);mxEvent.addListener(g,"click",t);".scratchpad"==c.title&&(this.addSelectionToScratchpad=t);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(g=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),g.className="geLibraryButton",A.insertBefore(g,A.firstChild))}l.appendChild(A);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
+function(c,e){for(var g=0;g<c.length;g++)try{var l=c[g],p=l.data;if(null!=p){p="data:"==p.substring(0,5)?this.convertDataUri(p):p;var u="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(u+="aspect=fixed;");u=u+"image="+p+";";null!=l.style&&(u+=l.style);e.appendChild(this.sidebar.createVertexTemplate(u,l.w,l.h,"",l.title||"",!1,null,!0))}else if(null!=l.xml){var z=this.stringToCells("<"==l.xml.charAt(0)?l.xml:Graph.decompress(l.xml)),E=0==z.length?mxResources.get("drawingEmpty"):
+null!=l.title?l.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,l.w,l.h,E,!0,null,!0))}}catch(D){E=null!=D.message?mxResources.get("error")+": "+D.message:String(D),u=this.sidebar.createVertexTemplateFromCells(null,l.w,l.h,E,!0,null,!0),e.appendChild(u)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||
+window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,g,l,p,u,z){c=new ImageDialog(this,c,e,g,l,p,u,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,g,l,p,u){var z=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=z?JSON.stringify(JSON.parse(z),null,2):"",mxUtils.bind(this,
+function(E){if(null!=E)try{if(null!=u&&u(E),E==z)this.hideDialog();else{if(0<E.length){var D=JSON.parse(E);localStorage.setItem(e,JSON.stringify(D))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(A){this.handleError(A)}}),null,mxResources.get("close"),null,null,null,!0,null,null,p,g,l);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,g,l){c=null!=c?c:mxUtils.bind(this,function(p,
+u,z,E){u||(p=new ChangePageSetup(this,l?z:null,p),p.ignoreColor=!l,null!=E&&l&&(p.shadowVisible=E),this.editor.graph.model.execute(p))});c=new BackgroundImageDialog(this,c,e,g,l);this.showDialog(c.container,400,l?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,l,p){c=new LibraryDialog(this,c,e,g,l,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(u){u&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var m=EditorUi.prototype.createFormat;
+EditorUi.prototype.createFormat=function(c){var e=m.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,g,l,p,u,z){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&
+null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(T){}if(null!=D||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var A=mxResources.get("ok"),Q=null;e=null!=e?e:mxResources.get("error");if(null!=D){null!=D.retry&&(A=mxResources.get("cancel"),Q=function(){E();D.retry()});if(404==D.code||404==D.status||403==D.code){z=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,
+!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var R=null!=p?null:null!=u?u:window.location.hash;if(null!=R&&("#G"==R.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==R.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&
+0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==D.code||404==D.status)){R="#U"==R.substring(0,2)?R.substring(45,R.lastIndexOf("%26ex")):R.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+R);null!=l&&l()}),Q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function T(){t.innerText="";for(var C=0;C<M.length;C++){var F=document.createElement("option");mxUtils.write(F,
+M[C].displayName);F.value=C;t.appendChild(F);F=document.createElement("option");F.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(F,"<"+M[C].email+">");F.setAttribute("disabled","disabled");t.appendChild(F)}F=document.createElement("option");mxUtils.write(F,mxResources.get("addAccount"));F.value=M.length;t.appendChild(F)}var M=this.drive.getUsersList(),U=document.createElement("div"),n=document.createElement("div");n.style.marginBottom="6px";mxUtils.write(n,mxResources.get("changeUser")+": ");U.appendChild(n);
+var t=document.createElement("select");t.style.width="100%";T();mxEvent.addListener(t,"change",mxUtils.bind(this,function(){var C=t.value,F=M.length!=C;F&&this.drive.setUser(M[C]);this.drive.authorize(F,mxUtils.bind(this,function(){F||(M=this.drive.getUsersList(),T())}),mxUtils.bind(this,function(J){this.handleError(J)}),!0)}));U.appendChild(t);U=new CustomDialog(this,U,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(U.container,300,100,!0,!0)}),mxResources.get("cancel"),
+mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),520,150);return}}null!=D.message?z=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?z=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(z=
+mxUtils.htmlEntities(D,!1)))}p=c=null;null!=D&&null!=D.helpLink?(c=mxResources.get("help"),p=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+D.ownerEmail+")",!1),p=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(c=D.alternateAction.label,p=D.alternateAction.funct);this.showError(e,z,A,
+g,Q,null,null,c,p,null,null,null,l?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,g,l,p,u){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=g&&g()},
+l,p,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,u);c.init()};EditorUi.prototype.showBanner=function(c,e,g,l,p,u,z,E,D){u=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var A=p?500:1E3,Q=document.createElement("div");Q.className="geBtn gePrimaryBtn geBanner"+(p?" geSmallBanner":"");Q.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(Q.style,
+"transform",z);mxUtils.setPrefixedStyle(Q.style,"transition","all "+A+"ms ease");null!=D&&mxUtils.setPrefixedStyle(Q.style,"transform-origin",D);if(!p){var R=document.createElement("img");R.setAttribute("src",IMAGE_PATH+"/logo.png");R.setAttribute("border","0");R.setAttribute("align","absmiddle");R.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";Q.appendChild(R);R=document.createElement("img");R.setAttribute("src",Dialog.prototype.closeImage);R.setAttribute("title",
+mxResources.get(l?"doNotShowAgain":"close"));R.setAttribute("border","0");R.style.cssText=(p?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";Q.appendChild(R)}mxUtils.write(Q,e);document.body.appendChild(Q);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var T=document.createElement("input");
+T.setAttribute("type","checkbox");T.setAttribute("id","geDoNotShowAgainCheckbox");T.style.marginRight="6px";if(!l){e.appendChild(T);var M=document.createElement("label");M.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(M,mxResources.get("doNotShowAgain"));e.appendChild(M);Q.style.paddingBottom=p?"16px":"30px";Q.appendChild(e)}var U=mxUtils.bind(this,function(){null!=Q.parentNode&&(Q.parentNode.removeChild(Q),this.bannerShowing=!1,T.checked||l)&&(this["hideBanner"+c]=!0,isLocalStorage&&
+null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=R&&mxEvent.addListener(R,"click",mxUtils.bind(this,function(t){mxEvent.consume(t);U()}));var n=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Q.style,"transform",z);window.setTimeout(mxUtils.bind(this,function(){U()}),A)});mxEvent.addListener(Q,"click",mxUtils.bind(this,function(t){var C=mxEvent.getSource(t);C!=T&&C!=M?(null!=g&&g(),U(),mxEvent.consume(t)):n()}));window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setPrefixedStyle(Q.style,"transform",E)}),A/2);window.setTimeout(n,p?4E3:3E4);u=!0}return u};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,l){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,
+"tEXt","mxfile",encodeURIComponent(e))),0<l&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,l,p){var u="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=e?".drawio":"")+"."+u;c=this.createImageDataUri(c,e,g,p);this.saveData(l,u,c.substring(c.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(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,l,p,u){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||
+/(\.html)$/i.test(e)||(e=e+"."+(null!=u?u:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=l?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,
+g,l);else{var z=document.createElement("a");u=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);u=65==(E?parseInt(E[2],10):!1)?!1:u}if(u||this.isOffline()){z.href=URL.createObjectURL(l?this.base64ToBlob(c,g):new Blob([c],{type:g}));u?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},
+2E4),z.click(),z.parentNode.removeChild(z)}catch(D){}}else this.createEchoRequest(c,e,g,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,l,p,u){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=g?"&mime="+g:"")+(null!=p?"&format="+p:"")+(null!=u?"&base64="+u:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(l?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,g,l,p,u,z,E){u=null!=u?u:!1;z=null!=z?z:"vsdx"!=p&&(!mxClient.IS_IOS||
+!navigator.standalone);var D=mxUtils.bind(this,function(Q,R,T,M){try{if("_blank"==R)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var U=new EmbedDialog(this,c);this.showDialog(U.container,450,240,!0,!0);U.init()}else{var n=window.open("about:blank");null==n?mxUtils.popup(c,!0):(n.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),n.document.close())}else if(R==App.MODE_DEVICE||"download"==R)this.doSaveLocalFile(c,Q,g,l,
+null,E);else if(null!=Q&&0<Q.length){var t=mxUtils.bind(this,function(C){try{this.exportFile(c,Q,g,l,R,C)}catch(F){this.handleError(F)}});null!=M?t(M):this.pickFolder(R,t)}}catch(C){this.handleError(C)}});p=[];u||p.push(App.MODE_BROWSER);z||p.push("_blank");var A=new SaveDialog(this,e,mxUtils.bind(this,function(Q,R,T){D(Q.value,R,Q,T);this.hideDialog(null,null,A.container)}),p,c,g,l);this.showDialog(A.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));A.init()};EditorUi.prototype.openInNewWindow=
+function(c,e,g){var l=window.open("about:blank");if(null==l||null==l.document)mxUtils.popup(c,!0);else{var p="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var u=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=u&&(p="background: "+u+";")}p='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+p+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||g?(u=g?c:btoa(unescape(encodeURIComponent(c))),l.document.write(p+
+'<img style="max-width:100%;" src="data:'+e+";base64,"+u+'"/></body></html>')):l.document.write(p+c+"</body></html>"):l.document.write(p+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");l.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=
+function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(l){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.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,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 p=e.getBoundingClientRect();this.tagsDialog.style.left=p.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=p.zIndex;document.body.appendChild(this.tagsDialog);
+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();e.style.display=0<l.length?"":"none"}))}d.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=c(mxUtils.bind(this,function(l){var p=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",p);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)p.apply(this);else{this.exportDialog=document.createElement("div");var u=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,80);this.exportDialog.style.left=u.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";u=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=u.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",p);this.editor.exportToCanvas(mxUtils.bind(this,function(E){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";
+E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",D);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,l,p){this.isLocalFileSave()?this.saveLocalFile(g,c,l,p,e):this.saveRequest(c,e,mxUtils.bind(this,function(u,z){return this.createEchoRequest(g,u,l,p,e,z)}),g,p,l)};EditorUi.prototype.saveRequest=function(c,e,g,l,p,u,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,
+function(A,Q,R,T){if("_blank"==Q||null!=A&&0<A.length){var M=g("_blank"==Q?null:A,Q==App.MODE_DEVICE||"download"==Q||null==Q||"_blank"==Q?"0":"1");null!=M&&(Q==App.MODE_DEVICE||"download"==Q||"_blank"==Q?M.simulate(document,"_blank"):(R=mxUtils.bind(this,function(U){u=null!=u?u:"pdf"==e?"application/pdf":"image/"+e;if(null!=l)try{this.exportFile(l,A,u,!0,Q,U)}catch(n){this.handleError(n)}else this.spinner.spin(document.body,mxResources.get("saving"))&&M.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=M.getStatus()&&299>=M.getStatus())try{this.exportFile(M.getText(),A,u,!0,Q,U)}catch(n){this.handleError(n)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}))}),null!=T?R(T):this.pickFolder(Q,R)))}});p=[App.MODE_BROWSER];z||p.push("_blank");var D=new SaveDialog(this,c,mxUtils.bind(this,function(A,Q,R){E(A.value,Q,A,R);this.hideDialog(null,null,D.container)}),p,null,"application/pdf");this.showDialog(D.container,
+420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,l,p,u){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,l,p,u,
+z,E,D,A,Q,R,T,M){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(c,e,g,l,p,u,z,E,D,A,Q,R,T,M)}));this.handleError(O)})))try{var U=this.editor.graph.isSelectionEmpty();g=null!=g?g:U;var n=e?null:this.editor.graph.background;n==mxConstants.NONE&&(n=null);null==n&&0==e&&(n=this.editor.graph.shapeBackgroundColor);var t=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var C=mxUtils.lightDarkColorSupported,F=mxUtils.preferDarkColor;if("light"==Q||"dark"==Q)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Q;var J=this.editor.graph.createSvgImageExport(p),K=this.editor.graph.getSvg(n,c,z,E,null,g,null,J,"blank"==A?"_blank":"self"==A?"_top":null,null,!T,Q,R);mxUtils.lightDarkColorSupported=C;mxUtils.preferDarkColor=F;this.editor.graph.addForeignObjectWarning=t;l&&this.editor.graph.addSvgShadow(K);
+var k=this.getBaseFilename()+(p?".drawio":"")+".svg";M=null!=M?M:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(O)}))});var v=mxUtils.bind(this,function(O){this.spinner.stop();p&&O.setAttribute("content",this.getFileData(!0,null,null,null,g,D,null,null,null,null,null,c,z));M(Graph.xmlDeclaration+
+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(K);var G=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&u&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&T?this.replaceAlternateContent(O,Q,v):v(O)}),N=mxUtils.bind(this,function(O){u&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,G,this.thumbImageCache)):G(O)});T?this.embedFonts(K,
+N):(this.editor.addFontCss(K),N(K))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(c,e,g){function l(R,T,M,U,n){var t=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");t.setAttribute("x",T);t.setAttribute("y",M+.5);t.setAttribute("width",U.width);t.setAttribute("height",U.height);null==t.setAttributeNS?t.setAttribute("xlink:href",n):t.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",n);R.replaceChild(t,R.lastChild);E()}function p(){if(z<Q.length)Q[z++](p)}
+var u="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)u+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&g(c)}),D={},A={},Q=[];for(z=0;z<e.length;z++)mxUtils.bind(this,function(R){var T=R.getElementsByTagName("div");if(0<T.length)try{var M=T[0].cloneNode(!0),U=parseInt(M.style.marginLeft),n=parseInt(M.style.paddingTop),t=M.getElementsByTagName("div")[1],C=T=!1,F=M.style.alignItems,J=M.style.justifyContent;
+if(null!=M.style.writingMode){var K=M.style.writingMode;C="vertical-"==K.substring(0,9);T="-rl"==K.substring(K.length-3)}var k=!C&&"1px"==M.style.width||C&&"1px"==M.style.height;if(!C&&"1px"==M.style.height||C&&"1px"==M.style.width)M.style.alignItems=C&&T?"unsafe flex-end":"unsafe flex-start";k&&(M.style.justifyContent="unsafe flex-start");M.style.paddingTop="";M.style.marginLeft="";var v=M.outerHTML,G=D[v];null==G&&(M.style.position="absolute",M.style.visibility="hidden",document.body.appendChild(M),
+K=1,K="1px"==M.style.width?t.offsetWidth:parseInt(M.style.width),k=1,k="1px"==M.style.height?t.offsetHeight:parseInt(M.style.height),document.body.removeChild(M),G=new mxRectangle(U,n,K,k),D[v]=G);"1px"==M.style.height&&("unsafe center"==F?n-=G.height/2:"unsafe flex-end"==F&&(n-=G.height));if("1px"==M.style.width)if(!C&&"unsafe center"==J||C&&"unsafe center"==F)U-=G.width/2;else if(!C&&"unsafe flex-end"==J||C&&(!T&&"unsafe flex-end"==F||T&&"unsafe flex-start"==F))U-=G.width;G=new mxRectangle(U,n,
+G.width,G.height+parseInt(t.style.fontSize)/4);Q.push(mxUtils.bind(this,function(N){var O=A[v];null==O?Graph.htmlToPng(v,G.width,G.height,mxUtils.bind(this,function(P){l(R,U,n,G,P);A[v]=P;N()}),u):(l(R,U,n,G,O),N())}))}catch(N){E()}else E()})(e[z]);0==counter&&g(c);z=0;p()};EditorUi.prototype.addRadiobox=function(c,e,g,l,p,u,z){return this.addCheckbox(c,g,l,p,u,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,l,p,u,z,E){u=null!=u?u:!0;var D=document.createElement("input");D.style.marginRight=
+"8px";D.style.marginTop="16px";D.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();D.id=z;null!=E&&D.setAttribute("name",E);g&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);l&&D.setAttribute("disabled","disabled");u&&(c.appendChild(D),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",z),c.appendChild(g),p||mxUtils.br(c));return D};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);
+g.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var u=document.createElement("select");u.style.maxWidth="200px";u.style.width="auto";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));u.appendChild(l);var z=document.createElement("option");z.setAttribute("value",
+"custom");mxUtils.write(z,mxResources.get("custom")+"...");u.appendChild(z);c.appendChild(u);mxEvent.addListener(u,"change",mxUtils.bind(this,function(){if("custom"==u.value){var E=new FilenameDialog(this,p,mxResources.get("ok"),function(D){null!=D?(p=D,z.setAttribute("title",D)):(u.value="blank",z.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){u.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
+function(){g.checked&&(null==e||e.checked)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===u.value?"_blank":p:null},getEditInput:function(){return g},getEditSelect:function(){return u}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=u&&u!=mxConstants.NONE?(E.style.border="1px solid black",
+E.style.backgroundColor=u):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));
+l.appendChild(p);p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));l.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));l.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(e));c.appendChild(l);mxUtils.write(c,mxResources.get("borderColor")+
+":");var u="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(u||"none",function(D){u=D;g()});mxEvent.consume(E)}));g();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return u},getTarget:function(){return l.value},
+focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,l,p,u){u=null!=u?u:[];g&&(u.push("lightbox=1"),"auto"!=c&&u.push("target="+c),null!=e&&e!=mxConstants.NONE&&u.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=l&&0<l.length&&u.push("edit="+encodeURIComponent(l)),p&&u.push("layers=1"),this.editor.graph.foldingEnabled&&u.push("nav=1"));return u};EditorUi.prototype.createLink=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){var M=this.getCurrentFile();D=this.createUrlParameters(c,
+e,l,p,u,D);c=!0;null!=z?g="#U"+encodeURIComponent(z):E||null==M||""==M.getHash()?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+M.getHash(),c=!1);c&&null!=M&&null!=M.getTitle()&&M.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(M.getTitle()));A&&1<g.length&&(D.push("open="+g.substring(1)),g="");Q&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());R&&D.push("transparent=1");
+null!=T&&D.push("dark="+T);return(l&&(null!=z||null!=M&&M.getMode()!=App.MODE_GITHUB&&M.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){this.getBasenames();var M={};""!=p&&p!=mxConstants.NONE&&(M.highlight=p);"auto"!==l&&(M.target=l);A||(M.lightbox=
+!1);M.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(M.zoom=g/100);g=[];z&&(g.push("pages"),M.resize=!0,null!=this.pages&&null!=this.currentPage&&(M.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),M.resize=!0);E&&g.push("layers");D&&g.push("tags");null!=T&&(M["dark-mode"]=T);0<g.length&&(A&&g.push("lightbox"),M.toolbar=g.join(" "));null!=Q&&0<Q.length&&(M.edit=Q);null!=c?M.url=c:M.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+
+(u?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(M))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";R(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,l){var p=document.createElement("div");p.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxResources.get("html"));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(u);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");u=E.cloneNode(!0);u.setAttribute("value","copy");z.appendChild(u);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(D);mxUtils.br(z);z.appendChild(E);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));z.appendChild(D);var A=this.getCurrentFile();null==g&&null!=A&&A.constructor==window.DriveFile&&(D=
+document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),z.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId(),A)})));u.setAttribute("checked","checked");null==g&&E.setAttribute("disabled","disabled");p.appendChild(z);z=380;var Q=this.addLinkSection(p),R=document.createElement("select");R.style.maxWidth="260px";R.style.marginLeft="8px";
+R.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));R.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");R.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(p,mxResources.get("appearance")+
+":");p.appendChild(R);mxUtils.br(p);z+=26;var T=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");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%";p.appendChild(M);var U=this.addCheckbox(p,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var n=n=this.addCheckbox(p,mxResources.get("allPages"),D,!D),t=this.addCheckbox(p,mxResources.get("layers"),
+!0),C=this.addCheckbox(p,mxResources.get("tags"),!0),F=this.addCheckbox(p,mxResources.get("lightbox"),!0),J=null;if(EditorUi.enableHtmlEditOption){J=this.addEditButton(p,F);var K=J.getEditInput();K.style.marginBottom="16px";z+=50;mxEvent.addListener(F,"change",function(){F.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");K.checked&&F.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,p,mxUtils.bind(this,
+function(){l(E.checked?g:null,T.checked,M.value,Q.getTarget(),Q.getColor(),U.checked,n.checked,t.checked,C.checked,F.checked,null!=J?J.getLink():null,null!=R?R.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);u.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,l,p,u,z,E,D,A,Q){var R=document.createElement("div");R.style.whiteSpace="nowrap";var T=document.createElement("h3");mxUtils.write(T,c||mxResources.get("publish"));T.style.width="100%";T.style.textAlign="center";
+T.style.marginTop="2px";T.style.marginBottom="20px";R.appendChild(T);var M=document.createElement("select");c=30;M.className="geBtn";M.style.marginBottom="8px";M.style.marginLeft="0px";M.style.width="100%";M.style.boxSizing="border-box";if(null==E||""==E.getHash())p=null!=p?p:"https://www.drawio.com/doc/faq/publish-diagram-as-link",T=document.createElement("option"),mxUtils.write(T,mxResources.get("makeCopy")),T.setAttribute("value","copy"),M.appendChild(T);T=document.createElement("option");mxUtils.write(T,
+mxResources.get("authorizationRequired"));T.setAttribute("value","auth");M.appendChild(T);null!=E&&""!=E.getHash()||T.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");M.appendChild(E);null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),M.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));R.appendChild(M);
+mxUtils.br(R);M.focus();var U=null,n=null;if(null!=e||null!=g)c+=30,mxUtils.write(R,mxResources.get("width")+":"),U=document.createElement("input"),U.setAttribute("type","text"),U.style.marginRight="16px",U.style.width="50px",U.style.marginLeft="6px",U.style.marginRight="16px",U.style.marginBottom="10px",U.value="100%",R.appendChild(U),mxUtils.write(R,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",n.style.marginLeft="6px",n.style.marginBottom=
+"10px",n.value=g+"px",R.appendChild(n),mxUtils.br(R);var t=this.addLinkSection(R,l),C=A?this.addCheckbox(R,mxResources.get("transparentBackground"),!1):null;null!=C&&(c+=20);var F=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),F=this.addCheckbox(R,mxResources.get("selectedPage")+": "+e));var J=document.createElement("select");J.style.maxWidth="260px";J.style.marginLeft=
+"8px";J.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));J.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));J.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");J.appendChild(e);Q&&(mxUtils.write(R,mxResources.get("appearance")+":"),R.appendChild(J),
+mxUtils.br(R),c+=30);var K=this.addCheckbox(R,mxResources.get("lightbox"),!0,null,null,!l),k=this.addEditButton(R,K),v=k.getEditInput();l&&(v.style.marginLeft=K.style.marginLeft,K.style.display="none",c-=20);var G=this.addCheckbox(R,mxResources.get("layers"),!0);G.style.marginLeft=v.style.marginLeft;G.style.marginTop="8px";var N=this.addCheckbox(R,mxResources.get("tags"),!0);N.style.marginLeft=v.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(K,"change",function(){K.checked?
+(G.removeAttribute("disabled"),v.removeAttribute("disabled"),N.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));v.checked&&K.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")});l=new CustomDialog(this,R,mxUtils.bind(this,function(){D(t.getTarget(),t.getColor(),null==F?!1:F.checked,K.checked,k.getLink(),G.checked,null!=U?U.value:null,null!=n?n.value:
+null,N.checked,M.value,null!=C?C.checked:!1,J.value)}),null,mxResources.get("create"),p,u);this.showDialog(l.container,340,296+c,!0,!0);null!=U?(U.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?U.select():document.execCommand("selectAll",!1,null)):null==M.parentNode;t.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,l,p){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";u.appendChild(z);if(p){mxUtils.write(u,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";u.appendChild(E);mxUtils.write(u,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight=
+"16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";u.appendChild(D);mxUtils.br(u)}var A=this.addCheckbox(u,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Q=l?null:this.addCheckbox(u,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var R=l?null:this.addCheckbox(u,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=R&&(R.style.marginBottom="16px");
+c=new CustomDialog(this,u,mxUtils.bind(this,function(){var T=parseInt(E.value)/100||1,M=parseInt(D.value)||0;g(!A.checked,null!=Q?Q.checked:!1,null!=R?R.checked:!1,T,M)}),null,c,e);this.showDialog(c.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,l,p,u,z,E,D){z=null!=z?z:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var Q=this.editor.graph,R="jpeg"==E||"webp"==E?220:320,T=document.createElement("h3");mxUtils.write(T,
+c);T.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(T);mxUtils.write(A,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";A.appendChild(M);mxUtils.write(A,mxResources.get("borderWidth")+":");var U=document.createElement("input");U.setAttribute("type","text");U.style.marginRight=
+"16px";U.style.width="60px";U.style.marginLeft="4px";U.value=this.lastExportBorder||"0";A.appendChild(U);mxUtils.br(A);var n=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,Q.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";c=["selectionOnly","diagram",
+"page"];for(T=0;T<c.length;T++)if(!Q.isSelectionEmpty()||"selectionOnly"!=c[T]){var F=document.createElement("option");mxUtils.write(F,mxResources.get(c[T]));F.setAttribute("value",c[T]);C.appendChild(F)}D?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(C),mxUtils.br(A),R+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(n.checked=!0)})):u&&(A.appendChild(t),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),R+=30,mxEvent.addListener(n,"change",function(){n.checked?
+t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));Q.isSelectionEmpty()?D&&(n.style.display="none",n.nextSibling.style.display="none",n.nextSibling.nextSibling.style.display="none",R-=30):(C.value="diagram",t.setAttribute("checked","checked"),t.defaultChecked=!0,mxEvent.addListener(n,"change",function(){C.value=n.checked?"selectionOnly":"diagram"}));var J=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),K=document.createElement("select");
+K.style.maxWidth="260px";K.style.marginLeft="8px";K.style.marginTop="16px";u=document.createElement("option");u.setAttribute("value","light");mxUtils.write(u,mxResources.get("light"));K.appendChild(u);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));K.appendChild(D);"svg"==E&&mxUtils.lightDarkColorSupported?(u=document.createElement("option"),u.setAttribute("value","auto"),mxUtils.write(u,mxResources.get("automatic")),u.setAttribute("selected",
+"selected"),K.appendChild(u)):Editor.isDarkMode()?D.setAttribute("selected","selected"):u.setAttribute("selected","selected");mxUtils.write(A,mxResources.get("appearance")+":");A.appendChild(K);mxUtils.br(A);R+=26;var k=this.addCheckbox(A,mxResources.get("shadow"),Q.shadowVisible),v=null;if("png"==E||"jpeg"==E||"webp"==E)v=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),R+=30;Q=null!=this.pages?this.pages.length:1;var G=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram")+
+(1<Q?":":""),z,null,null,"jpeg"!=E&&"webp"!=E),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){G.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},u=document.createElement("option"),u.setAttribute("value","allPages"),mxUtils.write(u,mxResources.get("allPages")),N.appendChild(u),u=document.createElement("option"),u.setAttribute("value","currentPage"),mxUtils.write(u,mxResources.get("currentPage")),N.appendChild(u),
+1<Q&&(G.style.marginBottom="12px",N.style.marginBottom="16px",A.appendChild(N),mxUtils.br(A),R+=20),null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(G,"change",z),z()):G.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");e&&(O.checked=null!=this.lastEmbedImages?
+this.lastEmbedImages:!0,A.appendChild(O),mxUtils.write(A,mxResources.get("embedImages")),mxUtils.br(A),P.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,A.appendChild(P),mxUtils.write(A,mxResources.get("embedFonts")),mxUtils.br(A),R+=50);var S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));S.appendChild(u);z=document.createElement("option");
+z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));S.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));S.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==E&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(S),A.appendChild(z),mxUtils.br(A),mxUtils.br(A),R+=50);g=new CustomDialog(this,
+A,mxUtils.bind(this,function(){this.lastExportBorder=U.value;this.lastExportZoom=M.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=P.checked;this.lastEmbedInclude=N.value;p(M.value,J.checked,!n.checked,k.checked,G.checked,O.checked&&e,U.value,t.checked,("png"==E||"svg"==E)&&"currentPage"==N.value,S.value,null!=v?v.checked:null,null!=K?K.value:null,C.value,P.checked)}),null,g,l);this.showDialog(g.container,340,R,!0,!0,null,null,null,null,!0);M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+M.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,l,p){var u=document.createElement("div");u.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";u.appendChild(E)}var D=this.addCheckbox(u,mxResources.get("fit"),!0),A=this.addCheckbox(u,mxResources.get("shadow"),z.shadowVisible&&l,!l),Q=this.addCheckbox(u,
+g),R=this.addCheckbox(u,mxResources.get("lightbox"),!0),T=this.addEditButton(u,R),M=T.getEditInput(),U=1<z.model.getChildCount(z.model.getRoot()),n=this.addCheckbox(u,mxResources.get("layers"),U,!U);n.style.marginLeft=M.style.marginLeft;n.style.marginBottom="12px";n.style.marginTop="8px";mxEvent.addListener(R,"change",function(){R.checked?(U&&n.removeAttribute("disabled"),M.removeAttribute("disabled")):(n.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));M.checked&&R.checked?
+T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,u,mxUtils.bind(this,function(){c(D.checked,A.checked,Q.checked,R.checked,T.getLink(),n.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,l,p,u,z,E){function D(M){var U=" ",n="";l&&(U=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=Q?"&page="+Q:"")+(p?"&edit=_blank":"")+(u?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");c&&(n+="max-width:100%;");var t="";g&&(t=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');z('<img src="'+M+'"'+t+(""!=n?' style="'+n+'"':"")+U+"/>")}var A=this.editor.graph.getGraphBounds(),Q=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(M){var U=l?this.getFileData(!0):null;M=
+this.createImageDataUri(M,U,"png");D(M)}),null,null,null,mxUtils.bind(this,function(M){E({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),A.width*A.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var R="";g&&(R="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var T=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+R+"&xml="+encodeURIComponent(e));T.send(mxUtils.bind(this,function(){200<=T.getStatus()&&
+299>=T.getStatus()?D("data:image/png;base64,"+T.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,l,p,u,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g,"auto"),D=E.getElementsByTagName("a");if(null!=D)for(var A=0;A<D.length;A++){var Q=D[A].getAttribute("href");null!=Q&&"#"==Q.charAt(0)&&"_blank"==D[A].getAttribute("target")&&D[A].removeAttribute("target")}l&&
E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(g){var R=" ",T="";l&&(R="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"+(p?"&edit=_blank":"")+(u?"&layers=1":
-"")+"');}})(this);\"",T+="cursor:pointer;");c&&(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(L){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(L))+'"'+(""!=T?' style="'+T+'"':"")+R+"/>")}))}else T="",l&&(e=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+"")+"');}})(this);\"",T+="cursor:pointer;");c&&(T+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(M){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(M))+'"'+(""!=T?' style="'+T+'"':"")+R+"/>")}))}else T="",l&&(e=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(u?"&layers=1":"")+"');}}})(this);"),T+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),p=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),T+="max-width:100%;max-height:"+p+"px;",E.removeAttribute("height")),""!=T&&E.setAttribute("style",T),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
c;else if("mxfile"==c.nodeName){var l=c.getElementsByTagName("diagram");if(0<l.length){g=l[0];var p=e.getGlobalVariable;e.getGlobalVariable=function(u){return"page"==u?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==u?1:p.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}l=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(u){}finally{this.editor.graph=l}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=c){if(c.hasAttribute("scale")){var l=parseFloat(c.getAttribute("scale"));!isNaN(l)&&0<l&&(e=l)}c.hasAttribute("border")&&(l=parseInt(c.getAttribute("border")),!isNaN(l)&&0<l&&(g=l))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,l,p){try{var u=this.editor.graph,z=null;if(null!=g&&0<g.length)u=this.createTemporaryGraph(u.getStylesheet()),document.body.appendChild(u.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
!0),u),z=g;else if(null!=this.pages&&this.currentPage!=this.pages[0]){u=this.createTemporaryGraph(u.getStylesheet());var E=u.getGlobalVariable;u.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?u.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&u.setBackgroundImage(D.viewState.backgroundImage);u.getGlobalVariable=function(A){return"page"==A?D.getName():"pagenumber"==A?1:E.apply(this,arguments)};document.body.appendChild(u.container);
-u.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(A){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var P=A.toDataURL("image/png");P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(z));c(P.substring(P.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(R){null!=e&&e(R)}}),null,null,null,mxUtils.bind(this,function(A){null!=e&&e(A)}),null,null,l,null,u.shadowVisible,null,u,p,null,
-null,null,"diagram",null)}catch(A){null!=e&&e(A)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,l,p,u,z,E,D,A,P,R,T){E=null!=E?E:!0;P=null!=P?P:0;z=null!=D?D:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);u=e.getSvg(z,A,P,null,null,u,null,D,null,e.shadowVisible||R,null,T,"diagram");(e.shadowVisible||R)&&e.addSvgShadow(u,null,null,0==P);null!=c&&u.setAttribute("content",c);null!=g&&u.setAttribute("resource",
-g);var L=mxUtils.bind(this,function(U){U=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(U);null!=p&&p(U);return U});e.mathEnabled&&this.editor.addMathCss(u);if(null!=p)this.embedFonts(u,mxUtils.bind(this,function(U){E?this.editor.convertImages(U,mxUtils.bind(this,function(n){L(n)})):L(U)}));else return L(u)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(l){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,l,p,u,z,E,D,A,P,R,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportImage(c,e,g,l,p,u,z,E,D,A,P,R,T)}));this.handleError(U)}))){var L=this.editor.graph.isSelectionEmpty();
-g=null!=g?g:L;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(U){this.spinner.stop();try{this.saveCanvas(U,p?this.getFileData(!0,null,null,null,g,E,null,null,null,null,null,c,u):null,D,null==this.pages||0==this.pages.length,P)}catch(n){this.handleError(n)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(U){this.spinner.stop();this.handleError(U)}),null,g,c||1,e,l,null,null,u,z,A,R,T)}catch(U){this.spinner.stop(),this.handleError(U)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,g,l,p,u,z){e=null!=e?e:0;g=null!=g?g:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var P=this.editor.extractGraphModel(A.documentElement,
-null!=this.pages);if(null!=P&&"mxfile"==P.nodeName&&null!=this.pages){var R=P.getElementsByTagName("diagram");if(1==R.length&&!u){if(P=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(c[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var T=R[0].getAttribute("name");null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,T))}}else if(0<R.length){u=[];var L=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[R[0].getAttribute("id")]=
-this.pages[0].getId(),T=R[0].getAttribute("name"),null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],T)),P=Editor.parseDiagramNode(R[0]),l=!1,L=1);for(;L<R.length;L++){var U=R[L].getAttribute("id");R[L].removeAttribute("id");var n=this.updatePageRoot(new DiagramPage(R[L]));c[U]=R[L].getAttribute("id");var t=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[t+1]));D.model.execute(new ChangePage(this,n,n,t,!0));u.push(n)}this.updatePageLinks(c,
-u)}}if(null!=P&&"mxGraphModel"===P.nodeName){E=D.importGraphModel(P,e,g,l);if(null!=E)for(this.addLocalPagesToMapping(c),L=0;L<E.length;L++)this.updatePageLinksForCell(c,E[L]);var B=D.parseBackgroundImage(P.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var F=new ChangePageSetup(this,null,B);F.ignoreColor=!0;D.model.execute(F)}}z&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(J){if(p)throw J;
+u.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(A){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Q=A.toDataURL("image/png");Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(z));c(Q.substring(Q.lastIndexOf(",")+1));u!=this.editor.graph&&u.container.parentNode.removeChild(u.container)}catch(R){null!=e&&e(R)}}),null,null,null,mxUtils.bind(this,function(A){null!=e&&e(A)}),null,null,l,null,u.shadowVisible,null,u,p,null,
+null,null,"diagram",null)}catch(A){null!=e&&e(A)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){E=null!=E?E:!0;Q=null!=Q?Q:0;z=null!=D?D:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");D=this.editor.graph.createSvgImageExport(null!=c);u=e.getSvg(z,A,Q,null,null,u,null,D,null,e.shadowVisible||R,null,T,"diagram");(e.shadowVisible||R)&&e.addSvgShadow(u,null,null,0==Q);null!=c&&u.setAttribute("content",c);null!=g&&u.setAttribute("resource",
+g);var M=mxUtils.bind(this,function(U){U=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(U);null!=p&&p(U);return U});e.mathEnabled&&this.editor.addMathCss(u);if(null!=p)this.embedFonts(u,mxUtils.bind(this,function(U){E?this.editor.convertImages(U,mxUtils.bind(this,function(n){M(n)})):M(U)}));else return M(u)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(l){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportImage(c,e,g,l,p,u,z,E,D,A,Q,R,T)}));this.handleError(U)}))){var M=this.editor.graph.isSelectionEmpty();
+g=null!=g?g:M;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(U){this.spinner.stop();try{this.saveCanvas(U,p?this.getFileData(!0,null,null,null,g,E,null,null,null,null,null,c,u):null,D,null==this.pages||0==this.pages.length,Q)}catch(n){this.handleError(n)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(U){this.spinner.stop();this.handleError(U)}),null,g,c||1,e,l,null,null,u,z,A,R,T)}catch(U){this.spinner.stop(),this.handleError(U)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,g,l,p,u,z){e=null!=e?e:0;g=null!=g?g:0;var E=[];try{var D=this.editor.graph;if(null!=c&&0<c.length){D.model.beginUpdate();try{var A=mxUtils.parseXml(c);c={};var Q=this.editor.extractGraphModel(A.documentElement,
+null!=this.pages);if(null!=Q&&"mxfile"==Q.nodeName&&null!=this.pages){var R=Q.getElementsByTagName("diagram");if(1==R.length&&!u){if(Q=Editor.parseDiagramNode(R[0]),null!=this.currentPage&&(c[R[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var T=R[0].getAttribute("name");null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,T))}}else if(0<R.length){u=[];var M=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[R[0].getAttribute("id")]=
+this.pages[0].getId(),T=R[0].getAttribute("name"),null!=T&&""!=T&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],T)),Q=Editor.parseDiagramNode(R[0]),l=!1,M=1);for(;M<R.length;M++){var U=R[M].getAttribute("id");R[M].removeAttribute("id");var n=this.updatePageRoot(new DiagramPage(R[M]));c[U]=R[M].getAttribute("id");var t=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[t+1]));D.model.execute(new ChangePage(this,n,n,t,!0));u.push(n)}this.updatePageLinks(c,
+u)}}if(null!=Q&&"mxGraphModel"===Q.nodeName){E=D.importGraphModel(Q,e,g,l);if(null!=E)for(this.addLocalPagesToMapping(c),M=0;M<E.length;M++)this.updatePageLinksForCell(c,E[M]);var C=D.parseBackgroundImage(Q.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(c,C);var F=new ChangePageSetup(this,null,C);F.ignoreColor=!0;D.model.execute(F)}}z&&D.pasteCellStyles(D.includeDescendants(E),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(J){if(p)throw J;
this.handleError(J)}return E};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
function(c,e){var g=document.createElement("div"),l=this.editor.graph,p=l.getLinkForCell(e);null!=p&&l.setLinkForCell(e,this.updatePageLink(c,p));if(l.isHtmlLabel(e)){g.innerHTML=Graph.sanitizeHtml(l.getLabel(e));for(var u=g.getElementsByTagName("a"),z=!1,E=0;E<u.length;E++)p=u[E].getAttribute("href"),null!=p&&(u[E].setAttribute("href",this.updatePageLink(c,p)),z=!0);z&&l.labelChanged(e,g.innerHTML)}for(E=0;E<l.model.getChildCount(e);E++)this.updatePageLinksForCell(c,l.model.getChildAt(e,E))};EditorUi.prototype.updatePageLink=
function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var l=JSON.parse(e.substring(17));if(null!=l.actions){for(var p=0;p<l.actions.length;p++){var u=l.actions[p];if(null!=u.open&&Graph.isPageLink(u.open)){var z=u.open.substring(u.open.indexOf(",")+1);g=c[z];null!=g?u.open="data:page/id,"+g:null==this.getPageById(z)&&delete u.open}}e="data:action/json,"+JSON.stringify(l)}}catch(E){}return e};
EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,l,p){var u=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=g?g(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){l=null!=l?l:c.name;var E=mxUtils.bind(this,function(A){z.clear()&&u(A)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var A=this.isRemoteVisioFormat(l);
-try{var P=l.lastIndexOf(".");if(0<=P&&P<l.length)l.substring(P+1).toUpperCase();else{var R=l.lastIndexOf("/");0<=R&&R<l.length&&(l=l.substring(R+1))}}catch(L){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",c,l);var T=new XMLHttpRequest;T.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
-null!=p&&T.setRequestHeader("x-convert-custom",p);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&z.clear())if(200<=T.status&&299>=T.status)try{var L=T.response;if("text/xml"==L.type){var U=new FileReader;U.onload=mxUtils.bind(this,function(n){try{e(n.target.result)}catch(t){E({message:mxResources.get("errorLoadingFile")})}});U.readAsText(L)}else this.doImportVisio(L,e,E,l)}catch(n){E(n)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(U=new FileReader,
-U.onload=function(){try{E({message:JSON.parse(U.result).Message})}catch(n){E(n)}},U.readAsText(T.response))}catch(n){E({})}});T.send(A)}else if(z.clear())try{this.doImportVisio(c,e,E,l)}catch(L){E(L)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),u)};EditorUi.prototype.importGraphML=function(c,e,g){var l=
+try{var Q=l.lastIndexOf(".");if(0<=Q&&Q<l.length)l.substring(Q+1).toUpperCase();else{var R=l.lastIndexOf("/");0<=R&&R<l.length&&(l=l.substring(R+1))}}catch(M){}if(A)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{A=new FormData;A.append("file1",c,l);var T=new XMLHttpRequest;T.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));T.responseType="blob";this.addRemoteServiceSecurityCheck(T);
+null!=p&&T.setRequestHeader("x-convert-custom",p);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState&&z.clear())if(200<=T.status&&299>=T.status)try{var M=T.response;if("text/xml"==M.type){var U=new FileReader;U.onload=mxUtils.bind(this,function(n){try{e(n.target.result)}catch(t){E({message:mxResources.get("errorLoadingFile")})}});U.readAsText(M)}else this.doImportVisio(M,e,E,l)}catch(n){E(n)}else try{""==T.responseType||"text"==T.responseType?E({message:T.responseText}):(U=new FileReader,
+U.onload=function(){try{E({message:JSON.parse(U.result).Message})}catch(n){E(n)}},U.readAsText(T.response))}catch(n){E({})}});T.send(A)}else if(z.clear())try{this.doImportVisio(c,e,E,l)}catch(M){E(M)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,E))}),u)};EditorUi.prototype.importGraphML=function(c,e,g){var l=
mxUtils.bind(this,function(p){this.loadingExtensions=!1;null!=g?g(p):this.handleError(p)});this.createTimeout(null,mxUtils.bind(this,function(p){var u=mxUtils.bind(this,function(E){p.clear()&&l(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(p.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,l)}catch(E){u(E)}else u({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,
mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,u))}),l)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(g){this.loadingExtensions=!1;this.handleError(g)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(g){var l=mxUtils.bind(this,function(u){g.clear()&&e(u)}),p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(g.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),
(new VsdxExport(this)).exportCurrentDiagrams(c)||l({message:mxResources.get("unknownError")})}catch(u){l(u)}else l({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(p,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",p,null,null,null,l))}),e):e({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,e,g){var l=
mxUtils.bind(this,function(p){this.loadingExtensions=!1;null!=g?g(p):this.handleError(p)});this.createTimeout(null,mxUtils.bind(this,function(p){var u=mxUtils.bind(this,function(E){p.clear()&&l(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(p.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);e(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",E];null!=E.state&&D.push(JSON.parse(E.state));
-if(null!=E.svgThumbs)for(var A=0;A<E.svgThumbs.length;A++)D.push(Editor.createSvgDataUri(E.svgThumbs[A]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(P){}}catch(P){null!=window.console&&console.error(P),u(P)}else u({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",
+if(null!=E.svgThumbs)for(var A=0;A<E.svgThumbs.length;A++)D.push(Editor.createSvgDataUri(E.svgThumbs[A]));null!=E.thumb&&D.push(E.thumb);console.log.apply(console,D)}}catch(Q){}}catch(Q){null!=window.console&&console.error(Q),u(Q)}else u({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",
function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",z,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,u))}),l)};EditorUi.prototype.createMermaidXml=function(c,e,g,l,p,u){var z=new Graph(document.createElement("div"));g=z.insertVertex(null,null,null,0,0,l,p,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
g+";");z.setAttributeForCell(g,"mermaidData",JSON.stringify({data:c,config:e},null,2));null!=u&&z.setAttributeForCell(g,"templatePrompt",u);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,g){var l=0,p=function(){for(var z=document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),E=0;E<z.length;E++)null!=z[E].parentNode&&z[E].parentNode.removeChild(z[E])},u=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,
-function(z){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(A){z.clear()&&(p(),g(A))});E.send(mxUtils.bind(this,function(A){if(z.isAlive())if(200<=A.getStatus()&&299>=A.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(A.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(T,L,U){this.tryAndHandle(mxUtils.bind(this,function(){z.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",
-[c],"result",[R]),p(),e(R,T,L,U))}),D)}),D,mxUtils.bind(this,function(T){3>l++?z.clear()&&u():D(T)}))}),D);else{var P={message:mxResources.get("error")+" "+A.getStatus()};try{P=JSON.parse(A.getText()),P=P.error}catch(R){}D(P)}}),D)}),g)});u()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");
+function(z){var E=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),D=mxUtils.bind(this,function(A){z.clear()&&(p(),g(A))});E.send(mxUtils.bind(this,function(A){if(z.isAlive())if(200<=A.getStatus()&&299>=A.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var R=mxUtils.trim(A.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(T,M,U){this.tryAndHandle(mxUtils.bind(this,function(){z.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",
+[c],"result",[R]),p(),e(R,T,M,U))}),D)}),D,mxUtils.bind(this,function(T){3>l++?z.clear()&&u():D(T)}))}),D);else{var Q={message:mxResources.get("error")+" "+A.getStatus()};try{Q=JSON.parse(A.getText()),Q=Q.error}catch(R){}D(Q)}}),D)}),g)});u()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");
c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var g=1<e.length?e[1]:null;if(null!=g){var l=g.indexOf("-");0<l&&(g=g.substring(0,l))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=g&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,g))e.shift(),c=mxUtils.trim(e.join("\n")),e=c.split("\n");g=e[0].split(" ")[0].replace(/:$/,"");l=g.indexOf("-");0<l&&(g=g.substring(0,l));try{"mindmap"==g&&2<e.length&&(c=extractMermaidMindmap(e))}catch(p){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,g)&&(c=
null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,g,l,p){var u=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=l?l(E):this.handleError(E)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);e.securityLevel="strict";e.startOnLoad=!1;e.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme=
-"dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var A=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<A.length&&"error"!=A[0].getAttribute("aria-roledescription")){var P=parseFloat(A[0].getAttribute("width")),R=parseFloat(A[0].getAttribute("height"));if(isNaN(P)||
-isNaN(R))try{var T=A[0].getAttribute("viewBox").split(/\s+/);P=parseFloat(T[2]);R=parseFloat(T[3])}catch(L){P=P||100,R=R||100}g(this.convertDataUri(Editor.createSvgDataUri(D)),P,R)}else null!=p?p():l({message:mxResources.get("invalidInput")})}catch(L){l(L)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(D){E(D.svg)}).catch(function(D){null!=p?p(D):l(D)})}catch(D){l(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?
+"dark");var E=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');D=D.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var A=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<A.length&&"error"!=A[0].getAttribute("aria-roledescription")){var Q=parseFloat(A[0].getAttribute("width")),R=parseFloat(A[0].getAttribute("height"));if(isNaN(Q)||
+isNaN(R))try{var T=A[0].getAttribute("viewBox").split(/\s+/);Q=parseFloat(T[2]);R=parseFloat(T[3])}catch(M){Q=Q||100,R=R||100}g(this.convertDataUri(Editor.createSvgDataUri(D)),Q,R)}else null!=p?p():l({message:mxResources.get("invalidInput")})}catch(M){l(M)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(D){E(D.svg)}).catch(function(D){null!=p?p(D):l(D)})}catch(D){l(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?
window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,u)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,u))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,l){function p(E,D,A){c1=E>>2;c2=(E&3)<<4|D>>4;c3=(D&15)<<2|A>>6;c4=A&63;r="";r+=u(c1&63);r+=u(c2&
63);r+=u(c3&63);return r+=u(c4&63)}function u(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";for(i=0;i<E.length;i+=3)r=i+2==E.length?r+p(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+p(E.charCodeAt(i),0,0):r+p(E.charCodeAt(i),E.charCodeAt(i+
-1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var P=new Image;P.onload=function(){try{var R=P.width,T=P.height;if(0==R&&0==T){var L=D.result,U=L.indexOf(","),n=decodeURIComponent(escape(atob(L.substring(U+1)))),t=mxUtils.parseXml(n).getElementsByTagName("svg");0<
-t.length&&(R=parseFloat(t[0].getAttribute("width")),T=parseFloat(t[0].getAttribute("height")))}g(D.result,R,T)}catch(B){l(B)}};P.src=D.result};D.onerror=function(A){l(A)}}else l(E)};z.onerror=function(E){l(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var l=this.editor.graph,p=null;l.getModel().beginUpdate();try{p=l.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=
+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(A){var Q=new Image;Q.onload=function(){try{var R=Q.width,T=Q.height;if(0==R&&0==T){var M=D.result,U=M.indexOf(","),n=decodeURIComponent(escape(atob(M.substring(U+1)))),t=mxUtils.parseXml(n).getElementsByTagName("svg");0<
+t.length&&(R=parseFloat(t[0].getAttribute("width")),T=parseFloat(t[0].getAttribute("height")))}g(D.result,R,T)}catch(C){l(C)}};Q.src=D.result};D.onerror=function(A){l(A)}}else l(E)};z.onerror=function(E){l(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var l=this.editor.graph,p=null;l.getModel().beginUpdate();try{p=l.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=
function(c,e,g,l,p,u,z,E){u=null!=u?u:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(T){4==T.readyState&&200<=T.status&&299>=T.status&&this.editor.graph.setSelectionCells(this.insertTextAt(T.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var D=
this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var A=Editor.extractGraphModelFromPdf(c);if(null!=A&&0<A.length)return this.importXml(A,e,g,u,!0,E)}if(Editor.isPngDataUrl(c)&&(A=Editor.extractGraphModelFromPng(c),null!=A&&0<A.length))return this.importXml(A,e,g,u,!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(A=c.substring(c.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(c.substring(c.indexOf(",")+
-1));var P=this.importXml(A,e,g,u,!0,E);if(0<P.length)return P}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(n,t,B){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(g),t,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(n)+";"))}),z,this.maxImageSize);else{var L=Math.min(1,Math.min(this.maxImageSize/T.width,
-this.maxImageSize/T.height)),U=Math.round(T.width*L);T=Math.round(T.height*L);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(g),U,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(e),D.snap(g),1,1,"text;"+(l?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted",
+1));var Q=this.importXml(A,e,g,u,!0,E);if(0<Q.length)return Q}catch(T){}this.loadImage(c,mxUtils.bind(this,function(T){if("data:"==c.substring(0,5))this.resizeImage(T,c,mxUtils.bind(this,function(n,t,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(g),t,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(n)+";"))}),z,this.maxImageSize);else{var M=Math.min(1,Math.min(this.maxImageSize/T.width,
+this.maxImageSize/T.height)),U=Math.round(T.width*M);T=Math.round(T.height*M);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(e),D.snap(g),U,T,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var T=null;D.getModel().beginUpdate();try{T=D.insertVertex(D.getDefaultParent(),null,c,D.snap(e),D.snap(g),1,1,"text;"+(l?"html=1;":"")),D.updateCellSize(T),D.fireEvent(new mxEventObject("textInserted",
"cells",[T]))}finally{D.getModel().endUpdate()}D.setSelectionCell(T)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,u,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(T){this.editor.graph.setSelectionCells(this.importXml(T,e,g,u,null,E))}),mxUtils.bind(this,function(T){this.handleError(T)}));else{D=this.editor.graph;p=null;D.getModel().beginUpdate();try{p=D.insertVertex(D.getDefaultParent(),
null,"",D.snap(e),D.snap(g),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[p]));l&&(c=D.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");p.value=c;D.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var R=D.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=R.width;p.geometry.height=R.height}Graph.isLink(p.value)&&D.setLinkForCell(p,p.value);p.geometry.width+=D.gridSize;
p.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};
EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var 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(z,E){StorageFile.listFiles(this,"F",z,E)});window.openBrowserFile=mxUtils.bind(this,function(z,E,D){StorageFile.getFileContent(this,z,E,D)});window.deleteBrowserFile=mxUtils.bind(this,function(z,E,D){StorageFile.deleteFile(this,z,E,D)});if(!e){var l=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=
new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(z=new Blob([z],{type:"application/octet-stream"}),this.importVisio(z,mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!e){var p=this.dialog,u=p.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=l;u.apply(p,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,e,g){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var z=0,E,D=!1;u.forEach(function(A,P){A=
-P.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,P.async("string").then(function(R){0==R.indexOf("<mxfile ")?e(R):g()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>z&&(z=A,E=P))});0<z?E.async("string").then(function(A){(new XMLHttpRequest).upload&&l.isRemoteFileFormat(A,c.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(A,mxUtils.bind(this,function(P){4==P.readyState&&(200<=P.status&&299>=P.status?e(P.responseText):g())}),
-c.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",p,null,null,null,g))};EditorUi.prototype.importFile=function(c,e,g,l,p,u,z,E,D,A,P,R){A=null!=A?A:!0;var T=!1,L=null,U=mxUtils.bind(this,function(n){var t=null;null!=n&&"<mxlibrary"==n.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,n,z)),this.showSidebar()):t=this.importXml(n,g,l,A,null,
-null!=R?mxEvent.isControlDown(R):null);null!=E&&E(t)});"image"==e.substring(0,5)?(D=!1,"image/png"==e.substring(0,9)&&(P=P?null:this.extractGraphModelFromPng(c),null!=P&&0<P.length&&(L=this.importXml(P,g,l,A,null,null!=R?mxEvent.isControlDown(R):null),D=!0)),D||(D=this.editor.graph,P=c.indexOf(";"),0<P&&(c=c.substring(0,P)+c.substring(c.indexOf(",",P+1))),A&&D.isGridEnabled()&&(g=D.snap(g),l=D.snap(l)),P="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;",
-"image/svg"==e.substring(0,9)&&(P+="editableCssRules=.*;"),L=[D.insertVertex(null,null,"",g,l,p,u,P+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,U)):null!=D&&null!=z&&EditorUi.isVisioFilename(z)?(T=!0,this.importVisio(D,U)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,e=mxUtils.bind(this,function(n){4==n.readyState&&(200<=n.status&&299>=n.status?U(n.responseText):
-null!=E&&(E(null),this.showError(mxResources.get("error"),413==n.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(D,e,z)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,U,mxUtils.bind(this,function(){L=this.insertTextAt(this.validateFileData(c),g,l,!0,null,A);E(L)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(L=this.insertTextAt(this.validateFileData(c),g,l,!0,null,A,null,null!=R?mxEvent.isControlDown(R):
-null));T||null==E||E(L);return L};EditorUi.prototype.importFiles=function(c,e,g,l,p,u,z,E,D,A,P,R,T){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var L=null!=e&&null!=g,U=!0;e=null!=e?e:0;g=null!=g?g:0;var n=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var t=P||this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>t){n=!0;break}var F=mxUtils.bind(this,function(){var J=this.editor.graph,K=J.gridSize;p=null!=
-p?p:mxUtils.bind(this,function(Q,S,V,W,X,Z,Y,ea,ca){try{if(null!=Q&&"<mxlibrary"==Q.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,Q,Y)),this.showSidebar(),null;this.isCompatibleString(Q)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(L=!1,W=V=0);return this.importFile(Q,S,V,W,X,Z,Y,ea,ca,L,R,T)}catch(ka){return this.handleError(ka),null}});u=null!=u?u:mxUtils.bind(this,function(Q){J.setSelectionCells(Q)});if(this.spinner.spin(document.body,
-mxResources.get("loading")))for(var k=c.length,v=k,G=[],N=mxUtils.bind(this,function(Q,S){G[Q]=S;if(0==--v){this.spinner.stop();if(null!=E)E(G);else{var V=[];J.getModel().beginUpdate();try{for(Q=0;Q<G.length;Q++){var W=G[Q]();null!=W&&(V=V.concat(W))}}finally{J.getModel().endUpdate()}}u(V)}}),O=0;O<k;O++)mxUtils.bind(this,function(Q){var S=c[Q];if(null!=S){var V=new FileReader;V.onload=mxUtils.bind(this,function(W){if(null==z||z(S))try{if("image/"==S.type.substring(0,6))if("image/svg"==S.type.substring(0,
-9)){var X=Graph.clipSvgDataUri(W.target.result),Z=X.indexOf(","),Y=decodeURIComponent(escape(atob(X.substring(Z+1)))),ea=mxUtils.parseXml(Y),ca=ea.getElementsByTagName("svg");if(0<ca.length){var ka=ca[0],ba=R?null:ka.getAttribute("content");null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(ba,!0)));null!=ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba));null==ba||"<mxfile "!==ba.substring(0,8)&&"<mxGraphModel "!==ba.substring(0,14)?N(Q,mxUtils.bind(this,
-function(){try{if(null!=ea){var ia=ea.getElementsByTagName("svg");if(0<ia.length){var fa=ia[0],da=fa.getAttribute("width"),za=fa.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var va=fa.getAttribute("viewBox");if(null==va||0==va.length)fa.setAttribute("viewBox","0 0 "+da+" "+za);else if(isNaN(da)||isNaN(za)){var oa=va.split(" ");3<oa.length&&(da=parseFloat(oa[2]),za=parseFloat(oa[3]))}X=Editor.createSvgDataUri(mxUtils.getXml(fa));
-var Ba=Math.min(1,Math.min(l/Math.max(1,da)),l/Math.max(1,za)),ma=p(X,S.type,e+Q*K,g+Q*K,Math.max(1,Math.round(da*Ba)),Math.max(1,Math.round(za*Ba)),S.name);if(null!=ma&&(isNaN(da)||isNaN(za))){var ta=new Image;ta.onload=mxUtils.bind(this,function(){da=Math.max(1,ta.width);za=Math.max(1,ta.height);ma[0].geometry.width=da;ma[0].geometry.height=za;fa.setAttribute("viewBox","0 0 "+da+" "+za);X=Editor.createSvgDataUri(mxUtils.getXml(fa));var qa=X.indexOf(";");0<qa&&(X=X.substring(0,qa)+X.substring(X.indexOf(",",
-qa+1)));J.setCellStyles("image",X,[ma[0]])});ta.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return ma}}}catch(qa){}return null})):N(Q,mxUtils.bind(this,function(){return p(ba,"text/xml",e+Q*K,g+Q*K,0,0,S.name)}))}else N(Q,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==S.type){var ha=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=ha&&0<ha.length){var aa=new Image;aa.src=W.target.result;N(Q,mxUtils.bind(this,function(){return p(ha,"text/xml",e+Q*K,g+Q*K,aa.width,
-aa.height,S.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,function(ia){this.resizeImage(ia,W.target.result,mxUtils.bind(this,function(fa,da,za){N(Q,mxUtils.bind(this,function(){if(null!=fa&&fa.length<
-A){var va=U&&this.isResampleImageSize(S.size,P)?Math.min(1,Math.min(l/da,l/za)):1;return p(fa,S.type,e+Q*K,g+Q*K,Math.round(da*va),Math.round(za*va),S.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),U,l,P,S.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=W.target.result,p(X,S.type,e+Q*K,g+Q*K,240,160,S.name,function(ia){N(Q,function(){return ia})},S)}catch(ia){N(Q,mxUtils.bind(this,function(){return null})),
-null!=window.console&&console.error(ia,S)}else N(Q,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(S.name)?p(null,S.type,e+Q*K,g+Q*K,240,160,S.name,function(W){N(Q,function(){return W})},S):"image"==S.type.substring(0,5)||"application/pdf"==S.type?V.readAsDataURL(S):V.readAsText(S)}})(O)});if(n){n=[];for(B=0;B<c.length;B++)n.push(c[B]);c=n;this.confirmImageResize(function(J){U=J;F()},D)}else F()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+function(){window.openFile=null});if(!e){var p=this.dialog,u=p.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=l;u.apply(p,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,e,g){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(u){if(mxUtils.isEmptyObject(u.files))g();else{var z=0,E,D=!1;u.forEach(function(A,Q){A=
+Q.name.toLowerCase();"diagram/diagram.xml"==A?(D=!0,Q.async("string").then(function(R){0==R.indexOf("<mxfile ")?e(R):g()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>z&&(z=A,E=Q))});0<z?E.async("string").then(function(A){(new XMLHttpRequest).upload&&l.isRemoteFileFormat(A,c.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(A,mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?e(Q.responseText):g())}),
+c.name):g()}):D||g()}},function(u){g(u)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",p,null,null,null,g))};EditorUi.prototype.importFile=function(c,e,g,l,p,u,z,E,D,A,Q,R){A=null!=A?A:!0;var T=!1,M=null,U=mxUtils.bind(this,function(n){var t=null;null!=n&&"<mxlibrary"==n.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,n,z)),this.showSidebar()):t=this.importXml(n,g,l,A,null,
+null!=R?mxEvent.isControlDown(R):null);null!=E&&E(t)});"image"==e.substring(0,5)?(D=!1,"image/png"==e.substring(0,9)&&(Q=Q?null:this.extractGraphModelFromPng(c),null!=Q&&0<Q.length&&(M=this.importXml(Q,g,l,A,null,null!=R?mxEvent.isControlDown(R):null),D=!0)),D||(D=this.editor.graph,Q=c.indexOf(";"),0<Q&&(c=c.substring(0,Q)+c.substring(c.indexOf(",",Q+1))),A&&D.isGridEnabled()&&(g=D.snap(g),l=D.snap(l)),Q="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;",
+"image/svg"==e.substring(0,9)&&(Q+="editableCssRules=.*;"),M=[D.insertVertex(null,null,"",g,l,p,u,Q+"image="+c+";")])):/(\.*<graphml )/.test(c)?(T=!0,this.importGraphML(c,U)):null!=D&&null!=z&&EditorUi.isVisioFilename(z)?(T=!0,this.importVisio(D,U)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(T=!0,e=mxUtils.bind(this,function(n){4==n.readyState&&(200<=n.status&&299>=n.status?U(n.responseText):
+null!=E&&(E(null),this.showError(mxResources.get("error"),413==n.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(D,e,z)):0==c.indexOf("PK")&&null!=D?(T=!0,this.importZipFile(D,U,mxUtils.bind(this,function(){M=this.insertTextAt(this.validateFileData(c),g,l,!0,null,A);E(M)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(M=this.insertTextAt(this.validateFileData(c),g,l,!0,null,A,null,null!=R?mxEvent.isControlDown(R):
+null));T||null==E||E(M);return M};EditorUi.prototype.importFiles=function(c,e,g,l,p,u,z,E,D,A,Q,R,T){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var M=null!=e&&null!=g,U=!0;e=null!=e?e:0;g=null!=g?g:0;var n=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var t=Q||this.resampleThreshold,C=0;C<c.length;C++)if("image/svg"!==c[C].type.substring(0,9)&&"image/"===c[C].type.substring(0,6)&&c[C].size>t){n=!0;break}var F=mxUtils.bind(this,function(){var J=this.editor.graph,K=J.gridSize;p=null!=
+p?p:mxUtils.bind(this,function(P,S,V,W,X,Z,Y,ea,ca){try{if(null!=P&&"<mxlibrary"==P.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,P,Y)),this.showSidebar(),null;this.isCompatibleString(P)&&1==c.length&&null!=T&&"drop"==T.type&&this.isBlankFile()&&!this.canUndo()&&(M=!1,W=V=0);return this.importFile(P,S,V,W,X,Z,Y,ea,ca,M,R,T)}catch(ka){return this.handleError(ka),null}});u=null!=u?u:mxUtils.bind(this,function(P){J.setSelectionCells(P)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var k=c.length,v=k,G=[],N=mxUtils.bind(this,function(P,S){G[P]=S;if(0==--v){this.spinner.stop();if(null!=E)E(G);else{var V=[];J.getModel().beginUpdate();try{for(P=0;P<G.length;P++){var W=G[P]();null!=W&&(V=V.concat(W))}}finally{J.getModel().endUpdate()}}u(V)}}),O=0;O<k;O++)mxUtils.bind(this,function(P){var S=c[P];if(null!=S){var V=new FileReader;V.onload=mxUtils.bind(this,function(W){if(null==z||z(S))try{if("image/"==S.type.substring(0,6))if("image/svg"==S.type.substring(0,
+9)){var X=Graph.clipSvgDataUri(W.target.result),Z=X.indexOf(","),Y=decodeURIComponent(escape(atob(X.substring(Z+1)))),ea=mxUtils.parseXml(Y),ca=ea.getElementsByTagName("svg");if(0<ca.length){var ka=ca[0],ba=R?null:ka.getAttribute("content");null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(ba,!0)));null!=ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba));null==ba||"<mxfile "!==ba.substring(0,8)&&"<mxGraphModel "!==ba.substring(0,14)?N(P,mxUtils.bind(this,
+function(){try{if(null!=ea){var ia=ea.getElementsByTagName("svg");if(0<ia.length){var fa=ia[0],da=fa.getAttribute("width"),za=fa.getAttribute("height");da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var ua=fa.getAttribute("viewBox");if(null==ua||0==ua.length)fa.setAttribute("viewBox","0 0 "+da+" "+za);else if(isNaN(da)||isNaN(za)){var na=ua.split(" ");3<na.length&&(da=parseFloat(na[2]),za=parseFloat(na[3]))}X=Editor.createSvgDataUri(mxUtils.getXml(fa));
+var Ba=Math.min(1,Math.min(l/Math.max(1,da)),l/Math.max(1,za)),ma=p(X,S.type,e+P*K,g+P*K,Math.max(1,Math.round(da*Ba)),Math.max(1,Math.round(za*Ba)),S.name);if(null!=ma&&(isNaN(da)||isNaN(za))){var ta=new Image;ta.onload=mxUtils.bind(this,function(){da=Math.max(1,ta.width);za=Math.max(1,ta.height);ma[0].geometry.width=da;ma[0].geometry.height=za;fa.setAttribute("viewBox","0 0 "+da+" "+za);X=Editor.createSvgDataUri(mxUtils.getXml(fa));var qa=X.indexOf(";");0<qa&&(X=X.substring(0,qa)+X.substring(X.indexOf(",",
+qa+1)));J.setCellStyles("image",X,[ma[0]])});ta.src=Editor.createSvgDataUri(mxUtils.getXml(fa))}return ma}}}catch(qa){}return null})):N(P,mxUtils.bind(this,function(){return p(ba,"text/xml",e+P*K,g+P*K,0,0,S.name)}))}else N(P,mxUtils.bind(this,function(){return null}))}else{Z=!1;if("image/png"==S.type){var ha=R?null:this.extractGraphModelFromPng(W.target.result);if(null!=ha&&0<ha.length){var aa=new Image;aa.src=W.target.result;N(P,mxUtils.bind(this,function(){return p(ha,"text/xml",e+P*K,g+P*K,aa.width,
+aa.height,S.name)}));Z=!0}}Z||(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(W.target.result,mxUtils.bind(this,function(ia){this.resizeImage(ia,W.target.result,mxUtils.bind(this,function(fa,da,za){N(P,mxUtils.bind(this,function(){if(null!=fa&&fa.length<
+A){var ua=U&&this.isResampleImageSize(S.size,Q)?Math.min(1,Math.min(l/da,l/za)):1;return p(fa,S.type,e+P*K,g+P*K,Math.round(da*ua),Math.round(za*ua),S.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),U,l,Q,S.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=W.target.result,p(X,S.type,e+P*K,g+P*K,240,160,S.name,function(ia){N(P,function(){return ia})},S)}catch(ia){N(P,mxUtils.bind(this,function(){return null})),
+null!=window.console&&console.error(ia,S)}else N(P,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(S.name)?p(null,S.type,e+P*K,g+P*K,240,160,S.name,function(W){N(P,function(){return W})},S):"image"==S.type.substring(0,5)||"application/pdf"==S.type?V.readAsDataURL(S):V.readAsText(S)}})(O)});if(n){n=[];for(C=0;C<c.length;C++)n.push(c[C]);c=n;this.confirmImageResize(function(J){U=J;F()},D)}else F()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(u,z){if(u||e)mxSettings.setResizeImages(u?z:null),mxSettings.save();g();c(z)};null==l||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(u){p(u,
!0)},function(u){p(u,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):p(!1,l)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,e,g)});l.readAsText(c)};EditorUi.prototype.parseFileData=
function(c,e,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){e(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,l,p,u,
-z){p=null!=p?p:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),A=e;if(l&&this.isResampleImageSize(null!=z?z:e.length,u))try{var P=Math.max(E/p,D/p);if(1<P){var R=Math.round(E/P),T=Math.round(D/P),L=document.createElement("canvas");L.width=R;L.height=T;L.getContext("2d").drawImage(c,0,0,R,T);var U=L.toDataURL();if(U.length<e.length){var n=document.createElement("canvas");n.width=R;n.height=T;var t=n.toDataURL();U!==t&&(e=U,E=R,D=T)}}}catch(B){}l&&A!=e&&p>this.maxImageSize/2&&e.length>
+z){p=null!=p?p:this.maxImageSize;var E=Math.max(1,c.width),D=Math.max(1,c.height),A=e;if(l&&this.isResampleImageSize(null!=z?z:e.length,u))try{var Q=Math.max(E/p,D/p);if(1<Q){var R=Math.round(E/Q),T=Math.round(D/Q),M=document.createElement("canvas");M.width=R;M.height=T;M.getContext("2d").drawImage(c,0,0,R,T);var U=M.toDataURL();if(U.length<e.length){var n=document.createElement("canvas");n.width=R;n.height=T;var t=n.toDataURL();U!==t&&(e=U,E=R,D=T)}}}catch(C){}l&&A!=e&&p>this.maxImageSize/2&&e.length>
this.maxImageBytes?this.resizeImage(c,e,g,l,p/1.5,u,z):g(e,E,D)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;e(l)};null!=g&&(l.onerror=g);l.src=c}catch(p){if(null!=g)g(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?
urlParams.rough:c)};var q=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());q.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var x=
EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,g=e.isEnabled;e.isEnabled=function(){return g.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(K){var k=K.getEvent();return null==K.getState()&&!mxEvent.isMouseEvent(k)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(k)&&(null==K.getState()||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k))});
-e.cellEditor.editPlantUmlData=function(K,k,v){var G=JSON.parse(v);k=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(N,G.format,function(O,Q,S){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==G.format)e.labelChanged(K,"<pre>"+O+"</pre>"),e.updateCellSize(K,!0);else{e.setCellStyles("image",c.convertDataUri(O),[K]);var V=e.model.getGeometry(K);null!=V&&(V=V.clone(),V.width=Q,
+e.cellEditor.editPlantUmlData=function(K,k,v){var G=JSON.parse(v);k=new TextareaDialog(c,mxResources.get("plantUml")+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(N,G.format,function(O,P,S){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==G.format)e.labelChanged(K,"<pre>"+O+"</pre>"),e.updateCellSize(K,!0);else{e.setCellStyles("image",c.convertDataUri(O),[K]);var V=e.model.getGeometry(K);null!=V&&(V=V.clone(),V.width=P,
V.height=S,e.cellsResized([K],[V],!1))}e.setAttributeForCell(K,"plantUmlData",JSON.stringify({data:N,format:G.format}))}finally{e.getModel().endUpdate()}},function(O){c.handleError(O)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};e.cellEditor.editMermaidData=function(K,k,v){var G=JSON.parse(v);k=new TextareaDialog(c,mxResources.get("mermaid")+":",G.data,function(N){null!=N&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(N,G.config,function(O,
-Q,S){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",O,[K]);var V=e.model.getGeometry(K);null!=V&&(V=V.clone(),V.width=Math.max(V.width,Q),V.height=Math.max(V.height,S),e.cellsResized([K],[V],!1));e.setAttributeForCell(K,"mermaidData",JSON.stringify({data:N,config:G.config},null,2))}finally{e.getModel().endUpdate()}},function(O){c.handleError(O)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var l=e.cellEditor.startEditing;e.cellEditor.startEditing=
+P,S){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",O,[K]);var V=e.model.getGeometry(K);null!=V&&(V=V.clone(),V.width=Math.max(V.width,P),V.height=Math.max(V.height,S),e.cellsResized([K],[V],!1));e.setAttributeForCell(K,"mermaidData",JSON.stringify({data:N,config:G.config},null,2))}finally{e.getModel().endUpdate()}},function(O){c.handleError(O)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var l=e.cellEditor.startEditing;e.cellEditor.startEditing=
function(K,k){try{var v=this.graph.getAttributeForCell(K,"plantUmlData");if(null!=v)this.editPlantUmlData(K,k,v);else if(v=this.graph.getAttributeForCell(K,"mermaidData"),null!=v&&window.isMermaidEnabled)this.editMermaidData(K,k,v);else{var G=e.getCellStyle(K);"1"==mxUtils.getValue(G,"metaEdit","0")?c.showDataDialog(K):l.apply(this,arguments)}}catch(N){c.handleError(N)}};e.getLinkTitle=function(K){return c.getLinkTitle(K)};e.customLinkClicked=function(K,k){var v=!1;try{var G=this.getGraphBounds();
c.handleCustomLink(K,k);v=!0;c.chromelessResize&&!G.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(k))}catch(N){c.handleError(N)}return v};var p=e.parseBackgroundImage;e.parseBackgroundImage=function(K){var k=p.apply(this,arguments);null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});return k};var u=e.setBackgroundImage;e.setBackgroundImage=function(K){null!=K&&null!=K.originalSrc&&(K=c.createImageForPageLink(K.originalSrc,c.currentPage,this));u.apply(this,
arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(K,k){K=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=K){var v=K.indexOf(",");if(0<v)for(K=K.substring(v+1),k=k.getProperty("patches"),v=0;v<k.length;v++)if(null!=k[v][EditorUi.DIFF_UPDATE]&&null!=k[v][EditorUi.DIFF_UPDATE][K]||
null!=k[v][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(k[v][EditorUi.DIFF_REMOVE],K)){e.refreshBackgroundImage();break}}}));var z=e.getBackgroundImageObject;e.getBackgroundImageObject=function(K,k){var v=z.apply(this,arguments);null!=v&&null!=v.originalSrc&&(v=k?c.createImageForPageLink(v.originalSrc,null,null,!0):{src:v.originalSrc});return v};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(K){K=null!=K?K:"";"1"==urlParams.dev&&(K+=(0<K.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=e.addClickHandler;e.addClickHandler=function(K,k,v){var G=k;k=function(N,O,Q){if(null==O){var S=mxEvent.getSource(N);"a"==S.nodeName.toLowerCase()&&(O=S.getAttribute("href"))}null!=
-O&&e.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&e.customLinkClicked(O,Q)&&mxEvent.consume(N);null!=G&&G(N,O,Q)};D.call(this,K,k,v)};x.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(K,k,v){e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,v);A.apply(this,arguments);
-e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,v);e.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(K,["-","exitGroup","home"],null,v)};var P=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,k,v){if(c.editor.graph.isSelectionEmpty())P.apply(this,arguments),c.menus.addMenuItems(K,["copyAsImage"],null,v);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,k,v):this.addPopupMenuArrangeItems(K,
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(K){K=null!=K?K:"";"1"==urlParams.dev&&(K+=(0<K.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var D=e.addClickHandler;e.addClickHandler=function(K,k,v){var G=k;k=function(N,O,P){if(null==O){var S=mxEvent.getSource(N);"a"==S.nodeName.toLowerCase()&&(O=S.getAttribute("href"))}null!=
+O&&e.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&e.customLinkClicked(O,P)&&mxEvent.consume(N);null!=G&&G(N,O,P)};D.call(this,K,k,v)};x.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(K,k,v){e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,v);A.apply(this,arguments);
+e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,v);e.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(K,["-","exitGroup","home"],null,v)};var Q=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,k,v){if(c.editor.graph.isSelectionEmpty())Q.apply(this,arguments),c.menus.addMenuItems(K,["copyAsImage"],null,v);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,k,v):this.addPopupMenuArrangeItems(K,
k,v),this.addMenuItems(K,"- cut copy copyAsImage duplicate -".split(" "),null,v),this.isShowCellEditItems()||this.addPopupDeleteItem(K,k,v),this.addMenuItems(K,["lockUnlock","-"],null,v),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(k)&&e.isCellEditable(k)&&(this.addSubmenu("editCell",K,null,mxResources.get("edit")),K.addSeparator(),e.getModel().isEdge(k))){this.addSubmenu("line",K);var G=e.getModel().getGeometry(k);null!=G&&null!=G.points&&0<G.points.length&&this.addMenuItems(K,
["clearWaypoints"],null,v)}1==e.getSelectionCount()&&this.addMenuItems(K,["enterGroup"],null,v);G=c.getSelectionState();null!=G.mergeCell?this.addMenuItem(K,"mergeCells"):(1<G.style.colspan||1<G.style.rowspan)&&this.addMenuItem(K,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var R=e.getExportVariables;e.getExportVariables=function(){var K=R.apply(this,arguments),k=c.getCurrentFile();null!=k&&(K.filename=k.getTitle());K.pagecount=null!=c.pages?c.pages.length:1;K.page=null!=c.currentPage?c.currentPage.getName():"";K.pagenumber=null!=c.pages&&null!=
-c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return K};var T=e.getGlobalVariable;e.getGlobalVariable=function(K){var k=c.getCurrentFile();return"filename"==K&&null!=k?k.getTitle():"page"==K&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==K?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==K?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var L=null,U=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var K=
-this.getCurrentFile(),k=null!=K&&null!=K.getTitle()?K.getTitle():this.defaultFilename;L!=k&&K==U&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());L=k;U=K}));var n=e.labelLinkClicked;e.labelLinkClicked=function(K,k,v){var G=k.getAttribute("href");if(null==G||!e.isCustomLink(G)||!mxEvent.isTouchEvent(v)&&mxEvent.isPopupTrigger(v))n.apply(this,arguments);else{if(!e.isEnabled()||null!=K&&e.isCellLocked(K.cell))e.customLinkClicked(G),e.getRubberband().reset();mxEvent.consume(v)}};
+c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return K};var T=e.getGlobalVariable;e.getGlobalVariable=function(K){var k=c.getCurrentFile();return"filename"==K&&null!=k?k.getTitle():"page"==K&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==K?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==K?null!=c.pages?c.pages.length:1:T.apply(this,arguments)};var M=null,U=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var K=
+this.getCurrentFile(),k=null!=K&&null!=K.getTitle()?K.getTitle():this.defaultFilename;M!=k&&K==U&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());M=k;U=K}));var n=e.labelLinkClicked;e.labelLinkClicked=function(K,k,v){var G=k.getAttribute("href");if(null==G||!e.isCustomLink(G)||!mxEvent.isTouchEvent(v)&&mxEvent.isPopupTrigger(v))n.apply(this,arguments);else{if(!e.isEnabled()||null!=K&&e.isCellLocked(K.cell))e.customLinkClicked(G),e.getRubberband().reset();mxEvent.consume(v)}};
this.editor.getOrCreateFilename=function(){var K=c.defaultFilename,k=c.getCurrentFile();null!=k&&(K=null!=k.getTitle()?k.getTitle():K);return K};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=
"synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),e.addListener(mxEvent.ESCAPE,function(K,k){null!=k&&e.isEnabled()&&!e.isEditing()&&null!=k.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(K){var k=e.cellEditor.text2,v=null;null!=
k&&(mxEvent.addListener(k,"dragleave",function(G){null!=v&&(v.parentNode.removeChild(v),v=null);G.stopPropagation();G.preventDefault()}),mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(G){null==v&&(!mxClient.IS_IE||10<document.documentMode)&&(v=this.highlightElement(k));G.stopPropagation();G.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(G){null!=v&&(v.parentNode.removeChild(v),v=null);if(0<G.dataTransfer.files.length)this.importFiles(G.dataTransfer.files,
-0,0,this.maxImageSize,function(O,Q,S,V,W,X){e.insertImage(O,W,X)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var Q=0;Q<O.length;Q++)O[Q]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var N=G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var Q=Math.max(1,O.width);O=Math.max(1,O.height);var S=this.maxImageSize;S=Math.min(1,
-Math.min(S/Math.max(1,Q)),S/Math.max(1,O));e.insertImage(decodeURIComponent(N),Q*S,O*S)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));if(Editor.isSettingsEnabled()){t=
-this.editor.graph.view;var B=mxSettings.getUnit();t.setUnit(B);Editor.pageSizeUnit=B==mxConstants.METERS?mxConstants.MILLIMETERS:B;t.addListener("unitChanged",function(K,k){K=k.getProperty("unit");mxSettings.setUnit(K);mxSettings.save();Editor.pageSizeUnit=K==mxConstants.METERS?mxConstants.MILLIMETERS:K});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,t.unit);
+0,0,this.maxImageSize,function(O,P,S,V,W,X){e.insertImage(O,W,X)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var P=0;P<O.length;P++)O[P]()},mxEvent.isControlDown(G));else if(0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")){var N=G.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var P=Math.max(1,O.width);O=Math.max(1,O.height);var S=this.maxImageSize;S=Math.min(1,
+Math.min(S/Math.max(1,P)),S/Math.max(1,O));e.insertImage(decodeURIComponent(N),P*S,O*S)})):document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(G.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(G.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,G.dataTransfer.getData("text/plain"));G.stopPropagation();G.preventDefault()})))}));if(Editor.isSettingsEnabled()){t=
+this.editor.graph.view;var C=mxSettings.getUnit();t.setUnit(C);Editor.pageSizeUnit=C==mxConstants.METERS?mxConstants.MILLIMETERS:C;t.addListener("unitChanged",function(K,k){K=k.getProperty("unit");mxSettings.setUnit(K);mxSettings.save();Editor.pageSizeUnit=K==mxConstants.METERS?mxConstants.MILLIMETERS:K});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,t.unit);
this.refresh()}if("1"==urlParams.styledev){t=document.getElementById("geFooter");null!=t&&(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)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(K,k){0<this.editor.graph.getSelectionCount()?(K=this.editor.graph.getSelectionCell(),K=this.editor.graph.getModel().getStyle(K),this.styleInput.value=K||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var F=this.isSelectionAllowed;this.isSelectionAllowed=function(K){return mxEvent.getSource(K)==this.styleInput?
!0:F.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var J=null;mxEvent.addListener(e.container,"dragleave",function(K){e.isEnabled()&&(null!=J&&(J.parentNode.removeChild(J),J=null),K.stopPropagation(),K.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(K){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(e.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(K){null!=J&&(J.parentNode.removeChild(J),J=null);if(e.isEnabled()){var k=mxUtils.convertPoint(e.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),v=K.dataTransfer.files,G=e.view.translate,N=e.view.scale,O=k.x/N-G.x,Q=k.y/N-G.y;if(0<v.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(K)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(v,!0)):(mxEvent.isAltDown(K)&&(Q=O=null),this.importFiles(v,O,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(K),null,null,mxEvent.isShiftDown(K),K));else{mxEvent.isAltDown(K)&&(Q=O=0);var S=0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")?K.dataTransfer.getData("text/uri-list"):null;k=this.extractGraphModelFromEvent(K,null!=this.pages);if(null!=k)e.setSelectionCells(this.importXml(k,O,Q,!0));else if(0<=mxUtils.indexOf(K.dataTransfer.types,
+null!=this.sidebar&&this.sidebar.hideTooltip();K.stopPropagation();K.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(K){null!=J&&(J.parentNode.removeChild(J),J=null);if(e.isEnabled()){var k=mxUtils.convertPoint(e.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),v=K.dataTransfer.files,G=e.view.translate,N=e.view.scale,O=k.x/N-G.x,P=k.y/N-G.y;if(0<v.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(K)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(v,!0)):(mxEvent.isAltDown(K)&&(P=O=null),this.importFiles(v,O,P,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(K),null,null,mxEvent.isShiftDown(K),K));else{mxEvent.isAltDown(K)&&(P=O=0);var S=0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")?K.dataTransfer.getData("text/uri-list"):null;k=this.extractGraphModelFromEvent(K,null!=this.pages);if(null!=k)e.setSelectionCells(this.importXml(k,O,P,!0));else if(0<=mxUtils.indexOf(K.dataTransfer.types,
"text/html")){var V=K.dataTransfer.getData("text/html");k=document.createElement("div");k.innerHTML=Graph.sanitizeHtml(V);var W=null;v=k.getElementsByTagName("img");null!=v&&1==v.length?(V=v[0].getAttribute("src"),null==V&&(V=v[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)||(W=!0)):(v=k.getElementsByTagName("a"),null!=v&&1==v.length?V=v[0].getAttribute("href"):(k=k.getElementsByTagName("pre"),null!=k&&1==k.length&&(V=mxUtils.getTextContent(k[0]))));var X=!0,Z=mxUtils.bind(this,
-function(){e.setSelectionCells(this.insertTextAt(V,O,Q,!0,W,null,X,mxEvent.isControlDown(K)))});W&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Y){X=Y;Z()},mxEvent.isControlDown(K)):Z()}else null!=S&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)?this.loadImage(decodeURIComponent(S),mxUtils.bind(this,function(Y){var ea=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,Y));e.setSelectionCell(e.insertVertex(null,
-null,"",O,Q,ea*ca,Y*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+S+";"))}),mxUtils.bind(this,function(Y){e.setSelectionCells(this.insertTextAt(S,O,Q,!0))})):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(K.dataTransfer.getData("text/plain"),O,Q,!0))}}K.stopPropagation();K.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
+function(){e.setSelectionCells(this.insertTextAt(V,O,P,!0,W,null,X,mxEvent.isControlDown(K)))});W&&null!=V&&V.length>this.resampleThreshold?this.confirmImageResize(function(Y){X=Y;Z()},mxEvent.isControlDown(K)):Z()}else null!=S&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)?this.loadImage(decodeURIComponent(S),mxUtils.bind(this,function(Y){var ea=Math.max(1,Y.width);Y=Math.max(1,Y.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,Y));e.setSelectionCell(e.insertVertex(null,
+null,"",O,P,ea*ca,Y*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+S+";"))}),mxUtils.bind(this,function(Y){e.setSelectionCells(this.insertTextAt(S,O,P,!0))})):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(K.dataTransfer.getData("text/plain"),O,P,!0))}}K.stopPropagation();K.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&e.view.validateBackground()});e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
null==c.embedViewport)mxUtils.fit(this.div);else{var K=parseInt(this.div.offsetLeft),k=parseInt(this.div.offsetWidth),v=c.embedViewport.x+c.embedViewport.width,G=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),O=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(K,v-k))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(G,O-N))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=
Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(t=Editor.currentTheme,"simple"==t||"sketch"==t)this.doSetCurrentTheme(t,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));t=!1;if(null!=urlParams.dark)t=urlParams.dark;else if(!this.editor.chromeless||
this.editor.editable)t="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||t&&"auto"!=mxSettings.settings.darkMode||(t=mxSettings.settings.darkMode);"auto"==t&&this.isAutoDarkModeSupported()&&(t=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof t?"1"==t:t);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(K){this.isAutoDarkMode()&&this.setDarkMode(K.matches)}))}catch(K){this.actions.get("autoMode").setEnabled(!1)}"1"==
urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",
-mxUtils.bind(this,function(K,k){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var C=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
-e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}C.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,l=this.editor.graph;g.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
+mxUtils.bind(this,function(K,k){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,
+e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,g=this.sketchPickerMenuElt,l=this.editor.graph;g.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,
mxUtils.bind(this,function(A){mxEvent.getSource(A)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(A),mxEvent.getClientY(A)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var p=document.createElement("div");p.style.position="absolute";p.style.width="10px";p.style.height="10px";p.style.borderRadius="5px";p.style.border="1px solid gray";p.style.background="#ffffff";p.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(p);
this.bottomResizer=p;var u=null,z=null,E=null,D=null;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){D=parseInt(this.diagramContainer.style.height);z=mxEvent.getClientY(A);l.popupMenuHandler.hideMenu();mxEvent.consume(A)}));p=p.cloneNode(!1);p.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(p);this.rightResizer=p;mxEvent.addGestureListeners(p,mxUtils.bind(this,function(A){E=parseInt(this.diagramContainer.style.width);u=mxEvent.getClientX(A);l.popupMenuHandler.hideMenu();
-mxEvent.consume(A)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(A){var P=!1;null!=u&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(A)-u)+"px",P=!0);null!=z&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(A)-z)+"px",P=!0);P&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
+mxEvent.consume(A)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(A){var Q=!1;null!=u&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(A)-u)+"px",Q=!0);null!=z&&(this.diagramContainer.style.height=Math.max(20,D+mxEvent.getClientY(A)-z)+"px",Q=!0);Q&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),
function(A){null==u&&null==z||mxEvent.consume(A);z=u=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";g.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(A){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",
mxUtils.bind(this,function(A){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";e.style.visibility="hidden";c.style.visibility="hidden";g.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
-mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,l=!1,p=0;p<g.types.length;p++)if("text/"===g.types[p].substring(0,5)){l=!0;break}if(!l){var u=g.items;for(index in u){var z=u[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(D,A,P,R,T,L){c.insertImage(D,T,L)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()});else{var E=
+mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,l=!1,p=0;p<g.types.length;p++)if("text/"===g.types[p].substring(0,5)){l=!0;break}if(!l){var u=g.items;for(index in u){var z=u[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(D,A,Q,R,T,M){c.insertImage(D,T,M)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var A=0;A<D.length;A++)D[A]()});else{var E=
this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=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 l=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(u){var z=mxEvent.getSource(u);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||"true"==z.contentEditable||224!=u.keyCode&&(mxClient.IS_MAC||17!=u.keyCode)&&(!mxClient.IS_MAC||91!=u.keyCode&&93!=u.keyCode)||l||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+
@@ -13400,21 +13399,21 @@ g.lastPasteXml=null):(g.lastPasteXml=p,g.pasteCounter=0);c.focus();document.exec
u.lastPasteXml==c?u.pasteCounter++:(u.lastPasteXml=c,u.pasteCounter=0);var E=u.pasteCounter*u.gridSize;if(g||this.isCompatibleString(c))z=this.importXml(c,E,E),u.setSelectionCells(z);else if(e&&1==u.getSelectionCount()){p=u.getStartEditingCell(u.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==u.getCurrentCellStyle(p)[mxConstants.STYLE_SHAPE])u.setCellStyles(mxConstants.STYLE_IMAGE,c,[p]);else{u.model.beginUpdate();try{u.labelChanged(p,c),Graph.isLink(c)&&u.setLinkForCell(p,
c)}finally{u.model.endUpdate()}}u.setSelectionCell(p)}else z=u.getInsertPoint(),u.isMouseInsertPoint()&&(E=0,u.lastPasteXml==c&&0<u.pasteCounter&&u.pasteCounter--),z=this.insertTextAt(c,z.x+E,z.y+E,p),u.setSelectionCells(z);u.isSelectionEmpty()||(u.scrollCellToVisible(u.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(u.view.getState(u.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(c,e,g,l){if(!mxEvent.isConsumed(c)){var p=e,u=!1;if(g&&null!=c.clipboardData&&
c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),E=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var D=decodeURIComponent(z);this.isCompatibleString(D)&&(E=!0,z=D)}catch(U){}E=E?null:c.clipboardData.getData("text/html");null!=E&&0<E.length?(p=this.parseHtmlData(E),u="text/plain"!=p.getAttribute("data-type")):null!=z&&0<z.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,E))}z=p.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===
-z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(U){var n=this.editor.graph;n.lastPasteXml==U?n.pasteCounter++:(n.lastPasteXml=U,n.pasteCounter=0);var t=n.pasteCounter*n.gridSize;n.setSelectionCells(this.importXml(U,t,t));n.scrollCellToVisible(n.getSelectionCell())}),mxUtils.bind(this,function(U){this.handleError(U)})),mxEvent.consume(c));else{var A=!1,P="";P=u?null!=p.textContent&&"<mxfile"==p.textContent.substring(0,
-7)&&"</mxfile>"==p.textContent.substring(p.textContent.length-9)||"<mxGraphModel"==p.textContent.substring(0,13)&&"</mxGraphModel>"==p.textContent.substring(p.textContent.length-15)?p.textContent.replace(/\u00a0/g," "):p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var R=P.lastIndexOf("%3E");0<=R&&R<P.length-3&&(P=P.substring(0,R+3))}catch(U){}try{z=p.getElementsByTagName("span"),(D=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(P))&&
-(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(A=!0,P=D)}catch(U){}try{if(null!=P&&0<P.length){if(0==P.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var T=mxUtils.bind(this,function(){try{P=(new MiroImporter).importMiroJson(JSON.parse(P)),this.pasteXml(P,l,A,c)}catch(U){console.log("Miro import error:",U)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",T):T()}else this.pasteXml(P,l,A,c,u);try{mxEvent.consume(c)}catch(U){}}else if(!g){var L=
-this.editor.graph;L.lastPasteXml=null;L.pasteCounter=0}}catch(U){this.handleError(U)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,e,g){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,e,g)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,e){var g=this.editor,l=g.graph,
-p=this.getPageIndex(this.currentPage),u=null!=p?p+1:1,z=mxUtils.bind(this,function(t,B,F,J){var K=t.useCssTransforms,k=t.currentTranslate,v=t.currentScale,G=t.view.translate,N=t.view.scale;t.useCssTransforms&&(t.useCssTransforms=!1,t.currentTranslate=new mxPoint(0,0),t.currentScale=1,t.view.translate=new mxPoint(0,0),t.view.scale=1);var O=t.getGraphBounds(),Q=0,S=0,V=mxRectangle.fromRectangle(t.pageFormat),W=e.fit||e.crop||!t.pageVisible,X=e.scale;V.width=Math.ceil(V.width*t.pageScale);V.height=Math.ceil(V.height*
-t.pageScale);var Z=1;if(e.fit){Z=e.sheetsAcross;var Y=e.sheetsDown;isNaN(X)||(V.width=Math.ceil(V.width*X),V.height=Math.ceil(V.height*X));Z=Math.min(V.height*Y/(O.height/t.view.scale),V.width*Z/(O.width/t.view.scale))}else Z=isNaN(X)?1:X;Z*=1;!W&&t.pageVisible?(X=t.getPageLayout(),Q-=X.x*V.width,S-=X.y*V.height):W=!0;e.crop&&(e.selection&&(O=l.getBoundingBox(l.getSelectionCells())),V.width=(O.width+1)*Z/t.view.scale,V.height=(O.height+1)*Z/t.view.scale);V.width=Math.ceil(1*V.width);V.height=Math.ceil(1*
-V.height);J=null!=J?"page/id,"+J:null;if(null==B){B=PrintDialog.createPrintPreview(t,Z,null,0,Q,S,W);B.title=this.getBaseFilename(!0);B.pageSelector=!1;B.mathEnabled=!1;Q=e.border;isNaN(Q)||(B.pageMargin=Q);e.selection&&(B.isCellVisible=function(ba){return t.isCellSelected(ba)});var ea=B.writeHead;B.writeHead=function(ba){ea.apply(this,arguments);mxClient.IS_GC&&(ba.writeln('<style type="text/css">'),ba.writeln("@media print {"),ba.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ba.writeln("}"),
+z[0].getAttribute("data-lucid-type"))g=z[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(U){var n=this.editor.graph;n.lastPasteXml==U?n.pasteCounter++:(n.lastPasteXml=U,n.pasteCounter=0);var t=n.pasteCounter*n.gridSize;n.setSelectionCells(this.importXml(U,t,t));n.scrollCellToVisible(n.getSelectionCell())}),mxUtils.bind(this,function(U){this.handleError(U)})),mxEvent.consume(c));else{var A=!1,Q="";Q=u?null!=p.textContent&&"<mxfile"==p.textContent.substring(0,
+7)&&"</mxfile>"==p.textContent.substring(p.textContent.length-9)||"<mxGraphModel"==p.textContent.substring(0,13)&&"</mxGraphModel>"==p.textContent.substring(p.textContent.length-15)?p.textContent.replace(/\u00a0/g," "):p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var R=Q.lastIndexOf("%3E");0<=R&&R<Q.length-3&&(Q=Q.substring(0,R+3))}catch(U){}try{z=p.getElementsByTagName("span"),(D=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(Q))&&
+(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(A=!0,Q=D)}catch(U){}try{if(null!=Q&&0<Q.length){if(0==Q.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var T=mxUtils.bind(this,function(){try{Q=(new MiroImporter).importMiroJson(JSON.parse(Q)),this.pasteXml(Q,l,A,c)}catch(U){console.log("Miro import error:",U)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",T):T()}else this.pasteXml(Q,l,A,c,u);try{mxEvent.consume(c)}catch(U){}}else if(!g){var M=
+this.editor.graph;M.lastPasteXml=null;M.pasteCounter=0}}catch(U){this.handleError(U)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,e,g){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,e,g)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,e){var g=this.editor,l=g.graph,
+p=this.getPageIndex(this.currentPage),u=null!=p?p+1:1,z=mxUtils.bind(this,function(t,C,F,J){var K=t.useCssTransforms,k=t.currentTranslate,v=t.currentScale,G=t.view.translate,N=t.view.scale;t.useCssTransforms&&(t.useCssTransforms=!1,t.currentTranslate=new mxPoint(0,0),t.currentScale=1,t.view.translate=new mxPoint(0,0),t.view.scale=1);var O=t.getGraphBounds(),P=0,S=0,V=mxRectangle.fromRectangle(t.pageFormat),W=e.fit||e.crop||!t.pageVisible,X=e.scale;V.width=Math.ceil(V.width*t.pageScale);V.height=Math.ceil(V.height*
+t.pageScale);var Z=1;if(e.fit){Z=e.sheetsAcross;var Y=e.sheetsDown;isNaN(X)||(V.width=Math.ceil(V.width*X),V.height=Math.ceil(V.height*X));Z=Math.min(V.height*Y/(O.height/t.view.scale),V.width*Z/(O.width/t.view.scale))}else Z=isNaN(X)?1:X;Z*=1;!W&&t.pageVisible?(X=t.getPageLayout(),P-=X.x*V.width,S-=X.y*V.height):W=!0;e.crop&&(e.selection&&(O=l.getBoundingBox(l.getSelectionCells())),V.width=(O.width+1)*Z/t.view.scale,V.height=(O.height+1)*Z/t.view.scale);V.width=Math.ceil(1*V.width);V.height=Math.ceil(1*
+V.height);J=null!=J?"page/id,"+J:null;if(null==C){C=PrintDialog.createPrintPreview(t,Z,null,0,P,S,W);C.title=this.getBaseFilename(!0);C.pageSelector=!1;C.mathEnabled=!1;P=e.border;isNaN(P)||(C.pageMargin=P);e.selection&&(C.isCellVisible=function(ba){return t.isCellSelected(ba)});var ea=C.writeHead;C.writeHead=function(ba){ea.apply(this,arguments);mxClient.IS_GC&&(ba.writeln('<style type="text/css">'),ba.writeln("@media print {"),ba.writeln(".MathJax svg { shape-rendering: crispEdges; }"),ba.writeln("}"),
ba.writeln("</style>"));null!=g.fontCss&&(ba.writeln('<style type="text/css">'),ba.writeln(mxUtils.htmlEntities(g.fontCss,!1,!1,!1)),ba.writeln("</style>"));for(var ha=t.getCustomFonts(),aa=0;aa<ha.length;aa++){var ia=ha[aa].name,fa=ha[aa].url;Graph.isCssFontUrl(fa)?ba.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(fa))+'" charset="UTF-8" type="text/css">'):(ba.writeln('<style type="text/css">'),ba.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ia)+
-'";\nsrc: url("'+mxUtils.htmlEntities(fa)+'");\n}'),ba.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;B.drawBackgroundImage=function(ba){ca.apply(this,arguments);null!=ba.node&&(EditorUi.embedSvgImages(ba.node),l.disableSvgLinks(ba.node,function(ha){ha.setAttribute("href","javascript:void(0)")}))}}var ka=B.addGraphFragment;B.addGraphFragment=function(ba,ha,aa,ia,fa,da){ka.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fa.classList.add("geDisableMathJax")};
-e.grid&&(B.gridSize=t.gridSize,B.gridSteps=t.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:t.view.gridColor);B.open(null,null,F,!0,J,V,e.selection?t.getSelectionCells():null)}else{O=t.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";B.backgroundColor=O;B.autoOrigin=W;e.grid&&(B.gridSize=t.gridSize,B.gridSteps=t.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:t.view.gridColor);B.appendGraph(t,Z,Q,S,F,!0,J,V,
-e.selection?t.getSelectionCells():null);F=t.getCustomFonts();if(null!=B.wnd)for(V=0;V<F.length;V++)Q=F[V].name,S=F[V].url,Graph.isCssFontUrl(S)?B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(S)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Q)+'";\nsrc: url("'+mxUtils.htmlEntities(S)+'");\n}'),B.wnd.document.writeln("</style>"))}K&&(t.useCssTransforms=K,
-t.currentTranslate=k,t.currentScale=v,t.view.translate=G,t.view.scale=N);return B}),E=e.pagesFrom,D=e.pagesTo,A=!e.allPages;p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,e);else{A&&(A=e.selection||E==u&&D==u);if(!A&&null!=this.pages&&this.pages.length){A=0;u=this.pages.length-1;e.allPages||(A=parseInt(E)-1,u=parseInt(D)-1);for(var P=A;P<=u;P++){var R=this.pages[P];E=R==this.currentPage?l:null;if(null==E){E=this.createTemporaryGraph(l.stylesheet);E.shapeForegroundColor=l.shapeForegroundColor;
-E.shapeBackgroundColor=l.shapeBackgroundColor;D=!0;A=!1;var T=null,L=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(D=R.viewState.pageVisible,A=R.viewState.mathEnabled,T=R.viewState.background,L=R.viewState.backgroundImage,E.pageFormat=R.viewState.pageFormat,E.gridSize=R.viewState.gridSize);null!=L&&null!=L.originalSrc&&(L=this.createImageForPageLink(L.originalSrc,R));E.background=T;E.backgroundImage=null!=L?new mxImage(L.src,L.width,L.height,L.x,L.y):null;E.pageVisible=
-D;E.mathEnabled=A;var U=E.getGraphBounds;E.getGraphBounds=function(){var t=U.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var F=this.view.translate,J=this.view.scale;t=mxRectangle.fromRectangle(t);t.add(new mxRectangle((F.x+B.x)*J,(F.y+B.y)*J,B.width*J,B.height*J))}return t};var n=E.getGlobalVariable;E.getGlobalVariable=function(t){return"page"==t?R.getName():"pagenumber"==t?P+1:"pagecount"==t?null!=this.pages?this.pages.length:1:n.apply(this,arguments)};
-document.body.appendChild(E.container);this.updatePageRoot(R);E.model.setRoot(R.root)}p=z(E,p,P!=u,R.getId());E!=l&&E.container.parentNode.removeChild(E.container)}}else p=z(l);null==p||null==p.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(z=p.wnd.document,c||(p.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),p.closeDocument(),Graph.rewritePageLinks(p.wnd.document,!0),p.mathEnabled||c||PrintDialog.printPreview(p));
+'";\nsrc: url("'+mxUtils.htmlEntities(fa)+'");\n}'),ba.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;C.drawBackgroundImage=function(ba){ca.apply(this,arguments);null!=ba.node&&(EditorUi.embedSvgImages(ba.node),l.disableSvgLinks(ba.node,function(ha){ha.setAttribute("href","javascript:void(0)")}))}}var ka=C.addGraphFragment;C.addGraphFragment=function(ba,ha,aa,ia,fa,da){ka.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fa.classList.add("geDisableMathJax")};
+e.grid&&(C.gridSize=t.gridSize,C.gridSteps=t.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:t.view.gridColor);C.open(null,null,F,!0,J,V,e.selection?t.getSelectionCells():null)}else{O=t.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";C.backgroundColor=O;C.autoOrigin=W;e.grid&&(C.gridSize=t.gridSize,C.gridSteps=t.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:t.view.gridColor);C.appendGraph(t,Z,P,S,F,!0,J,V,
+e.selection?t.getSelectionCells():null);F=t.getCustomFonts();if(null!=C.wnd)for(V=0;V<F.length;V++)P=F[V].name,S=F[V].url,Graph.isCssFontUrl(S)?C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(S)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(P)+'";\nsrc: url("'+mxUtils.htmlEntities(S)+'");\n}'),C.wnd.document.writeln("</style>"))}K&&(t.useCssTransforms=K,
+t.currentTranslate=k,t.currentScale=v,t.view.translate=G,t.view.scale=N);return C}),E=e.pagesFrom,D=e.pagesTo,A=!e.allPages;p=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,e);else{A&&(A=e.selection||E==u&&D==u);if(!A&&null!=this.pages&&this.pages.length){A=0;u=this.pages.length-1;e.allPages||(A=parseInt(E)-1,u=parseInt(D)-1);for(var Q=A;Q<=u;Q++){var R=this.pages[Q];E=R==this.currentPage?l:null;if(null==E){E=this.createTemporaryGraph(l.stylesheet);E.shapeForegroundColor=l.shapeForegroundColor;
+E.shapeBackgroundColor=l.shapeBackgroundColor;D=!0;A=!1;var T=null,M=null;null==R.viewState&&null==R.root&&this.updatePageRoot(R);null!=R.viewState&&(D=R.viewState.pageVisible,A=R.viewState.mathEnabled,T=R.viewState.background,M=R.viewState.backgroundImage,E.pageFormat=R.viewState.pageFormat,E.gridSize=R.viewState.gridSize);null!=M&&null!=M.originalSrc&&(M=this.createImageForPageLink(M.originalSrc,R));E.background=T;E.backgroundImage=null!=M?new mxImage(M.src,M.width,M.height,M.x,M.y):null;E.pageVisible=
+D;E.mathEnabled=A;var U=E.getGraphBounds;E.getGraphBounds=function(){var t=U.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var F=this.view.translate,J=this.view.scale;t=mxRectangle.fromRectangle(t);t.add(new mxRectangle((F.x+C.x)*J,(F.y+C.y)*J,C.width*J,C.height*J))}return t};var n=E.getGlobalVariable;E.getGlobalVariable=function(t){return"page"==t?R.getName():"pagenumber"==t?Q+1:"pagecount"==t?null!=this.pages?this.pages.length:1:n.apply(this,arguments)};
+document.body.appendChild(E.container);this.updatePageRoot(R);E.model.setRoot(R.root)}p=z(E,p,Q!=u,R.getId());E!=l&&E.container.parentNode.removeChild(E.container)}}else p=z(l);null==p||null==p.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(z=p.wnd.document,c||(p.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),p.closeDocument(),Graph.rewritePageLinks(p.wnd.document,!0),p.mathEnabled||c||PrintDialog.printPreview(p));
return p}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",function(l){null!=e&&(e.parentNode.removeChild(e),e=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());l.stopPropagation();
l.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(l){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(l);if(null==p){var u=null!=l.dataTransfer?
l.dataTransfer:l.clipboardData;null!=u&&(10==document.documentMode||11==document.documentMode?p=u.getData("Text"):(p=null,p=0<=mxUtils.indexOf(u.types,"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(u.types,"text/html")?u.getData("text/html"):null,null!=p&&0<p.length?(u=document.createElement("div"),u.innerHTML=Graph.sanitizeHtml(p),u=u.getElementsByTagName("img"),0<u.length&&(p=u[0].getAttribute("src"))):0<=mxUtils.indexOf(u.types,"text/plain")&&(p=u.getData("text/plain"))),
@@ -13438,38 +13437,38 @@ this.editor.modified=null!=l?l:!1;this.updateUi();window.self!==window.top&&wind
c.getPublicUrl(mxUtils.bind(this,function(g){this.spinner.stop();e(g)})):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||
window.parent;if(this.editor.modified){var l=e.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(p){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,l,1,this.embedExportBorder,null,this.embedExportTheme)}else c||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(p){c||this.handleError(p)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,l=!1,p=null,u=mxUtils.bind(this,function(D,A){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
-function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=D.data,P=null,R=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,u);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var A=D.data,Q=null,R=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,
26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(ia){}return aa});if("json"==urlParams.proto){var T=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[A])}catch(aa){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):
-A.title,null!=A.messageKey?mxResources.get(A.messageKey):mxUtils.htmlEntities(A.message),null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));return}if("prompt"==A.action){this.spinner.stop();var L=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",
-value:aa,message:A}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")});this.showDialog(L.container,300,80,!0,!1);L.init();return}if("draft"==A.action){var U=R(A.xml);this.spinner.stop();L=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),U,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",
-result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(L.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));
-try{L.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var n=1==A.enableRecent,t=1==A.enableSearch,B=1==A.enableCustomTemp;L=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(aa,ia,fa,da){aa=aa||this.emptyDiagramXml;null!=A.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:ia,tempUrl:fa,libs:da,builtIn:!0,message:A}),
+A.title,null!=A.messageKey?mxResources.get(A.messageKey):mxUtils.htmlEntities(A.message),null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));return}if("prompt"==A.action){this.spinner.stop();var M=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",
+value:aa,message:A}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),"*")});this.showDialog(M.container,300,80,!0,!1);M.init();return}if("draft"==A.action){var U=R(A.xml);this.spinner.stop();M=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),U,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",
+result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(M.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));
+try{M.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();var n=1==A.enableRecent,t=1==A.enableSearch,C=1==A.enableCustomTemp;M=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(aa,ia,fa,da){aa=aa||this.emptyDiagramXml;null!=A.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:ia,tempUrl:fa,libs:da,builtIn:!0,message:A}),
"*"):(c(aa,D,aa!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,n?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):null,t?mxUtils.bind(this,function(aa,ia){this.remoteInvoke("searchDiagrams",[aa,null],null,ia,function(){ia(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,ia,fa){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:ia,name:fa}),
-"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==A.withoutType);this.showDialog(L.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();aa&&this.actions.get("exit").funct()}));L.init();return}if("textContent"==A.action){var F=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){this.updateStatus(mxUtils.bind(this,
+"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==A.withoutType);this.showDialog(M.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();aa&&this.actions.get("exit").funct()}));M.init();return}if("textContent"==A.action){var F=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){this.updateStatus(mxUtils.bind(this,
function(){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message))}));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var J=null!=A.messageKey?mxResources.get(A.messageKey):A.message;null==A.show||A.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){if(null!=
-A.viewport){var K=this.editor.graph,k=K.view.translate.x,v=K.view.translate.y;this.embedViewport=A.viewport;K.refresh();this.diagramContainer.scrollTop-=(v-K.view.translate.y)*K.view.scale;this.diagramContainer.scrollLeft-=(k-K.view.translate.x)*K.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==A.action){L=null;try{var G=this.diagramContainer.getAttribute("data-scrollState");null!=G&&(this.diagramContainer.removeAttribute("data-scrollState"),L=JSON.parse(G))}catch(aa){}Editor.inlineFullscreen=
-A.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=L&&this.restoreScrollState(L);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var N=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);K=this.editor.graph;var O=mxUtils.bind(this,function(aa,ia){if(A.withSvg)A.withSvg=
-!1,this.getEmbeddedSvg(N,this.editor.graph,null,!0,function(da){O(aa,da)},null,null,A.embedImages,this.editor.graph.background,A.scale,A.border,A.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var fa=this.createLoadMessage("export");fa.format=A.format;fa.message=A;fa.data=aa;fa.svg=ia;fa.xml=N;z.postMessage(JSON.stringify(fa),"*")}}),Q=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==A.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(N)));
+A.viewport){var K=this.editor.graph,k=K.view.translate.x,v=K.view.translate.y;this.embedViewport=A.viewport;K.refresh();this.diagramContainer.scrollTop-=(v-K.view.translate.y)*K.view.scale;this.diagramContainer.scrollLeft-=(k-K.view.translate.x)*K.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==A.action){M=null;try{var G=this.diagramContainer.getAttribute("data-scrollState");null!=G&&(this.diagramContainer.removeAttribute("data-scrollState"),M=JSON.parse(G))}catch(aa){}Editor.inlineFullscreen=
+A.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=M&&this.restoreScrollState(M);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var N=null!=A.xml?A.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);K=this.editor.graph;var O=mxUtils.bind(this,function(aa,ia){if(A.withSvg)A.withSvg=
+!1,this.getEmbeddedSvg(N,this.editor.graph,null,!0,function(da){O(aa,da)},null,null,A.embedImages,this.editor.graph.background,A.scale,A.border,A.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var fa=this.createLoadMessage("export");fa.format=A.format;fa.message=A;fa.data=aa;fa.svg=ia;fa.xml=N;z.postMessage(JSON.stringify(fa),"*")}}),P=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==A.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(N)));
K!=this.editor.graph&&K.container.parentNode.removeChild(K.container);O(aa)}),S=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var V=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=S){var aa=K.getGlobalVariable;K=this.createTemporaryGraph(K.getStylesheet());for(var ia,fa=0;fa<this.pages.length;fa++)if(this.pages[fa].getId()==S){ia=this.updatePageRoot(this.pages[fa]);break}null==ia&&(ia=this.currentPage);
-K.getGlobalVariable=function(oa){return"page"==oa?ia.getName():"pagenumber"==oa?1:aa.apply(this,arguments)};document.body.appendChild(K.container);K.model.setRoot(ia.root)}if(null!=A.layerIds){var da=K.model,za=da.getChildCells(da.getRoot()),va={};for(fa=0;fa<A.layerIds.length;fa++)va[A.layerIds[fa]]=!0;for(fa=0;fa<za.length;fa++)da.setVisible(za[fa],va[za[fa].id]||!1)}fa=null;A.keepTheme&&(fa=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(oa){Q(oa.toDataURL("image/png"))}),
-A.width,null,A.background,mxUtils.bind(this,function(){Q(null)}),null,null,A.scale,A.transparent,A.shadow,null,K,A.border,null,A.grid,fa)});null!=A.xml&&0<A.xml.length&&(g=!0,this.setFileData(N),g=!1);V()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,
-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?O("data:image/png;base64,"+aa.getText()):Q(null)}),mxUtils.bind(this,function(){Q(null)}))}}else if(V=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();aa.xml=mxUtils.getXml(ia);aa.data=this.getFileData(null,null,!0,null,null,null,ia);aa.format=A.format}else if("html"==A.format)ia=this.editor.getGraphXml(),
+K.getGlobalVariable=function(na){return"page"==na?ia.getName():"pagenumber"==na?1:aa.apply(this,arguments)};document.body.appendChild(K.container);K.model.setRoot(ia.root)}if(null!=A.layerIds){var da=K.model,za=da.getChildCells(da.getRoot()),ua={};for(fa=0;fa<A.layerIds.length;fa++)ua[A.layerIds[fa]]=!0;for(fa=0;fa<za.length;fa++)da.setVisible(za[fa],ua[za[fa].id]||!1)}fa=null;A.keepTheme&&(fa=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(na){P(na.toDataURL("image/png"))}),
+A.width,null,A.background,mxUtils.bind(this,function(){P(null)}),null,null,A.scale,A.transparent,A.shadow,null,K,A.border,null,A.grid,fa)});null!=A.xml&&0<A.xml.length&&(g=!0,this.setFileData(N),g=!1);V()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(N))).send(mxUtils.bind(this,
+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?O("data:image/png;base64,"+aa.getText()):P(null)}),mxUtils.bind(this,function(){P(null)}))}}else if(V=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ia=this.getXmlFileData();aa.xml=mxUtils.getXml(ia);aa.data=this.getFileData(null,null,!0,null,null,null,ia);aa.format=A.format}else if("html"==A.format)ia=this.editor.getGraphXml(),
aa.data=this.getHtml(ia,this.editor.graph),aa.xml=mxUtils.getXml(ia),aa.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;ia=null!=A.background?A.background:this.editor.graph.background;ia==mxConstants.NONE&&(ia=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var fa=mxUtils.bind(this,function(za){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=A.asText?za:Editor.createSvgDataUri(za);z.postMessage(JSON.stringify(aa),"*")}),da="auto";
A.keepTheme&&(da=Editor.isDarkMode()?"dark":"light");null!=A.theme&&(da=A.theme);if("xmlsvg"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){da=null;if(this.isAutoDarkMode()||Editor.isDarkMode())da="auto";null!=A.theme&&(da=A.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,fa,null,null,A.embedImages,ia,A.scale,A.border,A.shadow,da)}}else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=
-A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,da),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(za){A.embedImages||null==A.embedImages?this.editor.convertImages(za,mxUtils.bind(this,function(va){fa(mxUtils.getXml(va))})):fa(mxUtils.getXml(za))}));return}z.postMessage(JSON.stringify(aa),
+A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),ia=this.editor.graph.getSvg(ia,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,da),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(ia),this.embedFonts(ia,mxUtils.bind(this,function(za){A.embedImages||null==A.embedImages?this.editor.convertImages(za,mxUtils.bind(this,function(ua){fa(mxUtils.getXml(ua))})):fa(mxUtils.getXml(za))}));return}z.postMessage(JSON.stringify(aa),
"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var W=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){W.apply(this,arguments);V()}}g=!0;this.setFileData(A.xml);g=!1;this.editor.graph.mathEnabled||V()}else V();return}if("load"==A.action){T=A.toSketch;l=1==A.autosave;this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);if("1"==urlParams.saveAndExit||
"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var X=Editor.sketchMode;this.doSetSketchMode(A.rough);X!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
A.dark&&this.setDarkMode(A.dark);null!=A.border&&(this.embedExportBorder=A.border);null!=A.theme&&(this.embedExportTheme=A.theme);null!=A.background&&(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var Z=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,A.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,A.rect.top)+"px";this.minInlineWidth=A.minWidth;this.minInlineHeight=A.minHeight;
-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Y=A.maxFitScale,ea=A.rect.width+2*Z,ca=A.rect.height+2*Z;P=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();ea=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ea):ea,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ca):ca,aa.height-80);this.diagramContainer.style.width=ea+"px";this.diagramContainer.style.height=
+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Y=A.maxFitScale,ea=A.rect.width+2*Z,ca=A.rect.height+2*Z;Q=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();ea=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,ea):ea,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ca):ca,aa.height-80);this.diagramContainer.style.width=ea+"px";this.diagramContainer.style.height=
aa+"px";var ia=this.editor.graph;aa=ia.maxFitScale;ia.maxFitScale=Y;ia.fit(2*Z,null,null,null,null,null,ca);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ia.getGraphBounds().width<this.minInlineWidth){var fa=ia.container.scrollTop;this.resetScrollbars();ia.container.scrollTop=fa}ia.maxFitScale=aa;ia.container.scrollTop-=Z;ia.container.scrollLeft-=Z;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[A]));ia.container.focus();null!=this.formatWindow&&
null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ia.container.style.top);var da=ia.getGraphBounds();ia.container.clientWidth>da.width+2*Z&&(ia.container.scrollLeft=da.x+(da.width+Z-ia.container.clientWidth)/2)}),10)})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&this.setEmbedTitle(A.title);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(aa){}A=null!=A.xmlpng?
this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var ka=this.getCurrentFile();null!=ka&&(U=R(A.xml),null!=U&&""!=U&&ka.mergeFile(new LocalFile(this,U),function(){z.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:A,error:aa}),"*")}))}else"remoteInvokeReady"==A.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,D.origin):"remoteInvokeResponse"==
A.action?this.handleRemoteInvokeResponse(A):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(aa){this.handleError(aa)}}var ba=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ha=mxUtils.bind(this,function(aa,ia){g=!0;try{c(aa,ia,null,T)}catch(fa){this.handleError(fa)}g=!1;null!=urlParams.modified&&this.clearStatus();p=ba();l&&null==e&&(e=mxUtils.bind(this,
function(fa,da){fa=ba();fa==p||g||(da=this.createLoadMessage("autosave"),da.xml=fa,(window.opener||window.parent).postMessage(JSON.stringify(da),"*"));p=fa}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",
-e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=aa,z.postMessage(JSON.stringify(ia),"*");null!=P&&P()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(R="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+
+e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ia=this.createLoadMessage("load"),ia.xml=aa,z.postMessage(JSON.stringify(ia),"*");null!=Q&&Q()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==A.substring(0,34)?(R="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+
1)),function(aa){ha(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),R)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?ha(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):
mxResources.get("unknownError")}))}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(aa){ha(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=R(A),ha(A,D)):this.loadDescriptor(A,mxUtils.bind(this,function(aa){ha(ba(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;
-u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(u,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,P){E.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:P}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,g,l){var p=document.createElement("button");p.className="geEmbedBtn geBtn";p.setAttribute("title",c+(null!=g?" ("+g+")":""));mxUtils.write(p,
+u="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(u,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(D,A,Q){E.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",href:D,target:A,allowOpener:Q}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,g,l){var p=document.createElement("button");p.className="geEmbedBtn geBtn";p.setAttribute("title",c+(null!=g?" ("+g+")":""));mxUtils.write(p,
c);l&&p.classList.add("gePrimaryBtn");mxEvent.addListener(p,"click",e);return p};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=
null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,
Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==
@@ -13478,52 +13477,52 @@ urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.act
mxUtils.bind(this,function(){try{var u=l.value;l.value=JSON.stringify(JSON.parse(u));l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));l.value=u}catch(z){this.handleError(z)}}));p.setAttribute("title","copy");p.className="geBtn";g.appendChild(p)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};
EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),l=mxUtils.bind(this,function(p){this.loadingOrgChart=!1;e.clear()&&this.handleError(p)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():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",g,null,null,null,l)},null,null,null,l)},null,null,null,l)},null,null,null,l):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",g,null,null,null,l))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,
-e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),l=[],p=[],u=[],z={};if(0<g.length){var E={},D=this.editor.graph,A=null,P=null,R=null,T=null,L=null,U=null,n=null,t="whiteSpace=wrap;html=1;",B=null,F=null,J="",K="auto",k="auto",v=!1,G=null,N=null,O=40,Q=40,S=100,V=0,W=mxUtils.bind(this,function(){null!=e?e(Ja):(D.setSelectionCells(Ja),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),
+e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),l=[],p=[],u=[],z={};if(0<g.length){var E={},D=this.editor.graph,A=null,Q=null,R=null,T=null,M=null,U=null,n=null,t="whiteSpace=wrap;html=1;",C=null,F=null,J="",K="auto",k="auto",v=!1,G=null,N=null,O=40,P=40,S=100,V=0,W=mxUtils.bind(this,function(){null!=e?e(Ja):(D.setSelectionCells(Ja),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),
0)}),X=D.getFreeInsertPoint(),Z=X.x,Y=X.y;X=Y;var ea=null,ca="auto";F=null;for(var ka=[],ba=null,ha=null,aa=0;aa<g.length&&"#"==g[aa].charAt(0);){c=g[aa].replace(/\r$/,"");for(aa++;aa<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[aa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[aa].substring(1)),aa++;if("#"!=c.charAt(1)){var ia=c.indexOf(":");if(0<ia){var fa=mxUtils.trim(c.substring(1,ia)),da=mxUtils.trim(c.substring(ia+1));"label"==fa?ea=Graph.sanitizeHtml(da):"labelname"==fa&&0<da.length&&
-"-"!=da?L=da:"labels"==fa&&0<da.length&&"-"!=da?n=JSON.parse(da):"style"==fa?P=da:"parentstyle"==fa?t=da:"unknownStyle"==fa&&"-"!=da?U=da:"stylename"==fa&&0<da.length&&"-"!=da?T=da:"styles"==fa&&0<da.length&&"-"!=da?R=JSON.parse(da):"vars"==fa&&0<da.length&&"-"!=da?A=JSON.parse(da):"identity"==fa&&0<da.length&&"-"!=da?B=da:"parent"==fa&&0<da.length&&"-"!=da?F=da:"namespace"==fa&&0<da.length&&"-"!=da?J=da:"width"==fa?K=da:"height"==fa?k=da:"collapsed"==fa&&"-"!=da?v="true"==da:"left"==fa&&0<da.length?
-G=da:"top"==fa&&0<da.length?N=da:"ignore"==fa?ha=da.split(","):"connect"==fa?ka.push(JSON.parse(da)):"link"==fa?ba=da:"padding"==fa?V=parseFloat(da):"edgespacing"==fa?O=parseFloat(da):"nodespacing"==fa?Q=parseFloat(da):"levelspacing"==fa?S=parseFloat(da):"layout"==fa&&(ca=da)}}}if(null==g[aa])throw Error(mxResources.get("invalidOrMissingFile"));var za=this.editor.csvToArray(g[aa].replace(/\r$/,""));ia=c=null;fa=[];for(da=0;da<za.length;da++)B==za[da]&&(c=da),F==za[da]&&(ia=da),fa.push(mxUtils.trim(za[da]).replace(/[^a-z0-9]+/ig,
-"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+fa[0]+"%");if(null!=ka)for(var va=0;va<ka.length;va++)null==E[ka[va].to]&&(E[ka[va].to]={});B=[];for(da=aa+1;da<g.length;da++){var oa=this.editor.csvToArray(g[da].replace(/\r$/,""));if(null==oa){var Ba=40<g[da].length?g[da].substring(0,40)+"...":g[da];throw Error(Ba+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<oa.length&&B.push(oa)}D.model.beginUpdate();try{for(da=0;da<B.length;da++){oa=B[da];var ma=null,ta=null!=c?J+oa[c]:
-null;g=!1;null!=ta&&(ma=D.model.getCell(ta),g=null==ma||0<=mxUtils.indexOf(l,ma));var qa=new mxCell(ea,new mxGeometry(Z,X,0,0),P||"whiteSpace=wrap;html=1;");qa.collapsed=v;qa.vertex=!0;qa.id=ta;null==ma||g||D.model.setCollapsed(ma,v);for(var la=0;la<oa.length;la++)D.setAttributeForCell(qa,fa[la],oa[la]),null==ma||g||D.setAttributeForCell(ma,fa[la],oa[la]);if(null!=L&&null!=n){var Fa=n[qa.getAttribute(L)];null!=Fa&&(D.labelChanged(qa,Fa),null==ma||g||D.cellLabelChanged(ma,Fa))}if(null!=T&&null!=R){var wa=
-R[qa.getAttribute(T)];null!=wa&&(qa.style=wa)}D.setAttributeForCell(qa,"placeholders","1");qa.style=D.replacePlaceholders(qa,qa.style,A);null==ma||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[qa])):(D.model.setStyle(ma,qa.style),0>mxUtils.indexOf(u,ma)&&u.push(ma),D.fireEvent(new mxEventObject("cellsInserted","cells",[ma])));g=null!=ma;ma=qa;if(!g)for(va=0;va<ka.length;va++)E[ka[va].to][ma.getAttribute(ka[va].to)]=ma;null!=ba&&"link"!=ba&&(D.setLinkForCell(ma,ma.getAttribute(ba)),D.setAttributeForCell(ma,
-ba,null));var Ca=this.editor.graph.getPreferredSizeForCell(ma);F=null!=ia?D.model.getCell(J+oa[ia]):null;if(ma.vertex){Ba=null!=F?0:Z;aa=null!=F?0:Y;null!=G&&null!=ma.getAttribute(G)&&(ma.geometry.x=Ba+parseFloat(ma.getAttribute(G)));null!=N&&null!=ma.getAttribute(N)&&(ma.geometry.y=aa+parseFloat(ma.getAttribute(N)));var xa="@"==K.charAt(0)?ma.getAttribute(K.substring(1)):null;ma.geometry.width=null!=xa&&"auto"!=xa?parseFloat(ma.getAttribute(K.substring(1))):"auto"==K||"auto"==xa?Ca.width+V:parseFloat(K);
-var Da="@"==k.charAt(0)?ma.getAttribute(k.substring(1)):null;ma.geometry.height=null!=Da&&"auto"!=Da&&"width"!=k?parseFloat(Da):"auto"==k||"auto"==Da?Ca.height+V:"width"==k?ma.geometry.width:parseFloat(k);X+=ma.geometry.height+Q}g?(null==z[ta]&&(z[ta]=[]),z[ta].push(ma)):(l.push(ma),null!=F?(F.style=D.replacePlaceholders(F,t,A),D.addCell(ma,F),p.push(F)):u.push(D.addCell(ma)))}for(da=0;da<p.length;da++)xa="@"==K.charAt(0)?p[da].getAttribute(K.substring(1)):null,Da="@"==k.charAt(0)?p[da].getAttribute(k.substring(1)):
-null,"auto"!=K&&"auto"!=xa||"auto"!=k&&"auto"!=Da||D.updateGroupBounds([p[da]],V,!0);var Aa=u.slice(),Ja=u.slice();for(va=0;va<ka.length;va++){var Ka=ka[va];for(da=0;da<l.length;da++){ma=l[da];var Ga=mxUtils.bind(this,function(Ra,ja,pa){var sa=ja.getAttribute(pa.from);if(null!=sa&&""!=sa){sa=sa.split(",");for(var ra=0;ra<sa.length;ra++){var na=E[pa.to][sa[ra]];if(null==na&&null!=U){na=new mxCell(sa[ra],new mxGeometry(Z,Y,0,0),U);na.style=D.replacePlaceholders(ja,na.style,A);var ua=this.editor.graph.getPreferredSizeForCell(na);
-na.geometry.width=ua.width+V;na.geometry.height=ua.height+V;E[pa.to][sa[ra]]=na;na.vertex=!0;na.id=sa[ra];u.push(D.addCell(na))}if(null!=na){ua=pa.label;null!=pa.fromlabel&&(ua=(ja.getAttribute(pa.fromlabel)||"")+(ua||""));null!=pa.sourcelabel&&(ua=D.replacePlaceholders(ja,pa.sourcelabel,A)+(ua||""));null!=pa.tolabel&&(ua=(ua||"")+(na.getAttribute(pa.tolabel)||""));null!=pa.targetlabel&&(ua=(ua||"")+D.replacePlaceholders(na,pa.targetlabel,A));var Ha="target"==pa.placeholders==!pa.invert?na:Ra;Ha=
-null!=pa.style?D.replacePlaceholders(Ha,pa.style,A):D.createCurrentEdgeStyle();ua=D.insertEdge(null,null,ua||"",pa.invert?na:Ra,pa.invert?Ra:na,Ha);if(null!=pa.labels)for(Ha=0;Ha<pa.labels.length;Ha++){var Ea=pa.labels[Ha],La=new mxCell(Ea.label||Ha,new mxGeometry(null!=Ea.x?Ea.x:0,null!=Ea.y?Ea.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ea.placeholders&&(La.value=D.replacePlaceholders("target"==Ea.placeholders==!pa.invert?na:Ra,La.value,A));if(null!=
-Ea.dx||null!=Ea.dy)La.geometry.offset=new mxPoint(null!=Ea.dx?Ea.dx:0,null!=Ea.dy?Ea.dy:0);ua.insert(La)}if(null!=pa.data)for(var Pa in pa.data)D.setAttributeForCell(ua,Pa,pa.data[Pa]);Ja.push(ua);mxUtils.remove(pa.invert?Ra:na,Aa)}}}});Ga(ma,ma,Ka);if(null!=z[ma.id])for(la=0;la<z[ma.id].length;la++)Ga(ma,z[ma.id][la],Ka)}}if(null!=ha)for(da=0;da<l.length;da++)for(ma=l[da],la=0;la<ha.length;la++)D.setAttributeForCell(ma,mxUtils.trim(ha[la]),null);if(0<u.length){var ya=new mxParallelEdgeLayout(D);
+"-"!=da?M=da:"labels"==fa&&0<da.length&&"-"!=da?n=JSON.parse(da):"style"==fa?Q=da:"parentstyle"==fa?t=da:"unknownStyle"==fa&&"-"!=da?U=da:"stylename"==fa&&0<da.length&&"-"!=da?T=da:"styles"==fa&&0<da.length&&"-"!=da?R=JSON.parse(da):"vars"==fa&&0<da.length&&"-"!=da?A=JSON.parse(da):"identity"==fa&&0<da.length&&"-"!=da?C=da:"parent"==fa&&0<da.length&&"-"!=da?F=da:"namespace"==fa&&0<da.length&&"-"!=da?J=da:"width"==fa?K=da:"height"==fa?k=da:"collapsed"==fa&&"-"!=da?v="true"==da:"left"==fa&&0<da.length?
+G=da:"top"==fa&&0<da.length?N=da:"ignore"==fa?ha=da.split(","):"connect"==fa?ka.push(JSON.parse(da)):"link"==fa?ba=da:"padding"==fa?V=parseFloat(da):"edgespacing"==fa?O=parseFloat(da):"nodespacing"==fa?P=parseFloat(da):"levelspacing"==fa?S=parseFloat(da):"layout"==fa&&(ca=da)}}}if(null==g[aa])throw Error(mxResources.get("invalidOrMissingFile"));var za=this.editor.csvToArray(g[aa].replace(/\r$/,""));ia=c=null;fa=[];for(da=0;da<za.length;da++)C==za[da]&&(c=da),F==za[da]&&(ia=da),fa.push(mxUtils.trim(za[da]).replace(/[^a-z0-9]+/ig,
+"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+fa[0]+"%");if(null!=ka)for(var ua=0;ua<ka.length;ua++)null==E[ka[ua].to]&&(E[ka[ua].to]={});C=[];for(da=aa+1;da<g.length;da++){var na=this.editor.csvToArray(g[da].replace(/\r$/,""));if(null==na){var Ba=40<g[da].length?g[da].substring(0,40)+"...":g[da];throw Error(Ba+" ("+da+"):\n"+mxResources.get("containsValidationErrors"));}0<na.length&&C.push(na)}D.model.beginUpdate();try{for(da=0;da<C.length;da++){na=C[da];var ma=null,ta=null!=c?J+na[c]:
+null;g=!1;null!=ta&&(ma=D.model.getCell(ta),g=null==ma||0<=mxUtils.indexOf(l,ma));var qa=new mxCell(ea,new mxGeometry(Z,X,0,0),Q||"whiteSpace=wrap;html=1;");qa.collapsed=v;qa.vertex=!0;qa.id=ta;null==ma||g||D.model.setCollapsed(ma,v);for(var la=0;la<na.length;la++)D.setAttributeForCell(qa,fa[la],na[la]),null==ma||g||D.setAttributeForCell(ma,fa[la],na[la]);if(null!=M&&null!=n){var Fa=n[qa.getAttribute(M)];null!=Fa&&(D.labelChanged(qa,Fa),null==ma||g||D.cellLabelChanged(ma,Fa))}if(null!=T&&null!=R){var wa=
+R[qa.getAttribute(T)];null!=wa&&(qa.style=wa)}D.setAttributeForCell(qa,"placeholders","1");qa.style=D.replacePlaceholders(qa,qa.style,A);null==ma||g?D.fireEvent(new mxEventObject("cellsInserted","cells",[qa])):(D.model.setStyle(ma,qa.style),0>mxUtils.indexOf(u,ma)&&u.push(ma),D.fireEvent(new mxEventObject("cellsInserted","cells",[ma])));g=null!=ma;ma=qa;if(!g)for(ua=0;ua<ka.length;ua++)E[ka[ua].to][ma.getAttribute(ka[ua].to)]=ma;null!=ba&&"link"!=ba&&(D.setLinkForCell(ma,ma.getAttribute(ba)),D.setAttributeForCell(ma,
+ba,null));var Ca=this.editor.graph.getPreferredSizeForCell(ma);F=null!=ia?D.model.getCell(J+na[ia]):null;if(ma.vertex){Ba=null!=F?0:Z;aa=null!=F?0:Y;null!=G&&null!=ma.getAttribute(G)&&(ma.geometry.x=Ba+parseFloat(ma.getAttribute(G)));null!=N&&null!=ma.getAttribute(N)&&(ma.geometry.y=aa+parseFloat(ma.getAttribute(N)));var xa="@"==K.charAt(0)?ma.getAttribute(K.substring(1)):null;ma.geometry.width=null!=xa&&"auto"!=xa?parseFloat(ma.getAttribute(K.substring(1))):"auto"==K||"auto"==xa?Ca.width+V:parseFloat(K);
+var Da="@"==k.charAt(0)?ma.getAttribute(k.substring(1)):null;ma.geometry.height=null!=Da&&"auto"!=Da&&"width"!=k?parseFloat(Da):"auto"==k||"auto"==Da?Ca.height+V:"width"==k?ma.geometry.width:parseFloat(k);X+=ma.geometry.height+P}g?(null==z[ta]&&(z[ta]=[]),z[ta].push(ma)):(l.push(ma),null!=F?(F.style=D.replacePlaceholders(F,t,A),D.addCell(ma,F),p.push(F)):u.push(D.addCell(ma)))}for(da=0;da<p.length;da++)xa="@"==K.charAt(0)?p[da].getAttribute(K.substring(1)):null,Da="@"==k.charAt(0)?p[da].getAttribute(k.substring(1)):
+null,"auto"!=K&&"auto"!=xa||"auto"!=k&&"auto"!=Da||D.updateGroupBounds([p[da]],V,!0);var Aa=u.slice(),Ja=u.slice();for(ua=0;ua<ka.length;ua++){var Ka=ka[ua];for(da=0;da<l.length;da++){ma=l[da];var Ga=mxUtils.bind(this,function(Ra,ja,pa){var ra=ja.getAttribute(pa.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var sa=0;sa<ra.length;sa++){var oa=E[pa.to][ra[sa]];if(null==oa&&null!=U){oa=new mxCell(ra[sa],new mxGeometry(Z,Y,0,0),U);oa.style=D.replacePlaceholders(ja,oa.style,A);var va=this.editor.graph.getPreferredSizeForCell(oa);
+oa.geometry.width=va.width+V;oa.geometry.height=va.height+V;E[pa.to][ra[sa]]=oa;oa.vertex=!0;oa.id=ra[sa];u.push(D.addCell(oa))}if(null!=oa){va=pa.label;null!=pa.fromlabel&&(va=(ja.getAttribute(pa.fromlabel)||"")+(va||""));null!=pa.sourcelabel&&(va=D.replacePlaceholders(ja,pa.sourcelabel,A)+(va||""));null!=pa.tolabel&&(va=(va||"")+(oa.getAttribute(pa.tolabel)||""));null!=pa.targetlabel&&(va=(va||"")+D.replacePlaceholders(oa,pa.targetlabel,A));var Ia="target"==pa.placeholders==!pa.invert?oa:Ra;Ia=
+null!=pa.style?D.replacePlaceholders(Ia,pa.style,A):D.createCurrentEdgeStyle();va=D.insertEdge(null,null,va||"",pa.invert?oa:Ra,pa.invert?Ra:oa,Ia);if(null!=pa.labels)for(Ia=0;Ia<pa.labels.length;Ia++){var Ea=pa.labels[Ia],La=new mxCell(Ea.label||Ia,new mxGeometry(null!=Ea.x?Ea.x:0,null!=Ea.y?Ea.y:0,0,0),"resizable=0;html=1;");La.vertex=!0;La.connectable=!1;La.geometry.relative=!0;null!=Ea.placeholders&&(La.value=D.replacePlaceholders("target"==Ea.placeholders==!pa.invert?oa:Ra,La.value,A));if(null!=
+Ea.dx||null!=Ea.dy)La.geometry.offset=new mxPoint(null!=Ea.dx?Ea.dx:0,null!=Ea.dy?Ea.dy:0);va.insert(La)}if(null!=pa.data)for(var Pa in pa.data)D.setAttributeForCell(va,Pa,pa.data[Pa]);Ja.push(va);mxUtils.remove(pa.invert?Ra:oa,Aa)}}}});Ga(ma,ma,Ka);if(null!=z[ma.id])for(la=0;la<z[ma.id].length;la++)Ga(ma,z[ma.id][la],Ka)}}if(null!=ha)for(da=0;da<l.length;da++)for(ma=l[da],la=0;la<ha.length;la++)D.setAttributeForCell(ma,mxUtils.trim(ha[la]),null);if(0<u.length){var ya=new mxParallelEdgeLayout(D);
ya.spacing=O;ya.checkOverlap=!0;var Ma=function(){0<ya.spacing&&ya.execute(D.getDefaultParent());for(var Ra=0;Ra<u.length;Ra++){var ja=D.getCellGeometry(u[Ra]);ja.x=Math.round(D.snap(ja.x));ja.y=Math.round(D.snap(ja.y));"auto"==K&&(ja.width=Math.round(D.snap(ja.width)));"auto"==k&&(ja.height=Math.round(D.snap(ja.height)))}};if("["==ca.charAt(0)){var Va=W;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Ma();Va()});W=null}else if("circle"==ca){var Ua=new mxCircleLayout(D);
-Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var fb=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Ra){return fb.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){Ua.execute(D.getDefaultParent());Ma()},!0,W);W=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Ja.length==2*u.length-1&&1==Aa.length){D.view.validate();var cb=new mxCompactTreeLayout(D,"horizontaltree"==ca);cb.levelDistance=Q;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(D.getDefaultParent(),
-0<Aa.length?Aa[0]:null)},!0,W);W=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Aa.length){D.view.validate();var Ta=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ta.intraCellSpacing=Q;Ta.parallelEdgeSpacing=O;Ta.interRankCellSpacing=S;Ta.disableEdgeStyle=!1;this.executeLayout(function(){Ta.execute(D.getDefaultParent(),Ja);D.moveCells(Ja,Z,Y)},!0,W);W=null}else if("orgchart"==ca){D.view.validate();var $a=new mxOrgChartLayout(D,
-2,S,Q),Wa=$a.isVertexIgnored;$a.isVertexIgnored=function(Ra){return Wa.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){$a.execute(D.getDefaultParent());Ma()},!0,W);W=null}else if("organic"==ca||"auto"==ca&&Ja.length>u.length){D.view.validate();var ab=new mxFastOrganicLayout(D);ab.forceConstant=3*Q;ab.disableEdgeStyle=!1;ab.resetEdges=!1;var ib=ab.isVertexIgnored;ab.isVertexIgnored=function(Ra){return ib.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){ab.execute(D.getDefaultParent());
+Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var fb=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Ra){return fb.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){Ua.execute(D.getDefaultParent());Ma()},!0,W);W=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Ja.length==2*u.length-1&&1==Aa.length){D.view.validate();var cb=new mxCompactTreeLayout(D,"horizontaltree"==ca);cb.levelDistance=P;cb.edgeRouting=!1;cb.resetEdges=!1;cb.sortEdges=!0;this.executeLayout(function(){cb.execute(D.getDefaultParent(),
+0<Aa.length?Aa[0]:null)},!0,W);W=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Aa.length){D.view.validate();var Ta=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ta.intraCellSpacing=P;Ta.parallelEdgeSpacing=O;Ta.interRankCellSpacing=S;Ta.disableEdgeStyle=!1;this.executeLayout(function(){Ta.execute(D.getDefaultParent(),Ja);D.moveCells(Ja,Z,Y)},!0,W);W=null}else if("orgchart"==ca){D.view.validate();var $a=new mxOrgChartLayout(D,
+2,S,P),Wa=$a.isVertexIgnored;$a.isVertexIgnored=function(Ra){return Wa.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){$a.execute(D.getDefaultParent());Ma()},!0,W);W=null}else if("organic"==ca||"auto"==ca&&Ja.length>u.length){D.view.validate();var ab=new mxFastOrganicLayout(D);ab.forceConstant=3*P;ab.disableEdgeStyle=!1;ab.resetEdges=!1;var ib=ab.isVertexIgnored;ab.isVertexIgnored=function(Ra){return ib.apply(this,arguments)||0>mxUtils.indexOf(u,Ra)};this.executeLayout(function(){ab.execute(D.getDefaultParent());
Ma()},!0,W);W=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=W&&W()}}catch(Ra){this.handleError(Ra)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",l;for(l in urlParams)0>mxUtils.indexOf(c,l)&&null!=urlParams[l]&&(e+=g+l+"="+urlParams[l],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;
if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(g,l)&&(c=0==e?c+"?":c+"&",null!=urlParams[l]&&(c+=l+"="+urlParams[l],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,l,p){c=new LinkDialog(this,c,e,g,!0,l,p);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&
"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);
this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.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));
c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("smartFit").setEnabled(e);this.actions.get("resetView").setEnabled(e);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);this.menus.get("edgeShape").setEnabled(c);this.menus.get("edgeStyle").setEnabled(c);
this.menus.get("appearance").setEnabled(mxUtils.lightDarkColorSupported)};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var e=
-0;e<c.length;e++)this.libraryLoaded(c[e].file,c[e].images,c[e].title,null!=c[e].div?"none"!=c[e].div.style.display:c[e].expand)};var M=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){M.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive(),p="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&p);this.actions.get("redo").setEnabled(this.canRedo()&&
+0;e<c.length;e++)this.libraryLoaded(c[e].file,c[e].images,c[e].title,null!=c[e].div?"none"!=c[e].div.style.display:c[e].expand)};var L=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive(),p="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&p);this.actions.get("redo").setEnabled(this.canRedo()&&
p);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(l&&0==g.edges.length&&1==g.vertices.length);this.actions.get("editImage").setEnabled(l&&g.image&&0<g.cells.length);this.actions.get("crop").setEnabled(l&&g.image&&0<g.cells.length);this.actions.get("pageSetup").setEnabled(l);this.actions.get("shadowVisible").setEnabled(l);
this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&l&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=
e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);
this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("none"!=this.diagramContainer.style.display);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(l&&
null!=c&&null!=c.shape&&null!=c.shape.stencil)};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);H.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,g,l,p,u,z,E){var D=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");
-else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(D.getSvg(l,p,u)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),P=D.getGraphBounds(),R=Math.floor(P.width*p/D.view.scale),T=Math.floor(P.height*p/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&R*T<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var L={globalVars:D.getExportVariables()};E&&(L.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(e,g,function(U,
-n){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(n||"0")+(null!=U?"&filename="+encodeURIComponent(U):"")+"&extras="+encodeURIComponent(JSON.stringify(L))+(0<z?"&dpi="+z:"")+"&bg="+(null!=l?l:"none")+"&w="+R+"&h="+T+"&border="+u+"&xml="+encodeURIComponent(A))})}else"png"==g?c.exportImage(p,null==l||"none"==l,!0,!1,!1,u,!0,!1,null,E,z):c.exportImage(p,!1,!0,!1,!1,u,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
+else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(D.getSvg(l,p,u)),"image/svg+xml");else{var A=c.getFileData(!0,null,null,null,null,!0),Q=D.getGraphBounds(),R=Math.floor(Q.width*p/D.view.scale),T=Math.floor(Q.height*p/D.view.scale);if(A.length<=MAX_REQUEST_SIZE&&R*T<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var M={globalVars:D.getExportVariables()};E&&(M.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});c.saveRequest(e,g,function(U,
+n){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(n||"0")+(null!=U?"&filename="+encodeURIComponent(U):"")+"&extras="+encodeURIComponent(JSON.stringify(M))+(0<z?"&dpi="+z:"")+"&bg="+(null!=l?l:"none")+"&w="+R+"&h="+T+"&border="+u+"&xml="+encodeURIComponent(A))})}else"png"==g?c.exportImage(p,null==l||"none"==l,!0,!1,!1,u,!0,!1,null,E,z):c.exportImage(p,!1,!0,!1,!1,u,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var l=c;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+l.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var l=
document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(c));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var u={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var E=z[c];if("R"==E.substring(0,1)){var D=JSON.parse(decodeURIComponent(E.substring(1)));
-u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){p.innerText="";if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var P=0;P<A.length;P++){var R=A[P];u[R.id]&&(e[R.id]=R);var T=this.addCheckbox(p,R.title,u[R.id]);(function(L,U){mxEvent.addListener(U,"change",function(){this.checked?e[L.id]=L:delete e[L.id]})})(R,T)}},mxUtils.bind(this,
-function(A){p.innerText="";var P=document.createElement("div");P.style.padding="8px";P.style.textAlign="center";mxUtils.write(P,mxResources.get("error")+": ");mxUtils.write(P,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(P)}));g.appendChild(p);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,P;for(P in e)null==u[P]&&(A++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],
-null,mxUtils.bind(this,function(T){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,R)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[P]));for(P in u)e[P]||this.closeLibrary(new RemoteLibrary(this,null,u[P]));0==A&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");
+u[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){p.innerText="";if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Q=0;Q<A.length;Q++){var R=A[Q];u[R.id]&&(e[R.id]=R);var T=this.addCheckbox(p,R.title,u[R.id]);(function(M,U){mxEvent.addListener(U,"change",function(){this.checked?e[M.id]=M:delete e[M.id]})})(R,T)}},mxUtils.bind(this,
+function(A){p.innerText="";var Q=document.createElement("div");Q.style.padding="8px";Q.style.textAlign="center";mxUtils.write(Q,mxResources.get("error")+": ");mxUtils.write(Q,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(Q)}));g.appendChild(p);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,Q;for(Q in e)null==u[Q]&&(A++,mxUtils.bind(this,function(R){this.remoteInvoke("getFileContent",[R.downloadUrl],
+null,mxUtils.bind(this,function(T){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,T,R)),this.showSidebar()}catch(M){this.handleError(M,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[Q]));for(Q in u)e[Q]||this.closeLibrary(new RemoteLibrary(this,null,u[Q]));0==A&&this.spinner.stop()}),null,null,"https://www.drawio.com/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(c){this.remoteWin=
c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,l,p){var u=
!0,z=window.setTimeout(mxUtils.bind(this,function(){u=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(z);u&&l.apply(this,arguments)}),D=mxUtils.bind(this,function(){window.clearTimeout(z);u&&p.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:D});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(A,P){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=P?R.error={errResp:P}:null!=A&&(R.resp=A);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var l=c.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var u=!1,z=0;z<p.allowedDomains.length;z++)if(e=="https://"+p.allowedDomains[z]){u=
+this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(A,Q){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Q?R.error={errResp:Q}:null!=A&&(R.resp=A);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var l=c.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var u=!1,z=0;z<p.allowedDomains.length;z++)if(e=="https://"+p.allowedDomains[z]){u=
!0;break}if(!u){g(null,"Invalid Call: "+l+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(p.isAsync)E.push(function(){g(Array.prototype.slice.apply(arguments))}),E.push(function(A){g(null,A||"Unkown Error")}),this[l].apply(this,E);else{var D=this[l].apply(this,E);g([D])}}else g(null,"Invalid Call: "+l+" is not found.")}catch(A){g(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||
window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var l=g.open("database",2);l.onupgradeneeded=function(p){try{var u=l.result;1>p.oldVersion&&u.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(u.createObjectStore("files",{keyPath:"title"}),u.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};l.onsuccess=mxUtils.bind(this,function(p){try{var u=l.result;this.database=u;EditorUi.migrateStorageFiles&&(StorageFile.migrate(u),
-EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if((!z||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,A=!1,P,R=0,T=mxUtils.bind(this,
-function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),L=mxUtils.bind(this,function(){R++;U()}),U=mxUtils.bind(this,function(){try{if(R>=P.length)T();else{var t=P[R];StorageFile.getFileContent(this,t,mxUtils.bind(this,function(B){null==B||".scratchpad"==t&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[t]}),
-"*"):L()}),L)}}catch(B){console.log(B)}}),n=mxUtils.bind(this,function(t){try{this.setDatabaseItem(null,[{title:t.title,size:t.data.length,lastModified:Date.now(),type:t.isLib?"L":"F"},{title:t.title,data:t.data}],L,L,["filesInfo","files"])}catch(B){console.log(B)}});z=mxUtils.bind(this,function(t){try{if(t.source==E.contentWindow){var B={};try{B=JSON.parse(t.data)}catch(F){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||A||(D?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(P=B.resp[0],D=!1,U()):T():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?n(B.resp[0]):L())}}catch(F){console.log(F)}});window.addEventListener("message",z)}})));c(u);u.onversionchange=function(){u.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});l.onerror=e;l.onblocked=function(){}}catch(p){null!=e?e(p):null!=window.console&&console.error(p)}else null!=
+EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if((!z||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var D=!0,A=!1,Q,R=0,T=mxUtils.bind(this,
+function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),M=mxUtils.bind(this,function(){R++;U()}),U=mxUtils.bind(this,function(){try{if(R>=Q.length)T();else{var t=Q[R];StorageFile.getFileContent(this,t,mxUtils.bind(this,function(C){null==C||".scratchpad"==t&&C==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[t]}),
+"*"):M()}),M)}}catch(C){console.log(C)}}),n=mxUtils.bind(this,function(t){try{this.setDatabaseItem(null,[{title:t.title,size:t.data.length,lastModified:Date.now(),type:t.isLib?"L":"F"},{title:t.title,data:t.data}],M,M,["filesInfo","files"])}catch(C){console.log(C)}});z=mxUtils.bind(this,function(t){try{if(t.source==E.contentWindow){var C={};try{C=JSON.parse(t.data)}catch(F){}"init"==C.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||A||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(Q=C.resp[0],D=!1,U()):T():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?n(C.resp[0]):M())}}catch(F){console.log(F)}});window.addEventListener("message",z)}})));c(u);u.onversionchange=function(){u.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});l.onerror=e;l.onblocked=function(){}}catch(p){null!=e?e(p):null!=window.console&&console.error(p)}else null!=
e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,g,l,p){this.openDatabase(mxUtils.bind(this,function(u){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c],e=[e]);var z=u.transaction(p,"readwrite");z.oncomplete=g;z.onerror=l;for(u=0;u<p.length;u++)z.objectStore(p[u]).put(null!=c&&null!=c[u]?{key:c[u],data:e[u]}:e[u])}catch(E){null!=l&&l(E)}}),l)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=
l||"objects";Array.isArray(l)||(l=[l],c=[c]);var u=p.transaction(l,"readwrite");u.oncomplete=e;u.onerror=g;for(p=0;p<l.length;p++)u.objectStore(l[p]).delete(c[p])}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=l||"objects";var u=p.transaction([l],"readonly").objectStore(l).get(c);u.onsuccess=function(){e(u.result)};u.onerror=g}catch(z){null!=g&&g(z)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,
function(l){try{g=g||"objects";var p=l.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),u=[];p.onsuccess=function(z){null==z.target.result?c(u):(u.push(z.target.result.value),z.target.result.continue())};p.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(l){try{g=g||"objects";var p=l.transaction([g],"readonly").objectStore(g).getAllKeys();p.onsuccess=function(){c(p.result)};p.onerror=
@@ -13531,71 +13530,71 @@ e}catch(u){null!=e&&e(u)}}),e)};EditorUi.prototype.commentsSupported=function(){
function(c,e,g){var l=this.getCurrentFile();null!=l?l.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=
function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,l,p,u,z,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,l,p,u,z,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,l,p,u,z,E,D,A,P,R,T,L,U,n){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,l,p,u,z,E,
-D,A,P,R,T,L,U,n)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,l)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};
+return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,l,p,u,z,E,D,A,Q,R,T,M,U,n){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,l,p,u,z,E,
+D,A,Q,R,T,M,U,n)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,l)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};
EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,l)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,
e,g,l,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),l=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<l.length){var p="<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(p||l)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=
function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,m,d,q,x){function C(){for(var n=E.getElementsByTagName("div"),t=0,B=0;B<n.length;B++)"none"!=n[B].style.display&&n[B].parentNode==E&&t++;D.style.display=0==t?"block":"none"}function y(n,t,B,F){function J(){t.removeChild(v);t.removeChild(G);k.style.display="block";K.style.display="block"}p={div:t,comment:n,saveCallback:B,deleteOnCancel:F};var K=t.querySelector(".geCommentTxt"),k=t.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className=
-"geCommentEditTxtArea";v.style.minHeight=K.offsetHeight+"px";v.value=n.content;t.insertBefore(v,K);var G=document.createElement("div");G.className="geCommentEditBtns";var N=mxUtils.button(mxResources.get("cancel"),function(){F?(t.parentNode.removeChild(t),C()):J();p=null});N.className="geCommentEditBtn";G.appendChild(N);var O=mxUtils.button(mxResources.get("save"),function(){K.innerText="";n.content=v.value;mxUtils.write(K,n.content);J();B(n);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,
-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(O.click(),mxEvent.consume(Q)):27==Q.keyCode&&(N.click(),mxEvent.consume(Q)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";G.appendChild(O);t.insertBefore(G,K);k.style.display="none";K.style.display="none";v.focus()}function I(n,t){t.innerText="";n=new Date(n.modifiedDate);var B=b.timeSince(n);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(t,mxResources.get("timeAgo",
-[B],"{1} ago"));t.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function M(n){var t=document.createElement("img");t.className="geCommentBusyImg";t.src=IMAGE_PATH+"/spin.gif";n.appendChild(t);n.busyImg=t}function H(n){n.style.border="1px solid red";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function c(n){n.style.border="";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function e(n,t,B,F,J){function K(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
-var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ea){W(ea,n);ea.preventDefault();mxEvent.consume(ea)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(n);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ea(){M(ha);n.addReply(ba,function(aa){ba.id=aa;n.replies.push(ba);
+var CommentsWindow=function(b,f,m,d,q,x){function B(){for(var n=E.getElementsByTagName("div"),t=0,C=0;C<n.length;C++)"none"!=n[C].style.display&&n[C].parentNode==E&&t++;D.style.display=0==t?"block":"none"}function y(n,t,C,F){function J(){t.removeChild(v);t.removeChild(G);k.style.display="block";K.style.display="block"}p={div:t,comment:n,saveCallback:C,deleteOnCancel:F};var K=t.querySelector(".geCommentTxt"),k=t.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className=
+"geCommentEditTxtArea";v.style.minHeight=K.offsetHeight+"px";v.value=n.content;t.insertBefore(v,K);var G=document.createElement("div");G.className="geCommentEditBtns";var N=mxUtils.button(mxResources.get("cancel"),function(){F?(t.parentNode.removeChild(t),B()):J();p=null});N.className="geCommentEditBtn";G.appendChild(N);var O=mxUtils.button(mxResources.get("save"),function(){K.innerText="";n.content=v.value;mxUtils.write(K,n.content);J();C(n);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,
+function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(O.click(),mxEvent.consume(P)):27==P.keyCode&&(N.click(),mxEvent.consume(P)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";G.appendChild(O);t.insertBefore(G,K);k.style.display="none";K.style.display="none";v.focus()}function I(n,t){t.innerText="";n=new Date(n.modifiedDate);var C=b.timeSince(n);null==C&&(C=mxResources.get("lessThanAMinute"));mxUtils.write(t,mxResources.get("timeAgo",
+[C],"{1} ago"));t.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function L(n){var t=document.createElement("img");t.className="geCommentBusyImg";t.src=IMAGE_PATH+"/spin.gif";n.appendChild(t);n.busyImg=t}function H(n){n.style.border="1px solid red";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function c(n){n.style.border="";n.busyImg.parentNode==n&&n.removeChild(n.busyImg)}function e(n,t,C,F,J){function K(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
+var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ea){W(ea,n);ea.preventDefault();mxEvent.consume(ea)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(n);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ea(){L(ha);n.addReply(ba,function(aa){ba.id=aa;n.replies.push(ba);
c(ha);X&&X()},function(aa){ca();H(ha);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ca(){y(ba,ha,function(aa){ea()},!0)}var ka=k().pdiv,ba=b.newComment(V,b.getCurrentUser());ba.pCommentId=n.id;null==n.replies&&(n.replies=[]);var ha=e(ba,n.replies,ka,F+1);W?ca():ea()}if(J||!n.isResolved){D.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",n.id);G.style.marginLeft=20*F+5+
-"px";n.isResolved&&(u.style.opacity="0.7");var N=document.createElement("div");N.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=n.user&&null!=n.user.pictureUrl?n.user.pictureUrl:Editor.userImage;N.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";N.appendChild(O);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,null!=n.user?n.user.displayName:mxResources.get("unknownUser"));
-O.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",n.id);I(n,Q);O.appendChild(Q);G.appendChild(N);N=document.createElement("div");N.className="geCommentTxt";mxUtils.write(N,n.content||"");G.appendChild(N);n.isLocked&&(G.style.opacity="0.5");N=document.createElement("div");N.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";N.appendChild(S);g||n.isLocked||0!=F&&!l||K(mxResources.get("reply"),
-function(){v("",!0)},n.isResolved);O=b.getCurrentUser();null==O||null==n.user||O.id!=n.user.id||g||n.isLocked||(K(mxResources.get("edit"),function(){function V(){y(n,G,function(){M(G);n.editComment(n.content,function(){c(G)},function(W){H(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},n.isResolved),K(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){M(G);n.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");
+"px";n.isResolved&&(u.style.opacity="0.7");var N=document.createElement("div");N.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=n.user&&null!=n.user.pictureUrl?n.user.pictureUrl:Editor.userImage;N.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";N.appendChild(O);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=n.user?n.user.displayName:mxResources.get("unknownUser"));
+O.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",n.id);I(n,P);O.appendChild(P);G.appendChild(N);N=document.createElement("div");N.className="geCommentTxt";mxUtils.write(N,n.content||"");G.appendChild(N);n.isLocked&&(G.style.opacity="0.5");N=document.createElement("div");N.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";N.appendChild(S);g||n.isLocked||0!=F&&!l||K(mxResources.get("reply"),
+function(){v("",!0)},n.isResolved);O=b.getCurrentUser();null==O||null==n.user||O.id!=n.user.id||g||n.isLocked||(K(mxResources.get("edit"),function(){function V(){y(n,G,function(){L(G);n.editComment(n.content,function(){c(G)},function(W){H(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},n.isResolved),K(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){L(G);n.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");
V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);c(G);G.style.opacity="0.5"}else{W=k(n).replies;for(V=0;V<W.length;V++)E.removeChild(W[V]);for(V=0;V<t.length;V++)if(t[V]==n){t.splice(V,1);break}D.style.display=0==E.getElementsByTagName("div").length?"block":"none"}},function(V){H(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},n.isResolved));
g||n.isLocked||0!=F||K(n.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";n.isResolved=!n.isResolved;mxUtils.write(X,n.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=n.isResolved?"none":"",Y=k(n).replies,ea="light-dark("+(n.isResolved?"ghostWhite":"white")+", transparent)",ca=0;ca<Y.length;ca++){Y[ca].style.backgroundColor=ea;for(var ka=Y[ca].querySelectorAll(".geCommentAction"),ba=0;ba<ka.length;ba++)ka[ba]!=
-X.parentNode&&(ka[ba].style.display=Z);T||(Y[ca].style.display="none")}C()}n.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(N);null!=B?E.insertBefore(G,B.nextSibling):E.appendChild(G);for(B=0;null!=n.replies&&B<n.replies.length;B++)N=n.replies[B],N.isResolved=n.isResolved,e(N,n.replies,null,F+1,J);null!=p&&(p.comment.id==n.id?(J=n.content,n.content=p.comment.content,y(n,G,p.saveCallback,p.deleteOnCancel),n.content=J):null==
+X.parentNode&&(ka[ba].style.display=Z);T||(Y[ca].style.display="none")}B()}n.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(N);null!=C?E.insertBefore(G,C.nextSibling):E.appendChild(G);for(C=0;null!=n.replies&&C<n.replies.length;C++)N=n.replies[C],N.isResolved=n.isResolved,e(N,n.replies,null,F+1,J);null!=p&&(p.comment.id==n.id?(J=n.content,n.content=p.comment.content,y(n,G,p.saveCallback,p.deleteOnCancel),n.content=J):null==
p.comment.id&&p.comment.pCommentId==n.id&&(E.appendChild(p.div),y(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return G}}var g=!b.canComment(),l=b.canReplyToReplies(),p=null,u=document.createElement("div");u.className="geCommentsWin";var z=EditorUi.compactUi?"26px":"30px",E=document.createElement("div");E.className="geCommentsList";E.style.bottom=parseInt(z)+7+"px";u.appendChild(E);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,
-mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=z;A.style.padding="3px 4px 4px 4px";z=document.createElement("a");z.className="geButton";if(!g){var P=z.cloneNode();P.style.backgroundImage="url("+Editor.plusImage+")";P.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(P,"click",function(n){function t(){y(B,F,function(J){M(F);b.addComment(J,function(K){J.id=K;L.push(J);c(F)},function(K){H(F);
-t();b.handleError(K,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=b.newComment("",b.getCurrentUser()),F=e(B,L,null,0);t();n.preventDefault();mxEvent.consume(n)});A.appendChild(P)}var R=z.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(R,"click",function(n){(T=!T)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");U();n.preventDefault();mxEvent.consume(n)});
-A.appendChild(R);b.commentsRefreshNeeded()&&(P=z.cloneNode(),P.style.backgroundImage="url("+Editor.refreshImage+")",P.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(P,"click",function(n){U();n.preventDefault();mxEvent.consume(n)}),A.appendChild(P));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geButton geAdaptiveAsset",mxEvent.addListener(z,
-"click",function(n){x();n.preventDefault();mxEvent.consume(n)}),A.appendChild(z));u.appendChild(A);var L=[],U=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var n=p.div.querySelector(".geCommentEditTxtArea"),t=p.div.querySelector(".geCommentEditBtns");p.comment.content=n.value;n.parentNode.removeChild(n);t.parentNode.removeChild(t)}catch(B){b.handleError(B)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function F(J){if(null!=J){J.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var K=0;K<J.length;K++)F(J[K].replies)}}B.sort(function(J,K){return new Date(J.modifiedDate)-new Date(K.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";L=B;for(B=0;B<L.length;B++)F(L[B].replies),e(L[B],L,null,0,T);null!=p&&null==p.comment.id&&
-null==p.comment.pCommentId&&(E.appendChild(p.div),y(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(B){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});U();this.refreshComments=U;A=mxUtils.bind(this,function(){function n(K){var k=B[K.id];if(null!=k)for(I(K,k),k=0;null!=K.replies&&k<K.replies.length;k++)n(K.replies[k])}if(this.window.isVisible()){for(var t=
-E.querySelectorAll(".geCommentDate"),B={},F=0;F<t.length;F++){var J=t[F];B[J.getAttribute("data-commentId")]=J}for(F=0;F<L.length;F++)n(L[F])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),u,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
-function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,m,d,q,x,C,y,I,M,H){var c=document.createElement("div");c.style.textAlign="center";H=null!=H?H:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=H+"px";e.style.lineHeight="1.2em";mxUtils.write(e,f);c.appendChild(e);null!=M&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",M),e.appendChild(f),
-c.appendChild(e));M=document.createElement("div");M.style.textAlign="center";M.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(g.checked)});x.className="geBtn";null!=y&&(x.innerHTML=y+"<br>"+x.innerHTML,x.style.display="inline-block",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&M.appendChild(x);
-var l=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=m&&m(g.checked)});M.appendChild(l);null!=C?(l.innerHTML=C+"<br>"+l.innerHTML+"<br>",l.style.display="inline-block",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||M.appendChild(x);c.appendChild(M);I?(M.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom=
-"0px",e.appendChild(g),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),e.appendChild(q),c.appendChild(e),mxEvent.addListener(q,"click",function(p){g.checked=!g.checked;mxEvent.consume(p)})):M.style.marginTop="12px";this.init=function(){l.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
+mxResources.get("noCommentsFound"));var A=document.createElement("div");A.className="geToolbarContainer geCommentsToolbar";A.style.height=z;A.style.padding="3px 4px 4px 4px";z=document.createElement("a");z.className="geButton";if(!g){var Q=z.cloneNode();Q.style.backgroundImage="url("+Editor.plusImage+")";Q.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Q,"click",function(n){function t(){y(C,F,function(J){L(F);b.addComment(J,function(K){J.id=K;M.push(J);c(F)},function(K){H(F);
+t();b.handleError(K,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var C=b.newComment("",b.getCurrentUser()),F=e(C,M,null,0);t();n.preventDefault();mxEvent.consume(n)});A.appendChild(Q)}var R=z.cloneNode();R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var T=!1;mxEvent.addListener(R,"click",function(n){(T=!T)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");U();n.preventDefault();mxEvent.consume(n)});
+A.appendChild(R);b.commentsRefreshNeeded()&&(Q=z.cloneNode(),Q.style.backgroundImage="url("+Editor.refreshImage+")",Q.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Q,"click",function(n){U();n.preventDefault();mxEvent.consume(n)}),A.appendChild(Q));b.commentsSaveNeeded()&&(z=z.cloneNode(),z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',z.setAttribute("title",mxResources.get("save")),z.className="geButton geAdaptiveAsset",mxEvent.addListener(z,
+"click",function(n){x();n.preventDefault();mxEvent.consume(n)}),A.appendChild(z));u.appendChild(A);var M=[],U=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var n=p.div.querySelector(".geCommentEditTxtArea"),t=p.div.querySelector(".geCommentEditBtns");p.comment.content=n.value;n.parentNode.removeChild(n);t.parentNode.removeChild(t)}catch(C){b.handleError(C)}E.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(C){function F(J){if(null!=J){J.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var K=0;K<J.length;K++)F(J[K].replies)}}C.sort(function(J,K){return new Date(J.modifiedDate)-new Date(K.modifiedDate)});E.innerText="";E.appendChild(D);D.style.display="block";M=C;for(C=0;C<M.length;C++)F(M[C].replies),e(M[C],M,null,0,T);null!=p&&null==p.comment.id&&
+null==p.comment.pCommentId&&(E.appendChild(p.div),y(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(C){E.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(C&&C.message?": "+C.message:""));this.hasError=!0})):E.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});U();this.refreshComments=U;A=mxUtils.bind(this,function(){function n(K){var k=C[K.id];if(null!=k)for(I(K,k),k=0;null!=K.replies&&k<K.replies.length;k++)n(K.replies[k])}if(this.window.isVisible()){for(var t=
+E.querySelectorAll(".geCommentDate"),C={},F=0;F<t.length;F++){var J=t[F];C[J.getAttribute("data-commentId")]=J}for(F=0;F<M.length;F++)n(M[F])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),u,f,m,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
+function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,m,d,q,x,B,y,I,L,H){var c=document.createElement("div");c.style.textAlign="center";H=null!=H?H:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=H+"px";e.style.lineHeight="1.2em";mxUtils.write(e,f);c.appendChild(e);null!=L&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",L),e.appendChild(f),
+c.appendChild(e));L=document.createElement("div");L.style.textAlign="center";L.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");x=mxUtils.button(x||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(g.checked)});x.className="geBtn";null!=y&&(x.innerHTML=y+"<br>"+x.innerHTML,x.style.display="inline-block",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.style.width="40%");b.editor.cancelFirst&&L.appendChild(x);
+var l=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=m&&m(g.checked)});L.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.display="inline-block",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||L.appendChild(x);c.appendChild(L);I?(L.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom=
+"0px",e.appendChild(g),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),e.appendChild(q),c.appendChild(e),mxEvent.addListener(q,"click",function(p){g.checked=!g.checked;mxEvent.consume(p)})):L.style.marginTop="12px";this.init=function(){l.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};
HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,m,d,q){if(null!=f)for(var x=0;x<f.length;x++)null!=f[x]&&(b=this.patchPages(b,f[x],m,d,q));return b};
-EditorUi.prototype.patchPages=function(b,f,m,d,q){var x={},C=[],y={},I={},M={},H={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])x[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)I[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)y[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(c in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(H[d.previous]=c);if(null!=b){var e="";for(d=0;d<b.length;d++){var g=b[d].getId();M[g]=b[d];null!=H[e]||I[g]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][g]&&null!=f[EditorUi.DIFF_UPDATE][g].previous||(H[e]=g);e=g}}var l={},p=mxUtils.bind(this,function(z){var E=null!=z?z.getId():"";if(null!=z&&!l[E]){l[E]=!0;C.push(z);var D=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][E]:null;null!=D&&(this.updatePageRoot(z),null!=D.name&&z.setName(D.name),
-null!=D.view&&this.patchViewState(z,D.view),null!=D.cells&&this.patchPage(z,D.cells,x[z.getId()],q),!m||null==D.cells&&null==D.view||(z.needsUpdate=!0))}z=H[E];null!=z&&(delete H[E],p(M[z]));z=y[E];null!=z&&(delete y[E],u(z))}),u=mxUtils.bind(this,function(z){z=mxUtils.parseXml(z.data).documentElement;z=new DiagramPage(z);this.updatePageRoot(z);var E=M[z.getId()];null==E?p(z):(this.patchPage(E,this.diffPages([E],[z]),x[E.getId()],q),m&&(E.needsUpdate=!0))});p();for(c in H)p(M[H[c]]),delete H[c];for(c in y)u(y[c]),
-delete y[c];return C};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var m in f)try{this.patchViewStateProperty(b,f,m)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,m){b.viewState[m]=JSON.parse(f[m])};
-EditorUi.prototype.createParentLookup=function(b,f){function m(M){var H=d[M];null==H&&(H={inserted:[],moved:{}},d[M]=H);return H}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var q=0;q<f[EditorUi.DIFF_INSERT].length;q++){var x=f[EditorUi.DIFF_INSERT][q],C=null!=x.parent?x.parent:"",y=null!=x.previous?x.previous:"";m(C).inserted[y]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var I in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][I],null!=x.previous&&(C=x.parent,null==C&&(q=b.getCell(I),null!=q&&(q=
-b.getParent(q),null!=q&&(C=q.getId()))),null!=C&&(m(C).moved[x.previous]=I));return d};
-EditorUi.prototype.patchPage=function(b,f,m,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(q,f);q.beginUpdate();try{var C=q.updateEdgeParent,y=new mxDictionary,I=[];q.updateEdgeParent=function(u,z){!y.get(u)&&d&&(y.put(u,!0),I.push(u))};var M=x[""],H=null!=M&&null!=M.inserted?M.inserted[""]:null,c=null;null!=H&&(c=this.getCellForJson(H));if(null==c){var e=null!=M&&null!=M.moved?M.moved[""]:null;null!=e&&(c=q.getCell(e))}null!=c&&(q.setRoot(c),
+EditorUi.prototype.patchPages=function(b,f,m,d,q){var x={},B=[],y={},I={},L={},H={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var c in d[EditorUi.DIFF_UPDATE])x[c]=d[EditorUi.DIFF_UPDATE][c];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)I[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)y[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(c in f[EditorUi.DIFF_UPDATE])d=
+f[EditorUi.DIFF_UPDATE][c],null!=d.previous&&(H[d.previous]=c);if(null!=b){var e="";for(d=0;d<b.length;d++){var g=b[d].getId();L[g]=b[d];null!=H[e]||I[g]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][g]&&null!=f[EditorUi.DIFF_UPDATE][g].previous||(H[e]=g);e=g}}var l={},p=mxUtils.bind(this,function(z){var E=null!=z?z.getId():"";if(null!=z&&!l[E]){l[E]=!0;B.push(z);var D=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][E]:null;null!=D&&(this.updatePageRoot(z),null!=D.name&&z.setName(D.name),
+null!=D.view&&this.patchViewState(z,D.view),null!=D.cells&&this.patchPage(z,D.cells,x[z.getId()],q),!m||null==D.cells&&null==D.view||(z.needsUpdate=!0))}z=H[E];null!=z&&(delete H[E],p(L[z]));z=y[E];null!=z&&(delete y[E],u(z))}),u=mxUtils.bind(this,function(z){z=mxUtils.parseXml(z.data).documentElement;z=new DiagramPage(z);this.updatePageRoot(z);var E=L[z.getId()];null==E?p(z):(this.patchPage(E,this.diffPages([E],[z]),x[E.getId()],q),m&&(E.needsUpdate=!0))});p();for(c in H)p(L[H[c]]),delete H[c];for(c in y)u(y[c]),
+delete y[c];return B};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var m in f)try{this.patchViewStateProperty(b,f,m)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,m){b.viewState[m]=JSON.parse(f[m])};
+EditorUi.prototype.createParentLookup=function(b,f){function m(L){var H=d[L];null==H&&(H={inserted:[],moved:{}},d[L]=H);return H}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var q=0;q<f[EditorUi.DIFF_INSERT].length;q++){var x=f[EditorUi.DIFF_INSERT][q],B=null!=x.parent?x.parent:"",y=null!=x.previous?x.previous:"";m(B).inserted[y]=x}if(null!=f[EditorUi.DIFF_UPDATE])for(var I in f[EditorUi.DIFF_UPDATE])x=f[EditorUi.DIFF_UPDATE][I],null!=x.previous&&(B=x.parent,null==B&&(q=b.getCell(I),null!=q&&(q=
+b.getParent(q),null!=q&&(B=q.getId()))),null!=B&&(m(B).moved[x.previous]=I));return d};
+EditorUi.prototype.patchPage=function(b,f,m,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),x=this.createParentLookup(q,f);q.beginUpdate();try{var B=q.updateEdgeParent,y=new mxDictionary,I=[];q.updateEdgeParent=function(u,z){!y.get(u)&&d&&(y.put(u,!0),I.push(u))};var L=x[""],H=null!=L&&null!=L.inserted?L.inserted[""]:null,c=null;null!=H&&(c=this.getCellForJson(H));if(null==c){var e=null!=L&&null!=L.moved?L.moved[""]:null;null!=e&&(c=q.getCell(e))}null!=c&&(q.setRoot(c),
b.root=c,EditorUi.debug("EditorUi.patchPage: Root changed",c.id));this.patchCellRecursive(b,q,q.root,x,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var g=0;g<f[EditorUi.DIFF_REMOVE].length;g++){e=f[EditorUi.DIFF_REMOVE][g];var l=q.getCell(e);null!=l&&q.remove(l)}if(null!=f[EditorUi.DIFF_UPDATE]){var p=null!=m&&null!=m.cells?m.cells[EditorUi.DIFF_UPDATE]:null;for(e in f[EditorUi.DIFF_UPDATE])l=q.getCell(e),null!=l?this.patchCell(q,l,f[EditorUi.DIFF_UPDATE][e],null!=p?p[e]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-e,"diff",[f[EditorUi.DIFF_UPDATE][e]])}if(null!=f[EditorUi.DIFF_INSERT])for(g=0;g<f[EditorUi.DIFF_INSERT].length;g++)H=f[EditorUi.DIFF_INSERT][g],l=q.getCell(H.id),null!=l&&(q.setTerminal(l,q.getCell(H.source),!0),q.setTerminal(l,q.getCell(H.target),!1));q.updateEdgeParent=C;if(d&&0<I.length)for(g=0;g<I.length;g++)q.contains(I[g])&&q.updateEdgeParent(I[g])}finally{q.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,m,d,q){if(null!=m){var x=d[m.getId()],C=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var y=0,I=f.getChildCount(m),M="",H=0;H<I;H++){var c=f.getChildAt(m,H).getId();null==x[M]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][c]||null==q[EditorUi.DIFF_UPDATE][c].previous&&null==q[EditorUi.DIFF_UPDATE][c].parent)&&(x[M]=c);M=c}I=mxUtils.bind(this,function(e,g){var l=null!=e?e.getId():"";null==l&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",e);null!=e&&g&&(g=f.getCell(l),null!=g&&g!=e&&(e=null));null!=e&&(f.getChildAt(m,y)!=e&&f.add(m,e,y),this.patchCellRecursive(b,f,e,d,q),y++);return l});for(M=[null];0<M.length;)if(H=M.shift(),H=I(null!=H?H.child:null,null!=H?H.insert:!1),c=x[H],null!=c&&(delete x[H],M.push({child:f.getCell(c)})),c=C[H],null!=c&&(delete C[H],M.push({child:this.getCellForJson(c),insert:!0})),0==M.length){for(H in x)M.push({child:f.getCell(x[H])}),delete x[H];for(H in C)M.push({child:this.getCellForJson(C[H]),
-insert:!0}),delete C[H]}}};
+e,"diff",[f[EditorUi.DIFF_UPDATE][e]])}if(null!=f[EditorUi.DIFF_INSERT])for(g=0;g<f[EditorUi.DIFF_INSERT].length;g++)H=f[EditorUi.DIFF_INSERT][g],l=q.getCell(H.id),null!=l&&(q.setTerminal(l,q.getCell(H.source),!0),q.setTerminal(l,q.getCell(H.target),!1));q.updateEdgeParent=B;if(d&&0<I.length)for(g=0;g<I.length;g++)q.contains(I[g])&&q.updateEdgeParent(I[g])}finally{q.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,m,d,q){if(null!=m){var x=d[m.getId()],B=null!=x&&null!=x.inserted?x.inserted:{};x=null!=x&&null!=x.moved?x.moved:{};for(var y=0,I=f.getChildCount(m),L="",H=0;H<I;H++){var c=f.getChildAt(m,H).getId();null==x[L]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][c]||null==q[EditorUi.DIFF_UPDATE][c].previous&&null==q[EditorUi.DIFF_UPDATE][c].parent)&&(x[L]=c);L=c}I=mxUtils.bind(this,function(e,g){var l=null!=e?e.getId():"";null==l&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",e);null!=e&&g&&(g=f.getCell(l),null!=g&&g!=e&&(e=null));null!=e&&(f.getChildAt(m,y)!=e&&f.add(m,e,y),this.patchCellRecursive(b,f,e,d,q),y++);return l});for(L=[null];0<L.length;)if(H=L.shift(),H=I(null!=H?H.child:null,null!=H?H.insert:!1),c=x[H],null!=c&&(delete x[H],L.push({child:f.getCell(c)})),c=B[H],null!=c&&(delete B[H],L.push({child:this.getCellForJson(c),insert:!0})),0==L.length){for(H in x)L.push({child:f.getCell(x[H])}),delete x[H];for(H in B)L.push({child:this.getCellForJson(B[H]),
+insert:!0}),delete B[H]}}};
EditorUi.prototype.patchCell=function(b,f,m,d){if(null!=f&&null!=m){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in m?b.setValue(f,m.value):null!=m.xmlValue&&b.setValue(f,mxUtils.parseXml(m.xmlValue).documentElement);null!=d&&null!=d.style||null==m.style||b.setStyle(f,m.style);null!=m.visible&&b.setVisible(f,1==m.visible);null!=m.collapsed&&b.setCollapsed(f,1==m.collapsed);null!=m.vertex&&(f.vertex=1==m.vertex);null!=m.edge&&(f.edge=1==m.edge);null!=m.connectable&&(f.connectable=
1==m.connectable);null!=m.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(m.geometry).documentElement));null!=m.source&&b.setTerminal(f,b.getCell(m.source),!0);null!=m.target&&b.setTerminal(f,b.getCell(m.target),!1);for(var q in m)this.cellProperties[q]||(f[q]=m[q])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var m=0;m<b.length;m++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[m].root));this.editor.graph.saveViewState(b[m].viewState,d);var q=b[m].node.cloneNode(!1);q.appendChild(d);f.appendChild(q)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,f){var m=this.editor.extractGraphModel(b,!0,!0);null!=m&&(b=m);f=b.getElementsByTagName(f||"diagram");m=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);m.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),m.push(d));return m};
-EditorUi.prototype.diffPages=function(b,f){var m=[],d=[],q={},x={},C={},y=null;if(null!=b&&null!=f){for(var I=0;I<f.length;I++)x[f[I].getId()]={page:f[I],prev:y},y=f[I];y=null;for(I=0;I<b.length;I++){var M=b[I].getId();f=x[M];if(null==f)d.push(M);else{this.updatePageRoot(b[I]);this.updatePageRoot(f.page);var H=this.diffCells(b[I].root,f.page.root),c={};mxUtils.isEmptyObject(H)||(c.cells=H);H=this.diffViewState(b[I],f.page);mxUtils.isEmptyObject(H)||(c.view=H);if((null!=f.prev?null==y:null!=y)||null!=
-y&&null!=f.prev&&y.getId()!=f.prev.getId())c.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[I].getName()!=f.page.getName()&&(c.name=f.page.getName());mxUtils.isEmptyObject(c)||(C[M]=c)}delete x[b[I].getId()];y=b[I]}for(M in x)f=x[M],m.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(C)||(q[EditorUi.DIFF_UPDATE]=C);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<m.length&&(q[EditorUi.DIFF_INSERT]=m)}return q};
+EditorUi.prototype.diffPages=function(b,f){var m=[],d=[],q={},x={},B={},y=null;if(null!=b&&null!=f){for(var I=0;I<f.length;I++)x[f[I].getId()]={page:f[I],prev:y},y=f[I];y=null;for(I=0;I<b.length;I++){var L=b[I].getId();f=x[L];if(null==f)d.push(L);else{this.updatePageRoot(b[I]);this.updatePageRoot(f.page);var H=this.diffCells(b[I].root,f.page.root),c={};mxUtils.isEmptyObject(H)||(c.cells=H);H=this.diffViewState(b[I],f.page);mxUtils.isEmptyObject(H)||(c.view=H);if((null!=f.prev?null==y:null!=y)||null!=
+y&&null!=f.prev&&y.getId()!=f.prev.getId())c.previous=null!=f.prev?f.prev.getId():"";null!=f.page.getName()&&b[I].getName()!=f.page.getName()&&(c.name=f.page.getName());mxUtils.isEmptyObject(c)||(B[L]=c)}delete x[b[I].getId()];y=b[I]}for(L in x)f=x[L],m.push({id:f.page.getId(),data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(B)||(q[EditorUi.DIFF_UPDATE]=B);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<m.length&&(q[EditorUi.DIFF_INSERT]=m)}return q};
EditorUi.prototype.createCellLookup=function(b,f,m){m=null!=m?m:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):m[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var q=0;q<d;q++){var x=b.getChildAt(q);this.createCellLookup(x,f,m);f=x}return m};
-EditorUi.prototype.diffCellRecursive=function(b,f,m,d,q){d=null!=d?d:{};var x=m[b.getId()];delete m[b.getId()];if(null==x)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):q.push(b.getId());else{var C=this.diffCell(b,x.cell);if(null!=C.parent||(null!=x.prev?null==f:null!=f)||null!=f&&null!=x.prev&&f.getId()!=x.prev.getId())C.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(C)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
-b,"diff",C):d[b.getId()]=C)}x=b.getChildCount();f=null;for(C=0;C<x;C++){var y=b.getChildAt(C);this.diffCellRecursive(y,f,m,d,q);f=y}return d};
+EditorUi.prototype.diffCellRecursive=function(b,f,m,d,q){d=null!=d?d:{};var x=m[b.getId()];delete m[b.getId()];if(null==x)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):q.push(b.getId());else{var B=this.diffCell(b,x.cell);if(null!=B.parent||(null!=x.prev?null==f:null!=f)||null!=f&&null!=x.prev&&f.getId()!=x.prev.getId())B.previous=null!=x.prev?x.prev.getId():"";mxUtils.isEmptyObject(B)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
+b,"diff",B):d[b.getId()]=B)}x=b.getChildCount();f=null;for(B=0;B<x;B++){var y=b.getChildAt(B);this.diffCellRecursive(y,f,m,d,q);f=y}return d};
EditorUi.prototype.diffCells=function(b,f){var m={},d=[],q=this.createCellLookup(f);f.id==b.id?(f=[],b=this.diffCellRecursive(b,null,q,null,f),mxUtils.isEmptyObject(b)||(m[EditorUi.DIFF_UPDATE]=b),0<f.length&&(m[EditorUi.DIFF_REMOVE]=f)):EditorUi.debug("EditorUi.diffCells: Root changed",f.id);for(var x in q)b=q[x],d.push(this.getJsonForCell(b.cell,b.prev));0<d.length&&(m[EditorUi.DIFF_INSERT]=d);return m};
EditorUi.prototype.diffViewState=function(b,f){var m=b.viewState,d=f.viewState,q={};b==this.currentPage&&(m=this.editor.graph.getViewState());f==this.currentPage&&(d=this.editor.graph.getViewState());if(null!=m&&null!=d)for(var x in this.viewStateProperties)this.diffViewStateProperty(m,d,x,q);return q};EditorUi.prototype.diffViewStateProperty=function(b,f,m,d){b=JSON.stringify(this.getViewStateProperty(b,m));f=JSON.stringify(this.getViewStateProperty(f,m));b!=f&&(d[m]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?b={originalSrc:b.originalSrc}:"extFonts"==f&&null==b&&(b=[]);return b};
EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,m=b.value;null!=b.xmlValue&&(m=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(m,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
EditorUi.prototype.getJsonForCell=function(b,f){var m={id:b.getId()};b.vertex&&(m.vertex=1);b.edge&&(m.edge=1);b.connectable||(m.connectable=0);null!=b.parent&&(m.parent=b.parent.getId());null!=f&&(m.previous=f.getId());null!=b.source&&(m.source=b.source.getId());null!=b.target&&(m.target=b.target.getId());null!=b.style&&(m.style=b.style);null!=b.geometry&&(m.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(m.collapsed=1);b.visible||(m.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?m.xmlValue=mxUtils.getXml(b.value):m.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(m[d]=b[d]);return m};
-EditorUi.prototype.diffCell=function(b,f){function m(C){return null!=C&&"object"===typeof C&&"number"===typeof C.nodeType&&"string"===typeof C.nodeName&&"function"===typeof C.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
+EditorUi.prototype.diffCell=function(b,f){function m(B){return null!=B&&"object"===typeof B&&"number"===typeof B.nodeType&&"string"===typeof B.nodeName&&"function"===typeof B.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";m(b.value)&&m(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(m(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var q=this.codec.encode(f.geometry);null!=q&&(d.geometry=mxUtils.getXml(q))}for(var x in b)this.cellProperties[x]||"function"===typeof b[x]||"function"===typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);for(x in f)x in b||this.cellProperties[x]||"function"===typeof b[x]||"function"===
typeof f[x]||b[x]==f[x]||(d[x]=void 0===f[x]?null:f[x]);return d};EditorUi.prototype.resolveCrossReferences=function(b,f){var m={};mxUtils.isEmptyObject(f)||(this.adoptTheirPages(b,f,m),this.adoptTheirCells(b,f,m));EditorUi.debug("EditorUi.resolveCrossReferences",[this],"ownDiff",b,"theirDiff",f,"resolve",m);return m};
EditorUi.prototype.adoptTheirPages=function(b,f,m){var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var q=0;q<f[EditorUi.DIFF_INSERT].length;q++)d[f[EditorUi.DIFF_INSERT][q].id]=f[EditorUi.DIFF_INSERT][q];for(var x in b[EditorUi.DIFF_UPDATE])null!=d[x]&&(null==m[EditorUi.DIFF_INSERT]&&(m[EditorUi.DIFF_INSERT]=[]),null==m[EditorUi.DIFF_UPDATE]&&(m[EditorUi.DIFF_UPDATE]={}),m[EditorUi.DIFF_INSERT].push(d[x]),m[EditorUi.DIFF_UPDATE][x]=b[EditorUi.DIFF_UPDATE][x],delete b[EditorUi.DIFF_UPDATE][x])};
EditorUi.prototype.adoptTheirCells=function(b,f,m){for(var d in b[EditorUi.DIFF_UPDATE]){var q=b[EditorUi.DIFF_UPDATE][d];null!=q.cells&&this.adoptTheirCellsFromPage(q,f,d,m)}};
-EditorUi.prototype.adoptTheirCellsFromPage=function(b,f,m,d){var q=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][m]:null;if(null!=q&&null!=q.cells&&null!=q.cells[EditorUi.DIFF_INSERT]){f=q.cells[EditorUi.DIFF_UPDATE];for(var x={},C=0;C<q.cells[EditorUi.DIFF_INSERT].length;C++){var y=q.cells[EditorUi.DIFF_INSERT][C];x[y.id]=y}q={cells:{}};q.cells[EditorUi.DIFF_INSERT]=[];q.cells[EditorUi.DIFF_UPDATE]={};q.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],x,q);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
+EditorUi.prototype.adoptTheirCellsFromPage=function(b,f,m,d){var q=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][m]:null;if(null!=q&&null!=q.cells&&null!=q.cells[EditorUi.DIFF_INSERT]){f=q.cells[EditorUi.DIFF_UPDATE];for(var x={},B=0;B<q.cells[EditorUi.DIFF_INSERT].length;B++){var y=q.cells[EditorUi.DIFF_INSERT][B];x[y.id]=y}q={cells:{}};q.cells[EditorUi.DIFF_INSERT]=[];q.cells[EditorUi.DIFF_UPDATE]={};q.inserted={};this.resolveOwnInsertedCells(b.cells[EditorUi.DIFF_INSERT],x,q);this.resolveOwnUpdatedCells(b.cells[EditorUi.DIFF_UPDATE],
x,f,q);null==d[EditorUi.DIFF_UPDATE]&&(d[EditorUi.DIFF_UPDATE]={});delete q.inserted;d[EditorUi.DIFF_UPDATE][m]=q}};EditorUi.prototype.resolveOwnInsertedCells=function(b,f,m){if(null!=b)for(var d=0;d<b.length;d++){var q=b[d];null!=q&&(this.adoptParentCell(q.id,null,f,m),this.adoptTerminalCell(q.id,q,f,!0,m),this.adoptTerminalCell(q.id,q,f,!1,m))}};
EditorUi.prototype.resolveOwnUpdatedCells=function(b,f,m,d){if(null!=b)for(var q in b){var x=f[q];null!=x?(d.inserted[q]||(d.cells[EditorUi.DIFF_INSERT].push(x),d.inserted[q]=!0),d.cells[EditorUi.DIFF_UPDATE][q]=b[q]):null!=m&&(x=m[q],null!=x&&(this.adoptParentCell(q,x,f,d),this.adoptTerminalCell(q,x,f,!0,d,q),this.adoptTerminalCell(q,x,f,!1,d,q)))}};
EditorUi.prototype.adoptParentCell=function(b,f,m,d){var q=m[b],x=null!=f?f.parent:null!=q?q.parent:null;null!=x&&this.adoptParentCell(x,null,m,d);null!=q?d.inserted[b]||(d.cells[EditorUi.DIFF_INSERT].push(q),d.inserted[b]=!0):null!=f&&(null==d.cells[EditorUi.DIFF_UPDATE][b]&&(d.cells[EditorUi.DIFF_UPDATE][b]={}),d.cells[EditorUi.DIFF_UPDATE][b]=f)};
@@ -13649,39 +13648,39 @@ DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatche
f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};
DrawioFileSync.prototype.scheduleCleanup=function(b){var f=Math.min(15,Math.floor(this.file.getSize()/5E6));f=0==b?0:this.cleanupDelay+1E3*f;var m=this.cleanupThread;if(1!=b||null!=this.cleanupThread)window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanup(null,mxUtils.bind(this,function(d){this.file.handleFileError(d)}))}),f);EditorUi.debug("DrawioFileSync.scheduleCleanup",[this],"lazy",b,"delay",f,"prev",m,"thread",this.cleanupThread)};
DrawioFileSync.prototype.cleanup=function(b,f,m){var d=this.cleanupThread;window.clearTimeout(this.cleanupThread);this.cleanupThread=null;if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var q=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.cleanup",[this],"thread",d,"patches",q,"checkFile",m,"checksum",this.ui.getHashValueForPages(this.ui.pages));
-this.file.ignorePatches(q)||this.file.patch(q);m?this.file.getLatestVersion(mxUtils.bind(this,function(x){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var C=x.getShadowPages();q=[this.ui.diffPages(this.ui.pages,C),this.ui.diffPages(C,this.file.ownPages)];this.file.ignorePatches(q)||this.file.patch(q);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",x,"patches",q)}null!=b&&b()}catch(y){null!=f&&f(y)}}),f):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
+this.file.ignorePatches(q)||this.file.patch(q);m?this.file.getLatestVersion(mxUtils.bind(this,function(x){try{if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()){var B=x.getShadowPages();q=[this.ui.diffPages(this.ui.pages,B),this.ui.diffPages(B,this.file.ownPages)];this.file.ignorePatches(q)||this.file.patch(q);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",x,"patches",q)}null!=b&&b()}catch(y){null!=f&&f(y)}}),f):(document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||
this.testChecksum(),null!=b&&b())}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",m,"modified",this.file.isModified()))};
DrawioFileSync.prototype.testChecksum=function(){var b=this.ui.getHashValueForPages(this.ui.pages),f=this.file.getCurrentRevisionId();this.file.getLatestVersion(mxUtils.bind(this,function(m){if(!document.hidden){var d=this.ui.getHashValueForPages(m.getShadowPages()),q=m.getDescriptorChecksum(m.getDescriptor()),x=m.getCurrentRevisionId();EditorUi.debug("DrawioFileSync.testChecksum","local",[this.file],"modified",this.file.isModified(),"inConflictState",this.file.inConflictState,"autosaveThread",this.file.autosaveThread,
"savingFile",this.file.savingFile,"localFileWasChanged",this.localFileWasChanged,"remoteFileChanged",this.remoteFileChanged,"cleanup",this.cleanupThread,"checksum",b);EditorUi.debug("DrawioFileSync.testChecksum","remote",[m],"rev",x==f,"desc",q==d,"checksum",d);d!=b?(EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums do not match"),this.ui.alert("Checksums do not match")):EditorUi.debug("DrawioFileSync.testChecksum",[this],"checksums match")}}),mxUtils.bind(this,function(m){EditorUi.debug("DrawioFileSync.testChecksum",
[this],"checksum test error",m)}))};DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][m];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][m]={};var q=f[EditorUi.DIFF_UPDATE][m];q.cells={};q.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
-DrawioFileSync.prototype.patchRealtime=function(b,f,m,d){var q=null;if(this.file.isRealtime()){q=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var x=this.extractRemove(this.extractLocal(q)),C=(null==m?b:b.concat(m)).concat([x]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,C,!0,f);mxUtils.isEmptyObject(x)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",m,
-"all",q,"local",x,"applied",C,"immediate",d)}return q};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
+DrawioFileSync.prototype.patchRealtime=function(b,f,m,d){var q=null;if(this.file.isRealtime()){q=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var x=this.extractRemove(this.extractLocal(q)),B=(null==m?b:b.concat(m)).concat([x]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,B,!0,f);mxUtils.isEmptyObject(x)?this.scheduleCleanup(null!=d?!1:null):this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",m,
+"all",q,"local",x,"applied",B,"immediate",d)}return q};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;var m=this.ui.resolveCrossReferences(f,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,m,!0);this.isRealtimeActive()&&this.doSendLocalChanges([m,f])}this.localFileWasChanged=
!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,m,d,q,x,C){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(m);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var I=this.ui.clonePages(this.file.getShadowPages()),M=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(I,this.ui.pages):null,H=this.file.isRealtime()?this.ui.diffPages(I,this.file.ownPages):null;I=this.ui.applyPatches(I,b);var c=null==f?null:this.ui.getHashValueForPages(I);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",M,"pending",H,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(m),"immediate",C);if(null!=f&&f!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),x,null,C);return}this.file.setShadowPages(I);null==this.patchRealtime(b,null,H,C)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
-M:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),m);null!=d&&d(!0)}catch(l){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=q&&q(l);try{var e=this.file.getCurrentUser(),g=null!=e?e.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,l)}catch(p){}}};
-DrawioFileSync.prototype.fileChanged=function(b,f,m,d,q){var x=window.setTimeout(mxUtils.bind(this,function(){null!=m&&m()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",q,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(C){null!=m&&m()||(this.isValidState()?this.catchup(C,b,f,m,q):null!=f&&f())}),f)):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=
+DrawioFileSync.prototype.merge=function(b,f,m,d,q,x,B){try{this.file.stats.merged++;this.lastModified=new Date;var y=this.file.getDescriptorRevisionId(m);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var I=this.ui.clonePages(this.file.getShadowPages()),L=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(I,this.ui.pages):null,H=this.file.isRealtime()?this.ui.diffPages(I,this.file.ownPages):null;I=this.ui.applyPatches(I,b);var c=null==f?null:this.ui.getHashValueForPages(I);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",L,"pending",H,"checksum",f,"current",c,"valid",f==c,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",y,"etag",this.file.getDescriptorEtag(m),"immediate",B);if(null!=f&&f!=c){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),x,null,B);return}this.file.setShadowPages(I);null==this.patchRealtime(b,null,H,B)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+L:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),m);null!=d&&d(!0)}catch(l){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=q&&q(l);try{var e=this.file.getCurrentUser(),g=null!=e?e.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,l)}catch(p){}}};
+DrawioFileSync.prototype.fileChanged=function(b,f,m,d,q){var x=window.setTimeout(mxUtils.bind(this,function(){null!=m&&m()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",q,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(B){null!=m&&m()||(this.isValidState()?this.catchup(B,b,f,m,q):null!=f&&f())}),f)):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=
x};
DrawioFileSync.prototype.fastForward=function(b){this.file.patchDescriptor(this.file.getDescriptor(),b);this.file.setShadowPages(this.ui.clonePages(this.ui.pages));this.file.theirPages=this.ui.clonePages(this.ui.pages);var f=this.file.ownPages;this.file.ownPages=this.ui.clonePages(this.ui.pages);for(var m=0;m<this.file.ownPages.length;m++)null!=f[m]&&this.ui.getHashValueForPages([this.file.ownPages[m]])!=this.ui.getHashValueForPages([f[m]])&&(this.file.ownPages[m].needsUpdate=!0);f=this.cleanupThread;window.clearTimeout(this.cleanupThread);
this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fastForward",[this],"desc",[b],"cleanup",f,"checksum",this.ui.getHashValueForPages(this.ui.pages));document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum()};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,f,m,d,q){if(null!=b&&(null==d||!d())){var x=this.file.getCurrentRevisionId(),C=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",x,"to",C,"immediate",q,"valid",this.isValidState());if(x==C)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),I=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=I&&"1"!=urlParams.lockdown){var M=0,H=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(x!=this.file.getCurrentRevisionId())null!=f&&
-f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,m,d,null,q)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(x)+"&to="+encodeURIComponent(C)+(null!=I?"&secret="+encodeURIComponent(I):""),mxUtils.bind(this,function(l){this.file.stats.bytesReceived+=l.getText().length;window.clearTimeout(g);if(e&&(null==d||!d()))if(x!=this.file.getCurrentRevisionId())null!=
-f&&f(!0);else if(this.isValidState()){var p=null,u=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[l],"status",l.getStatus(),"cacheReadyRetryCount",M,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=l.getStatus()&&299>=l.getStatus()&&0<l.getText().length)try{var z=JSON.parse(l.getText());if(null!=z&&0<z.length)for(var E=0;E<z.length;E++){var D=this.stringToObject(z[E]);if(D.v>DrawioFileSync.PROTOCOL){H=!0;u=[];break}else if(D.v===DrawioFileSync.PROTOCOL&&null!=D.d)p=D.d.checksum,
-u.push(D.d.patch);else{H=!0;u=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"status",H?"failed":"ok","temp",u,"checksum",p)}catch(A){u=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<u.length?(this.file.stats.cacheHits++,this.merge(u,p,b,f,m,d,q)):M<=this.maxCacheReadyRetries-1&&!H&&401!=l.getStatus()&&503!=l.getStatus()&&410!=l.getStatus()?(M++,this.file.stats.cacheMiss++,window.setTimeout(c,(M+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+DrawioFileSync.prototype.catchup=function(b,f,m,d,q){if(null!=b&&(null==d||!d())){var x=this.file.getCurrentRevisionId(),B=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",x,"to",B,"immediate",q,"valid",this.isValidState());if(x==B)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=f&&f(!0);else if(this.isValidState()){var y=this.file.getDescriptorChecksum(b),I=this.file.getDescriptorSecret(b);if(null!=y&&y==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=f&&f(!0);else if(Editor.enableRealtimeCache&&null!=I&&"1"!=urlParams.lockdown){var L=0,H=!1,c=mxUtils.bind(this,function(){if(null==d||!d())if(x!=this.file.getCurrentRevisionId())null!=f&&
+f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;this.reload(f,m,d,null,q)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(x)+"&to="+encodeURIComponent(B)+(null!=I?"&secret="+encodeURIComponent(I):""),mxUtils.bind(this,function(l){this.file.stats.bytesReceived+=l.getText().length;window.clearTimeout(g);if(e&&(null==d||!d()))if(x!=this.file.getCurrentRevisionId())null!=
+f&&f(!0);else if(this.isValidState()){var p=null,u=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[l],"status",l.getStatus(),"cacheReadyRetryCount",L,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=l.getStatus()&&299>=l.getStatus()&&0<l.getText().length)try{var z=JSON.parse(l.getText());if(null!=z&&0<z.length)for(var E=0;E<z.length;E++){var D=this.stringToObject(z[E]);if(D.v>DrawioFileSync.PROTOCOL){H=!0;u=[];break}else if(D.v===DrawioFileSync.PROTOCOL&&null!=D.d)p=D.d.checksum,
+u.push(D.d.patch);else{H=!0;u=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"status",H?"failed":"ok","temp",u,"checksum",p)}catch(A){u=[],null!=window.console&&"1"==urlParams.test&&console.log(A)}try{0<u.length?(this.file.stats.cacheHits++,this.merge(u,p,b,f,m,d,q)):L<=this.maxCacheReadyRetries-1&&!H&&401!=l.getStatus()&&503!=l.getStatus()&&410!=l.getStatus()?(L++,this.file.stats.cacheMiss++,window.setTimeout(c,(L+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
this.reload(f,m,d,null,q))}catch(A){null!=m&&m(A)}}else null!=m&&m()}),m)}else null!=m&&m()});window.setTimeout(c,this.cacheReadyDelay)}else this.reload(f,m,d,null,q)}else null!=m&&m()}};DrawioFileSync.prototype.reload=function(b,f,m,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(x){null!=f&&f(x)}),m,d,q)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),m=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(m)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",m)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,f,m){var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(x){window.clearTimeout(q);d&&(200<=x.getStatus()&&299>=x.getStatus()?f(x.getText()):m({code:x.getStatus(),message:"Token Error "+x.getStatus()}))}),m)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,m,d,q,x){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var C=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),I=this.file.getDescriptorRevisionId(f),M=this.file.getCurrentRevisionId();if(null!=C&&null!=q&&
+DrawioFileSync.prototype.fileSaved=function(b,f,m,d,q,x){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var B=this.file.getDescriptorSecret(this.file.getDescriptor()),y=this.createMessage({m:this.lastModified.getTime()}),I=this.file.getDescriptorRevisionId(f),L=this.file.getCurrentRevisionId();if(null!=B&&null!=q&&
"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var H=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);x=null!=x?x:this.ui.getHashValueForPages(b);var c=this.objectToString(this.createMessage({patch:H,checksum:x}));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(I)+"&to="+encodeURIComponent(M)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=C?"&secret="+encodeURIComponent(C):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(l){window.clearTimeout(g);e&&(200<=l.getStatus()&&299>=l.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=m&&m()):d({message:mxResources.get("realtimeCollaboration")+
-(0!=l.getStatus()?": "+l.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",I,"to",M,"etag",this.file.getCurrentEtag(),"diff",H,c.length,"bytes","msg",y,"checksum",x)}else this.notify(y),null!=m&&m(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",I,"to",M,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+"&from="+encodeURIComponent(I)+"&to="+encodeURIComponent(L)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(y)))+(null!=B?"&secret="+encodeURIComponent(B):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(c.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(c):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(l){window.clearTimeout(g);e&&(200<=l.getStatus()&&299>=l.getStatus()?(Editor.p2pSyncNotify&&this.notify(y),null!=m&&m()):d({message:mxResources.get("realtimeCollaboration")+
+(0!=l.getStatus()?": "+l.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",I,"to",L,"etag",this.file.getCurrentEtag(),"diff",H,c.length,"bytes","msg",y,"checksum",x)}else this.notify(y),null!=m&&m(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",I,"to",L,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,m){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,m):this.fileChanged(f,m)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
@@ -13690,13 +13689,13 @@ DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var b=this.
null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,"touchstart",this.activityListener),
mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.p2pCollab&&this.p2pCollab.destroy()};App=function(b,f,m){EditorUi.call(this,b,f,null!=m?m:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&d.isModified()&&(d.getHash(),d.savingFile&&null!=d.savingFileTime&&(Date.now(),d.savingFileTime.getTime()),null!=d.ageStart&&(Date.now(),d.ageStart.getTime()),d.isAutosave(),null!=d.opened&&(Date.now(),d.opened.getTime()),null!=d.lastSaved&&(Date.now(),d.lastSaved.getTime()),
null!=d.lastChanged&&(Date.now(),d.lastChanged.getTime()),Date.now(),App.startTime.getTime(),d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&d.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,q,x){if("1"==urlParams.openInSameWin||navigator.standalone)null!=x&&x();else{var C=null;try{C=window.open(d)}catch(y){}null==C||void 0===C?this.showDialog((new PopupDialog(this,d,q,x)).container,340,140,!0,!0):null!=q&&q()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(d,q,x){if("1"==urlParams.openInSameWin||navigator.standalone)null!=x&&x();else{var B=null;try{B=window.open(d)}catch(y){}null==B||void 0===B?this.showDialog((new PopupDialog(this,d,q,x)).container,340,140,!0,!0):null!=q&&q()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";
App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":"js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="js/jquery/jquery-3.6.0.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL="js/simplepeer/simplepeer9.10.0.min.js";App.GOOGLE_APIS="drive-share";App.startTime=new Date;
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"plugins/explore.js",ex:"plugins/explore.js",ac:"plugins/connect.js",acj:"plugins/connectJira.js",ac148:"plugins/cConf-1-4-8.js",ac148cmnt:"plugins/cConf-comments.js",nxtcld:"plugins/nextcloud.js",monday:"plugins/monday.js",tips:"plugins/tooltips.js",svgdata:"plugins/svgdata.js",number:"plugins/number.js",sql:"plugins/sql.js",props:"plugins/props.js",text:"plugins/text.js",anim:"plugins/animation.js",update:"plugins/update.js",trees:"plugins/trees/trees.js",
"import":"plugins/import.js",replay:"plugins/replay.js",anon:"plugins/anonymize.js",tr:"plugins/trello.js",f5:"plugins/rackF5.js",webcola:"plugins/webcola/webcola.js",rnd:"plugins/random.js",page:"plugins/page.js",gd:"plugins/googledrive.js",tags:"plugins/tags.js"};App.publicPlugin="ex tips svgdata number sql props text anim update trees replay anon webcola tags".split(" ");
-App.loadScripts=function(b,f,m){for(var d=b.length,q=!1,x=0;x<b.length;x++)mxscript(b[x],function(){0!=--d||q||null==f||f()},null,null,null,function(C,y){q=!0;null!=m&&m(Error(C));console.error("Error loading script",C,y,y.stack)})};
+App.loadScripts=function(b,f,m){for(var d=b.length,q=!1,x=0;x<b.length;x++)mxscript(b[x],function(){0!=--d||q||null==f||f()},null,null,null,function(B,y){q=!0;null!=m&&m(Error(B));console.error("Error loading script",B,y,y.stack)})};
App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage)try{for(var f=document.cookie.split(";"),m=0;m<f.length;m++){var d=mxUtils.trim(f[m]);if("MODE="==d.substring(0,5)){b=d.substring(5);break}}if(null!=b&&isLocalStorage){var q=new Date;q.setYear(q.getFullYear()-1);document.cookie="MODE=; expires="+q.toUTCString();localStorage.setItem(".mode",b)}}catch(x){}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode),null==App.mode&&"1"!=urlParams.embed&&(App.mode=App.getStoredMode()),null!=window.mxscript&&"1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=
window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
@@ -13704,44 +13703,42 @@ window.location.hash&&"#G"==window.location.hash.substring(0,2)?mxscript("https:
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(m){if(null!=m&&0<m.length){for(var d=0;d<m.length;d++)m[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};App.isSameDomain=function(b){var f=document.createElement("a");f.href=b;return f.protocol===window.location.protocol||f.host===window.location.host};App.isBuiltInPlugin=function(b){for(var f in App.pluginRegistry)if(App.pluginRegistry[f]==b)return!0;return!1};
App.isSimpleThemePreferred=function(){var b=navigator.userAgent||navigator.vendor||window.opera;return 1024>=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||/android/i.test(b)||/iPad|iPhone|iPod/.test(b)&&!window.MSStream||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints};
-App.main=function(b,f){try{var m=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):
-EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(p){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(p.stack)):console.error(p)}try{if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var l=Menus.prototype.defaultFonts[g];"string"!==typeof l&&null!=l.fontFamily&&null!=l.fontUrl&&Graph.addFont(l.fontFamily,l.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
-mxLanguage))}catch(p){document.body.innerHTML="",l=document.createElement("pre"),mxUtils.write(l,p.stack),document.body.appendChild(l)}},d=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(l){function p(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
-"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(P){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var A=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
+App.main=function(b,f){try{var m=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var H=parseInt(mxSettings.settings.autosaveDelay);!isNaN(H)&&0<H?(DrawioFile.prototype.autosaveDelay=H,EditorUi.debug("Setting autosaveDelay",H)):EditorUi.debug("Invalid autosaveDelay",H)}null!=mxSettings.settings.defaultEdgeLength&&(H=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(H)&&0<H?(Graph.prototype.defaultEdgeLength=H,EditorUi.debug("Using defaultEdgeLength",H)):
+EditorUi.debug("Invalid defaultEdgeLength",H))}}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}try{if(null!=Menus.prototype.defaultFonts)for(H=0;H<Menus.prototype.defaultFonts.length;H++){var c=Menus.prototype.defaultFonts[H];"string"!==typeof c&&null!=c.fontFamily&&null!=c.fontUrl&&Graph.addFont(c.fontFamily,c.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
+mxLanguage))}catch(e){document.body.innerHTML="",c=document.createElement("pre"),mxUtils.write(c,e.stack),document.body.appendChild(c)}},d=function(H){mxUtils.getAll("1"!=urlParams.dev?[H]:[H,STYLE_PATH+"/default.xml"],function(c){function e(){try{try{null==Editor.currentTheme&&"1"!=urlParams.embed&&(1==urlParams.dev||1==urlParams.test||"test.draw.io"===window.location.hostname||"www.draw.io"===window.location.hostname||"preprod.diagrams.net"===window.location.hostname||"app.diagrams.net"===window.location.hostname||
+"jgraph.github.io"===window.location.hostname||/drawio-dev\.pages\.dev$/.test(window.location.hostname))&&App.isSimpleThemePreferred()&&(Editor.currentTheme="simple")}catch(E){}"kennedy"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var z=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&
("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&
"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
-"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(A);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,A,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(P){EditorUi.isElectronApp?
-(mxLog.show(),mxLog.debug(P.stack)):(EditorUi.logError(P.message,null,null,null,P),window.setTimeout(function(){alert(P.message)},1))}}mxResources.parse(l[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var u=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=u){EditorUi.debug("Setting configuration",JSON.stringify(u));if(null!=u.merge){var z=localStorage.getItem(Editor.configurationKey);if(null!=
-z)try{var E=JSON.parse(z),D;for(D in u.merge)E[D]=u.merge[D];u=E}catch(A){window.location.hash="",alert(A)}else u=u.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(u)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(A){window.location.hash="",alert(A)}1<l.length&&(Graph.prototype.defaultThemes["default-style2"]=l[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
-l[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],p,function(A){document.body.innerHTML="";var P=document.createElement("pre");mxUtils.write(P,A.stack);document.body.appendChild(P)}))},function(l){l=document.getElementById("geStatus");null!=l&&(l.innerHTML="Error loading page. <a>Please try refreshing.</a>",l.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
+"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(z);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,z,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?
+(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(c[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=g){EditorUi.debug("Setting configuration",JSON.stringify(g));if(null!=g.merge){var l=localStorage.getItem(Editor.configurationKey);if(null!=
+l)try{var p=JSON.parse(l),u;for(u in g.merge)p[u]=g.merge[u];g=p}catch(z){window.location.hash="",alert(z)}else g=g.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(g)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(z){window.location.hash="",alert(z)}1<c.length&&(Graph.prototype.defaultThemes["default-style2"]=c[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=
+c[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?e():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],e,function(z){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,z.stack);document.body.appendChild(E)}))},function(c){c=document.getElementById("geStatus");null!=c&&(c.innerHTML="Error loading page. <a>Please try refreshing.</a>",c.getElementsByTagName("a")[0].onclick=function(){mxLanguage=
"en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,
-function(g){if(200<=g.getStatus()&&299>=g.getStatus()){var l=document.createElement("style");l.type="text/css";l.appendChild(document.createTextNode(g.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(l)}})),App.isMainCalled=!0,window.onerror=function(g,l,p,u,z){EditorUi.logError("Global: "+(null!=g?g:""),l,p,u,z,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",l,"\nLine:",
-p,"\nColumn:",u,"\nError:",z)):console.error("Message:",g,"\nURL:",l,"\nLine:",p,"\nColumn:",u,"\nError:",z);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");
-null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var x=document.getElementById("geBootstrap");if(null!=x){var C=mxUtils.getTextContent(x);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(C).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",
-CryptoJS.MD5(C).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var y=document.getElementById("geMain");null!=y&&(C=mxUtils.getTextContent(y),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(C).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(C).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&
-"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),
-"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var I=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var M=JSON.parse(localStorage.getItem(mxSettings.key));null!=M&&(I=M.plugins)}catch(g){}M=urlParams.p;App.initPluginCallback();null!=M&&App.loadPlugins(M.split(";"));if(null!=I&&0<I.length&&"0"!=urlParams.plugins)for(q=0;q<I.length;q++)try{("/"==I[q].charAt(0)&&
-(I[q]=PLUGINS_BASE_PATH+I[q]),App.isSameDomain(I[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(I[q])?null==App.pluginsLoaded[I[q]]&&(App.pluginsLoaded[I[q]]=!0,App.embedModePluginsCount++,mxscript(I[q])):null!=window.console&&console.log("Unknown plugin:",I[q]):null!=window.console&&console.log("Blocked plugin:",I[q])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&
-isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var H=window.opener||window.parent,c=function(g){if(g.source==H)try{var l=JSON.parse(g.data);null!=l&&"configure"==l.action&&(mxEvent.removeListener(window,"message",c),Editor.configure(l.config),
-mxSettings.load(),null!=l.config.darkColor&&document.body.style.setProperty("--dark-color",l.config.darkColor),l.colorSchemeMeta&&mxmeta("color-scheme","dark light"),m())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,g.data)}};mxEvent.addListener(window,"message",c);H.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),
-mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var e=localStorage.getItem(Editor.configurationKey);if(null!=e)try{e=JSON.parse(e),null!=e&&(EditorUi.debug("Using local configuration",e),Editor.configure(e),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}}}m()}}else document.body.innerHTML=
-'<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",I=document.createElement("pre"),mxUtils.write(I,g.stack),document.body.appendChild(I)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};
-App.pluginsLoaded={};App.embedModePluginsCount=0;
+function(H){if(200<=H.getStatus()&&299>=H.getStatus()){var c=document.createElement("style");c.type="text/css";c.appendChild(document.createTextNode(H.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(c)}})),App.isMainCalled=!0,window.onerror=function(H,c,e,g,l){EditorUi.logError("Global: "+(null!=H?H:""),c,e,g,l,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",H,"\nURL:",c,"\nLine:",
+e,"\nColumn:",g,"\nError:",l)):console.error("Message:",H,"\nURL:",c,"\nLine:",e,"\nColumn:",g,"\nError:",l);window.setTimeout(function(){alert("Error: "+(null!=H?H:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}"1"==urlParams.embed&&document.body.classList.add("geEmbed");
+null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&(!Editor.isSettingsEnabled()||null!=mxSettings.settings&&!mxSettings.settings.isNew)&&
+navigator.serviceWorker.register("service-worker.js")}catch(H){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&("1"!=urlParams.embedRT||"1"==urlParams.lockdown)||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var x=null!=mxSettings.settings?
+mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var B=JSON.parse(localStorage.getItem(mxSettings.key));null!=B&&(x=B.plugins)}catch(H){}B=urlParams.p;App.initPluginCallback();null!=B&&App.loadPlugins(B.split(";"));if(null!=x&&0<x.length&&"0"!=urlParams.plugins)for(q=0;q<x.length;q++)try{("/"==x[q].charAt(0)&&(x[q]=PLUGINS_BASE_PATH+x[q]),App.isSameDomain(x[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(x[q])?null==App.pluginsLoaded[x[q]]&&(App.pluginsLoaded[x[q]]=
+!0,App.embedModePluginsCount++,mxscript(x[q])):null!=window.console&&console.log("Unknown plugin:",x[q]):null!=window.console&&console.log("Blocked plugin:",x[q])}catch(H){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,
+null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var y=window.opener||window.parent,I=function(H){if(H.source==y)try{var c=JSON.parse(H.data);null!=c&&"configure"==c.action&&(mxEvent.removeListener(window,"message",I),Editor.configure(c.config),mxSettings.load(),null!=c.config.darkColor&&document.body.style.setProperty("--dark-color",c.config.darkColor),c.colorSchemeMeta&&mxmeta("color-scheme","dark light"),
+m())}catch(e){null!=window.console&&console.log("Error in configure message: "+e,H.data)}};mxEvent.addListener(window,"message",I);y.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(H){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(H.stack)):console.error(H)}if(isLocalStorage&&null!=
+localStorage&&"1"!=urlParams.embed){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{L=JSON.parse(L),null!=L&&(EditorUi.debug("Using local configuration",L),Editor.configure(L),mxSettings.load())}catch(H){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(H.stack)):console.error(H)}}}m()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(H){document.body.innerHTML="",x=document.createElement("pre"),
+mxUtils.write(x,H.stack),document.body.appendChild(x)}};mxUtils.extend(App,EditorUi);App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
App.loadPlugins=function(b,f){EditorUi.debug("Loading plugins",b);for(var m=0;m<b.length;m++)if(null!=b[m]&&0<b[m].length)try{if(null!=App.pluginRegistry[b[m]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[m]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?f?mxinclude(d):mxscript(d):f?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[m])}catch(q){null!=window.console&&console.log("Error loading plugin:",
b[m],q)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};
App.prototype.init=function(){if(!App.blockedAncestorFrames()){this.buttonContainer=this.createButtonContainer();EditorUi.prototype.init.apply(this,arguments);this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(!0)}));try{this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||
-"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(C){null!=window.console&&console.log("GitHubClient disabled: "+C.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
-mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(C){null!=window.console&&console.log("GitLabClient disabled: "+C.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
-this.oneDrive))}catch(C){null!=window.console&&console.log("OneDriveClient disabled: "+C.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
-"client",this.trello))}catch(C){null!=window.console&&console.log("TrelloClient disabled: "+C.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var m=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var C=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
-this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(y){null!=window.console&&console.log("DriveClient disabled: "+y.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,C),window.DrawGapiClientCallback=null):C()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=m)});m()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
-null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(C){null!=window.console&&console.log("DropboxClient disabled: "+C.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
-this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(C){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){C.prompt()})})),!this.isOwnDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var C=this.getCurrentFile();C=null!=C?C.getMode():null;mxClient.IS_CHROMEAPP||
-mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||C!=App.MODE_DEVICE&&C!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var q=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),
-Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(C){Editor.enableRealtimeCache=200<=C.getStatus()&&299>=C.getStatus();window.clearTimeout(q)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(q)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var x=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
+"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this),null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(B){null!=window.console&&console.log("GitHubClient disabled: "+B.message)}try{this.gitLab=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gl||"1"==urlParams.embed&&"1"!=urlParams.gl?null:new GitLabClient(this),null!=this.gitLab&&this.gitLab.addListener("userChanged",
+mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()}))}catch(B){null!=window.console&&console.log("GitLabClient disabled: "+B.message)}if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){if("undefined"!==typeof OneDrive)try{this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",
+this.oneDrive))}catch(B){null!=window.console&&console.log("OneDriveClient disabled: "+B.message)}else null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var f=mxUtils.bind(this,function(){if("undefined"!==typeof window.Trello)try{this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded",
+"client",this.trello))}catch(B){null!=window.console&&console.log("TrelloClient disabled: "+B.message)}else null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=f)});f()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var m=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var B=mxUtils.bind(this,function(){try{this.drive=new DriveClient(this),this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries();"1"!=urlParams.dev&&
+this.checkLicense()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))}catch(y){null!=window.console&&console.log("DriveClient disabled: "+y.message)}});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+App.GOOGLE_APIS,B),window.DrawGapiClientCallback=null):B()}else null==window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=m)});m()}if("1"!=urlParams.embed||"1"==urlParams.db){var d=mxUtils.bind(this,function(){if("function"===typeof Dropbox){window.DrawDropboxClientCallback=
+null;try{this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))}catch(B){null!=window.console&&console.log("DropboxClient disabled: "+B.message)}}else null==window.DrawDropboxClientCallback&&(window.DrawDropboxClientCallback=d)});d()}if("1"!=urlParams.embed&&(this.setGraphEnabled(!1),"1"==urlParams.local?this.setMode(App.MODE_DEVICE):
+this.mode=App.mode,"serviceWorker"in navigator&&!this.editor.isChromelessView()&&(mxClient.IS_ANDROID||mxClient.IS_IOS)&&window.addEventListener("beforeinstallprompt",mxUtils.bind(this,function(B){this.showBanner("AddToHomeScreenFooter",mxResources.get("installApp"),function(){B.prompt()})})),!this.isOwnDomain()||this.editor.chromeless&&!this.editor.editable||this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var B=this.getCurrentFile();B=null!=B?B.getMode():null;mxClient.IS_CHROMEAPP||
+mxClient.IS_ANDROID||mxClient.IS_IOS||EditorUi.isElectronApp||this.isOffline()||null!=urlParams.open||"1"==urlParams.extAuth||B!=App.MODE_DEVICE&&B!=App.MODE_BROWSER||this.showDownloadDesktopBanner()})),!(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.local||"1"==urlParams.stealth||this.isOffline()||!Editor.enableRealtimeCache||this.editor.chromeless&&!this.editor.editable))){var q=window.setTimeout(mxUtils.bind(this,function(){Editor.enableRealtimeCache=!1}),
+Editor.cacheTimeout);mxUtils.get(EditorUi.cacheUrl+"?alive",mxUtils.bind(this,function(B){Editor.enableRealtimeCache=200<=B.getStatus()&&299>=B.getStatus();window.clearTimeout(q)}),function(){Editor.enableRealtimeCache=!1;window.clearTimeout(q)})}this.updateHeader();if(null!=this.menubar){if("sketch"!=Editor.currentTheme&&("simple"!=Editor.currentTheme||"1"!=urlParams.embed)){var x=mxUtils.bind(this,function(){"1"!=urlParams.embed?this.menubar.container.appendChild(this.buttonContainer):this.toolbarContainer.appendChild(this.buttonContainer)});
this.addListener("languageChanged",x);this.addListener("currentThemeChanged",x);x()}("kennedy"==Editor.currentTheme&&"1"==urlParams.embed||"atlas"==Editor.currentTheme&&"1"!=urlParams.embed)&&this.setCompactMode(!0);if("atlas"==Editor.currentTheme||"1"==urlParams.atlas)this.icon=document.createElement("img"),this.icon.setAttribute("src",IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.className="geSmallAppIcon","1"!=urlParams.embed&&(this.icon.style.cursor=
-"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(C){this.appIconClicked(C)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
+"pointer",mxEvent.addListener(this.icon,"click",mxUtils.bind(this,function(B){this.appIconClicked(B)}))),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild)}this.editor.graph.isViewer()&&this.initializeViewerMode()}};
App.blockedAncestorFrames=function(){try{if(window.location.ancestorOrigins&&window.location.hostname&&window.location.ancestorOrigins.length&&0<window.location.ancestorOrigins.length){var b=window.location.hostname;b&&1<b.length&&"/"==b.charAt(b.length-1)&&b.substring(0,b.length-1);b="";for(var f=0;f<window.location.ancestorOrigins.length;f++)if(b+=" -> "+window.location.ancestorOrigins[f],b.endsWith("dan6v7pm1f1a1.cloudfront.net")||b.endsWith("confluence-cloud-excalidraw-ll3likebca-uc.a.run.app"))return!0}}catch(m){}return!1};
App.prototype.scheduleSanityCheck=function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.sanityCheckThread||(this.sanityCheckThread=window.setTimeout(mxUtils.bind(this,function(){this.sanityCheckThread=null;this.sanityCheck()}),this.warnInterval))};App.prototype.stopSanityCheck=function(){null!=this.sanityCheckThread&&(window.clearTimeout(this.sanityCheckThread),this.sanityCheckThread=null)};
App.prototype.sanityCheck=function(){var b=this.getCurrentFile();if(null!=b&&b.isModified()&&b.isAutosave()&&b.isOverdue()){b.getHash();b.savingFile&&null!=b.savingFileTime&&(Date.now(),b.savingFileTime.getTime());null!=b.ageStart&&(Date.now(),b.ageStart.getTime());b.isAutosave();null!=b.opened&&(Date.now(),b.opened.getTime());null!=b.lastSaved&&(Date.now(),b.lastSaved.getTime());null!=b.lastChanged&&(Date.now(),b.lastChanged.getTime());Date.now();App.startTime.getTime();var f=null!=b.sync?"client_"+
@@ -13756,21 +13753,21 @@ m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.setAttribute(
b.appendChild(m);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var q=document.createElement("img");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.setAttribute("title","3 star");q.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");q.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(q);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.setAttribute("title","4 star");x.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");x.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(x);this.bannerShowing=!0;var C=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);C()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);C()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(y){mxEvent.consume(y);C()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);C()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");C()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){C()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(x);this.bannerShowing=!0;var B=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);B()}));mxEvent.addListener(m,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);B()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(y){mxEvent.consume(y);B()}));mxEvent.addListener(q,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);B()}));mxEvent.addListener(x,"click",mxUtils.bind(this,function(y){mxEvent.consume(y);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");B()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){B()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var m=f.lastIndexOf("@"),d=0<=m?f.substring(m+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()){var x=q.getText();if(0<x.length){var C=JSON.parse(x);null!=C&&this.handleLicense(C,
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var m=f.lastIndexOf("@"),d=0<=m?f.substring(m+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(q){try{if(200<=q.getStatus()&&299>=q.getStatus()){var x=q.getText();if(0<x.length){var B=JSON.parse(x);null!=B&&this.handleLicense(B,
d)}}}catch(y){}}))}};App.prototype.handleLicense=function(b,f){};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b,f,m){if(isLocalStorage&&null!=localStorage){f=null!=f?f:"";var d=this.getRecent(f);if(null==d)d=[];else for(var q=0;q<d.length;q++)d[q].mode==b.mode&&d[q].id==b.id&&d.splice(q,1);null!=d&&(m=null!=m?m:10,d.unshift(b),d=d.slice(0,m),localStorage.setItem(".recent"+f,JSON.stringify(d)))}};App.prototype.getRecent=function(b){if(isLocalStorage&&null!=localStorage){try{var f=localStorage.getItem(".recent"+(null!=b?b:""));if(null!=f)return JSON.parse(f)}catch(m){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");this.unloading=!0;var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,f=this.getCurrentFile();null==f||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,f,m){m=null!=m?m:0;var d=!1;try{var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;f(null)}),this.timeout),C=mxUtils.bind(this,function(L){window.clearTimeout(x);q&&f(L)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,I=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var M=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var H=this.pages[0];this.currentPage==H?y.setBackgroundImage(I):null!=H.viewState&&null!=H.viewState&&(I=H.viewState.backgroundImage,y.setBackgroundImage(I));y.getGlobalVariable=function(L){return"page"==L?H.getName():"pagenumber"==L?1:M.apply(this,arguments)};y.getGlobalVariable=M;document.body.appendChild(y.container);y.model.setRoot(H.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{y!=this.editor.graph&&null!=y.container.parentNode&&
-y.container.parentNode.removeChild(y.container)}catch(U){L=null}C(L)}),b,this.thumbImageCache,"#ffffff",function(){C()},null,null,null,null,null,null,y,m,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),e=y.getGraphBounds(),g=y.view.translate,l=y.view.scale;null!=I&&(e=mxRectangle.fromRectangle(e),e.add(new mxRectangle((g.x+I.x)*l,(g.y+I.y)*l,I.width*l,I.height*l)));var p=b/e.width;p=Math.min(1,Math.min(3*b/(4*e.height),
-p));var u=Math.floor(e.x),z=Math.floor(e.y);c.setAttribute("width",Math.ceil(p*(e.width+4)));c.setAttribute("height",Math.ceil(p*(e.height+4)));var E=c.getContext("2d");E.scale(p,p);E.translate(-u,-z);var D=y.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(u,z,Math.ceil(e.width+4),Math.ceil(e.height+4));E.restore();if(null!=I){var A=new Image;A.src=I.src;E.drawImage(A,I.x*p,I.y*p,I.width*p,I.height*p)}var P=new mxJsCanvas(c),R=new mxAsyncCanvas(this.thumbImageCache);
-P.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(L,U){L.shape instanceof mxShape&&L.shape.checkBounds()&&(U.save(),U.translate(.5,.5),L.shape.paint(U),U.translate(-.5,-.5),U.restore())};T.drawText=function(L,U){};T.drawState(y.getView().getState(y.model.root),R);R.finish(mxUtils.bind(this,function(){try{T.drawState(y.getView().getState(y.model.root),P),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(L){c=null}C(c)}));
-d=!0}}catch(L){d=!1,null!=y&&y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}d||window.clearTimeout(x);return d};
+App.prototype.getThumbnail=function(b,f,m){m=null!=m?m:0;var d=!1;try{var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;f(null)}),this.timeout),B=mxUtils.bind(this,function(M){window.clearTimeout(x);q&&f(M)});null==this.thumbImageCache&&(this.thumbImageCache={});var y=this.editor.graph,I=y.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var L=y.getGlobalVariable;y=this.createTemporaryGraph(y.getStylesheet());y.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var H=this.pages[0];this.currentPage==H?y.setBackgroundImage(I):null!=H.viewState&&null!=H.viewState&&(I=H.viewState.backgroundImage,y.setBackgroundImage(I));y.getGlobalVariable=function(M){return"page"==M?H.getName():"pagenumber"==M?1:L.apply(this,arguments)};y.getGlobalVariable=L;document.body.appendChild(y.container);y.model.setRoot(H.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(M){try{y!=this.editor.graph&&null!=y.container.parentNode&&
+y.container.parentNode.removeChild(y.container)}catch(U){M=null}B(M)}),b,this.thumbImageCache,"#ffffff",function(){B()},null,null,null,null,null,null,y,m,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var c=document.createElement("canvas"),e=y.getGraphBounds(),g=y.view.translate,l=y.view.scale;null!=I&&(e=mxRectangle.fromRectangle(e),e.add(new mxRectangle((g.x+I.x)*l,(g.y+I.y)*l,I.width*l,I.height*l)));var p=b/e.width;p=Math.min(1,Math.min(3*b/(4*e.height),
+p));var u=Math.floor(e.x),z=Math.floor(e.y);c.setAttribute("width",Math.ceil(p*(e.width+4)));c.setAttribute("height",Math.ceil(p*(e.height+4)));var E=c.getContext("2d");E.scale(p,p);E.translate(-u,-z);var D=y.background;if(null==D||""==D||D==mxConstants.NONE)D="#ffffff";E.save();E.fillStyle=D;E.fillRect(u,z,Math.ceil(e.width+4),Math.ceil(e.height+4));E.restore();if(null!=I){var A=new Image;A.src=I.src;E.drawImage(A,I.x*p,I.y*p,I.width*p,I.height*p)}var Q=new mxJsCanvas(c),R=new mxAsyncCanvas(this.thumbImageCache);
+Q.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(M,U){M.shape instanceof mxShape&&M.shape.checkBounds()&&(U.save(),U.translate(.5,.5),M.shape.paint(U),U.translate(-.5,-.5),U.restore())};T.drawText=function(M,U){};T.drawState(y.getView().getState(y.model.root),R);R.finish(mxUtils.bind(this,function(){try{T.drawState(y.getView().getState(y.model.root),Q),y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}catch(M){c=null}B(c)}));
+d=!0}}catch(M){d=!1,null!=y&&y!=this.editor.graph&&null!=y.container.parentNode&&y.container.parentNode.removeChild(y.container)}d||window.clearTimeout(x);return d};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,m){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;null==this.updateTitleListener&&(this.updateTitleListener=mxUtils.bind(this,function(){f==App.MODE_GOOGLE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])):f==App.MODE_DROPBOX?this.appIcon.setAttribute("title",
mxResources.get("openIt",[mxResources.get("dropbox")])):f==App.MODE_ONEDRIVE?this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])):this.appIcon.removeAttribute("title")}),this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTitleListener()})));this.updateTitleListener()}if(m)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+f+"; expires="+
q.toUTCString()}}catch(x){}}})();
@@ -13785,338 +13782,340 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(m){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(m))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(I,M,H,c,e){"ResizeObserver loop limit exceeded"!=I&&(EditorUi.logError("Uncaught: "+(null!=I?I:""),M,H,c,e,null,!0),b.handleError({message:I},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(I){var M=this.getCurrentFile();EditorUi.debug("storage event",[I],
-[M]);null!=M&&".draft-alive-check"==I.key&&null!=I.newValue&&null!=M.draftId&&(this.draftAliveCheck=I.newValue,M.saveDraft())}))}catch(I){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(I){try{var M=this.getDiagramId();if(M!=f){f=M;var H=this.getCurrentFile();null!=H&&H.getHash()==M||this.loadFile(M,!0)}else{var c=this.getHashObject();if(null!=c&&null!=c.pageId&&null!=this.currentPage&&c.pageId!=this.currentPage.getId()){var e=this.getPageById(c.pageId);
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(I,L,H,c,e){"ResizeObserver loop limit exceeded"!=I&&(EditorUi.logError("Uncaught: "+(null!=I?I:""),L,H,c,e,null,!0),b.handleError({message:I},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(I){var L=this.getCurrentFile();EditorUi.debug("storage event",[I],
+[L]);null!=L&&".draft-alive-check"==I.key&&null!=I.newValue&&null!=L.draftId&&(this.draftAliveCheck=I.newValue,L.saveDraft())}))}catch(I){}var f=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(I){try{var L=this.getDiagramId();if(L!=f){f=L;var H=this.getCurrentFile();null!=H&&H.getHash()==L||this.loadFile(L,!0)}else{var c=this.getHashObject();if(null!=c&&null!=c.pageId&&null!=this.currentPage&&c.pageId!=this.currentPage.getId()){var e=this.getPageById(c.pageId);
null!=e&&this.selectPage(e)}}}catch(g){null!=document.body&&this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=null!=l?l.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(I){this.handleError(I,mxResources.get("errorLoadingFile"))}))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}else if((null==
window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var m=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var I=mxUtils.bind(this,function(c){Editor.isPngDataUrl(c)&&(c=Editor.extractGraphModelFromPng(c));var e=urlParams.title;e=null!=e?decodeURIComponent(e):this.defaultFilename;c=new LocalFile(this,
-c,e,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(c.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(c);this.editor.chromeless||(c.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),M=window.opener||window.parent;if(M!=window){var H=urlParams.create;null!=H?I(M[decodeURIComponent(H)]):(H=urlParams.data,null!=H?I(decodeURIComponent(H)):this.installMessageHandler(mxUtils.bind(this,function(c,
-e){e.source==M&&I(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)H=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=H;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{H=!1;try{H=null!=window.opener&&null!=window.opener.openFile}catch(c){}H?this.spinner.spin(document.body,mxResources.get("loading")):(H=this.getDiagramId(),
+c,e,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(c.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(c);this.editor.chromeless||(c.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),L=window.opener||window.parent;if(L!=window){var H=urlParams.create;null!=H?I(L[decodeURIComponent(H)]):(H=urlParams.data,null!=H?I(decodeURIComponent(H)):this.installMessageHandler(mxUtils.bind(this,function(c,
+e){e.source==L&&I(c)})))}}else if(null==this.dialog)if("1"==urlParams.demo)H=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=H;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{H=!1;try{H=null!=window.opener&&null!=window.opener.openFile}catch(c){}H?this.spinner.spin(document.body,mxResources.get("loading")):(H=this.getDiagramId(),
!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=H&&0!=H.length||this.editor.isChromelessView()?null!=H&&0<H.length?this.loadFile(H,null,null,mxUtils.bind(this,function(){var c=decodeURIComponent(urlParams.viewbox||"");if(""!=c)try{var e=JSON.parse(c);this.editor.graph.fitWindow(e,e.border)}catch(g){console.error(g)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");null!=window.location.hash&&"#create="==window.location.hash.substring(0,8)&&(d=decodeURIComponent(window.location.hash.substring(8)));if((null==window.location.hash||1>=window.location.hash.length||"#create="==window.location.hash.substring(0,8))&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var q=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&
-(window.location.search=this.getSearch(["create","title"]))}),x=mxUtils.bind(this,function(I){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,I,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var M=urlParams.title;M=null!=M?decodeURIComponent(M):this.defaultFilename;I=this.getServiceCount(!0);isLocalStorage&&I++;var H=4>=I?2:6<I?4:3;M=new CreateDialog(this,M,mxUtils.bind(this,function(c,e){if(null==e){this.hideDialog();var g=Editor.useLocalStorage;
-this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(e,mxUtils.bind(this,function(l){this.createFile(c,this.getFileData(!0),null,e,null,!0,l)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,H,null,null,null,this.editor.fileExtensions);this.showDialog(M.container,420,I>H?390:280,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));M.init()}});if("http://"!=d.substring(0,
-7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var C=mxUtils.bind(this,function(I){this.createFile(null!=I.filename?I.filename:this.defaultFilename,I,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(I)}),!0,null,!0)}),y=d.data;d.compressed&&(y=Graph.decompress(y));
-"mermaid"==d.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){I!=this.emptyDiagramXml&&C(I)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(I){for(var M=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),H=0;H<M.length;H++)M[H].parentNode.removeChild(M[H]);mxMermaidToDrawio.resetListeners();this.handleError(I)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):
-C(y)}else try{null!=window.opener&&null!=window.opener[d]?x(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(I){x(I)},mxUtils.bind(this,function(I){this.handleError(I,mxResources.get("errorLoadingFile"),q)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&
-window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=
-urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),m())}}catch(I){this.handleError(I)}};
-App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var m=this.getCurrentFile();null!=m&&(m.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,m){function d(){m(q)}var q=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var C=0;C<x.length;C++)try{var y=x[C].key;if(null!=y&&".draft_"==y.substring(0,7)){var I=JSON.parse(x[C].data);null!=I&&"draft"==I.type&&I.aliveCheck!=f&&(null==b&&null==I.fileObject||null!=I.fileObject&&I.fileObject.path==b)&&(I.key=y,q.push(I))}}catch(M){}d()}),d)}catch(x){d()}};
+(window.location.search=this.getSearch(["create","title"]))}),x=mxUtils.bind(this,function(I){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,I,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var L=urlParams.title;L=null!=L?decodeURIComponent(L):this.defaultFilename;I=this.getServiceCount(!0);isLocalStorage&&I++;var H=4>=I?2:6<I?4:3;L=new CreateDialog(this,L,mxUtils.bind(this,function(c,e){if(null==e){this.hideDialog();var g=Editor.useLocalStorage;
+this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=g}else this.pickFolder(e,mxUtils.bind(this,function(l){this.createFile(c,this.getFileData(!0),null,e,null,!0,l)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,H,null,null,null,this.editor.fileExtensions);this.showDialog(L.container,420,I>H?390:280,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));L.init()}});if("http://"!=d.substring(0,
+7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0)){this.spinner.stop();d=JSON.parse(d);var B=mxUtils.bind(this,function(I){this.createFile(null!=I.filename?I.filename:this.defaultFilename,I,null,null,mxUtils.bind(this,function(){this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct();window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"]));window.location.hash="R"+Graph.compress(I)}),!0,null,!0)}),y=d.data;d.compressed&&(y=Graph.decompress(y));
+"mermaid"==d.type?window.isMermaidEnabled?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(I){I!=this.emptyDiagramXml&&B(I)})),this.generateMermaidImage(y,null,function(){},mxUtils.bind(this,function(I){for(var L=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),H=0;H<L.length;H++)L[H].parentNode.removeChild(L[H]);mxMermaidToDrawio.resetListeners();this.handleError(I)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):
+"generate"==d.type&&this.spinner.spin(document.body,mxResources.get("generate"))&&this.generateDiagram(y,mxUtils.bind(this,function(I){this.spinner.stop();B(I)}),mxUtils.bind(this,function(I){this.handleError(I,mxResources.get("errorLoadingFile"))}))}else try{null!=window.opener&&null!=window.opener[d]?x(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(I){x(I)},mxUtils.bind(this,
+function(I){this.handleError(I,mxResources.get("errorLoadingFile"),q)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=
+this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open",
+"sketch"])),window.location.hash=urlParams.open),m())}}catch(I){this.handleError(I)}};
+App.prototype.generateDiagram=function(b,f,m){var d=!1,q=null,x='Write a detailed and complex MermaidJS declaration for "'+(""!=b?b:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(B){B!=this.emptyDiagramXml&&(d=!0,q=B)}));this.generateOpenAiMermaidDiagram(x,function(B,y,I,L){q=d?q:this.createMermaidXml(B,EditorUi.defaultMermaidConfig,y,I,L,b);
+f(q,y)},m)};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var m=this.getCurrentFile();null!=m&&(m.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
+App.prototype.filterDrafts=function(b,f,m){function d(){m(q)}var q=[];try{this.getDatabaseItems(mxUtils.bind(this,function(x){EditorUi.debug("App.filterDrafts",[this],"items",x);for(var B=0;B<x.length;B++)try{var y=x[B].key;if(null!=y&&".draft_"==y.substring(0,7)){var I=JSON.parse(x[B].data);null!=I&&"draft"==I.type&&I.aliveCheck!=f&&(null==b&&null==I.fileObject||null!=I.fileObject&&I.fileObject.path==b)&&(I.key=y,q.push(I))}}catch(L){}d()}),d)}catch(x){d()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var m=new Date(f[0].modified);m=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[m.toLocaleDateString()+" "+m.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d&&null!=f[d]?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,q){this.removeDatabaseItem(f[""!=d?d:0].key);null!=q&&q()}),null,null,null,1<f.length?f:null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}));m.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
-App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),m=mxUtils.bind(this,function(){var q=new SplashDialog(this);this.showDialog(q.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x,C){!x&&!C||mxClient.IS_CHROMEAPP||(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||null!=this.mode&&!b)null==urlParams.create&&m();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();m()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};
+App.prototype.showSplash=function(b){if("1"!=urlParams.noFileMenu){var f=this.getServiceCount(!0),m=mxUtils.bind(this,function(){var q=new SplashDialog(this);this.showDialog(q.container,340,mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:230,!0,!0,mxUtils.bind(this,function(x,B){!x&&!B||mxClient.IS_CHROMEAPP||(x=Editor.useLocalStorage,this.createFile(this.defaultFilename+(EditorUi.isElectronApp?".drawio":""),null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=x)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=this.mode&&!b)null==urlParams.create&&m();else{b=4==f?2:3;var d=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();m()}),b);this.showDialog(d.container,3>b?200:300,3<f?320:210,!0,!1)}}};
App.prototype.addLanguageMenu=function(b,f,m){var d=null;null!=this.menus.get("language")&&(d=document.createElement("div"),this.setElementTitle(d,"language"),d.className="geAdaptiveAsset",d.style.backgroundImage="url("+Editor.globeImage+")",d.style.backgroundPosition="right center",d.style.backgroundRepeat="no-repeat",d.style.backgroundSize="19px 19px",d.style.width="19px",d.style.height="19px",mxUtils.setOpacity(d,40),d.style.position="absolute",d.style.cursor="pointer",d.style.bottom="20px",d.style.right=
null!=m?m:"22px",f&&(d.style.direction="rtl",d.style.textAlign="right",d.style.right=null!=m?m:"24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="2px 24px 0 0",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),d.appendChild(f),f.className="geAdaptiveAsset"),mxEvent.addListener(d,"click",mxUtils.bind(this,function(q){this.editor.graph.popupMenuHandler.hideMenu();var x=new mxPopupMenu(this.menus.get("language").funct);
-x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var C=mxUtils.getOffset(d);x.popup(C.x,C.y+d.offsetHeight,null,q);this.setCurrentMenu(x)})),b.appendChild(d));return d};
-App.prototype.loadFileSystemEntry=function(b,f,m){m=null!=m?m:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var q=new FileReader;q.onload=mxUtils.bind(this,function(x){var C=mxUtils.bind(this,function(y){try{if(null!=f){var I=x.target.result;"image/png"==d.type&&(I=this.extractGraphModelFromPng(I));f(new LocalFile(this,I,d.name,null,b,d,y))}else this.openFileHandle(x.target.result,d.name,d,!1,b,y)}catch(M){m(M)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
-function(y){C("denied"!==y)})):b.createWritable().then(mxUtils.bind(this,function(){C(!0)}),mxUtils.bind(this,function(y){C(!1)}))});q.onerror=m;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?q.readAsText(d):q.readAsDataURL(d)}),m)}catch(d){m(d)}};
+x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);x.destroy()});var B=mxUtils.getOffset(d);x.popup(B.x,B.y+d.offsetHeight,null,q);this.setCurrentMenu(x)})),b.appendChild(d));return d};
+App.prototype.loadFileSystemEntry=function(b,f,m){m=null!=m?m:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var q=new FileReader;q.onload=mxUtils.bind(this,function(x){var B=mxUtils.bind(this,function(y){try{if(null!=f){var I=x.target.result;"image/png"==d.type&&(I=this.extractGraphModelFromPng(I));f(new LocalFile(this,I,d.name,null,b,d,y))}else this.openFileHandle(x.target.result,d.name,d,!1,b,y)}catch(L){m(L)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+function(y){B("denied"!==y)})):b.createWritable().then(mxUtils.bind(this,function(){B(!0)}),mxUtils.bind(this,function(y){B(!1)}))});q.onerror=m;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||"image/svg"===d.type.substring(0,9)?q.readAsText(d):q.readAsDataURL(d)}),m)}catch(d){m(d)}};
App.prototype.createFileSystemOptions=function(b){var f=[],m=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(m=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var q={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};q.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==m?f.splice(0,0,
q):this.editor.diagramFileTypes[d].extension==m?f.splice(0,0,q):f.push(q)}return{types:f,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,f,m){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});m=null!=m?m:this.createFileSystemOptions();window.showSaveFilePicker(m).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(q){b(d,q)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getServiceForName(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(C){null!=C&&0<C.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(C[0])}),
-mxUtils.bind(this,function(C){"AbortError"!=C.name&&this.handleError(C)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var m=document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.openFiles(m.files),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.openFileInputElt=m}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(C,y){StorageFile.listFiles(this,"F",C,y)});window.openBrowserFile=mxUtils.bind(this,function(C,y,I){StorageFile.getFileContent(this,C,y,I)});window.deleteBrowserFile=mxUtils.bind(this,function(C,y,I){StorageFile.deleteFile(this,C,y,I)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(C,y){var I=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,C,y):new LocalFile(this,C,y))}),M=this.getCurrentFile();null!=M&&M.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}));var q=this.dialog,x=q.close;this.dialog.close=mxUtils.bind(this,function(C){Editor.useLocalStorage=
-d;x.apply(q,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(C){this.handleError(C)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(x){try{this.loadLibrary(x);this.showSidebar();try{this.sidebar.palettes[x.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(C){}}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var m=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
-this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=m&&m.pickLibrary(mxUtils.bind(this,function(x,C){null!=C?f(C):this.spinner.spin(document.body,mxResources.get("loading"))&&m.getLibrary(x,mxUtils.bind(this,function(y){this.spinner.stop();f(y)}),mxUtils.bind(this,function(y){this.handleError(y,null!=y?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
-d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var x=0;x<d.files.length;x++)mxUtils.bind(this,function(C){var y=new FileReader;y.onload=mxUtils.bind(this,function(I){f(new LocalLibrary(this,I.target.result,C.name))});y.readAsText(C)})(d.files[x]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(x,C){StorageFile.listFiles(this,"L",x,C)});window.openBrowserFile=mxUtils.bind(this,function(x,C,y){StorageFile.getFileContent(this,x,C,y)});window.deleteBrowserFile=mxUtils.bind(this,function(x,C,y){StorageFile.deleteFile(this,x,C,y)});var q=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,C){f(b==App.MODE_BROWSER?new StorageLibrary(this,
-x,C):new LocalLibrary(this,x,C))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=q;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,m,d,q,x,C){try{d=null!=d?d:this.mode;q=null!=q?q:!1;x=null!=x?x:!1;var y=this.createLibraryDataFromImages(f),I=mxUtils.bind(this,function(c){this.spinner.stop();null!=C&&C();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==m&&d==App.MODE_DEVICE&&(m=new LocalLibrary(this,y,b));if(null==m)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getServiceForName(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(B){null!=B&&0<B.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(B[0])}),
+mxUtils.bind(this,function(B){"AbortError"!=B.name&&this.handleError(B)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var m=document.createElement("input");m.setAttribute("type","file");mxEvent.addListener(m,"change",mxUtils.bind(this,function(){null!=m.files&&(this.openFiles(m.files),m.type="",m.type="file",m.value="")}));m.style.display="none";document.body.appendChild(m);this.openFileInputElt=m}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(B,y){StorageFile.listFiles(this,"F",B,y)});window.openBrowserFile=mxUtils.bind(this,function(B,y,I){StorageFile.getFileContent(this,B,y,I)});window.deleteBrowserFile=mxUtils.bind(this,function(B,y,I){StorageFile.deleteFile(this,B,y,I)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(B,y){var I=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=y.substring(y.length-4)||(y=y.substring(0,y.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,B,y):new LocalFile(this,B,y))}),L=this.getCurrentFile();null!=L&&L.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()}));var q=this.dialog,x=q.close;this.dialog.close=mxUtils.bind(this,function(B){Editor.useLocalStorage=
+d;x.apply(q,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(B){this.handleError(B)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var f=mxUtils.bind(this,function(x){try{this.loadLibrary(x);this.showSidebar();try{this.sidebar.palettes[x.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(B){}}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var m=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
+this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=m&&m.pickLibrary(mxUtils.bind(this,function(x,B){null!=B?f(B):this.spinner.spin(document.body,mxResources.get("loading"))&&m.getLibrary(x,mxUtils.bind(this,function(y){this.spinner.stop();f(y)}),mxUtils.bind(this,function(y){this.handleError(y,null!=y?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var d=document.createElement("input");
+d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var x=0;x<d.files.length;x++)mxUtils.bind(this,function(B){var y=new FileReader;y.onload=mxUtils.bind(this,function(I){f(new LocalLibrary(this,I.target.result,B.name))});y.readAsText(B)})(d.files[x]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(x,B){StorageFile.listFiles(this,"L",x,B)});window.openBrowserFile=mxUtils.bind(this,function(x,B,y){StorageFile.getFileContent(this,x,B,y)});window.deleteBrowserFile=mxUtils.bind(this,function(x,B,y){StorageFile.deleteFile(this,x,B,y)});var q=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,B){f(b==App.MODE_BROWSER?new StorageLibrary(this,
+x,B):new LocalLibrary(this,x,B))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=q;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,f,m,d,q,x,B){try{d=null!=d?d:this.mode;q=null!=q?q:!1;x=null!=x?x:!1;var y=this.createLibraryDataFromImages(f),I=mxUtils.bind(this,function(c){this.spinner.stop();null!=B&&B();this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});null==m&&d==App.MODE_DEVICE&&(m=new LocalLibrary(this,y,b));if(null==m)this.pickFolder(d,mxUtils.bind(this,function(c){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
this.drive.insertFile(b,y,c,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,f)}),I,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,f)}),I,c):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,f)}),I,c):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,f)}),I,c):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();
this.hideDialog(!0);this.libraryLoaded(e,f)}),I,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,y,mxUtils.bind(this,function(e){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(e,f)}),I,c):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,y,b),mxUtils.bind(this,function(e){this.hideDialog(!0);this.libraryLoaded(e,f)}),I):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){m.setData(y);var M=mxUtils.bind(this,function(){m.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(m,f);null!=C&&C()}),I)});if(b!=m.getTitle()){var H=m.getHash();m.rename(b,mxUtils.bind(this,function(c){m.constructor!=LocalLibrary&&H!=m.getHash()&&(mxSettings.removeCustomLibrary(H),mxSettings.addCustomLibrary(m.getHash()));this.removeLibrarySidebar(H);M()}),I)}else M()}}catch(c){this.handleError(c)}};
+else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){m.setData(y);var L=mxUtils.bind(this,function(){m.save(!0,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);x||this.libraryLoaded(m,f);null!=B&&B()}),I)});if(b!=m.getTitle()){var H=m.getHash();m.rename(b,mxUtils.bind(this,function(c){m.constructor!=LocalLibrary&&H!=m.getHash()&&(mxSettings.removeCustomLibrary(H),mxSettings.addCustomLibrary(m.getHash()));this.removeLibrarySidebar(H);L()}),I)}else L()}}catch(c){this.handleError(c)}};
App.prototype.saveFile=function(b,f){var m=this.getCurrentFile(),d=this.mode;if(null!=m){var q=mxUtils.bind(this,function(){EditorUi.enableDrafts&&m.removeDraft();this.getCurrentFile()==m||m.isModified()||(m.getMode()!=App.MODE_DEVICE?this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))})):this.clearStatus());null!=f&&f()});if(b||null==m.getTitle()||null!=m.invalidFileHandle||null==this.mode)if(null!=m&&m.constructor==LocalFile&&
-null!=m.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,I){m.invalidFileHandle=null;m.fileHandle=y;m.title=I.name;m.desc=I;m.editable=null;this.save(I.name,q)}),null,this.createFileSystemOptions(m.getTitle()));else{b=null!=m.getTitle()?m.getTitle():this.defaultFilename;var x=mxUtils.bind(this,function(y,I,M,H){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
-mxUtils.bind(this,function(){M.value=y.split(".").slice(0,-1).join(".");M.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&I==App.MODE_DEVICE)null!=m&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(e,g){m.fileHandle=e;m.mode=App.MODE_DEVICE;m.title=g.name;m.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,q)}),mxUtils.bind(this,
+null!=m.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,function(y,I){m.invalidFileHandle=null;m.fileHandle=y;m.title=I.name;m.desc=I;m.editable=null;this.save(I.name,q)}),null,this.createFileSystemOptions(m.getTitle()));else{b=null!=m.getTitle()?m.getTitle():this.defaultFilename;var x=mxUtils.bind(this,function(y,I,L,H){if(null!=y&&0<y.length)if(/(\.pdf)$/i.test(y))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),
+mxUtils.bind(this,function(){L.value=y.split(".").slice(0,-1).join(".");L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&I==App.MODE_DEVICE)null!=m&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(e,g){m.fileHandle=e;m.mode=App.MODE_DEVICE;m.title=g.name;m.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,q)}),mxUtils.bind(this,
function(e){"AbortError"!=e.name&&this.handleError(e)}),this.createFileSystemOptions(y)):(this.setMode(App.MODE_DEVICE),this.save(y,q));else if("download"==I)(new LocalFile(this,null,y)).save();else if("_blank"==I)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=I){var c=mxUtils.bind(this,function(e){var g=this.editor.graph,l=g.getSelectionCells(),p=g.getViewState(),
-u=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,I,q,null==this.mode,e,null,null,mxUtils.bind(this,function(){this.restoreViewState(u,p,l)}))});null!=H?c(H):this.pickFolder(I,c)}else null!=I&&this.save(y,q)}),C=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,I,M){x(y.value,I,y,M);this.hideDialog()}),C?null:["_blank"]);this.showDialog(b.container,
+u=this.currentPage;this.createFile(y,this.getFileData(/(\.xml)$/i.test(y)||0>y.indexOf(".")||/(\.drawio)$/i.test(y),/(\.svg)$/i.test(y),/(\.html)$/i.test(y)),null,I,q,null==this.mode,e,null,null,mxUtils.bind(this,function(){this.restoreViewState(u,p,l)}))});null!=H?c(H):this.pickFolder(I,c)}else null!=I&&this.save(y,q)}),B=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(y,I,L){x(y.value,I,y,L);this.hideDialog()}),B?null:["_blank"]);this.showDialog(b.container,
420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(m.getTitle(),q)}};
-App.prototype.loadTemplate=function(b,f,m,d,q){var x=!1,C=b,y=null!=d?d:b;d=/\.png$/i.test(y)||/\.pdf$/i.test(y);var I=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(C)||(x=d||I,C="t="+(new Date).getTime(),C=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+C+(x?"&base64=1":""));this.editor.loadUrl(C,mxUtils.bind(this,function(M){try{var H=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(M):atob(M):M;if(I||this.isVisioData(H))I||(y=q?this.isRemoteVisioData(H)?"raw.vss":"raw.vssx":
-this.isRemoteVisioData(H)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(M.substring(M.indexOf(",")+1)),function(c){f(c)},m,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,y))this.isExternalDataComms()?this.parseFileData(H,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&f(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m);else if(this.isLucidChartData(H))this.convertLucidChart(H,
-mxUtils.bind(this,function(c){f(c)}),mxUtils.bind(this,function(c){m(c)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(H))H=Editor.extractGraphModelFromPng(M);f(H)}}catch(c){m(c)}}),m,/(\.png)($|\?)/i.test(y)||I,null,null,x)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+App.prototype.loadTemplate=function(b,f,m,d,q){var x=!1,B=b,y=null!=d?d:b;d=/\.png$/i.test(y)||/\.pdf$/i.test(y);var I=EditorUi.isVisioFilename(y);this.editor.isCorsEnabledForUrl(B)||(x=d||I,B="t="+(new Date).getTime(),B=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+B+(x?"&base64=1":""));this.editor.loadUrl(B,mxUtils.bind(this,function(L){try{var H=x?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(L):atob(L):L;if(I||this.isVisioData(H))I||(y=q?this.isRemoteVisioData(H)?"raw.vss":"raw.vssx":
+this.isRemoteVisioData(H)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(L.substring(L.indexOf(",")+1)),function(c){f(c)},m,y);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,y))this.isExternalDataComms()?this.parseFileData(H,mxUtils.bind(this,function(c){4==c.readyState&&200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&f(c.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,m);else if(this.isLucidChartData(H))this.convertLucidChart(H,
+mxUtils.bind(this,function(c){f(c)}),mxUtils.bind(this,function(c){m(c)}));else{if(/(\.png)($|\?)/i.test(y)||Editor.isPngData(H))H=Editor.extractGraphModelFromPng(L);f(H)}}catch(c){m(c)}}),m,/(\.png)($|\?)/i.test(y)||I,null,null,x)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
App.prototype.uncompressPages=function(b){if(null!=b)try{var f=mxUtils.parseXml(b);if("mxfile"==f.documentElement.nodeName){for(var m=f.documentElement.getElementsByTagName("diagram"),d=0;d<m.length;d++){var q=Editor.parseDiagramNode(m[d],!0);null!=q&&(mxUtils.setTextContent(m[d],""),m[d].appendChild(q))}b=mxUtils.getPrettyXml(f.documentElement)}}catch(x){}return b};
-App.prototype.createFile=function(b,f,m,d,q,x,C,y,I,M){d=y?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var H=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(g){H();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var e=mxUtils.bind(this,function(g){H();this.fileCreated(g,
-m,x,q,I,M)});d==App.MODE_GOOGLE&&null!=this.drive?(null==C&&null!=this.stateArg&&null!=this.stateArg.folderId&&(C=this.stateArg.folderId),this.drive.insertFile(b,f,C,e,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,e,c,!1,C):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,e,c,!1,C):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,e,c,!1,C):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,e,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?
-this.oneDrive.insertFile(b,f,e,c,!1,C):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,e,c):!y&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(H(),this.showSaveFilePicker(mxUtils.bind(this,function(g,l){var p=new LocalFile(this,f,l.name,null,g,l);p.saveFile(l.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,m,x,q,I,M)}),c,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&c(g)}),this.createFileSystemOptions(b))):(H(),this.fileCreated(new LocalFile(this,f,b,null==d),m,x,q,I,M))}catch(g){H(),
+App.prototype.createFile=function(b,f,m,d,q,x,B,y,I,L){d=y?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var H=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(g){H();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var e=mxUtils.bind(this,function(g){H();this.fileCreated(g,
+m,x,q,I,L)});d==App.MODE_GOOGLE&&null!=this.drive?(null==B&&null!=this.stateArg&&null!=this.stateArg.folderId&&(B=this.stateArg.folderId),this.drive.insertFile(b,f,B,e,c)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,e,c,!1,B):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,e,c,!1,B):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,e,c,!1,B):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,e,c):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?
+this.oneDrive.insertFile(b,f,e,c,!1,B):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,e,c):!y&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(H(),this.showSaveFilePicker(mxUtils.bind(this,function(g,l){var p=new LocalFile(this,f,l.name,null,g,l);p.saveFile(l.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,m,x,q,I,L)}),c,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&c(g)}),this.createFileSystemOptions(b))):(H(),this.fileCreated(new LocalFile(this,f,b,null==d),m,x,q,I,L))}catch(g){H(),
this.handleError(g)}}};
-App.prototype.fileCreated=function(b,f,m,d,q,x){var C=window.location.pathname;null!=f&&0<f.length&&(C+="?libs="+f);null!=q&&0<q.length&&(C+="?clibs="+q);C=this.getUrl(C);b.getMode()!=App.MODE_DEVICE&&(C+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var I=window.location.protocol+"//"+window.location.hostname+C,M=y,H=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(H=
-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(H.container),M=this.decodeNodeIntoGraph(M,H));b.setData(this.createFileData(y,H,b,I));null!=H&&H.container.parentNode.removeChild(H.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(){c();var g=this.getCurrentFile();null==m&&null!=g&&(m=!g.isModified()&&null==g.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,x);m&&this.updateStatus(mxUtils.bind(this,
+App.prototype.fileCreated=function(b,f,m,d,q,x){var B=window.location.pathname;null!=f&&0<f.length&&(B+="?libs="+f);null!=q&&0<q.length&&(B+="?clibs="+q);B=this.getUrl(B);b.getMode()!=App.MODE_DEVICE&&(B+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var y=b.getData();y=0<y.length?this.editor.extractGraphModel(mxUtils.parseXml(y).documentElement,!0):null;var I=window.location.protocol+"//"+window.location.hostname+B,L=y,H=null;null!=y&&/\.svg$/i.test(b.getTitle())&&(H=
+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(H.container),L=this.decodeNodeIntoGraph(L,H));b.setData(this.createFileData(y,H,b,I));null!=H&&H.container.parentNode.removeChild(H.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),e=mxUtils.bind(this,function(){c();var g=this.getCurrentFile();null==m&&null!=g&&(m=!g.isModified()&&null==g.getMode());var l=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,x);m&&this.updateStatus(mxUtils.bind(this,
function(){b.addAllSavedStatus()}));null!=f&&this.sidebar.showEntries(f);if(null!=q){for(var u=[],z=q.split(";"),E=0;E<z.length;E++)u.push(decodeURIComponent(z[E]));this.loadLibraries(u)}null!=d&&d()}),p=mxUtils.bind(this,function(){m||null==g||!g.isModified()?l():this.confirm(mxResources.get("allChangesLost"),null,l,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==m||m?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),
-b.getTitle(),null==b.getMode())),window.geOpenWindow(C,null,p))});b.constructor==LocalFile?e():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){e()}),mxUtils.bind(this,function(g){c();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};
+b.getTitle(),null==b.getMode())),window.geOpenWindow(B,null,p))});b.constructor==LocalFile?e():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){e()}),mxUtils.bind(this,function(g){c();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};
App.prototype.loadFile=function(b,f,m,d,q){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var x=mxUtils.bind(this,function(){if(null==b||0==b.length)this.clearStatus(),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var I=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var l=this.getCurrentFile();window.location.hash=
null!=l?l.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=d&&d()):I({message:mxResources.get("fileNotFound")})}),I)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=m)this.spinner.stop(),this.fileLoaded(m),
-null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var M=decodeURIComponent(b.substring(1));"<"!=M.charAt(0)&&(M=Graph.decompress(M));M=new LocalFile(this,M,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
-!0);M.getHash=function(){return b};this.fileLoaded(M);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,l){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,l));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
+null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var L=decodeURIComponent(b.substring(1));"<"!=L.charAt(0)&&(L=Graph.decompress(L));L=new LocalFile(this,L,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,
+!0);L.getHash=function(){return b};this.fileLoaded(L);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,l){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,l));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"))}));
else if("U"==b.charAt(0)){var H=decodeURIComponent(b.substring(1)),c=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=H.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var l=H.substring(31,H.lastIndexOf("&ex"));this.loadFile("G"+l,f,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&!this.editor.editable&&(p.getHash=
function(){return"G"+l},window.location.hash="#"+p.getHash());null!=d&&d()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(H,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var l=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var p=H,u=H.lastIndexOf("."),z=p.lastIndexOf("/");u>z&&0<z&&(p=p.substring(z+1,u),u=H.substring(u),this.useCanvasForExport||
".png"!=u||(u=".drawio"),".svg"===u||".xml"===u||".html"===u||".png"===u||".drawio"===u)&&(l=p+u)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):l,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=d&&d():c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else c()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,function(){c()||(this.spinner.stop(),
this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var e=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var g=this.getServiceForName(e);if(null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();window.location.hash=null!=
p?p.getHash():""}));else{var l=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var u=this.getCurrentFile();if(null==u)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){u.getHash=function(){return l+b};p="#"+u.getHash();try{var z=this.getHashObject();null==z||mxUtils.isEmptyObject(z)||(p=p+"#"+encodeURIComponent(JSON.stringify(z)))}catch(E){}window.location.replace(p)}else p==
u&&null==p.getMode()&&this.updateStatus(mxUtils.bind(this,function(){var E=mxResources.get("copyCreated");this.editor.setStatus('<div title="'+E+'" class="geStatusAlert">'+E+"</div>")}));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var u=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,
-null!=p?mxResources.get("errorLoadingFile"):null,u,null,null,"#"+l+b):u()}))}})()}}),C=this.getCurrentFile(),y=mxUtils.bind(this,function(){q||null==C||!C.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=C&&(window.location.hash=C.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==C||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,340,140,!0,!0)};
+null!=p?mxResources.get("errorLoadingFile"):null,u,null,null,"#"+l+b):u()}))}})()}}),B=this.getCurrentFile(),y=mxUtils.bind(this,function(){q||null==B||!B.isModified()?x():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=B&&(window.location.hash=B.getHash())}),x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?y():null==B||f?y():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,y)).container,340,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(m){for(var d=0;d<m.length;d++)""!=m[d]&&0>mxUtils.indexOf(f,m[d])&&f.push(m[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var m=mxUtils.bind(this,function(M,H){H||mxSettings.removeCustomLibrary(M);delete this.loadedLibraries[M]}),d=0,q=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,C=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var M=b.length-1;0<=M;M--)null!=q[M]&&this.loadLibrary(q[M],M<=x);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var I=encodeURIComponent(decodeURIComponent(b[y]));
-mxUtils.bind(this,function(M,H){if(null!=M&&0<M.length&&null==this.loadedLibraries[M]&&null==this.sidebar.palettes[M]){this.loadedLibraries[M]=!0;d++;var c=mxUtils.bind(this,function(z){q[H]=z;d--;C()}),e=mxUtils.bind(this,function(z){m(M,z);d--;C()}),g=M.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var z=decodeURIComponent(M.substring(1));StorageFile.getFileContent(this,z,mxUtils.bind(this,function(E){".scratchpad"==z&&null==
-E&&(E=this.emptyLibraryXml);null!=E?c(new StorageLibrary(this,E,z)):e()}),e)}catch(E){e()}}),0);else if("U"==g){var l=decodeURIComponent(M.substring(1));this.isOffline()?e(!0):this.loadTemplate(l,mxUtils.bind(this,function(z){null!=z&&0<z.length?c(new UrlLibrary(this,z,l)):e()}),function(){e()},null,!0)}else if("R"==g){g=decodeURIComponent(M.substring(1));try{g=JSON.parse(g);var p={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(z){try{c(new RemoteLibrary(this,
-z,p))}catch(E){e()}}),function(){e()})}catch(z){e()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(M.substring(1)),function(z){c(z)},e)}catch(z){e()}else{var u=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(u=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(u=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(u=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(u=this.dropbox):"W"==g&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(u=this.oneDrive);null!=u?u.getLibrary(decodeURIComponent(M.substring(1)),mxUtils.bind(this,function(z){try{c(z)}catch(E){e()}}),function(z){e()}):e(!0)}}})(I,y)}C()}};
-App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var m=mxUtils.bind(this,function(L,H){H||mxSettings.removeCustomLibrary(L);delete this.loadedLibraries[L]}),d=0,q=[],x=0<b.length&&"L.scratchpad"==b[0]?1:0,B=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var L=b.length-1;0<=L;L--)null!=q[L]&&this.loadLibrary(q[L],L<=x);null!=f&&f()}});if(null!=b)for(var y=0;y<b.length;y++){var I=encodeURIComponent(decodeURIComponent(b[y]));
+mxUtils.bind(this,function(L,H){if(null!=L&&0<L.length&&null==this.loadedLibraries[L]&&null==this.sidebar.palettes[L]){this.loadedLibraries[L]=!0;d++;var c=mxUtils.bind(this,function(z){q[H]=z;d--;B()}),e=mxUtils.bind(this,function(z){m(L,z);d--;B()}),g=L.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var z=decodeURIComponent(L.substring(1));StorageFile.getFileContent(this,z,mxUtils.bind(this,function(E){".scratchpad"==z&&null==
+E&&(E=this.emptyLibraryXml);null!=E?c(new StorageLibrary(this,E,z)):e()}),e)}catch(E){e()}}),0);else if("U"==g){var l=decodeURIComponent(L.substring(1));this.isOffline()?e(!0):this.loadTemplate(l,mxUtils.bind(this,function(z){null!=z&&0<z.length?c(new UrlLibrary(this,z,l)):e()}),function(){e()},null,!0)}else if("R"==g){g=decodeURIComponent(L.substring(1));try{g=JSON.parse(g);var p={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(z){try{c(new RemoteLibrary(this,
+z,p))}catch(E){e()}}),function(){e()})}catch(z){e()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(L.substring(1)),function(z){c(z)},e)}catch(z){e()}else{var u=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(u=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(u=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(u=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(u=this.dropbox):"W"==g&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(u=this.oneDrive);null!=u?u.getLibrary(decodeURIComponent(L.substring(1)),mxUtils.bind(this,function(z){try{c(z)}catch(E){e()}}),function(z){e()}):e(!0)}}})(I,y)}B()}};
+App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer)if(EditorUi.isElectronApp||this.isOffline()||(null!=urlParams.notif?this.fetchAndShowNotification(urlParams.notif):"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",this.mode)),this.isStandaloneApp()||"simple"==Editor.currentTheme&&"1"!=urlParams.embed)this.buttonContainer.style.display="none",null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.sketchMenubarElt&&this.sketchMenubarElt.appendChild(this.notificationBtn);
else{this.buttonContainer.style.display="";var b=this.getCurrentFile();null!=this.notificationBtn&&this.notificationBtn.parentNode!=this.buttonContainer&&this.buttonContainer.appendChild(this.notificationBtn);"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&(null==this.commentButton&&(this.commentButton=document.createElement("a"),this.setElementTitle(this.commentButton,"comments"),this.commentButton.className="geButton geRoundButton",this.commentButton.style.backgroundImage="url("+Editor.commentImage+
")",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton)),this.commentButton.style.display=this.commentsSupported()?"":"none");if(null==this.shareButton){this.shareButton=document.createElement("button");this.shareButton.className="geBtn gePrimaryBtn";var f=document.createElement("div");f.className="geButton";f.style.backgroundImage="url("+Editor.groupImage+")";this.shareButton.appendChild(f);
this.dependsOnLanguage(mxUtils.bind(this,function(){f.innerHTML="";mxUtils.write(f,mxResources.get("share"));this.shareButton.setAttribute("title",mxResources.get("share"))}));mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()}));this.buttonContainer.appendChild(this.shareButton)}this.shareButton.style.display=null!=b&&"kennedy"==Editor.currentTheme&&"1"!=urlParams.embed?"":"none";if("simple"!=Editor.currentTheme){if(null==this.userButton){this.userButton=
-document.createElement("a");this.userButton.className="geButton geRoundButton";var m=document.createElement("img");this.userButton.appendChild(m);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(y){this.toggleUserPanel();var I=this.userButton.getBoundingClientRect(),M=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=I.bottom+"px";this.userPanel.style.right=M-I.right+"px";mxEvent.consume(y)}));var d=document.createElement("img");d.style.position=
+document.createElement("a");this.userButton.className="geButton geRoundButton";var m=document.createElement("img");this.userButton.appendChild(m);mxEvent.addListener(this.userButton,"click",mxUtils.bind(this,function(y){this.toggleUserPanel();var I=this.userButton.getBoundingClientRect(),L=window.innerWidth||document.documentElement.clientWidth;this.userPanel.style.top=I.bottom+"px";this.userPanel.style.right=L-I.right+"px";mxEvent.consume(y)}));var d=document.createElement("img");d.style.position=
"absolute";d.style.width="10px";this.userButton.appendChild(d);this.buttonContainer.appendChild(this.userButton)}if(!this.unloading){m=this.userButton.getElementsByTagName("img")[0];d=this.userButton.getElementsByTagName("img")[1];var q=mxResources.get("changeUser"),x=this.getMainUser();null!=x&&null!=x.displayName&&(q=x.displayName);null!=x&&null!=x.pictureUrl?(m.classList.remove("geAdaptiveAsset"),m.src=x.pictureUrl,d.style.top="3px",d.style.right="0"):(m.classList.add("geAdaptiveAsset"),m.src=
-Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";m=b.getRealtimeError();var C=b.getRealtimeState();q+=" (";1==C?(d.src=Editor.syncImage,q+=mxResources.get("online")):(d.src=Editor.syncProblemImage,q=null!=m&&null!=m.message?q+m.message:q+mxResources.get("disconnected"));q+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",q);this.userButton.style.display="draw.io"!=this.getServiceName()||
+Editor.userImage,d.style.top="6px",d.style.right="4px");if(null!=b&&b.isRealtimeEnabled()&&b.isRealtimeSupported()){d.style.display="";m=b.getRealtimeError();var B=b.getRealtimeState();q+=" (";1==B?(d.src=Editor.syncImage,q+=mxResources.get("online")):(d.src=Editor.syncProblemImage,q=null!=m&&null!=m.message?q+m.message:q+mxResources.get("disconnected"));q+=")"}else d.style.display="none",d.src=Editor.cloudImage;this.userButton.setAttribute("title",q);this.userButton.style.display="draw.io"!=this.getServiceName()||
null==x||"1"==urlParams.embed||this.isStandaloneApp()||null==b?"none":""}}}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var m=null,d=mxUtils.bind(this,function(q){q=q.filter(function(I){return!I.targets||-1<I.targets.indexOf(b)||null!=f&&-1<I.targets.indexOf(f)});for(var x=b+"NotifReadTS",C=isLocalStorage?parseInt(localStorage.getItem(x)):!0,y=0;y<q.length;y++)q[y].isNew=!C||q[y].timestamp>C;this.showNotification(q,x)});try{isLocalStorage&&(m=JSON.parse(localStorage.getItem(".notifCache")))}catch(q){}null==m||m.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus())try{var x=JSON.parse(q.getText());x.sort(function(C,y){return y.timestamp-C.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:x}));this.fetchingNotif=!1;d(x)}catch(C){}}))):d(m.notifs)}};
-App.prototype.showNotification=function(b,f){function m(M){var H=document.querySelector(".geNotification-count");null!=H&&(H.innerHTML=M,H.style.display=0==M?"none":"",H=document.querySelector(".geNotification-bell"),H.style.animation=0==M?"none":"",H.className="geNotification-bell"+(0==M?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==M?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var q=d=0;q<b.length;q++)b[q].isNew&&
-d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var M=this.notificationWin.querySelectorAll(".circle.active"),H=0;H<M.length;H++)M[H].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var m=null,d=mxUtils.bind(this,function(q){q=q.filter(function(I){return!I.targets||-1<I.targets.indexOf(b)||null!=f&&-1<I.targets.indexOf(f)});for(var x=b+"NotifReadTS",B=isLocalStorage?parseInt(localStorage.getItem(x)):!0,y=0;y<q.length;y++)q[y].isNew=!B||q[y].timestamp>B;this.showNotification(q,x)});try{isLocalStorage&&(m=JSON.parse(localStorage.getItem(".notifCache")))}catch(q){}null==m||m.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(q){if(200<=q.getStatus()&&299>=q.getStatus())try{var x=JSON.parse(q.getText());x.sort(function(B,y){return y.timestamp-B.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:x}));this.fetchingNotif=!1;d(x)}catch(B){}}))):d(m.notifs)}};
+App.prototype.showNotification=function(b,f){function m(L){var H=document.querySelector(".geNotification-count");null!=H&&(H.innerHTML=L,H.style.display=0==L?"none":"",H=document.querySelector(".geNotification-bell"),H.style.animation=0==L?"none":"",H.className="geNotification-bell"+(0==L?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==L?"none":"")}var d=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var q=d=0;q<b.length;q++)b[q].isNew&&
+d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var x=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var L=this.notificationWin.querySelectorAll(".circle.active"),H=0;H<L.length;H++)L[H].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";q=document.createElement("span");q.className="geBell-top";d.appendChild(q);q=document.createElement("span");q.className="geBell-middle";d.appendChild(q);q=document.createElement("span");q.className="geBell-bottom";d.appendChild(q);q=document.createElement("span");q.className="geBell-rad";d.appendChild(q);
this.notificationBtn.appendChild(d);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);q=document.createElement("div");q.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");q.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";q.appendChild(d);this.notificationWin.appendChild(q);
-q=document.createElement("div");q.className="notifications clearfix";var C=document.createElement("div");C.setAttribute("id","geNotifList");C.style.position="relative";q.appendChild(C);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var M=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
-M.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=M.right-this.notificationWin.clientWidth+"px";m(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var y=0,I=document.getElementById("geNotifList");if(null!=I){I.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(M,H){H.isNew&&y++;var c=document.createElement("div");c.className="notification";M=M.timeSince(new Date(H.timestamp));null==M&&(M=mxResources.get("lessThanAMinute"));
-c.innerHTML='<div class="circle'+(H.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[M],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(H.content)+"</p>";H.link&&mxEvent.addListener(c,"click",function(){window.open(H.link,"notifWin")});I.appendChild(c)})(this,b[q]);m(y)}}};
-App.prototype.save=function(b,f){var m=this.getCurrentFile(),d=!0,q=mxUtils.bind(this,function(){d&&(d=!1,m.handleFileSuccess(!0),null!=f&&f())}),x=mxUtils.bind(this,function(C){if(d){d=!1;Editor.addRetryToError(C,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=C&&null!=C.retry){var y=C.retry;C.retry=function(){d=!0;try{m.isModified()?y():q()}catch(I){x(I)}}}m.handleFileError(C,null==C||"AbortError"!=C.name)}});if(null!=m&&this.spinner.spin(document.body,mxResources.get("saving"),x,3*this.timeout))try{this.clearStatus(),
-this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==m.getTitle()?m.save(!0,q,x):m.saveAs(b,q,x)}catch(C){x(C)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
+q=document.createElement("div");q.className="notifications clearfix";var B=document.createElement("div");B.setAttribute("id","geNotifList");B.style.position="relative";q.appendChild(B);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var L=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=
+L.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=L.right-this.notificationWin.clientWidth+"px";m(0)}else x()}));mxEvent.addListener(d,"click",x)}else this.notificationBtn.style.display="";var y=0,I=document.getElementById("geNotifList");if(null!=I){I.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(L,H){H.isNew&&y++;var c=document.createElement("div");c.className="notification";L=L.timeSince(new Date(H.timestamp));null==L&&(L=mxResources.get("lessThanAMinute"));
+c.innerHTML='<div class="circle'+(H.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[L],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(H.content)+"</p>";H.link&&mxEvent.addListener(c,"click",function(){window.open(H.link,"notifWin")});I.appendChild(c)})(this,b[q]);m(y)}}};
+App.prototype.save=function(b,f){var m=this.getCurrentFile(),d=!0,q=mxUtils.bind(this,function(){d&&(d=!1,m.handleFileSuccess(!0),null!=f&&f())}),x=mxUtils.bind(this,function(B){if(d){d=!1;Editor.addRetryToError(B,mxUtils.bind(this,function(){this.save(b,f)}));if(null!=B&&null!=B.retry){var y=B.retry;B.retry=function(){d=!0;try{m.isModified()?y():q()}catch(I){x(I)}}}m.handleFileError(B,null==B||"AbortError"!=B.name)}});if(null!=m&&this.spinner.spin(document.body,mxResources.get("saving"),x,3*this.timeout))try{this.clearStatus(),
+this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==m.getTitle()?m.save(!0,q,x):m.saveAs(b,q,x)}catch(B){x(B)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,f,m,d,q,x){m=null!=m?m:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var C=this.spinner.pause();m&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(y){C();if(y.action==google.picker.Action.PICKED){var I=null;null!=y.docs&&0<y.docs.length&&"folder"==y.docs[0].type&&(I=y.docs[0].id);f(x?y:I)}}),q):m&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(y){C();
-if(null!=y&&null!=y.value&&0<y.value.length){var I=OneDriveFile.prototype.getIdOf(y.value[0]);f(x?y:I)}}),d):m&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(y){C();f(y)})):m&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(y){C();f(y)})):m&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(y){C();f(y)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,m,d,q,x){q==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)})):q==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,x,mxUtils.bind(this,function(C){this.spinner.stop()}),
-mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),m,d):q==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):q==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):q==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!0,x,d):q==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
-m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),!1,x):q==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(m="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,f):new StorageFile(this,b,f),StorageFile.doInsertFile(m,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}))):(m=mxUtils.bind(this,
+App.prototype.pickFolder=function(b,f,m,d,q,x){m=null!=m?m:!0;this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);var B=this.spinner.pause();m&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(y){B();if(y.action==google.picker.Action.PICKED){var I=null;null!=y.docs&&0<y.docs.length&&"folder"==y.docs[0].type&&(I=y.docs[0].id);f(x?y:I)}}),q):m&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(y){B();
+if(null!=y&&null!=y.value&&0<y.value.length){var I=OneDriveFile.prototype.getIdOf(y.value[0]);f(x?y:I)}}),d):m&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(y){B();f(y)})):m&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(y){B();f(y)})):m&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(y){B();f(y)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,m,d,q,x){q==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)})):q==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,x,mxUtils.bind(this,function(B){this.spinner.stop()}),
+mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),m,d):q==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,x):q==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,x,d):q==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!0,x,d):q==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
+m):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}),!1,x):q==App.MODE_BROWSER&&(null!=window.StorageFile&&!d&&this.spinner.spin(document.body,mxResources.get("saving"))?(m="<mxlibrary"==b.substring(0,10)?new StorageLibrary(this,b,f):new StorageFile(this,b,f),StorageFile.doInsertFile(m,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(B){this.spinner.stop();this.handleError(B)}))):(m=mxUtils.bind(this,
function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?m():this.confirm(mxResources.get("replaceIt",[f]),m)))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fname.innerText="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f)}f=this.editor.graph;var m=b.isEditable();f.isEnabled()&&!m&&f.reset();f.setEnabled(m);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?(f!=this.getDiagramId()&&(window.location.hash=f),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=
""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,f,m,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=m&&m(x,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(C){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(C.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,m,d,q,x,C,y){var I=f;/\.svg$/i.test(I)||(I=I.substring(0,f.lastIndexOf("."))+d);var M=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(M=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var H=new XMLHttpRequest;H.open("GET",b,!0);M||(H.responseType="blob");if(y)for(var c in y)H.setRequestHeader(c,y[c]);H.onload=mxUtils.bind(this,function(){if(200<=
-H.status&&299>=H.status){var g=null;M?(g=JSON.parse(H.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([H.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(l){q(new LocalFile(this,l,I,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});H.onerror=x;H.send()}else{var e=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(f)){var l=Editor.extractGraphModelFromPdf(g);null!=l&&0<l.length&&q(new LocalFile(this,
+App.prototype.showAuthDialog=function(b,f,m,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(x){try{null!=m&&m(x,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(B){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(B.message))}))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(x){null!=d&&d(x);x&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,f,m,d,q,x,B,y){var I=f;/\.svg$/i.test(I)||(I=I.substring(0,f.lastIndexOf("."))+d);var L=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(L=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var H=new XMLHttpRequest;H.open("GET",b,!0);L||(H.responseType="blob");if(y)for(var c in y)H.setRequestHeader(c,y[c]);H.onload=mxUtils.bind(this,function(){if(200<=
+H.status&&299>=H.status){var g=null;L?(g=JSON.parse(H.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([H.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(l){q(new LocalFile(this,l,I,!0))}),x,f)}else null!=x&&x({message:mxResources.get("errorLoadingFile")})});H.onerror=x;H.send()}else{var e=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(f)){var l=Editor.extractGraphModelFromPdf(g);null!=l&&0<l.length&&q(new LocalFile(this,
l,I,!0))}else/\.png$/i.test(f)?(l=this.extractGraphModelFromPng(g),null!=l?q(new LocalFile(this,l,I,!0)):q(new LocalFile(this,g,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(p){4==p.readyState&&(200<=p.status&&299>=p.status?q(new LocalFile(this,p.responseText,I,!0)):null!=x&&x({message:mxResources.get("errorLoadingFile")}))}),f):q(new LocalFile(this,g,I,!0))}catch(p){null!=x&&x(p)}});m=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
-/\.pdf$/i.test(f)||null!=m&&"image/"==m.substring(0,6);M?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=q){g=JSON.parse(g.getText());var l=g.content;"base64"===g.encoding&&(l=/\.png$/i.test(f)?"data:image/png;base64,"+l:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+l:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l));e(l)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=C?C(b,e,x,m):this.editor.loadUrl(b,e,x,m,null,null,null,y)}};
-App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(C){this.appIconClicked(C)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var C=this.getCurrentFile();null!=C&&(C=C.getMode(),C==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
-"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):C==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):C==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):C==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
-"70%"):C==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):C==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
-this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(C){var y=this.getCurrentFile();null!=y&&y.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(C)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
-this.menubarContainer.appendChild(this.fnameWrapper);var f=document.createElement("div");f.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(f);var m=document.createElement("a");m.style.backgroundImage="url('"+Editor.fullscreenImage+"')";m.className="geButton";f.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(C){var y=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!y,null,Editor.transitionDelay);this.toggleShapesPanel(y);
-this.toggleFormatPanel(y);this.fullscreenMode=!y;m.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(C)}));mxEvent.preventDefault(m);var d=document.createElement("a");d.className="geButton";f.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(C){this.actions.get("format").funct();mxEvent.consume(C)}));mxEvent.preventDefault(d);var q=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
-"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",q);q();var x=document.createElement("a");x.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";x.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(f.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(C){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(C)})),
+/\.pdf$/i.test(f)||null!=m&&"image/"==m.substring(0,6);L?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=q){g=JSON.parse(g.getText());var l=g.content;"base64"===g.encoding&&(l=/\.png$/i.test(f)?"data:image/png;base64,"+l:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+l:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(l):atob(l));e(l)}}else null!=x&&x({code:App.ERROR_UNKNOWN})}),function(){null!=x&&x({code:App.ERROR_UNKNOWN})},!1,this.timeout,
+function(){null!=x&&x({code:App.ERROR_TIMEOUT,retry:fn})},y):null!=B?B(b,e,x,m):this.editor.loadUrl(b,e,x,m,null,null,null,y)}};
+App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.className="geAppIcon";this.appIcon.style.backgroundImage=b;mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(B){this.appIconClicked(B)}));mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var B=this.getCurrentFile();null!=B&&(B=B.getMode(),B==App.MODE_GOOGLE?(this.appIcon.style.backgroundImage=
+"url("+IMAGE_PATH+"/google-drive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):B==App.MODE_DROPBOX?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):B==App.MODE_ONEDRIVE?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)",this.appIcon.style.backgroundSize="70%"):B==App.MODE_GITHUB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)",this.appIcon.style.backgroundSize=
+"70%"):B==App.MODE_GITLAB?(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/gitlab-logo-white.svg)",this.appIcon.style.backgroundSize="90%"):B==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)",this.appIcon.style.backgroundSize="70%"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundSize=""}));"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);
+this.fnameWrapper=document.createElement("div");this.fname=document.createElement("a");this.fnameWrapper.className="geFilenameContainer";this.fname.className="geFilename";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(B){var y=this.getCurrentFile();null!=y&&y.isRenamable()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),this.actions.get("rename").funct());mxEvent.consume(B)}));mxEvent.preventDefault(this.fname);this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
+this.menubarContainer.appendChild(this.fnameWrapper);var f=document.createElement("div");f.className="geToolbar geToolbarEnd";this.toolbarContainer.appendChild(f);var m=document.createElement("a");m.style.backgroundImage="url('"+Editor.fullscreenImage+"')";m.className="geButton";f.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(B){var y=this.fullscreenMode;"atlas"!=Editor.currentTheme&&"1"!=urlParams.embed&&this.setCompactMode(!y,null,Editor.transitionDelay);this.toggleShapesPanel(y);
+this.toggleFormatPanel(y);this.fullscreenMode=!y;m.style.backgroundImage="url('"+(this.fullscreenMode?Editor.fullscreenExitImage:Editor.fullscreenImage)+"')";mxEvent.consume(B)}));mxEvent.preventDefault(m);var d=document.createElement("a");d.className="geButton";f.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(B){this.actions.get("format").funct();mxEvent.consume(B)}));mxEvent.preventDefault(d);var q=mxUtils.bind(this,function(){d.style.backgroundImage=0<this.formatWidth?
+"url('"+Editor.rightPanelCloseImage+"')":"url('"+Editor.rightPanelOpenImage+"')"});this.addListener("formatWidthChanged",q);q();var x=document.createElement("a");x.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')";x.className="geButton";"1"!=urlParams.embed&&"atlas"!=Editor.currentTheme&&(f.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(B){this.setCompactMode(!this.compactMode,!0,Editor.transitionDelay);mxEvent.consume(B)})),
mxEvent.preventDefault(x),!mxClient.IS_FF&&740>=screen.height&&"undefined"!==typeof x.click&&window.setTimeout(mxUtils.bind(this,function(){x.click()}),0),this.addListener("compactModeChanged",mxUtils.bind(this,function(){x.style.backgroundImage="url('"+(this.compactMode?Editor.chevronDownImage:Editor.chevronUpImage)+"')"})));this.dependsOnLanguage(mxUtils.bind(this,function(){this.fname.setAttribute("title",mxResources.get("rename"));m.setAttribute("title",mxResources.get("fullscreen"));x.setAttribute("title",
mxResources.get("collapseExpand"));d.setAttribute("title",mxResources.get("format")+" ("+Editor.ctrlKey+"+Shift+P)")}))}};
App.prototype.setCompactMode=function(b,f,m){var d=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container;m=null!=m?m:0;window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition","all "+m+"s ease-in-out");mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition","all "+m+"s ease-in-out");b?d.classList.add("geCompactMode"):d.classList.remove("geCompactMode");window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(this.menubarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.toolbarContainer.style,"transition",null);this.compactMode=b;this.refresh(!0);this.fireEvent(new mxEventObject("compactModeChanged"));isLocalStorage&&f&&(mxSettings.settings.compactMode=this.compactMode,mxSettings.save())}),1E3*m)}),0)};
App.prototype.getMainUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());return b};
App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
-App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(C){mxEvent.isConsumed(C)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
-mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var m=this.drive.getUsersList();if(0<m.length){var d=mxUtils.bind(this,function(C,y){var I=this.getCurrentFile();null!=I&&I.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
-function(){this.spinner.stop();C()}),2E3)):C()});b=mxUtils.bind(this,function(C){var y=document.createElement("tr"),I=document.createElement("td");I.setAttribute("valig","middle");I.style.height="59px";I.style.width="66px";var M=document.createElement("img");M.setAttribute("width","50");M.setAttribute("height","50");M.setAttribute("border","0");M.setAttribute("src",null!=C.pictureUrl?C.pictureUrl:Editor.userImage);M.style.borderRadius="50%";M.style.margin="4px 8px 0 8px";I.appendChild(M);y.appendChild(I);
-I=document.createElement("td");I.setAttribute("valign","middle");I.style.whiteSpace="nowrap";I.style.paddingTop="4px";I.style.maxWidth="0";I.style.overflow="hidden";I.style.textOverflow="ellipsis";mxUtils.write(I,C.displayName+(C.isCurrent&&1<m.length?" ("+mxResources.get("default")+")":""));null!=C.email&&(mxUtils.br(I),M=document.createElement("small"),M.style.color="gray",mxUtils.write(M,C.email),I.appendChild(M));M=document.createElement("div");M.style.marginTop="4px";var H=document.createElement("i");
-mxUtils.write(H,mxResources.get("googleDrive"));M.appendChild(H);I.appendChild(M);y.appendChild(I);C.isCurrent?y.setAttribute("title","User ID: "+C.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+C.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
-d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(C);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(e){this.handleError(e)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return y});f=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";for(var x=0;x<m.length;x++)q.appendChild(b(m[x]));
+App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog geInlineDialog";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(B){mxEvent.isConsumed(B)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var f=!1;this.userPanel.innerText="";b=document.createElement("div");b.className="geButton";b.setAttribute("title",
+mxResources.get("close"));b.style.backgroundImage="url("+Editor.crossImage+")";b.style.position="absolute";b.style.right="0px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var m=this.drive.getUsersList();if(0<m.length){var d=mxUtils.bind(this,function(B,y){var I=this.getCurrentFile();null!=I&&I.constructor==DriveFile?(this.spinner.spin(document.body,y),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,
+function(){this.spinner.stop();B()}),2E3)):B()});b=mxUtils.bind(this,function(B){var y=document.createElement("tr"),I=document.createElement("td");I.setAttribute("valig","middle");I.style.height="59px";I.style.width="66px";var L=document.createElement("img");L.setAttribute("width","50");L.setAttribute("height","50");L.setAttribute("border","0");L.setAttribute("src",null!=B.pictureUrl?B.pictureUrl:Editor.userImage);L.style.borderRadius="50%";L.style.margin="4px 8px 0 8px";I.appendChild(L);y.appendChild(I);
+I=document.createElement("td");I.setAttribute("valign","middle");I.style.whiteSpace="nowrap";I.style.paddingTop="4px";I.style.maxWidth="0";I.style.overflow="hidden";I.style.textOverflow="ellipsis";mxUtils.write(I,B.displayName+(B.isCurrent&&1<m.length?" ("+mxResources.get("default")+")":""));null!=B.email&&(mxUtils.br(I),L=document.createElement("small"),L.style.color="gray",mxUtils.write(L,B.email),I.appendChild(L));L=document.createElement("div");L.style.marginTop="4px";var H=document.createElement("i");
+mxUtils.write(H,mxResources.get("googleDrive"));L.appendChild(H);I.appendChild(L);y.appendChild(I);B.isCurrent?y.setAttribute("title","User ID: "+B.id):(y.setAttribute("title",mxResources.get("login")+" (User ID: "+B.id+")"),y.style.cursor="pointer",y.style.opacity="0.3",mxEvent.addListener(y,"mouseenter",mxUtils.bind(this,function(){y.style.opacity="1"})),mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(){y.style.opacity="0.3"})),mxEvent.addListener(y,"click",mxUtils.bind(this,function(c){this.hideUserPanel();
+d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(B);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(e){this.handleError(e)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(c)})));return y});f=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width="100%";q.style.padding="10px";for(var x=0;x<m.length;x++)q.appendChild(b(m[x]));
this.userPanel.appendChild(q);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";q=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));
-q.className="geBtn";q.style.float="right";b.appendChild(q);q=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var C=this.drive.createAuthWin();C.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0,C)}),mxResources.get("closingFile")+"...")}));q.className="geBtn";q.style.margin="0px";
-b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(C,y,I,M){if(null!=C){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var H=document.createElement("table");H.style.borderSpacing="0";H.style.fontSize="10pt";H.style.width="100%";H.style.padding="10px";var c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=y){var l=document.createElement("img");l.setAttribute("width",
-"40");l.setAttribute("height","40");l.setAttribute("border","0");l.setAttribute("src",y);l.style.marginRight="6px";g.appendChild(l)}e.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,C.displayName);null!=C.email&&(mxUtils.br(g),y=document.createElement("small"),y.style.color="gray",mxUtils.write(y,C.email),g.appendChild(y));null!=M&&(C=document.createElement("div"),
-C.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,M),C.appendChild(y),g.appendChild(C));e.appendChild(g);c.appendChild(e);H.appendChild(c);this.userPanel.appendChild(H);C=document.createElement("div");C.style.textAlign="center";C.style.padding="10px";C.style.whiteSpace="nowrap";null!=I&&(I=mxUtils.button(mxResources.get("signOut"),I),I.className="geBtn",C.appendChild(I));this.userPanel.appendChild(C)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
-mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==DropboxFile){var y=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var C=
-this.getCurrentFile();if(null!=C&&C.constructor==OneDriveFile){var y=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitHubFile){var y=
-mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==GitLabFile){var y=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
-""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var C=this.getCurrentFile();if(null!=C&&C.constructor==TrelloFile){var y=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});C.isModified()?this.confirm(mxResources.get("allChangesLost"),
+q.className="geBtn";q.style.float="right";b.appendChild(q);q=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var B=this.drive.createAuthWin();B.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(y){this.handleError(y)}),!0,B)}),mxResources.get("closingFile")+"...")}));q.className="geBtn";q.style.margin="0px";
+b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(B,y,I,L){if(null!=B){f&&this.userPanel.appendChild(document.createElement("hr"));f=!0;var H=document.createElement("table");H.style.borderSpacing="0";H.style.fontSize="10pt";H.style.width="100%";H.style.padding="10px";var c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=y){var l=document.createElement("img");l.setAttribute("width",
+"40");l.setAttribute("height","40");l.setAttribute("border","0");l.setAttribute("src",y);l.style.marginRight="6px";g.appendChild(l)}e.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,B.displayName);null!=B.email&&(mxUtils.br(g),y=document.createElement("small"),y.style.color="gray",mxUtils.write(y,B.email),g.appendChild(y));null!=L&&(B=document.createElement("div"),
+B.style.marginTop="4px",y=document.createElement("i"),mxUtils.write(y,L),B.appendChild(y),g.appendChild(B));e.appendChild(g);c.appendChild(e);H.appendChild(c);this.userPanel.appendChild(H);B=document.createElement("div");B.style.textAlign="center";B.style.padding="10px";B.style.whiteSpace="nowrap";null!=I&&(I=mxUtils.button(mxResources.get("signOut"),I),I.className="geBtn",B.appendChild(I));this.userPanel.appendChild(B)}});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",
+mxUtils.bind(this,function(){var B=this.getCurrentFile();if(null!=B&&B.constructor==DropboxFile){var y=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var B=
+this.getCurrentFile();if(null!=B&&B.constructor==OneDriveFile){var y=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var B=this.getCurrentFile();if(null!=B&&B.constructor==GitHubFile){var y=
+mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var B=this.getCurrentFile();if(null!=B&&B.constructor==GitLabFile){var y=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=
+""});B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var B=this.getCurrentFile();if(null!=B&&B.constructor==TrelloFile){var y=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});B.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()}else this.trello.logout()}),mxResources.get("trello"));"min"==uiTheme&&(q=this.getCurrentFile(),null!=q&&q.isRealtimeEnabled()&&q.isRealtimeSupported()&&(b=document.createElement("div"),b.style.padding="10px",b.style.whiteSpace="nowrap",b.style.borderTop="1px solid rgb(224, 224, 224)",b.style.marginTop="4px",b.style.textAlign="center",b.style.padding="10px",b.style.fontSize="9pt",x=q.getRealtimeError(),1!=q.getRealtimeState()&&
(mxUtils.write(b,mxResources.get("realtimeCollaboration")+": "+(null!=x&&null!=x.message?x.message:mxResources.get("disconnected"))),this.userPanel.appendChild(b))));document.body.appendChild(this.userPanel)}};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(m){return this.editorUi.createHelpIcon(m)};Menus.prototype.addLinkToItem=function(m,d){null!=m&&m.firstChild.nextSibling.appendChild(this.createHelpLink(d))};
Menus.prototype.removeCustomFont=function(m,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==m&&this.customFonts[q].url==d){this.customFonts.splice(q,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(m,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==m&&this.customFonts[q].url==d)return!0;for(q=0;q<this.defaultFonts.length;q++){var x=this.defaultFonts[q];
-if("string"!==typeof x&&x.fontFamily==m&&x.fontUrl==d||"string"===typeof x&&x==m&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(m,d){null==m||this.containsFont(m,d)||(this.customFonts.push({name:m,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function m(n,t,B){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
-mxUtils.bind(this,function(F,J,K,k,v,G,N,O,Q,S,V,W,X){var Z=parseInt(F);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,J&&"png"==n,K,k,v&&"png"==n,N,!O,Q,n,V,null,W,X),null!=B&&B(F,J,K,k,v,G,N,O,Q,S,V,W,X))}),!0,t,n,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(F,J,K,k,v){d.downloadFile(J&&"png"==n?"xmlpng":n,null,null,F,null,null,K,k,v)}),!1,!0)}f.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,x=mxUtils.bind(q,
-q.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));d.actions.addAction("new...",function(){var n=d.isOffline(),t=new NewDialog(d,n,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(t.container,n?350:620,n?70:460,!0,!0,function(B){null!=d.sidebar&&d.sidebar.hideTooltip();B&&null==d.getCurrentFile()&&d.showSplash()});t.init()});var C=mxUtils.bind(this,function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
-(n=new NewDialog(d,null,!1,function(t){d.hideDialog();if(null!=t){var B=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(t,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,n),d.showDialog(n.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()}),n.init())});Editor.enableChatGpt&&d.isExternalDataComms()&&"draw.io"==d.getServiceName()&&"undefined"!==
-typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(d.actions.put("generate",new Action("generate...",function(){C(!0)})).isEnabled=x);d.actions.put("insertTemplate",new Action("template...",function(){C()})).isEnabled=x;var y=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShareCursorPosition()});y=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});
+if("string"!==typeof x&&x.fontFamily==m&&x.fontUrl==d||"string"===typeof x&&x==m&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(m,d){null==m||this.containsFont(m,d)||(this.customFonts.push({name:m,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var f=Menus.prototype.init;Menus.prototype.init=function(){function m(n,t,C){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",
+mxUtils.bind(this,function(F,J,K,k,v,G,N,O,P,S,V,W,X){var Z=parseInt(F);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,J&&"png"==n,K,k,v&&"png"==n,N,!O,P,n,V,null,W,X),null!=C&&C(F,J,K,k,v,G,N,O,P,S,V,W,X))}),!0,t,n,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(F,J,K,k,v){d.downloadFile(J&&"png"==n?"xmlpng":n,null,null,F,null,null,K,k,v)}),!1,!0)}f.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,x=mxUtils.bind(q,
+q.isEnabled);"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(n){return"file"!=n}));d.actions.addAction("new...",function(){var n=d.isOffline(),t=new NewDialog(d,n,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(t.container,n?350:620,n?70:460,!0,!0,function(C){null!=d.sidebar&&d.sidebar.hideTooltip();C&&null==d.getCurrentFile()&&d.showSplash()});t.init()});var B=mxUtils.bind(this,function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
+(n=new NewDialog(d,null,!1,function(t){d.hideDialog();if(null!=t){var C=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(t,Math.max(C.x,20),Math.max(C.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"),null,null,n),d.showDialog(n.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()}),n.init())});Editor.enableChatGpt&&d.isExternalDataComms()&&"draw.io"==d.getServiceName()&&"undefined"!==
+typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(d.actions.put("generate",new Action("generate...",function(){B(!0)})).isEnabled=x);d.actions.put("insertTemplate",new Action("template...",function(){B()})).isEnabled=x;var y=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShareCursorPosition()});y=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});
y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isShowRemoteCursors()});y=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.POINTS});y=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});y=d.actions.addAction("millimeters",
function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});y=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,["points","inches","millimeters","meters"],
t);"min"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme||d.menus.addMenuItems(n,["-","pageScale"],t)})));y=d.actions.addAction("pageTabs",function(){d.setTabContainerVisible(!d.isTabContainerVisible(),!0)});y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isTabContainerVisible()});y=d.actions.addAction("ruler",function(){d.setRulerVisible(!d.isRulerVisible())});y.setEnabled(d.canvasSupported&&9!=document.documentMode);y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isRulerVisible()});
y=d.actions.addAction("fullscreen",function(){if("1"==urlParams.embedInline)d.setInlineFullscreen(!Editor.inlineFullscreen);else{var n=mxUtils.isAncestorNode(document.body,d.container)?d.container:d.editor.graph.container;null!=n&&(null==document.fullscreenElement?(document.body.requestFullscreen(),n.classList.add("geFullscreen")):(document.exitFullscreen(),n.classList.remove("geFullscreen")))}});y.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;
y.setToggleAction(!0);y.setSelectedCallback(function(){return"1"==urlParams.embedInline?Editor.inlineFullscreen:null!=document.fullscreenElement});y=d.actions.put("lightMode",new Action("light",function(n){d.setAndPersistDarkMode(!1)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&!Editor.isDarkMode()});y=d.actions.put("darkMode",new Action("dark",function(n){d.setAndPersistDarkMode(!0)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return!d.isAutoDarkMode(!0)&&
Editor.isDarkMode()});y=d.actions.put("autoMode",new Action("automatic",function(n){d.setAndPersistDarkMode("auto")}));y.setToggleAction(!0);y.setSelectedCallback(function(){return d.isAutoDarkMode(!0)});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){n=new FilePropertiesDialog(d,n);d.showDialog(n.container,340,200,!0,!0);n.init()})}).isEnabled=x;window.mxFreehand&&(d.actions.put("insertFreehand",new Action("freehand...",function(){if(q.isEnabled()){if(null==
-d.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,n?126:90,n)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(!0)}},null,null,"X")).isEnabled=function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action("formatXml...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=null==d.pages||1>=d.pages.length,B=document.createElement("h3");
-mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(B);var F=d.addCheckbox(n,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),J=d.addCheckbox(n,mxResources.get("compressed"),Editor.defaultCompressed),K=d.addCheckbox(n,mxResources.get("allPages"),!t,t);K.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")});n=
-new CustomDialog(d,n,mxUtils.bind(this,function(){d.downloadFile("xml",!J.checked,null,!F.checked,t||!K.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(n,t,B,F,J,K,k,v,G,N,O,Q){k=[];F&&G&&k.push("tags=%7B%7D");n=new EmbedDialog(d,d.createLink(n,t,!0,F,J,K,null,!0,k,null,B,null,Q));d.showDialog(n.container,
-450,240,!0,!0);n.init()},null,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showHtmlDialog(mxResources.get("export"),null,n,function(t,B,F,J,K,k,v,G,N,O,Q,S){d.createHtml(t,B,F,J,K,k,v,G,N,O,Q,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+
-V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(n,t){n=null!=d.pages?d.pages.length:1;var B=null==d.pages||1>=d.pages.length,F=d.getPageIndex(d.currentPage);F=null!=F?F+1:1;d.downloadFile("pdf",null,null,!t.selection,B||
+d.freehandWindow){var n=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,n?126:90,n)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(!0)}},null,null,"X")).isEnabled=function(){return x()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action("formatXml...",function(){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=null==d.pages||1>=d.pages.length,C=document.createElement("h3");
+mxUtils.write(C,mxResources.get("formatXml"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";n.appendChild(C);var F=d.addCheckbox(n,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),J=d.addCheckbox(n,mxResources.get("compressed"),Editor.defaultCompressed),K=d.addCheckbox(n,mxResources.get("allPages"),!t,t);K.style.marginBottom="16px";mxEvent.addListener(F,"change",function(){F.checked?K.setAttribute("disabled","disabled"):K.removeAttribute("disabled")});n=
+new CustomDialog(d,n,mxUtils.bind(this,function(){d.downloadFile("xml",!J.checked,null,!F.checked,t||!K.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action("url...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(n,t,C,F,J,K,k,v,G,N,O,P){k=[];F&&G&&k.push("tags=%7B%7D");n=new EmbedDialog(d,d.createLink(n,t,!0,F,J,K,null,!0,k,null,C,null,P));d.showDialog(n.container,
+450,240,!0,!0);n.init()},null,!0)}));d.actions.put("exportHtml",new Action("formatHtmlEmbedded...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showHtmlDialog(mxResources.get("export"),null,n,function(t,C,F,J,K,k,v,G,N,O,P,S){d.createHtml(t,C,F,J,K,k,v,G,N,O,P,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+
+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action("formatPdf...",function(){d.showPrintDialog(mxResources.get("formatPdf"),EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?mxUtils.bind(this,function(n,t){n=null!=d.pages?d.pages.length:1;var C=null==d.pages||1>=d.pages.length,F=d.getPageIndex(d.currentPage);F=null!=F?F+1:1;d.downloadFile("pdf",null,null,!t.selection,C||
!t.allPages&&t.pagesFrom==F&&t.pagesTo==F,!t.crop,t.transparent,t.scale,null,t.grid,t.includeCopy,t.allPages||t.pagesFrom==F&&t.pagesTo==F?null:{from:Math.max(0,Math.min(n-1,t.pagesFrom-1)),to:Math.max(0,Math.min(n-1,t.pagesTo-1))},t.border,t.fit,t.sheetsAcross,t.sheetsDown)}):null,mxResources.get("export"))}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function n(){null!=t&&t.removeDraft();d.fileLoaded(null)}var t=d.getCurrentFile();null!=t&&t.isModified()?
-d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var n=q.getSelectionCell(),t=q.view.getState(n);null!=t&&null!=t.shape&&null!=t.shape.stencil&&(n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?
+d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){if(1==q.getSelectionCount()){var n=q.getSelectionCell(),t=q.view.getState(n);null!=t&&null!=t.shape&&null!=t.shape.stencil&&(n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?
d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(n,t){d.spinner.stop();n=new RevisionDialog(d,n,t);d.showDialog(n.container,640,480,!0,!0);n.init()}),mxUtils.bind(this,function(n){d.handleError(null!=n?n:mxResources.get("notAvailable"))})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");y=d.actions.addAction("synchronize",
function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(y.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var n=d.getCurrentFile();null!=n&&(window.drawdata=d.getFileData(),n=null!=n.getTitle()?n.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(n),null,!0))});"undefined"!==typeof MathJax&&
(y=d.actions.addAction("mathematicalTypesetting",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.mathEnabled=!d.isMathEnabled();q.model.execute(n)}),y.setToggleAction(!0),y.setSelectedCallback(function(){return d.isMathEnabled()}),y.isEnabled=x);y=d.actions.put("defaultAdaptiveColors",new Action("defaultAdaptiveColors",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="default";q.model.execute(n)}));y.getTitle=function(){return mxResources.get("default")+
" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")"};y.setToggleAction(!0);y.setSelectedCallback(function(){return null==q.adaptiveColors});y=d.actions.put("automaticAdaptiveColors",new Action("automatic",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="auto";q.model.execute(n)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return"auto"==q.adaptiveColors});y=d.actions.put("simpleAdaptiveColors",new Action("simple",function(){var n=new ChangePageSetup(d);
n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="simple";q.model.execute(n)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return"simple"==q.adaptiveColors});y=d.actions.put("noAdaptiveColors",new Action("none",function(){var n=new ChangePageSetup(d);n.ignoreColor=!0;n.ignoreImage=!0;n.adaptiveColors="none";q.model.execute(n)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return"none"==q.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,
-["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],t)})));isLocalStorage&&(y=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var I=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});I.setToggleAction(!0);I.setSelectedCallback(function(){return I.isEnabled()&&
-d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var n=q.getSelectionCells(),t=[],B=0;B<n.length;B++)q.getModel().isVertex(n[B])&&t.push(n[B]);0<t.length&&(n=new EditGeometryDialog(d,t),d.showDialog(n.container,200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var n=q.getSelectionCell(),t=q.getCellStyle(n,!1);d.copiedStyle={};var B=[],F=[],J;for(J in t)B.push(t[J]),F.push(J);
-q.copyCellStyles([n],F,B,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action("formatSvg...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,
-function(n,t,B,F,J,K,k,v,G,N,O,Q,S,V){n=parseInt(n);d.lastExportSvgEditable=J;!isNaN(n)&&0<n&&d.exportSvg(n/100,t,B,F,J,K,k,!v,G,N,Q,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){m("png",d.lastExportPngEditable,function(n,t,B,F,J){d.lastExportPngEditable=J})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){m("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",function(){m("webp")}));y=d.actions.addAction("copyAsImage",
-mxUtils.bind(this,function(){var n=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),t=mxUtils.getXml(0==n.length?d.editor.getGraphXml():q.encodeCells(n));d.copyImage(n,t)}),null,null,"Ctrl+Alt+X");y.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;y=d.actions.put("shadowVisible",new Action("shadow",function(){q.setShadowVisible(!q.shadowVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+
-EditorUi.VERSION,function(n,t){d.isOwnDomain()&&mxEvent.isShiftDown(t)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},
-mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var n=new FeedbackDialog(d);d.showDialog(n.container,610,360,!0,!1);n.init()});d.actions.addAction("quickStart...",function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):
-d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});y=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):
-this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(y=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-
-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),y.setToggleAction(!0),y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));
-y=d.actions.addAction("findReplace",mxUtils.bind(this,function(n,t){var B=(n=q.isEnabled()&&(null==t||!mxEvent.isShiftDown(t)))?"findReplace":"find";t=B+"Window";if(null==this[t]){var F="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,J=n?F?330:300:240;this[t]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,n?F?304:288:170,n);this[t].window.addListener("show",function(){d.fireEvent(new mxEventObject(B))});this[t].window.addListener("hide",function(){d.fireEvent(new mxEventObject(B))})}this[t].window.setVisible(!0);
-this[t].focus()}),null,null,Editor.ctrlKey+"+F");y=new Action("exportVsdx",function(){var n=null==d.pages||1>=d.pages.length;if(n)d.exportVisio();else{var t=document.createElement("div");t.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(B);var F=d.addCheckbox(t,mxResources.get("allPages"),!n,n);F.style.marginBottom="16px";n=new CustomDialog(d,t,
-mxUtils.bind(this,function(){d.exportVisio(!F.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,130,!0,!0)}});y.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};d.actions.put("exportVsdx",y);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginRight="8px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;
-if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var t=document.createElement("span");t.style.display="flex";t.style.alignItems="center";t.style.cssFloat="right";t.style.cursor="pointer";t.style.userSelect="none";t.style.marginTop="-3px";t.appendChild(n);mxUtils.write(t,mxResources.get("showStartScreen"));mxEvent.addListener(t,"click",function(F){mxEvent.getSource(F)!=n&&(n.checked=!n.checked)});header=t}t=[[mxResources.get("reset"),
-function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(F){d.handleError(F)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var B=d.actions.get("plugins");null==B||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||t.push([mxResources.get("plugins"),B.funct])}EditorUi.isElectronApp||t.push([mxResources.get("link"),
-function(F,J){if(0<J.value.length)try{var K=JSON.parse(J.value),k=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),v=new EmbedDialog(d,k);d.showDialog(v.container,450,240,!0);v.init()}catch(G){d.handleError(G)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&t.push([mxResources.get("preferences"),function(){d.showLocalStorageDialog(mxResources.get("preferences")+
-":",Editor.settingsKey,[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(F){d.handleError(F)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,t,n.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),
-mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(n,t){var B=mxLanguage;null==urlParams.lang&&isLocalStorage&&(B=mxSettings.settings.language);var F=mxUtils.bind(this,function(K){var k=""==K?mxResources.get("automatic"):mxLanguageMap[K],v=null;""!=k&&(v=n.addItem(k,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(K)}),t),(K==B||""==K&&null==B)&&n.addCheckmark(v,Editor.checkmarkImage));return v});F("");n.addSeparator(t);
-for(var J in mxLanguageMap)F(J)})));d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(n){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=new AdaptiveColorsWindow(d,document.body.offsetWidth-
-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));y=this.get("viewZoom");var M=y.funct;y.funct=mxUtils.bind(this,function(n,t){M.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","outline","fullscreen"],t)});y=this.get("layout");var H=y.funct;y.funct=function(n,t){H.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var B=null,F=20,J=20,K=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&d.tryAndHandle(mxUtils.bind(this,
-function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,B,F,J),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),
-mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var N=0;N<v.length;N++){var O=document.createElement("option");mxUtils.write(O,v[N]);O.value=N;2==N&&O.setAttribute("selected","selected");G.appendChild(O)}mxEvent.addListener(G,"change",function(){B=G.value});k.appendChild(G);v=document.createElement("div");v.style.marginTop="6px";v.style.display=
-"inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var Q=document.createElement("input");Q.type="number";Q.value=F;Q.style.width="160px";Q.style.boxSizing="border-box";k.appendChild(Q);mxEvent.addListener(Q,"change",function(){F=Q.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var S=document.createElement("input");
-S.type="number";S.value=J;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){J=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(Q.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==B&&(B=2);d.loadOrgChartLayouts(K)},
-null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},t,null,x());n.addSeparator(t);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(q);B.checkOverlap=!0;d.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(F){d.tryAndHandle(mxUtils.bind(this,function(){B.spacing=F;d.executeLayout(function(){B.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),
-t);n.addSeparator(t);d.menus.addMenuItem(n,"runLayout",t,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,t){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(n,["keyboardShortcuts","-","about"],t);else{var B=n.addItem("Search:",null,null,t,null,null,!1);B.style.cursor="default";var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("size","25");F.style.borderWidth="1px";F.style.marginLeft="8px";mxEvent.addListener(F,
-"keydown",mxUtils.bind(this,function(J){var K=mxUtils.trim(F.value);13==J.keyCode&&0<K.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(K)),F.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:K}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==J.keyCode&&(F.value="")}));B.firstChild.nextSibling.appendChild(F);mxEvent.addGestureListeners(F,
-function(J){document.activeElement!=F&&F.focus();mxEvent.consume(J)},function(J){mxEvent.consume(J)},function(J){mxEvent.consume(J)});window.setTimeout(function(){F.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action("zoomIn",function(){d.desktopZoomIn()})),d.actions.put("desktopZoomOut",new Action("zoomOut",function(){d.desktopZoomOut()})),
-d.actions.put("desktopResetZoom",new Action("actualSize",function(){d.desktopResetZoom()})),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),t),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates","-"],t),this.addMenuItems(n,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),t)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),t)}"1"==urlParams.test&&(n.addSeparator(t),this.addSubmenu("testDevelop",
-n,t))})));d.actions.addAction("languageCode...",function(){var n=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(Graph.diagramLanguage=0<t.length?t:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(n.container,340,80,!0,!0);n.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,["languageCode",
-"-"],t);t=n.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},t);Graph.translateDiagram||n.addCheckmark(t,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");mxResources.parse("testCheckPages=Check Pages");
-mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var n=q.cloneCells(q.getSelectionCells()),t=q.getBoundingBoxFromGeometry(n,!0);n=q.moveCells(n,-t.x,-t.y);d.showTextDialog("Create Sidebar Entry",
-"this.addDataEntry('tag1 tag2', "+t.width+", "+t.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(n)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function n(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var t=q.isSelectionEmpty()?q.getGraphBounds():q.getBoundingBox(q.getSelectionCells()),B=q.view.translate,F=q.view.scale;q.insertVertex(q.getDefaultParent(),
-null,"",t.x/F-B.x,t.y/F-B.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;");var J=0,K=0;q.view.states.visit(function(k,v){k=!0;n(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);n(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||J++;K++});console.log("states checked",K,"invalid",J)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,
-"Paste Data:",n,function(t){if(0<t.length)try{var B=function(v){function G(ea){if(null==Y[ea]){if(Y[ea]=!0,null!=Q[ea]){for(;0<Q[ea].length;){var ca=Q[ea].pop();G(ca)}delete Q[ea]}}else mxLog.debug(N+": Visited: "+ea)}var N=v.parentNode.id,O=v.childNodes;v={};for(var Q={},S=null,V={},W=0;W<O.length;W++){var X=O[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(N+": Multiple roots: "+X.id):S=X.id:(null==Q[Z]&&(Q[Z]=[]),Q[Z].push(X.id))}else V[X.id]=
-X.id}O=Object.keys(V);0<O.length?(O=N+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(N+": Checked");var Y={};null==S?mxLog.debug(N+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",Q)))};"<"!=t.charAt(0)&&(t=Graph.decompress(t),mxLog.debug("See console for uncompressed XML"),console.log("xml",t));var F=mxUtils.parseXml(t),J=d.getPagesForNode(F.documentElement,"mxGraphModel");
-if(null!=J&&0<J.length)try{var K=d.getHashValueForPages(J);mxLog.debug("Checksum: ",K)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=F.getElementsByTagName("root");for(t=0;t<k.length;t++)B(k[t]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(n.container,620,460,!0,!0);n.init()}));var c=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var n=new TextareaDialog(d,"Diff/Sync:",
-"",function(t){var B=d.getCurrentFile();if(0<t.length&&null!=B)try{var F=JSON.parse(t);B.patch([F],null,!0,!0);d.hideDialog()}catch(J){d.handleError(J)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(t,B){c=d.getPagesForXml(d.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(c)}],["Diff",function(t,B){try{n.textarea.value=JSON.stringify(d.diffPages(c,d.pages),null,2)}catch(F){d.handleError(F)}}]]);null==c?
-(c=d.getPagesForXml(d.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(c)):n.textarea.value=JSON.stringify(d.diffPages(c,d.pages),null,2);d.showDialog(n.container,620,460,!0,!0);n.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var n=d.getCurrentFile();null!=d.pages&&null!=n?d.spinner.spin(document.body,mxResources.get("loading"))&&n.getLatestVersion(function(t){d.spinner.stop();
-var B=d.getHashValueForPages(d.pages),F=n.getCurrentRevisionId(),J=d.getHashValueForPages(t.getShadowPages()),K=t.getDescriptorChecksum(t.getDescriptor()),k=t.getCurrentRevisionId();console.log("Local File",[n],"modified",n.isModified(),"checksum",B);console.log("Remote File",[t],"rev",k==F,"desc",K==J,"checksum",J);d.alert("Checksums "+(J==B?"match":"no not match"))},function(t){console.log("Error getLatestVersion",t);d.handleError(t)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",
-mxUtils.bind(this,function(){var n=d.getCurrentFile();console.log("editorUi",d,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",d.diffPages(n.ownPages,n.theirPages));var t=n.getShadowPages();null!=t&&(console.log("Checksum shadowPages",d.getHashValueForPages(t)),console.log("diff shadowPages/ownPages",d.diffPages(t,n.ownPages)),console.log("diff ownPages/shadowPages",
-d.diffPages(n.ownPages,t)),console.log("diff theirPages/shadowPages",d.diffPages(n.theirPages,t)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(n.theirPages,n.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(n.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",
-d.diffPages(n.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(n.theirPages,d.pages)))}null!=n&&console.log("Shadow pages",[d.getXmlForPages(n.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var n=d.getCurrentFile();null!=n&&n.isRealtime()&&null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([d.diffPages(n.shadowPages,
-d.pages)])),n.ownPages=d.clonePages(d.pages),n.theirPages=d.clonePages(d.pages),n.shadowPages=d.clonePages(d.pages),null!=n.sync&&(n.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var n=q.model.cells,t=0,B=[],F=[],J;for(J in n){var K=n[J],k=q.getCurrentCellStyle(K)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,5)&&(null==B[k]&&(B[k]=(B[k]||0)+1,t++),F.push(K))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,
-F);console.log("Removed",t,"image(s) from",F.length,"cell(s): ",[F,B])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,t=q.getGraphBounds(),B=q.view.scale,F=mxUtils.createXmlDocument(),J=F.createElement("output");F.appendChild(J);F=new mxXmlCanvas2D(J);F.translate(Math.floor((1-t.x)/B),Math.floor((1-t.y)/B));F.scale(1/B);var K=
-0,k=F.save;F.save=function(){K++;k.apply(this,arguments)};var v=F.restore;F.restore=function(){K--;v.apply(this,arguments)};var G=n.drawShape;n.drawShape=function(N){mxLog.debug("entering shape",N,K);G.apply(this,arguments);mxLog.debug("leaving shape",N,K)};n.drawState(q.getView().getState(q.model.root),F);mxLog.show();mxLog.debug(mxUtils.getXml(J));mxLog.debug("stateCounter",K)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
-mxPopupMenu.prototype.zIndex-2});var e=null,g=null,l=null,p=null,u=null,z=null,E=null,D=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=e?(q.view.revalidate=e,e=null):(e=q.view.revalidate,q.view.revalidate=function(){var n=Date.now(),t=e.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=g?(d.selectPage=g,g=null):(g=d.selectPage,d.selectPage=function(){var n=Date.now(),t=g.apply(this,
-arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=l?(d.diffPages=l,l=null):(l=d.diffPages,d.diffPages=function(){var n=Date.now(),t=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var n=Date.now(),t=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",
-[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=u?(d.clonePages=u,u=null):(u=d.clonePages,d.clonePages=function(){var n=Date.now(),t=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=E?(d.getHashValueForPages=E,E=null):(E=d.getHashValueForPages,d.getHashValueForPages=function(){var n=Date.now(),t=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],
-"time",Date.now()-n+" ms","args",arguments);return t});null!=D?(d.resolveCrossReferences=D,D=null):(D=d.resolveCrossReferences,d.resolveCrossReferences=function(){var n=Date.now(),t=D.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=z?(d.getFileData=z,z=null):(z=d.getFileData,d.getFileData=function(){var n=Date.now(),t=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",
-[this],"time",Date.now()-n+" ms","args",arguments);return t});EditorUi.debug("[Performance]",null!=e?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),t);var B=n.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},t);null!=e&&n.addCheckmark(B,
-Editor.checkmarkImage);this.addMenuItems(n,["-","testShowConsole"],t)})))}d.actions.put("shapes",new Action("moreShapes...",function(n){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action("shape...",function(n){q.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,
-120,120),d.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())})).isEnabled=x;d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",n,function(t,B,F,J,K,k,v,G,N,O,Q,S){d.createHtml(t,B,F,J,K,k,v,G,N,O,Q,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,
-"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){try{var Z=window.open();if(null!=Z&&null!=Z.document){var Y=Z.document;"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ea=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ea&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");
-Y.close();if(!ea){var ca=Z.document.createElement("div");ca.marginLeft="26px";ca.marginTop="26px";mxUtils.write(ca,mxResources.get("updatingDocument"));var ka=Z.document.createElement("img");ka.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ka.style.marginLeft="6px";ca.appendChild(ka);Z.document.body.insertBefore(ca,Z.document.body.firstChild);window.setTimeout(function(){var ba=document.createElement("script");ba.type="text/javascript";ba.src=
-/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ba);ca.parentNode.removeChild(ca)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ba){d.handleError(ba)}});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.getPublicUrl(n,function(t){null!=t?(t=new EmbedDialog(d,'<img src="'+(n.constructor!=DriveFile?t:"https://drive.google.com/uc?id="+n.getId())+'"/>'),
-d.showDialog(t.container,450,240,!0,!0),t.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action("image...",function(){d.showEmbedImageDialog(function(n,t,B,F,J,K){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(n,t,B,F,J,K,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),mxResources.get("retina"),
-d.isExportToCanvas())}));d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(n,t,B,F,J,K){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(n,t,B,F,J,K,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));d.actions.put("embedIframe",
-new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){var t=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,t.height/q.view.scale))+2,null,null,null,n,d.getCurrentFile(),function(B,F,J,K,k,v,G,N,O,Q,S,V){var W=[];O&&W.push("tags=%7B%7D");B=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+N+';" src="'+d.createLink(B,F,!0,K,k,v,"public"==Q?n:null,null,W,null,J,S,V)+'"'+(S?' allowtransparency="true"':"")+
-"></iframe>");d.showDialog(B.container,450,240,!0,!0);B.init()},!0,!0)})}));d.actions.put("embedNotion",new Action("notion...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var t=document.createElement("a");t.setAttribute("href","javascript:void(0);");t.setAttribute("target","_blank");t.style.cursor="pointer";mxUtils.write(t,mxResources.get("getNotionChromeExtension"));n.appendChild(t);
-mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");mxUtils.setOpacity(t,0);window.setTimeout(function(){mxUtils.setOpacity(t,100)},300);mxEvent.addListener(t,"click",function(B){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});d.getPublicUrl(d.getCurrentFile(),function(B){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",n,B,d.getCurrentFile(),function(F,
-J,K,k,v,G,N,O,Q,S,V,W){N=["border=0"];Q&&N.push("tags=%7B%7D");F=new EmbedDialog(d,d.createLink(F,J,!0,k,v,G,"public"==S?B:null,null,N,null,K,null,W));d.showDialog(F.container,450,240,!0,!0);F.init()},null,!0)})}));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showPublishLinkDialog(null,null,null,null,null,null,n,d.getCurrentFile(),function(t,B,F,J,K,k,v,G,N,O,Q,S){v=[];J&&N&&v.push("tags=%7B%7D");t=new EmbedDialog(d,d.createLink(t,B,!0,
+["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],t)})));isLocalStorage&&(y=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());urlParams.splash=mxSettings.getShowStartScreen()?"1":"0";mxSettings.save()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var I=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});
+I.setToggleAction(!0);I.setSelectedCallback(function(){return I.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var n=q.getSelectionCells(),t=[],C=0;C<n.length;C++)q.getModel().isVertex(n[C])&&t.push(n[C]);0<t.length&&(n=new EditGeometryDialog(d,t),d.showDialog(n.container,200,270,!0,!0),n.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var n=q.getSelectionCell(),t=q.getCellStyle(n,
+!1);d.copiedStyle={};var C=[],F=[],J;for(J in t)C.push(t[J]),F.push(J);q.copyCellStyles([n],F,C,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action("formatSvg...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),
+"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(n,t,C,F,J,K,k,v,G,N,O,P,S,V){n=parseInt(n);d.lastExportSvgEditable=J;!isNaN(n)&&0<n&&d.exportSvg(n/100,t,C,F,J,K,k,!v,G,N,P,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action("formatPng...",function(){m("png",d.lastExportPngEditable,function(n,t,C,F,J){d.lastExportPngEditable=J})}));d.actions.put("exportJpg",new Action("formatJpg...",function(){m("jpeg")}));d.actions.put("exportWebp",new Action("formatWebp...",
+function(){m("webp")}));y=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var n=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),t=mxUtils.getXml(0==n.length?d.editor.getGraphXml():q.encodeCells(n));d.copyImage(n,t)}),null,null,"Ctrl+Alt+X");y.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;y=d.actions.put("shadowVisible",new Action("shadow",function(){q.setShadowVisible(!q.shadowVisible)}));y.setToggleAction(!0);y.setSelectedCallback(function(){return q.shadowVisible});
+d.actions.put("about",new Action("v"+EditorUi.VERSION,function(n,t){d.isOwnDomain()&&mxEvent.isShiftDown(t)&&("1"==urlParams.test?(EditorUi.debug("Debug output disabled"),urlParams.test="0"):(urlParams.test="1",EditorUi.debug("Debug output enabled")))}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",
+function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var n=new FeedbackDialog(d);d.showDialog(n.container,610,360,!0,!1);n.init()});d.actions.addAction("quickStart...",
+function(){"ac.draw.io"===window.location.hostname?d.openLink("https://www.youtube.com/watch?v=s5BG0705MHU"):d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});y=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),
+this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+K");y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));null==Editor.gptApiKey||null==Editor.gptModel||null==Editor.gptUrl||d.isOffline()||EditorUi.isElectronApp||(y=d.actions.addAction("chatWindowTitle",mxUtils.bind(this,function(){null==
+this.chatWindow?(this.chatWindow=new ChatWindow(d,220,document.body.offsetHeight-380,250,320),this.chatWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("chat"))})),this.chatWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("chat"))}),this.chatWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("chat"))):this.chatWindow.window.setVisible(!this.chatWindow.window.isVisible())})),y.setToggleAction(!0),y.setSelectedCallback(mxUtils.bind(this,
+function(){return null!=this.chatWindow&&this.chatWindow.window.isVisible()})));y=d.actions.addAction("findReplace",mxUtils.bind(this,function(n,t){var C=(n=q.isEnabled()&&(null==t||!mxEvent.isShiftDown(t)))?"findReplace":"find";t=C+"Window";if(null==this[t]){var F="min"==Editor.currentTheme||"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme,J=n?F?330:300:240;this[t]=new FindWindow(d,document.body.offsetWidth-(J+20),100,J,n?F?304:288:170,n);this[t].window.addListener("show",function(){d.fireEvent(new mxEventObject(C))});
+this[t].window.addListener("hide",function(){d.fireEvent(new mxEventObject(C))})}this[t].window.setVisible(!0);this[t].focus()}),null,null,Editor.ctrlKey+"+F");y=new Action("exportVsdx",function(){var n=null==d.pages||1>=d.pages.length;if(n)d.exportVisio();else{var t=document.createElement("div");t.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("formatVsdx"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(C);
+var F=d.addCheckbox(t,mxResources.get("allPages"),!n,n);F.style.marginBottom="16px";n=new CustomDialog(d,t,mxUtils.bind(this,function(){d.exportVisio(!F.checked)}),null,mxResources.get("export"));d.showDialog(n.container,300,130,!0,!0)}});y.getTitle=function(){return mxResources.get("formatVsdx")+" (beta)..."};d.actions.put("exportVsdx",y);isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",function(){var n=document.createElement("input");n.setAttribute("type",
+"checkbox");n.style.marginRight="8px";n.checked=mxSettings.getShowStartScreen();n.defaultChecked=n.checked;if(Editor.isSettingsEnabled()&&("sketch"==Editor.currentTheme||"simple"==Editor.currentTheme||"min"==Editor.currentTheme)){var t=document.createElement("span");t.style.display="flex";t.style.alignItems="center";t.style.cssFloat="right";t.style.cursor="pointer";t.style.userSelect="none";t.style.marginTop="-3px";t.appendChild(n);mxUtils.write(t,mxResources.get("showStartScreen"));mxEvent.addListener(t,
+"click",function(F){mxEvent.getSource(F)!=n&&(n.checked=!n.checked)});header=t}t=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(F){d.handleError(F)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var C=d.actions.get("plugins");null==C||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||
+t.push([mxResources.get("plugins"),C.funct])}EditorUi.isElectronApp||t.push([mxResources.get("link"),function(F,J){if(0<J.value.length)try{var K=JSON.parse(J.value),k=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(K)),v=new EmbedDialog(d,k);d.showDialog(v.container,450,240,!0);v.init()}catch(G){d.handleError(G)}else d.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=d.getServiceName()&&"1"!=urlParams.embed&&t.push([mxResources.get("preferences"),
+function(){d.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(F){d.handleError(F)}})}]])}]);d.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,t,n.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",
+function(){null!=n.parentNode&&(mxSettings.setShowStartScreen(n.checked),mxSettings.save())})});(mxClient.IS_CHROMEAPP||isLocalStorage)&&this.put("language",new Menu(mxUtils.bind(this,function(n,t){var C=mxLanguage;null==urlParams.lang&&isLocalStorage&&(C=mxSettings.settings.language);var F=mxUtils.bind(this,function(K){var k=""==K?mxResources.get("automatic"):mxLanguageMap[K],v=null;""!=k&&(v=n.addItem(k,null,mxUtils.bind(this,function(){d.setAndPersistLanguage(K)}),t),(K==C||""==K&&null==C)&&n.addCheckmark(v,
+Editor.checkmarkImage));return v});F("");n.addSeparator(t);for(var J in mxLanguageMap)F(J)})));d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];d.actions.addAction("runLayout",function(){d.showCustomLayoutDialog(JSON.stringify(d.customLayoutConfig,null,2))});d.actions.put("adaptiveColors",new Action("adaptiveColors",function(n){null==d.adaptiveColorsWindow&&(d.adaptiveColorsWindow=
+new AdaptiveColorsWindow(d,document.body.offsetWidth-520,80,200,160));d.adaptiveColorsWindow.window.setVisible(!0)}));y=this.get("viewZoom");var L=y.funct;y.funct=mxUtils.bind(this,function(n,t){L.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","outline","fullscreen"],t)});y=this.get("layout");var H=y.funct;y.funct=function(n,t){H.apply(this,arguments);n.addItem(mxResources.get("orgChart"),null,function(){var C=null,F=20,J=20,K=function(){"undefined"!==
+typeof mxOrgChartLayout&&null!=C&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,C,F,J),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width=
+"160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var N=0;N<v.length;N++){var O=document.createElement("option");mxUtils.write(O,v[N]);O.value=N;2==N&&O.setAttribute("selected","selected");G.appendChild(O)}mxEvent.addListener(G,"change",function(){C=G.value});k.appendChild(G);v=
+document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var P=document.createElement("input");P.type="number";P.value=F;P.style.width="160px";P.style.boxSizing="border-box";k.appendChild(P);mxEvent.addListener(P,"change",function(){F=P.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+
+": ");k.appendChild(v);var S=document.createElement("input");S.type="number";S.value=J;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){J=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";
+k=new CustomDialog(d,k,function(){null==C&&(C=2);d.loadOrgChartLayouts(K)},null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},t,null,x());n.addSeparator(t);n.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var C=new mxParallelEdgeLayout(q);C.checkOverlap=!0;d.prompt(mxResources.get("spacing"),C.spacing,mxUtils.bind(this,function(F){d.tryAndHandle(mxUtils.bind(this,function(){C.spacing=F;d.executeLayout(function(){C.execute(q.getDefaultParent(),
+q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),t);n.addSeparator(t);d.menus.addMenuItem(n,"runLayout",t,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(n,t){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(n,["keyboardShortcuts","-","about"],t);else{var C=n.addItem("Search:",null,null,t,null,null,!1);C.style.cursor="default";var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("size","25");F.style.borderWidth=
+"1px";F.style.marginLeft="8px";mxEvent.addListener(F,"keydown",mxUtils.bind(this,function(J){var K=mxUtils.trim(F.value);13==J.keyCode&&0<K.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(K)),F.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:K}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==J.keyCode&&(F.value="")}));
+C.firstChild.nextSibling.appendChild(F);mxEvent.addGestureListeners(F,function(J){document.activeElement!=F&&F.focus();mxEvent.consume(J)},function(J){mxEvent.consume(J)},function(J){mxEvent.consume(J)});window.setTimeout(function(){F.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.drawio.com")}),d.actions.addAction("check4Updates",function(){d.checkForUpdates()}),d.actions.put("desktopZoomIn",new Action("zoomIn",function(){d.desktopZoomIn()})),
+d.actions.put("desktopZoomOut",new Action("zoomOut",function(){d.desktopZoomOut()})),d.actions.put("desktopResetZoom",new Action("actualSize",function(){d.desktopResetZoom()})),this.addMenuItems(n,"- keyboardShortcuts quickStart website support -".split(" "),t),"1"!=urlParams.disableUpdate&&this.addMenuItems(n,["check4Updates","-"],t),this.addMenuItems(n,"desktopResetZoom desktopZoomIn desktopZoomOut - openDevTools - about".split(" "),t)):this.addMenuItems(n,"- keyboardShortcuts quickStart support - about".split(" "),
+t)}"1"==urlParams.test&&(n.addSeparator(t),this.addSubmenu("testDevelop",n,t))})));d.actions.addAction("languageCode...",function(){var n=new FilenameDialog(d,Graph.diagramLanguage||"",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(Graph.diagramLanguage=0<t.length?t:null,Graph.translateDiagram=!0,q.refresh())}),mxResources.get("languageCode"),null,null,"https://www.drawio.com/blog/translate-diagrams");d.showDialog(n.container,340,80,!0,!0);n.init()});this.put("diagramLanguage",new Menu(mxUtils.bind(this,
+function(n,t){this.addMenuItems(n,["languageCode","-"],t);t=n.addItem(mxResources.get("disabled"),null,function(){Graph.translateDiagram=!1;q.refresh()},t);Graph.translateDiagram||n.addCheckmark(t,Editor.checkmarkImage)})));if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testChecksum=Checksum");
+mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var n=q.cloneCells(q.getSelectionCells()),t=q.getBoundingBoxFromGeometry(n,
+!0);n=q.moveCells(n,-t.x,-t.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+t.width+", "+t.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(n)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function n(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var t=q.isSelectionEmpty()?q.getGraphBounds():q.getBoundingBox(q.getSelectionCells()),
+C=q.view.translate,F=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",t.x/F-C.x,t.y/F-C.y,t.width/F,t.height/F,"fillColor=none;strokeColor=red;");var J=0,K=0;q.view.states.visit(function(k,v){k=!0;n(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);n(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||J++;K++});console.log("states checked",K,"invalid",J)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var n=null!=d.pages&&null!=d.getCurrentFile()?
+d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";n=new TextareaDialog(d,"Paste Data:",n,function(t){if(0<t.length)try{var C=function(v){function G(ea){if(null==Y[ea]){if(Y[ea]=!0,null!=P[ea]){for(;0<P[ea].length;){var ca=P[ea].pop();G(ca)}delete P[ea]}}else mxLog.debug(N+": Visited: "+ea)}var N=v.parentNode.id,O=v.childNodes;v={};for(var P={},S=null,V={},W=0;W<O.length;W++){var X=O[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?
+mxLog.debug(N+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else V[X.id]=X.id}O=Object.keys(V);0<O.length?(O=N+": "+O.length+" Duplicates: "+O.join(", "),mxLog.debug(O+" (see console)")):mxLog.debug(N+": Checked");var Y={};null==S?mxLog.debug(N+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(N+": Invalid tree: (see console)"),console.log(N+": Invalid tree",P)))};"<"!=t.charAt(0)&&(t=Graph.decompress(t),mxLog.debug("See console for uncompressed XML"),
+console.log("xml",t));var F=mxUtils.parseXml(t),J=d.getPagesForNode(F.documentElement,"mxGraphModel");if(null!=J&&0<J.length)try{var K=d.getHashValueForPages(J);mxLog.debug("Checksum: ",K)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=F.getElementsByTagName("root");for(t=0;t<k.length;t++)C(k[t]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(n.container,620,460,!0,!0);n.init()}));var c=null;d.actions.addAction("testDiff",
+mxUtils.bind(this,function(){if(null!=d.pages){var n=new TextareaDialog(d,"Diff/Sync:","",function(t){var C=d.getCurrentFile();if(0<t.length&&null!=C)try{var F=JSON.parse(t);C.patch([F],null,!0,!0);d.hideDialog()}catch(J){d.handleError(J)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(t,C){c=d.getPagesForXml(d.getFileData(!0));n.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(c)}],["Diff",function(t,C){try{n.textarea.value=
+JSON.stringify(d.diffPages(c,d.pages),null,2)}catch(F){d.handleError(F)}}]]);null==c?(c=d.getPagesForXml(d.getFileData(!0)),n.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(c)):n.textarea.value=JSON.stringify(d.diffPages(c,d.pages),null,2);d.showDialog(n.container,620,460,!0,!0);n.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var n=d.getCurrentFile();null!=d.pages&&null!=n?d.spinner.spin(document.body,
+mxResources.get("loading"))&&n.getLatestVersion(function(t){d.spinner.stop();var C=d.getHashValueForPages(d.pages),F=n.getCurrentRevisionId(),J=d.getHashValueForPages(t.getShadowPages()),K=t.getDescriptorChecksum(t.getDescriptor()),k=t.getCurrentRevisionId();console.log("Local File",[n],"modified",n.isModified(),"checksum",C);console.log("Remote File",[t],"rev",k==F,"desc",K==J,"checksum",J);d.alert("Checksums "+(J==C?"match":"no not match"))},function(t){console.log("Error getLatestVersion",t);d.handleError(t)}):
+console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",mxUtils.bind(this,function(){var n=d.getCurrentFile();console.log("editorUi",d,"file",n);if(null!=n&&n.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(n.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(n.theirPages));console.log("diff ownPages/theirPages",d.diffPages(n.ownPages,n.theirPages));var t=n.getShadowPages();null!=t&&(console.log("Checksum shadowPages",d.getHashValueForPages(t)),
+console.log("diff shadowPages/ownPages",d.diffPages(t,n.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(n.ownPages,t)),console.log("diff theirPages/shadowPages",d.diffPages(n.theirPages,t)));null!=n.sync&&null!=n.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(n.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(n.ownPages,n.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(n.theirPages,n.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",
+d.diffPages(n.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(n.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(n.theirPages,d.pages)))}null!=n&&console.log("Shadow pages",[d.getXmlForPages(n.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var n=d.getCurrentFile();null!=n&&n.isRealtime()&&
+null!=n.shadowPages&&(console.log("patching actualPages to shadowPages",n.patch([d.diffPages(n.shadowPages,d.pages)])),n.ownPages=d.clonePages(d.pages),n.theirPages=d.clonePages(d.pages),n.shadowPages=d.clonePages(d.pages),null!=n.sync&&(n.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var n=q.model.cells,t=0,C=[],F=[],J;for(J in n){var K=n[J],k=q.getCurrentCellStyle(K)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,
+5)&&(null==C[k]&&(C[k]=(C[k]||0)+1,t++),F.push(K))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,F);console.log("Removed",t,"image(s) from",F.length,"cell(s): ",[F,C])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var n=new mxImageExport,t=q.getGraphBounds(),C=q.view.scale,F=mxUtils.createXmlDocument(),J=F.createElement("output");F.appendChild(J);F=new mxXmlCanvas2D(J);
+F.translate(Math.floor((1-t.x)/C),Math.floor((1-t.y)/C));F.scale(1/C);var K=0,k=F.save;F.save=function(){K++;k.apply(this,arguments)};var v=F.restore;F.restore=function(){K--;v.apply(this,arguments)};var G=n.drawShape;n.drawShape=function(N){mxLog.debug("entering shape",N,K);G.apply(this,arguments);mxLog.debug("leaving shape",N,K)};n.drawState(q.getView().getState(q.model.root),F);mxLog.show();mxLog.debug(mxUtils.getXml(J));mxLog.debug("stateCounter",K)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
+mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});var e=null,g=null,l=null,p=null,u=null,z=null,E=null,D=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=e?(q.view.revalidate=e,e=null):(e=q.view.revalidate,q.view.revalidate=function(){var n=Date.now(),t=e.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=g?(d.selectPage=g,g=null):(g=
+d.selectPage,d.selectPage=function(){var n=Date.now(),t=g.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=l?(d.diffPages=l,l=null):(l=d.diffPages,d.diffPages=function(){var n=Date.now(),t=l.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var n=Date.now(),
+t=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=u?(d.clonePages=u,u=null):(u=d.clonePages,d.clonePages=function(){var n=Date.now(),t=u.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=E?(d.getHashValueForPages=E,E=null):(E=d.getHashValueForPages,d.getHashValueForPages=function(){var n=Date.now(),t=E.apply(this,
+arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=D?(d.resolveCrossReferences=D,D=null):(D=d.resolveCrossReferences,d.resolveCrossReferences=function(){var n=Date.now(),t=D.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-n+" ms","args",arguments);return t});null!=z?(d.getFileData=z,z=null):(z=d.getFileData,d.getFileData=function(){var n=Date.now(),
+t=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-n+" ms","args",arguments);return t});EditorUi.debug("[Performance]",null!=e?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),t);var C=n.addItem(mxResources.get("testPerformance"),
+null,function(){d.actions.get("testPerformance").funct()},t);null!=e&&n.addCheckmark(C,Editor.checkmarkImage);this.addMenuItems(n,["-","testShowConsole"],t)})))}d.actions.put("shapes",new Action("moreShapes...",function(n){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",
+new Action("shape...",function(n){q.isEnabled()&&(n=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),n.vertex=!0,n=new EditShapeDialog(d,n,mxResources.get("editShape")+":",630,400),d.showDialog(n.container,640,480,!0,!1),n.init())})).isEnabled=x;d.actions.put("embedHtml",new Action("html...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",n,function(t,C,F,J,K,k,v,G,N,O,P,S){d.createHtml(t,
+C,F,J,K,k,v,G,N,O,P,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){try{var Z=window.open();if(null!=Z&&null!=Z.document){var Y=Z.document;"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ea=mxClient.IS_IE||mxClient.IS_EDGE||
+null!=document.documentMode;ea&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ea){var ca=Z.document.createElement("div");ca.marginLeft="26px";ca.marginTop="26px";mxUtils.write(ca,mxResources.get("updatingDocument"));var ka=Z.document.createElement("img");ka.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ka.style.marginLeft="6px";ca.appendChild(ka);Z.document.body.insertBefore(ca,Z.document.body.firstChild);window.setTimeout(function(){var ba=
+document.createElement("script");ba.type="text/javascript";ba.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ba);ca.parentNode.removeChild(ca)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})}catch(ba){d.handleError(ba)}});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var n=d.getCurrentFile();null!=n&&d.getPublicUrl(n,function(t){null!=t?(t=new EmbedDialog(d,'<img src="'+(n.constructor!=
+DriveFile?t:"https://drive.google.com/uc?id="+n.getId())+'"/>'),d.showDialog(t.container,450,240,!0,!0),t.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action("image...",function(){d.showEmbedImageDialog(function(n,t,C,F,J,K){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(n,t,C,F,J,K,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();
+d.handleError(k)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action("formatSvg...",function(){d.showEmbedImageDialog(function(n,t,C,F,J,K){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(n,t,C,F,J,K,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));
+d.actions.put("embedIframe",new Action("iframe...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){var t=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,t.height/q.view.scale))+2,null,null,null,n,d.getCurrentFile(),function(C,F,J,K,k,v,G,N,O,P,S,V){var W=[];O&&W.push("tags=%7B%7D");C=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+N+';" src="'+d.createLink(C,F,!0,K,k,v,"public"==P?n:null,null,W,null,J,S,V)+'"'+(S?' allowtransparency="true"':
+"")+"></iframe>");d.showDialog(C.container,450,240,!0,!0);C.init()},!0,!0)})}));d.actions.put("embedNotion",new Action("notion...",function(){var n=document.createElement("div");n.style.position="absolute";n.style.bottom="30px";n.style.textAlign="center";n.style.width="100%";n.style.left="0px";var t=document.createElement("a");t.setAttribute("href","javascript:void(0);");t.setAttribute("target","_blank");t.style.cursor="pointer";mxUtils.write(t,mxResources.get("getNotionChromeExtension"));n.appendChild(t);
+mxUtils.setPrefixedStyle(t.style,"transition","all 1s ease");mxUtils.setOpacity(t,0);window.setTimeout(function(){mxUtils.setOpacity(t,100)},300);mxEvent.addListener(t,"click",function(C){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(C)});d.getPublicUrl(d.getCurrentFile(),function(C){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",n,C,d.getCurrentFile(),function(F,
+J,K,k,v,G,N,O,P,S,V,W){N=["border=0"];P&&N.push("tags=%7B%7D");F=new EmbedDialog(d,d.createLink(F,J,!0,k,v,G,"public"==S?C:null,null,N,null,K,null,W));d.showDialog(F.container,450,240,!0,!0);F.init()},null,!0)})}));d.actions.put("publishLink",new Action("link...",function(){d.getPublicUrl(d.getCurrentFile(),function(n){d.showPublishLinkDialog(null,null,null,null,null,null,n,d.getCurrentFile(),function(t,C,F,J,K,k,v,G,N,O,P,S){v=[];J&&N&&v.push("tags=%7B%7D");t=new EmbedDialog(d,d.createLink(t,C,!0,
J,K,k,"public"==O?n:null,null,v,null,F,null,S));d.showDialog(t.container,450,240,!0,!0);t.init()},null,!0)})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",
function(){d.getPublicUrl(d.getCurrentFile(),function(n){n=new GoogleSitesDialog(d,n);d.showDialog(n.container,420,256,!0,!0);n.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)y=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),y.setToggleAction(!0),y.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&
(y=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),y.setToggleAction(!0),y.setSelectedCallback(function(){return d.isHighContrast()}));y=d.actions.addAction("search",function(){if(null!=d.sidebar){var n=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!n);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!n,mxSettings.save())}});y.label=mxResources.get("searchShapes");y.setToggleAction(!0);y.setSelectedCallback(function(){return null!=
-d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(n){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(n){q.isEditing()&&q.stopEditing();var t="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var B=d.createLoadMessage("save");B.xml=t;!0!==
-n||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);t=JSON.stringify(B)}(window.opener||window.parent).postMessage(t,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.clearStatus());n=d.getCurrentFile();null==n||n.constructor==EmbedFile||n.constructor==LocalFile&&null==n.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label=
+d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(n){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(n){q.isEditing()&&q.stopEditing();var t="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var C=d.createLoadMessage("save");C.xml=t;!0!==
+n||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(C.exit=!0);t=JSON.stringify(C)}(window.opener||window.parent).postMessage(t,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.clearStatus());n=d.getCurrentFile();null==n||n.constructor==EmbedFile||n.constructor==LocalFile&&null==n.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label=
"1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var n=function(){d.editor.modified=!1;var t="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(t,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,n,mxResources.get("cancel"),mxResources.get("discardChanges")):n()}},
null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(n,t){d.isExportToCanvas()?(this.addMenuItems(n,["exportPng"],t),d.jpgSupported&&this.addMenuItems(n,["exportJpg"],t),d.webpSupported&&this.addMenuItems(n,["exportWebp"],t)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPng","exportJpg"],t);this.addMenuItems(n,["exportSvg","-"],t);d.isOffline()||d.printPdfExport?this.addMenuItems(n,["exportPdf"],t):d.isOffline()||
mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["exportPdf"],t);!d.vsdxExportEnabled()||mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(n,["exportVsdx"],t);this.addMenuItems(n,["-","exportHtml","exportXml","exportUrl"],t);d.isOffline()||(n.addSeparator(t),this.addMenuItem(n,"export",t).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(n,["publishLink"],
-t);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(n.addSeparator(t),d.menus.addSubmenu("embed",n,t))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(n,t){function B(K){K.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?J(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&!d.editor.isDataSvg(v.getData())&&
-(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");F(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},K==d.drive)},!0)}var F=mxUtils.bind(this,function(K,k,v){var G=q.view,N=q.getGraphBounds(),O=q.snap(Math.ceil(Math.max(0,N.x/G.scale-G.translate.x)+4*q.gridSize)),Q=q.snap(Math.ceil(Math.max(0,(N.y+N.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==K.substring(0,11)?d.loadImage(K,mxUtils.bind(this,function(S){var V=
-!0,W=mxUtils.bind(this,function(){d.resizeImage(S,K,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(K,k,O,Q,Math.round(Z*X),Math.round(Y*X),v,function(ea){d.spinner.stop();q.setSelectionCells(ea);q.scrollCellToVisible(q.getSelectionCell())})}),V)});K.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(K,k,O,Q,0,
-0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),J=mxUtils.bind(this,function(K){var k="text/xml";/\.png$/i.test(K)?k="image/png":/\.jpe?g$/i.test(K)?k="image/jpg":/\.gif$/i.test(K)?k="image/gif":/\.pdf$/i.test(K)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){B(d.drive)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){B(d.oneDrive)},t):d.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){B(d.dropbox)},t):d.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);d.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){B(d.gitHub)},t);d.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){B(d.gitLab)},t);d.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){B(d.trello)},t):d.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+t);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(n.addSeparator(t),d.menus.addSubmenu("embed",n,t))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(n,t){function C(K){K.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&K.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?J(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&!d.editor.isDataSvg(v.getData())&&
+(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");F(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},K==d.drive)},!0)}var F=mxUtils.bind(this,function(K,k,v){var G=q.view,N=q.getGraphBounds(),O=q.snap(Math.ceil(Math.max(0,N.x/G.scale-G.translate.x)+4*q.gridSize)),P=q.snap(Math.ceil(Math.max(0,(N.y+N.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==K.substring(0,11)?d.loadImage(K,mxUtils.bind(this,function(S){var V=
+!0,W=mxUtils.bind(this,function(){d.resizeImage(S,K,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(K,k,O,P,Math.round(Z*X),Math.round(Y*X),v,function(ea){d.spinner.stop();q.setSelectionCells(ea);q.scrollCellToVisible(q.getSelectionCell())})}),V)});K.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(K,k,O,P,0,
+0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),J=mxUtils.bind(this,function(K){var k="text/xml";/\.png$/i.test(K)?k="image/png":/\.jpe?g$/i.test(K)?k="image/jpg":/\.gif$/i.test(K)?k="image/gif":/\.pdf$/i.test(K)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){C(d.drive)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+
+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){C(d.oneDrive)},t):d.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){C(d.dropbox)},t):d.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+
+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);d.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){C(d.gitHub)},t);d.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){C(d.gitLab)},t);d.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){C(d.trello)},t):d.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
"...)",null,function(){},t,null,!1);n.addSeparator(t);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},t);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},t);d.isOffline()||(n.addSeparator(t),n.addItem(mxResources.get("url")+"...",null,function(){var K=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var v=
-/(\.png)($|\?)/i.test(k)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(k),function(G){F(G,v,k)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==v)}},mxResources.get("url"));d.showDialog(K.container,300,80,!0,!0);K.init()},t))}))).isEnabled=x;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(n,t){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
-(750>B&&this.addSubmenu("viewZoom",n,t,mxResources.get("zoom")),460>B&&d.isPageMenuVisible()&&this.addSubmenu("pages",n,t),320>B&&this.addSubmenu("insert",n,t),360>B&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",n,t))})));this.put("appearance",new Menu(mxUtils.bind(this,function(n,t){if(d.isAutoDarkModeSupported()){var B=d.menus.addMenuItem(n,"autoMode",t);null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+
-")")}this.addMenuItems(n,["lightMode","darkMode","-"],t);B=d.menus.addMenuItem(n,"highContrast",t);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(n){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(n)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});
-this.put("theme",new Menu(mxUtils.bind(this,function(n,t){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),F=n.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},t),J=n.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme("kennedy")},t),K=!1;if("kennedy"==B||"dark"==B)n.addCheckmark(J,Editor.checkmarkImage),K=!0;for(var k=0;k<Editor.themes.length;k++)mxUtils.bind(this,function(v){J=n.addItem(mxResources.get("min"==v?"minimal":v),null,function(){d.setCurrentTheme(v)},
-t);B==v&&(n.addCheckmark(J,Editor.checkmarkImage),K=!0);"simple"==v&&n.addSeparator(t)})(Editor.themes[k]);K||n.addCheckmark(F,Editor.checkmarkImage)})));y=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(B,F){n.invalidFileHandle=null;n.fileHandle=B;n.title=F.name;n.desc=F;d.save(F.name)}),null,d.createFileSystemOptions(n.getTitle()));
-else{var t=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;t=new FilenameDialog(this.editorUi,t,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=n&&B!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&n.rename(B,mxUtils.bind(this,function(F){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(F){this.editorUi.handleError(F,null!=F?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==
-StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(t.container,340,100,!0,!0);t.init()}}));y.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};y.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=d.getCurrentFile();
-if(null!=n){var t=d.getCopyFilename(n);n.constructor==DriveFile?(t=new CreateDialog(d,t,mxUtils.bind(this,function(B,F){"_blank"==F?d.editor.editAsNew(d.getFileData(),B):("download"==F&&(F=App.MODE_GOOGLE),null!=B&&0<B.length&&(F==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&n.saveAs(B,mxUtils.bind(this,function(J){n.desc=J;n.save(!1,mxUtils.bind(this,function(){d.spinner.stop();n.setModified(!1);d.updateStatus(mxUtils.bind(this,function(){n.addAllSavedStatus()}))}),mxUtils.bind(this,
-function(K){d.handleError(K)}))}),mxUtils.bind(this,function(J){d.handleError(J)})):d.createFile(B,d.getFileData(!0),null,F)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(t.container,420,380,!0,!0),t.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),t)}}));y=new Action("openFolder",function(n,t){n=d.getCurrentFile();null!=n&&d.openLink(n.getFolderUrl())});
-y.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};d.actions.put("openFolder",y);d.actions.addAction("openFile...",mxUtils.bind(this,function(){var n=d.getCurrentFile();null!=n&&d.openLink(n.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var t=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var B=0;B<n.desc.parents.length;B++)if(n.desc.parents[B].isRoot){t=
+/(\.png)($|\?)/i.test(k)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(k),function(G){F(G,v,k)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==v)}},mxResources.get("url"));d.showDialog(K.container,300,80,!0,!0);K.init()},t))}))).isEnabled=x;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(n,t){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
+(750>C&&this.addSubmenu("viewZoom",n,t,mxResources.get("zoom")),460>C&&d.isPageMenuVisible()&&this.addSubmenu("pages",n,t),320>C&&this.addSubmenu("insert",n,t),360>C&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",n,t))})));this.put("appearance",new Menu(mxUtils.bind(this,function(n,t){if(d.isAutoDarkModeSupported()){var C=d.menus.addMenuItem(n,"autoMode",t);null!=C&&C.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+
+")")}this.addMenuItems(n,["lightMode","darkMode","-"],t);C=d.menus.addMenuItem(n,"highContrast",t);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(C,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(n){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(n)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});
+this.put("theme",new Menu(mxUtils.bind(this,function(n,t){var C="1"==urlParams.sketch?"sketch":mxSettings.getUi(),F=n.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},t),J=n.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme("kennedy")},t),K=!1;if("kennedy"==C||"dark"==C)n.addCheckmark(J,Editor.checkmarkImage),K=!0;for(var k=0;k<Editor.themes.length;k++)mxUtils.bind(this,function(v){J=n.addItem(mxResources.get("min"==v?"minimal":v),null,function(){d.setCurrentTheme(v)},
+t);C==v&&(n.addCheckmark(J,Editor.checkmarkImage),K=!0);"simple"==v&&n.addSeparator(t)})(Editor.themes[k]);K||n.addCheckmark(F,Editor.checkmarkImage)})));y=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var n=this.editorUi.getCurrentFile();if(null!=n)if(n.constructor==LocalFile&&null!=n.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(C,F){n.invalidFileHandle=null;n.fileHandle=C;n.title=F.name;n.desc=F;d.save(F.name)}),null,d.createFileSystemOptions(n.getTitle()));
+else{var t=null!=n.getTitle()?n.getTitle():this.editorUi.defaultFilename;t=new FilenameDialog(this.editorUi,t,mxResources.get("rename"),mxUtils.bind(this,function(C){null!=C&&0<C.length&&null!=n&&C!=n.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&n.rename(C,mxUtils.bind(this,function(F){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(F){this.editorUi.handleError(F,null!=F?mxResources.get("errorRenamingFile"):null)}))}),n.constructor==DriveFile||n.constructor==
+StorageFile?mxResources.get("diagramName"):null,function(C){if(null!=C&&0<C.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(t.container,340,100,!0,!0);t.init()}}));y.isEnabled=function(){return this.enabled&&x.apply(this,arguments)};y.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var n=d.getCurrentFile();
+if(null!=n){var t=d.getCopyFilename(n);n.constructor==DriveFile?(t=new CreateDialog(d,t,mxUtils.bind(this,function(C,F){"_blank"==F?d.editor.editAsNew(d.getFileData(),C):("download"==F&&(F=App.MODE_GOOGLE),null!=C&&0<C.length&&(F==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&n.saveAs(C,mxUtils.bind(this,function(J){n.desc=J;n.save(!1,mxUtils.bind(this,function(){d.spinner.stop();n.setModified(!1);d.updateStatus(mxUtils.bind(this,function(){n.addAllSavedStatus()}))}),mxUtils.bind(this,
+function(K){d.handleError(K)}))}),mxUtils.bind(this,function(J){d.handleError(J)})):d.createFile(C,d.getFileData(!0),null,F)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(t.container,420,380,!0,!0),t.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),t)}}));y=new Action("openFolder",function(n,t){n=d.getCurrentFile();null!=n&&d.openLink(n.getFolderUrl())});
+y.getTitle=function(){return mxResources.get("openIt",[mxResources.get("folder")])+"..."};d.actions.put("openFolder",y);d.actions.addAction("openFile...",mxUtils.bind(this,function(){var n=d.getCurrentFile();null!=n&&d.openLink(n.getFileUrl())}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var n=d.getCurrentFile();if(n.getMode()==App.MODE_GOOGLE||n.getMode()==App.MODE_ONEDRIVE){var t=!1;if(n.getMode()==App.MODE_GOOGLE&&null!=n.desc.parents)for(var C=0;C<n.desc.parents.length;C++)if(n.desc.parents[C].isRoot){t=
!0;break}d.pickFolder(n.getMode(),mxUtils.bind(this,function(F){d.spinner.spin(document.body,mxResources.get("moving"))&&n.move(F,mxUtils.bind(this,function(J){d.spinner.stop()}),mxUtils.bind(this,function(J){d.handleError(J)}))}),null,!0,t)}}));this.put("publish",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,["publishLink"],t)})));d.actions.put("useOffline",new Action("useOffline...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,
-function(){try{var n=d.getCurrentFile();null!=n&&n.share()}catch(t){d.handleError(t)}})).isEnabled=x;this.put("embed",new Menu(mxUtils.bind(this,function(n,t){var B=d.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(n,["liveImage","-"],t);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],t);navigator.standalone||d.isOffline()||this.addMenuItems(n,["embedIframe"],t);"1"==urlParams.embed||d.isOffline()||
-this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),t)})));d.addInsertItem=function(n,t,B,F){("plantUml"!=F||EditorUi.enablePlantUml&&!d.isOffline())&&n.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==F||"formatSql"==F||"plantUml"==F||"mermaid"==F){var J=new ParseDialog(d,B,F);d.showDialog(J.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else J=new CreateGraphDialog(d,B,F),d.showDialog(J.container,620,420,!0,!1,function(K,
+function(){try{var n=d.getCurrentFile();null!=n&&n.share()}catch(t){d.handleError(t)}})).isEnabled=x;this.put("embed",new Menu(mxUtils.bind(this,function(n,t){var C=d.getCurrentFile();null==C||C.getMode()!=App.MODE_GOOGLE&&C.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(C.getTitle())||this.addMenuItems(n,["liveImage","-"],t);this.addMenuItems(n,["embedImage","embedSvg","-","embedHtml"],t);navigator.standalone||d.isOffline()||this.addMenuItems(n,["embedIframe"],t);"1"==urlParams.embed||d.isOffline()||
+this.addMenuItems(n,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),t)})));d.addInsertItem=function(n,t,C,F){("plantUml"!=F||EditorUi.enablePlantUml&&!d.isOffline())&&n.addItem(C,null,mxUtils.bind(this,function(){if("fromText"==F||"formatSql"==F||"plantUml"==F||"mermaid"==F){var J=new ParseDialog(d,C,F);d.showDialog(J.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else J=new CreateGraphDialog(d,C,F),d.showDialog(J.container,620,420,!0,!1,function(K,
k){if(k)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=J.graph&&(null!=J.graph.container.parentNode&&J.graph.container.parentNode.removeChild(J.graph.container),J.graph.destroy(),J.graph=null)});J.init()}),t,null,x())};var A=function(n){q.getModel().beginUpdate();try{n=q.addCell(n),q.fireEvent(new mxEventObject("cellsInserted","cells",[n])),q.model.isVertex(n)&&q.isAutoSizeCell(n)&&q.updateCellSize(n)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(n);q.setSelectionCell(n);
-q.container.focus();q.editAfterInsert&&q.startEditing(n);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(n))},0);return n},P=function(n,t,B,F,J){n=new mxCell(n,new mxGeometry(0,0,t,B),F);n.vertex=!0;null==J&&(J=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=J.x;n.geometry.y=J.y;return A(n)};d.actions.put("insertText",new Action("text",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(P("Text",60,
-30,q.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",q.vertexFontSize),null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=x;d.actions.put("insertRectangle",new Action("rectangle",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&P("",120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?
-null:q.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action("note",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&P("",140,160,"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;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:
-q.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action("ellipse",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&P("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action("rhombus",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&P("",80,80,"rhombus;whiteSpace=wrap;html=1;",
-null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=x;d.actions.put("insertEdge",new Action("line",function(n){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var t=q.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==n&&(n=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,t,0),
-"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");B.geometry.setTerminalPoint(n,!0);B.geometry.setTerminalPoint(new mxPoint(n.x+B.geometry.width,n.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;A(B)}},null,null,"C")).isEnabled=x;y=d.actions.put("toggleShapes",new Action("shapes",function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));y.setToggleAction(!0);
-y.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==d.sidebarWindow&&0<d.hsplitPosition}));d.addInsertMenuItems=mxUtils.bind(this,function(n,t,B){for(var F=0;F<B.length;F++)"-"==B[F]?n.addSeparator(t):d.addInsertItem(n,t,mxResources.get(B[F])+"...",B[F])});this.put("insert",new Menu(mxUtils.bind(this,function(n,t){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(n,["toggleShapes"],t),d.menus.addSubmenu("table",n,t),n.addSeparator(t),
+q.container.focus();q.editAfterInsert&&q.startEditing(n);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(n))},0);return n},Q=function(n,t,C,F,J){n=new mxCell(n,new mxGeometry(0,0,t,C),F);n.vertex=!0;null==J&&(J=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([n],!0)));n.geometry.x=J.x;n.geometry.y=J.y;return A(n)};d.actions.put("insertText",new Action("text",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(Q("Text",60,
+30,q.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",q.vertexFontSize),null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=x;d.actions.put("insertRectangle",new Action("rectangle",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&Q("",120,60,"whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?
+null:q.getInsertPoint())},null,null,"D")).isEnabled=x;d.actions.put("insertNote",new Action("note",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&Q("",140,160,"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;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:
+q.getInsertPoint())},null,null,"S")).isEnabled=x;d.actions.put("insertEllipse",new Action("ellipse",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&Q("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=x;d.actions.put("insertRhombus",new Action("rhombus",function(n){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&Q("",80,80,"rhombus;whiteSpace=wrap;html=1;",
+null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=x;d.actions.put("insertEdge",new Action("line",function(n){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var t=q.defaultEdgeLength;n=null==n||mxEvent.isControlDown(n)||mxEvent.isMetaDown(n)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==n&&(n=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([C],!0)));var C=new mxCell("",new mxGeometry(0,0,t,0),
+"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");C.geometry.setTerminalPoint(n,!0);C.geometry.setTerminalPoint(new mxPoint(n.x+C.geometry.width,n.y),!1);C.geometry.points=[];C.geometry.relative=!0;C.edge=!0;A(C)}},null,null,"C")).isEnabled=x;y=d.actions.put("toggleShapes",new Action("shapes",function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));y.setToggleAction(!0);
+y.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==d.sidebarWindow&&0<d.hsplitPosition}));d.addInsertMenuItems=mxUtils.bind(this,function(n,t,C){for(var F=0;F<C.length;F++)"-"==C[F]?n.addSeparator(t):d.addInsertItem(n,t,mxResources.get(C[F])+"...",C[F])});this.put("insert",new Menu(mxUtils.bind(this,function(n,t){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(n,["toggleShapes"],t),d.menus.addSubmenu("table",n,t),n.addSeparator(t),
d.menus.addMenuItems(n,["insertImage","insertLink","-"],t),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(n,["insertTemplate"],t),d.menus.addMenuItems(n,["generate"],t),window.isMermaidEnabled&&d.addInsertMenuItems(n,t,["mermaid"]),n.addSeparator(t),d.menus.addSubmenu("insertAdvanced",n,t,mxResources.get("advanced")),d.menus.addSubmenu("layout",n,t)):(this.addMenuItems(n,"insertRectangle insertEllipse insertRhombus - insertEdge insertNote - insertText insertLink - createShape insertFreehand - insertImage".split(" "),
t),window.isMermaidEnabled&&d.addInsertMenuItems(n,t,["mermaid"]),d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(n,["-","insertTemplate"],t),d.menus.addMenuItems(n,["generate","-"],t),"min"==uiTheme||"simple"==Editor.currentTheme?(this.addSubmenu("layout",n,t),this.addSubmenu("insertLayout",n,t,mxResources.get("insert")),n.addSeparator(t),this.addSubmenu("table",n,t)):this.addSubmenu("insertLayout",n,t,mxResources.get("layout")),this.addSubmenu("insertAdvanced",n,t,mxResources.get("advanced")))})));
this.put("table",new Menu(mxUtils.bind(this,function(n,t){d.menus.addInsertTableCellItem(n,t)})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(n,t){d.addInsertMenuItems(n,t,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(n,t){d.addInsertMenuItems(n,t,["fromText","plantUml","formatSql"]);n.addItem(mxResources.get("csv")+"...",null,function(){q.popupMenuHandler.hideMenu();
-d.showImportCsvDialog()},t,null,x());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","createShape","editDiagram"],t)})));this.put("openRecent",new Menu(function(n,t){var B=d.getRecent();if(null!=B){for(var F=0;F<B.length;F++)(function(J){var K=J.mode;K==App.MODE_GOOGLE?K="googleDrive":K==App.MODE_ONEDRIVE&&(K="oneDrive");n.addItem(J.title+" ("+mxResources.get(K)+")",null,function(){d.loadFile(J.id)},t)})(B[F]);n.addSeparator(t)}n.addItem(mxResources.get("reset"),
+d.showImportCsvDialog()},t,null,x());"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(n,["-","createShape","editDiagram"],t)})));this.put("openRecent",new Menu(function(n,t){var C=d.getRecent();if(null!=C){for(var F=0;F<C.length;F++)(function(J){var K=J.mode;K==App.MODE_GOOGLE?K="googleDrive":K==App.MODE_ONEDRIVE&&(K="oneDrive");n.addItem(J.title+" ("+mxResources.get(K)+")",null,function(){d.loadFile(J.id)},t)})(C[F]);n.addSeparator(t)}n.addItem(mxResources.get("reset"),
null,function(){d.resetRecent()},t)}));this.put("openFrom",new Menu(function(n,t){null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},t):d.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+
" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},t):d.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);d.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},t);d.isModeReady(App.MODE_GITLAB)&&
n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},t);d.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},t):d.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},t);"1"!=
-urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},t);d.isOffline()||(n.addSeparator(t),n.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(F){null!=F&&0<F.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(F):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(F)))},
-mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},t))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(n,t){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1));
+urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},t);d.isOffline()||(n.addSeparator(t),n.addItem(mxResources.get("url")+"...",null,function(){var C=new FilenameDialog(d,"",mxResources.get("open"),function(F){null!=F&&0<F.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(F):window.geOpenWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(F)))},
+mxResources.get("url"));d.showDialog(C.container,300,80,!0,!0);C.init()},t))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(n,t){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1));
d.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},t):d.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},t):d.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);d.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},t);d.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},t);d.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,
null,null,null,App.MODE_TRELLO)},t):d.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},t);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},t);"1"==
urlParams.confLib&&n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showLibraryDialog(null,null,null,null,"CONF_LIB")},t)})),this.put("openLibraryFrom",new Menu(function(n,t){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?n.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},t):d.isModeEnabled(App.MODE_GOOGLE)&&n.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},
t,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?n.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},t):d.isModeEnabled(App.MODE_ONEDRIVE)&&n.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},t,null,!1);d.isModeReady(App.MODE_DROPBOX)?n.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},t):d.isModeEnabled(App.MODE_DROPBOX)&&n.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
"...)",null,function(){},t,null,!1);n.addSeparator(t);d.isModeReady(App.MODE_GITHUB)&&n.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},t);d.isModeReady(App.MODE_GITLAB)&&n.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},t);d.isModeReady(App.MODE_TRELLO)?n.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},t):d.isModeEnabled(App.MODE_TRELLO)&&n.addItem(mxResources.get("trello")+" ("+
-mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},t);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},t);d.isOffline()||(n.addSeparator(t),n.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(d,"",mxResources.get("open"),function(F){if(null!=F&&
+mxResources.get("loading")+"...)",null,function(){},t,null,!1);n.addSeparator(t);isLocalStorage&&"0"!=urlParams.browser&&n.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},t);"1"!=urlParams.noDevice&&n.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},t);d.isOffline()||(n.addSeparator(t),n.addItem(mxResources.get("url")+"...",null,function(){var C=new FilenameDialog(d,"",mxResources.get("open"),function(F){if(null!=F&&
0<F.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var J=F;d.editor.isCorsEnabledForUrl(F)||(J=PROXY_URL+"?url="+encodeURIComponent(F));mxUtils.get(J,function(K){if(200<=K.getStatus()&&299>=K.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(d,K.getText(),F)),d.showSidebar()}catch(k){d.handleError(k,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},
-mxResources.get("url"));d.showDialog(B.container,300,80,!0,!0);B.init()},t));"1"==urlParams.confLib&&(n.addSeparator(t),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},t))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+mxResources.get("url"));d.showDialog(C.container,300,80,!0,!0);C.init()},t));"1"==urlParams.confLib&&(n.addSeparator(t),n.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},t))})));this.put("edit",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
y=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var n=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(n,t){var B=
-d.getCurrentFile();d.menus.addMenuItems(n,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),t);d.commentsSupported()&&d.menus.addMenuItems(n,["-","comments"],t);null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&d.menus.addMenuItems(n,["-","showRemoteCursors","shareCursor"],t);d.menus.addMenuItems(n,["-","fullscreen"],t)};this.put("view",new Menu(mxUtils.bind(this,function(n,t){if("simple"==Editor.currentTheme){var B=d.getCurrentFile();d.menus.addMenuItems(n,
+this.commentsWindow.window.setVisible(n);this.commentsWindow.refreshCommentsTime();n&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));y.setToggleAction(!0);y.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));this.get("viewPanels").funct=function(n,t){var C=
+d.getCurrentFile();d.menus.addMenuItems(n,"toggleShapes format ruler - findReplace layers tags chatWindowTitle outline -".split(" "),t);d.commentsSupported()&&d.menus.addMenuItems(n,["-","comments"],t);null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&d.menus.addMenuItems(n,["-","showRemoteCursors","shareCursor"],t);d.menus.addMenuItems(n,["-","fullscreen"],t)};this.put("view",new Menu(mxUtils.bind(this,function(n,t){if("simple"==Editor.currentTheme){var C=d.getCurrentFile();d.menus.addMenuItems(n,
["toggleShapes","format"],t);d.isPageMenuVisible()&&d.menus.addMenuItems(n,["pageTabs"],t);d.menus.addMenuItems(n,["ruler","-","search"],t);if(isLocalStorage||mxClient.IS_CHROMEAPP){var F=d.menus.addMenuItem(n,"scratchpad",t);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(F,"https://www.drawio.com/doc/faq/scratchpad")}d.menus.addMenuItems(n,"- findReplace layers tags chatWindowTitle outline -".split(" "),t);d.commentsSupported()&&d.menus.addMenuItems(n,["comments"],
-t);null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],t);this.addMenuItems(n,["-","fullscreen"],t)}else{this.addMenuItems(n,["format","outline","layers","tags","chatWindowTitle"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],t);if(isLocalStorage||mxClient.IS_CHROMEAPP)F=this.addMenuItem(n,"scratchpad",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/scratchpad");
+t);null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],t);this.addMenuItems(n,["-","fullscreen"],t)}else{this.addMenuItems(n,["format","outline","layers","tags","chatWindowTitle"].concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(n,["-","search"],t);if(isLocalStorage||mxClient.IS_CHROMEAPP)F=this.addMenuItem(n,"scratchpad",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/scratchpad");
this.addMenuItems(n,["toggleShapes","-","pageView","pageScale"]);this.addSubmenu("units",n,t);n.addSeparator(t);d.isPageMenuVisible()&&d.menus.addMenuItems(n,["pageTabs"],t);this.addMenuItems(n,"ruler - tooltips animations - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),t);"1"!=urlParams.sketch&&this.addMenuItems(n,["-","fullscreen"],t)}})));this.put("editCell",new Menu(mxUtils.bind(this,function(n,t){this.addMenuItems(n,"editLink editShape editImage crop - editData copyData pasteData - editConnectionPoints editGeometry - editTooltip editStyle - edit".split(" "),
-t)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(n,t){var B=d.currentPage;null!=B&&(n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(B,B.getName())}),t),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(B)}),t),1<d.pages.length&&(d.menus.addSubmenu("movePage",n,t,mxResources.get("move")),n.addSeparator(t)),n.addSeparator(t),n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(B,
-mxResources.get("copyOf",[B.getName()]))}),t),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),t)))})));this.put("pages",new Menu(mxUtils.bind(this,function(n,t){var B=d.currentPage;d.editor.graph.isLightboxView()||(n.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(J){d.handleError(J)}}),
-t,null,d.editor.graph.isEnabled()),n.addSeparator(t));if(null!=d.pages)for(var F=0;F<d.pages.length;F++)mxUtils.bind(this,function(J){var K=null;K=d.pages[J]==B&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",n,t,d.getShortPageName(B)):n.addItem(d.getShortPageName(d.pages[J]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[J])}),t);var k=d.pages[J].getId();K.setAttribute("title",d.pages[J].getName()+" ("+(J+1)+"/"+d.pages.length+")"+(null!=k?" ["+
-k+"]":""));d.pages[J]==B&&n.addCheckmark(K,Editor.checkmarkImage)})(F)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return R});var T="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();T=!T});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});
-var L="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();L=!L;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return L});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var n=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(t){t=parseInt(t);0<=t&&(EditorUi.draftSaveDelay=
+t)})));this.put("currentPage",new Menu(mxUtils.bind(this,function(n,t){var C=d.currentPage;null!=C&&(n.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){d.renamePage(C,C.getName())}),t),n.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(C)}),t),1<d.pages.length&&(d.menus.addSubmenu("movePage",n,t,mxResources.get("move")),n.addSeparator(t)),n.addSeparator(t),n.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(C,
+mxResources.get("copyOf",[C.getName()]))}),t),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||n.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),t)))})));this.put("pages",new Menu(mxUtils.bind(this,function(n,t){var C=d.currentPage;d.editor.graph.isLightboxView()||(n.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(J){d.handleError(J)}}),
+t,null,d.editor.graph.isEnabled()),n.addSeparator(t));if(null!=d.pages)for(var F=0;F<d.pages.length;F++)mxUtils.bind(this,function(J){var K=null;K=d.pages[J]==C&&!d.editor.graph.isLightboxView()&&d.editor.graph.isEnabled()?d.menus.addSubmenu("currentPage",n,t,d.getShortPageName(C)):n.addItem(d.getShortPageName(d.pages[J]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[J])}),t);var k=d.pages[J].getId();K.setAttribute("title",d.pages[J].getName()+" ("+(J+1)+"/"+d.pages.length+")"+(null!=k?" ["+
+k+"]":""));d.pages[J]==C&&n.addCheckmark(K,Editor.checkmarkImage)})(F)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;y=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return R});var T="1"==urlParams.enableStoreBkp;y=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();T=!T});y.setToggleAction(!0);y.setSelectedCallback(function(){return T});
+var M="1"==urlParams.isGoogleFontsEnabled;y=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();M=!M;d.alert(mxResources.get("restartForChangeRequired"))});y.setToggleAction(!0);y.setSelectedCallback(function(){return M});d.actions.addAction("openDevTools",function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var n=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(t){t=parseInt(t);0<=t&&(EditorUi.draftSaveDelay=
1E3*t,EditorUi.enableDrafts=0<t,mxSettings.setDraftSaveDelay(t),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(n.container,320,80,!0,!0);n.init()})}var U=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(n,t){if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){null==U||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",n,t);"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||
-"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",n,t);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",n,t);n.addSeparator(t);d.menus.addSubmenu("units",n,t);d.menus.addMenuItems(n,"- copyConnect collapseExpand - tooltips animations -".split(" "),t);var B=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],t),d.menus.addMenuItems(n,["ruler","-"],
+"1"==urlParams.embedInline||d.menus.addSubmenu("appearance",n,t);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",n,t);n.addSeparator(t);d.menus.addSubmenu("units",n,t);d.menus.addMenuItems(n,"- copyConnect collapseExpand - tooltips animations -".split(" "),t);var C=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&this.addMenuItems(n,["showRemoteCursors"],t),d.menus.addMenuItems(n,["ruler","-"],
t));EditorUi.isElectronApp&&d.menus.addMenuItems(n,"- googleFonts spellCheck autoBkp drafts -".split(" "),t);this.addSubmenu("diagramLanguage",n,t);n.addSeparator(t);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(n,"configuration",t);n.addSeparator(t)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",n,t),"1"==urlParams.embed&&"1"!=urlParams.atlas||d.menus.addSubmenu("appearance",n,t),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",
-n,t),EditorUi.isElectronApp&&this.addMenuItems(n,"- googleFonts spellCheck autoBkp drafts -".split(" "),t),n.addSeparator(t),B=this.addSubmenu("adaptiveColors",n,t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(B=this.addMenuItem(n,"mathematicalTypesetting",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/math-typesetting")),
-"1"!=urlParams.embed&&(B=d.getCurrentFile(),null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(n,["-","showRemoteCursors","shareCursor"],t),n.addSeparator(t),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],t),this.addMenuItems(n,["autosave"],t)),this.addMenuItems(n,["-","copyConnect","collapseExpand","-"],t),this.addSubmenu("diagramLanguage",n,t),this.addMenuItems(n,["editDiagram","-"],t),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,
-"plugins",t),this.addMenuItems(n,["configuration"],t)})));this.put("movePage",new Menu(mxUtils.bind(this,function(n,t){var B=d.currentPage,F=d.getPageIndex(B);if(null!=d.pages)for(var J=0;J<d.pages.length;J++)J!=F&&function(K){n.addItem(d.getShortPageName(d.pages[K]),null,function(){d.movePage(F,K);d.scrollToPage(B,!0)},t)}(J)})));this.put("share",new Menu(mxUtils.bind(this,function(n,t){if(!d.isStandaloneApp()){var B=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=B&&(n.addItem(B,
-null,null,t,null,!1),n.addSeparator(t));d.menus.addMenuItems(n,["share"],t)}this.addMenuItem(n,"publishLink",t,null,null,mxResources.get("publish")+"...");null!=d.getMainUser()&&this.addMenuItems(n,["accounts"],t)})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,t){var B=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",n,t,mxResources.get("settings")),n.addSeparator(t));var F="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)d.menus.addMenuItems(n,"new open - synchronize properties - save saveAs -".split(" "),t);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(n,["-","save"],t);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(n,["saveAndExit"],t),null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t);n.addSeparator(t)}else d.mode==
+n,t),EditorUi.isElectronApp&&this.addMenuItems(n,"- googleFonts spellCheck autoBkp drafts -".split(" "),t),n.addSeparator(t),C=this.addSubmenu("adaptiveColors",n,t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(C,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(C=this.addMenuItem(n,"mathematicalTypesetting",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/math-typesetting")),
+"1"!=urlParams.embed&&(C=d.getCurrentFile(),null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()&&this.addMenuItems(n,["-","showRemoteCursors","shareCursor"],t),n.addSeparator(t),(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(n,["showStartScreen"],t),this.addMenuItems(n,["autosave"],t)),this.addMenuItems(n,["-","copyConnect","collapseExpand","-"],t),this.addSubmenu("diagramLanguage",n,t),this.addMenuItems(n,["editDiagram","-"],t),!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(n,
+"plugins",t),this.addMenuItems(n,["configuration"],t)})));this.put("movePage",new Menu(mxUtils.bind(this,function(n,t){var C=d.currentPage,F=d.getPageIndex(C);if(null!=d.pages)for(var J=0;J<d.pages.length;J++)J!=F&&function(K){n.addItem(d.getShortPageName(d.pages[K]),null,function(){d.movePage(F,K);d.scrollToPage(C,!0)},t)}(J)})));this.put("share",new Menu(mxUtils.bind(this,function(n,t){if(!d.isStandaloneApp()){var C=d.isOffline(!0)?mxResources.get("offline"):d.getNetworkStatus();null!=C&&(n.addItem(C,
+null,null,t,null,!1),n.addSeparator(t));d.menus.addMenuItems(n,["share"],t)}this.addMenuItem(n,"publishLink",t,null,null,mxResources.get("publish")+"...");null!=d.getMainUser()&&this.addMenuItems(n,["accounts"],t)})));this.put("diagram",new Menu(mxUtils.bind(this,function(n,t){var C=d.getCurrentFile();"simple"!=Editor.currentTheme&&(d.menus.addSubmenu("extras",n,t,mxResources.get("settings")),n.addSeparator(t));var F="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)d.menus.addMenuItems(n,"new open - synchronize properties - save saveAs -".split(" "),t);else if(d.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(n,["-","save"],t);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||d.mode==App.MODE_ATLAS)d.menus.addMenuItems(n,["saveAndExit"],t),null!=C&&C.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t);n.addSeparator(t)}else d.mode==
App.MODE_ATLAS?d.menus.addMenuItems(n,["save","synchronize","-"],t):"1"!=urlParams.noFileMenu&&(d.menus.addSubmenu("file",n,t),n.addSeparator(t),"min"==Editor.currentTheme&&(d.menus.addMenuItems(n,"toggleShapes format layers tags chatWindowTitle - findReplace".split(" "),t),d.commentsSupported()&&d.menus.addMenuItems(n,["comments"],t),n.addSeparator(t)));d.menus.addSubmenu("exportAs",n,t);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"atlassian"==d.getServiceName()?d.menus.addMenuItems(n,["import"],
t):"1"!=urlParams.noFileMenu&&d.menus.addSubmenu("importFrom",n,t);"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme?(d.menus.addMenuItems(n,["-","findReplace"],t),d.commentsSupported()&&d.menus.addMenuItems(n,["comments","-"],t),d.menus.addMenuItems(n,"toggleShapes format layers tags chatWindowTitle -".split(" "),t),d.menus.addMenuItems(n,["pageSetup"],t)):"min"!=Editor.currentTheme&&(this.addMenuItems(n,["-"],t),this.addSubmenu("newLibrary",n,t),this.addSubmenu("openLibraryFrom",n,t));n.addSeparator(t);
-"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(n,["print"],t);F||"min"==Editor.currentTheme||null==B||null==d.fileNode||"1"==urlParams.embedInline||(F=null!=B.getTitle()?B.getTitle():d.defaultFilename,/(\.html)$/i.test(F)||this.addMenuItems(n,["-","properties"]));n.addSeparator(t);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",n,t,mxResources.get("settings")),n.addSeparator(t));d.menus.addSubmenu("help",n,t);n.addSeparator(t);"1"==urlParams.embed&&
-("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(n,["save"],t),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(n,["saveAndExit"],t),null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(n,["exit"],t);"1"!=urlParams.embed&&null!=B&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(n,
-["-","close"],t)})));this.put("save",new Menu(mxUtils.bind(this,function(n,t){var B=d.getCurrentFile();null==B||B.constructor!=DriveFile&&B.constructor!=OneDriveFile?(d.menus.addMenuItems(n,["save","saveAs","-","rename"],t),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):d.menus.addMenuItems(n,["makeCopy"],t)):d.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],t);d.menus.addMenuItems(n,["-","autosave"],t);null!=
-B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],t)})));this.put("file",new Menu(mxUtils.bind(this,function(n,t){var B="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,t),this.addSubmenu("exportAs",n,t),this.addSubmenu("embed",n,t),"1"==urlParams.libraries&&(this.addMenuItems(n,["-"],t),this.addSubmenu("newLibrary",n,t),this.addSubmenu("openLibraryFrom",n,t)),d.isRevisionHistorySupported()&&
-this.addMenuItems(n,["-","revisionHistory"],t),this.addMenuItems(n,["-","pageSetup","print","-","rename"],t),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],t):(this.addMenuItems(n,["save"],t),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],t))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,["exit"],t);else if(B){B=d.getCurrentFile();d.menus.addMenuItems(n,["new"],t);d.menus.addSubmenu("openFrom",n,t);isLocalStorage&&
-this.addSubmenu("openRecent",n,t);n.addSeparator(t);d.menus.addMenuItems(n,["-","save"],t);null!=B&&B.constructor==DriveFile||d.menus.addMenuItems(n,["saveAs"],t);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||d.menus.addMenuItems(n,["synchronize"],t);n.addSeparator(t);null!=B&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(n,"publishLink",t,null,null,mxResources.get("publish")+"..."),"simple"==
-Editor.currentTheme||B.constructor!=DriveFile&&B.constructor!=GitHubFile&&B.constructor!=OneDriveFile||d.menus.addMenuItems(n,["share"],t));n.addSeparator(t);null!=B&&B.isRenamable()&&this.addMenuItems(n,["rename"],t);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):(d.menus.addMenuItems(n,["makeCopy"],t),null!=B&&(B.constructor!=OneDriveFile&&B.constructor!=DriveFile||d.menus.addMenuItems(n,["moveToFolder"],t),n.addSeparator(t),
-null!=B.getFolderUrl()&&d.menus.addMenuItems(n,["openFolder"],t),null!=B.getFileUrl()&&d.menus.addMenuItems(n,["openFile"],t)));n.addSeparator(t);null!=B&&B.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t);if(null!=B&&null!=d.fileNode&&"1"!=urlParams.embedInline){var F=null!=B.getTitle()?B.getTitle():d.defaultFilename;(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(F))&&this.addMenuItems(n,["properties"],t)}"simple"==Editor.currentTheme&&
-d.menus.addMenuItems(n,["-","autosave"],t)}else B=this.editorUi.getCurrentFile(),null!=B&&B.constructor==DriveFile?(B.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],t),this.addMenuItems(n,["save","-","share"],t),F=this.addMenuItem(n,"synchronize",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/synchronize"),n.addSeparator(t)):this.addMenuItems(n,["new"],t),this.addSubmenu("openFrom",n,t),isLocalStorage&&this.addSubmenu("openRecent",
-n,t),null!=B&&B.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),t):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(n.addSeparator(t),F=this.addMenuItem(n,"synchronize",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(n,["-","save","saveAs","-"],t),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==B||this.addMenuItems(n,["share","-"],t),null!=B&&B.isRenamable()&&this.addMenuItems(n,["rename"],t),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):(this.addMenuItems(n,["makeCopy"],t),null!=B&&(B.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],t),null!=B.getFolderUrl()&&d.menus.addMenuItems(n,["openFolder"],t)))),n.addSeparator(t),this.addSubmenu("importFrom",
-n,t),this.addSubmenu("exportAs",n,t),n.addSeparator(t),this.addSubmenu("embed",n,t),this.addSubmenu("publish",n,t),n.addSeparator(t),this.addSubmenu("newLibrary",n,t),this.addSubmenu("openLibraryFrom",n,t),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],t),null!=B&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(F=null!=B.getTitle()?B.getTitle():d.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(F))&&this.addMenuItems(n,["-",
-"properties"])),this.addMenuItems(n,["-","pageSetup"],t),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],t),this.addMenuItems(n,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,t){function B(O){var Q=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!J[Q]){for(var S=O.name,V=0;null!=G[S.toLowerCase()];)S=O.name+" ("+ ++V+")";null==v[Q]&&(N.push({name:O.name,url:O.url,label:S,title:O.url}),G[S.toLowerCase()]=O,v[Q]=O)}}for(var F=
-mxUtils.bind(this,function(O,Q,S,V,W){var X=d.editor.graph,Z=this.styleChange(n,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=Q?encodeURIComponent(Q):null,null],null,t,function(){X.setFont(O,Q);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=Q?encodeURIComponent(Q):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");
+"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||d.menus.addMenuItems(n,["print"],t);F||"min"==Editor.currentTheme||null==C||null==d.fileNode||"1"==urlParams.embedInline||(F=null!=C.getTitle()?C.getTitle():d.defaultFilename,/(\.html)$/i.test(F)||this.addMenuItems(n,["-","properties"]));n.addSeparator(t);"simple"==Editor.currentTheme&&(d.menus.addSubmenu("extras",n,t,mxResources.get("settings")),n.addSeparator(t));d.menus.addSubmenu("help",n,t);n.addSeparator(t);"1"==urlParams.embed&&
+("1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&d.menus.addMenuItems(n,["save"],t),"1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit)&&(d.menus.addMenuItems(n,["saveAndExit"],t),null!=C&&C.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t));"1"!=urlParams.embed&&d.mode!=App.MODE_ATLAS||"1"==urlParams.noExitBtn&&d.mode!=App.MODE_ATLAS||d.menus.addMenuItems(n,["exit"],t);"1"!=urlParams.embed&&null!=C&&"undefined"==typeof AtlasFile&&d.menus.addMenuItems(n,
+["-","close"],t)})));this.put("save",new Menu(mxUtils.bind(this,function(n,t){var C=d.getCurrentFile();null==C||C.constructor!=DriveFile&&C.constructor!=OneDriveFile?(d.menus.addMenuItems(n,["save","saveAs","-","rename"],t),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):d.menus.addMenuItems(n,["makeCopy"],t)):d.menus.addMenuItems(n,["save","makeCopy","-","rename","moveToFolder"],t);d.menus.addMenuItems(n,["-","autosave"],t);null!=
+C&&C.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["-","revisionHistory"],t)})));this.put("file",new Menu(mxUtils.bind(this,function(n,t){var C="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme;if("1"==urlParams.embed)this.addSubmenu("importFrom",n,t),this.addSubmenu("exportAs",n,t),this.addSubmenu("embed",n,t),"1"==urlParams.libraries&&(this.addMenuItems(n,["-"],t),this.addSubmenu("newLibrary",n,t),this.addSubmenu("openLibraryFrom",n,t)),d.isRevisionHistorySupported()&&
+this.addMenuItems(n,["-","revisionHistory"],t),this.addMenuItems(n,["-","pageSetup","print","-","rename"],t),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],t):(this.addMenuItems(n,["save"],t),"1"==urlParams.saveAndExit&&this.addMenuItems(n,["saveAndExit"],t))),"1"!=urlParams.noExitBtn&&this.addMenuItems(n,["exit"],t);else if(C){C=d.getCurrentFile();d.menus.addMenuItems(n,["new"],t);d.menus.addSubmenu("openFrom",n,t);isLocalStorage&&
+this.addSubmenu("openRecent",n,t);n.addSeparator(t);d.menus.addMenuItems(n,["-","save"],t);null!=C&&C.constructor==DriveFile||d.menus.addMenuItems(n,["saveAs"],t);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==C||C.constructor==LocalFile&&null==C.fileHandle||d.menus.addMenuItems(n,["synchronize"],t);n.addSeparator(t);null!=C&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"sketch"!=Editor.currentTheme||this.addMenuItem(n,"publishLink",t,null,null,mxResources.get("publish")+"..."),"simple"==
+Editor.currentTheme||C.constructor!=DriveFile&&C.constructor!=GitHubFile&&C.constructor!=OneDriveFile||d.menus.addMenuItems(n,["share"],t));n.addSeparator(t);null!=C&&C.isRenamable()&&this.addMenuItems(n,["rename"],t);d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):(d.menus.addMenuItems(n,["makeCopy"],t),null!=C&&(C.constructor!=OneDriveFile&&C.constructor!=DriveFile||d.menus.addMenuItems(n,["moveToFolder"],t),n.addSeparator(t),
+null!=C.getFolderUrl()&&d.menus.addMenuItems(n,["openFolder"],t),null!=C.getFileUrl()&&d.menus.addMenuItems(n,["openFile"],t)));n.addSeparator(t);null!=C&&C.isRevisionHistorySupported()&&d.menus.addMenuItems(n,["revisionHistory"],t);if(null!=C&&null!=d.fileNode&&"1"!=urlParams.embedInline){var F=null!=C.getTitle()?C.getTitle():d.defaultFilename;(C.constructor==DriveFile&&null!=C.sync&&C.sync.isConnected()||!/(\.html)$/i.test(F))&&this.addMenuItems(n,["properties"],t)}"simple"==Editor.currentTheme&&
+d.menus.addMenuItems(n,["-","autosave"],t)}else C=this.editorUi.getCurrentFile(),null!=C&&C.constructor==DriveFile?(C.isRestricted()&&this.addMenuItems(n,["exportOptionsDisabled"],t),this.addMenuItems(n,["save","-","share"],t),F=this.addMenuItem(n,"synchronize",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/synchronize"),n.addSeparator(t)):this.addMenuItems(n,["new"],t),this.addSubmenu("openFrom",n,t),isLocalStorage&&this.addSubmenu("openRecent",
+n,t),null!=C&&C.constructor==DriveFile?this.addMenuItems(n,"new - rename makeCopy openFolder moveToFolder".split(" "),t):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==C||C.constructor==LocalFile&&null==C.fileHandle||(n.addSeparator(t),F=this.addMenuItem(n,"synchronize",t),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(F,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(n,["-","save","saveAs","-"],t),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
+"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==C||this.addMenuItems(n,["share","-"],t),null!=C&&C.isRenamable()&&this.addMenuItems(n,["rename"],t),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(n,["upload"],t):(this.addMenuItems(n,["makeCopy"],t),null!=C&&(C.constructor==OneDriveFile&&this.addMenuItems(n,["moveToFolder"],t),null!=C.getFolderUrl()&&d.menus.addMenuItems(n,["openFolder"],t)))),n.addSeparator(t),this.addSubmenu("importFrom",
+n,t),this.addSubmenu("exportAs",n,t),n.addSeparator(t),this.addSubmenu("embed",n,t),this.addSubmenu("publish",n,t),n.addSeparator(t),this.addSubmenu("newLibrary",n,t),this.addSubmenu("openLibraryFrom",n,t),d.isRevisionHistorySupported()&&this.addMenuItems(n,["-","revisionHistory"],t),null!=C&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(F=null!=C.getTitle()?C.getTitle():d.defaultFilename,(C.constructor==DriveFile&&null!=C.sync&&C.sync.isConnected()||!/(\.html)$/i.test(F))&&this.addMenuItems(n,["-",
+"properties"])),this.addMenuItems(n,["-","pageSetup"],t),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(n,["print"],t),this.addMenuItems(n,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(n,t){function C(O){var P=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!J[P]){for(var S=O.name,V=0;null!=G[S.toLowerCase()];)S=O.name+" ("+ ++V+")";null==v[P]&&(N.push({name:O.name,url:O.url,label:S,title:O.url}),G[S.toLowerCase()]=O,v[P]=O)}}for(var F=
+mxUtils.bind(this,function(O,P,S,V,W){var X=d.editor.graph,Z=this.styleChange(n,null!=V?V:O,[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],[O,null!=P?encodeURIComponent(P):null,null],null,t,function(){X.setFont(O,P);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[O,null!=P?encodeURIComponent(P):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");
Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?
-"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(O,Q);this.editorUi.hideCurrentMenu();mxEvent.consume(Y)})));Graph.addFont(O,Q);Z.firstChild.nextSibling.style.fontFamily=O;W=null!=V?V:O;null!=Q&&(W+=" ("+Q+")");Z.setAttribute("title",W)}),J={},K=0;K<this.defaultFonts.length;K++){var k=this.defaultFonts[K];"string"===typeof k?F(k):null!=k.fontFamily&&null!=k.fontUrl&&(J[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,F(k.fontFamily,k.fontUrl))}n.addSeparator(t);
-var v={},G={},N=[];for(K=0;K<this.customFonts.length;K++)B(this.customFonts[K]);N.sort(function(O,Q){return O.label<Q.label?-1:O.label>Q.label?1:0});if(0<N.length){for(K=0;K<N.length;K++)F(N[K].name,N[K].url,!0,N[K].label);n.addSeparator(t)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),t);n.addSeparator(t);n.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,
-Q=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(O.isEditing()){var W=O.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){Q=mxUtils.getCssFontFamily(X.fontFamily);X=O.getView().getState(O.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=O.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");
-break}else if(W.getAttribute("face")==Q){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,S="g"):S="w")}}}else X=O.getView().getState(O.getSelectionCell()),null!=X&&(Q=X.style[mxConstants.STYLE_FONTFAMILY]||Q,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==O.cellEditor.textarea&&
-(Z=O.cellEditor.saveSelection());Q=new FontDialog(this.editorUi,Q,V,S,mxUtils.bind(this,function(Y,ea,ca){null!=Z&&(O.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ea),O.isEditing())O.setFont(Y,ea);else{O.getModel().beginUpdate();try{O.stopEditing(!1),O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),O.setCellStyles("fontSource",null!=ea?encodeURIComponent(ea):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(Q.container,
-380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);Q.init()}),t,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(O,P);this.editorUi.hideCurrentMenu();mxEvent.consume(Y)})));Graph.addFont(O,P);Z.firstChild.nextSibling.style.fontFamily=O;W=null!=V?V:O;null!=P&&(W+=" ("+P+")");Z.setAttribute("title",W)}),J={},K=0;K<this.defaultFonts.length;K++){var k=this.defaultFonts[K];"string"===typeof k?F(k):null!=k.fontFamily&&null!=k.fontUrl&&(J[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,F(k.fontFamily,k.fontUrl))}n.addSeparator(t);
+var v={},G={},N=[];for(K=0;K<this.customFonts.length;K++)C(this.customFonts[K]);N.sort(function(O,P){return O.label<P.label?-1:O.label>P.label?1:0});if(0<N.length){for(K=0;K<N.length;K++)F(N[K].name,N[K].url,!0,N[K].label);n.addSeparator(t)}n.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),t);n.addSeparator(t);n.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,
+P=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(O.isEditing()){var W=O.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){P=mxUtils.getCssFontFamily(X.fontFamily);X=O.getView().getState(O.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=O.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");
+break}else if(W.getAttribute("face")==P){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?(V=null,S="g"):S="w")}}}else X=O.getView().getState(O.getSelectionCell()),null!=X&&(P=X.style[mxConstants.STYLE_FONTFAMILY]||P,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==O.cellEditor.textarea&&
+(Z=O.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,S,mxUtils.bind(this,function(Y,ea,ca){null!=Z&&(O.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ea),O.isEditing())O.setFont(Y,ea);else{O.getModel().beginUpdate();try{O.stopEditing(!1),O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),O.setCellStyles("fontSource",null!=ea?encodeURIComponent(ea):null),O.setCellStyles("FType",null)}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,
+380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),t,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,f,m){this.ui=b;this.page=f;this.previous=this.name=m}
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,f,m){this.ui=b;this.oldIndex=f;this.newIndex=m}
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,f,m){this.ui=b;this.previousPage=this.page=f;null!=f&&(this.ui.updatePageRoot(f),null!=m&&(f.viewState=m))}
@@ -14129,15 +14128,15 @@ EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null
EditorUi.prototype.createImageForPageLink=function(b,f,m,d){var q=b.indexOf(","),x=null;0<q&&(q=this.getPageById(b.substring(q+1)),null!=q&&q!=f&&(x=this.getImageForPage(q,f,m,d),x.originalSrc=b));null==x&&(x={originalSrc:b});return x};
EditorUi.prototype.pageSelected=function(){var b=this.editor.graph,f=this.currentPage;null!=f&&(b.tooltipHandler.hide(),null==f.viewState||null==f.viewState.scrollTop||null==f.viewState.scrollLeft?(b.selectUnlockedLayer(),this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollleft=0,b.container.scrollTop=0,this.chromelessResize())):b.setScrollbarPositions(f.viewState,b.view.translate.x,b.view.translate.y),this.updateTabContainer(),this.scrollToPage())};
EditorUi.prototype.getImageForPage=function(b,f,m,d){m=null!=m?m:this.editor.graph;var q=m.getGlobalVariable;m=this.createTemporaryGraph(m.getStylesheet());var x=this.getPageIndex(null!=f?f:this.currentPage);m.getGlobalVariable=function(y){return"pagenumber"==y?x+1:"page"==y&&null!=f?f.getName():q.apply(this,arguments)};document.body.appendChild(m.container);this.updatePageRoot(b);m.setAdaptiveColors(b.viewState.adaptiveColors);m.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText=
-"";d=m.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var C=m.getGraphBounds();document.body.removeChild(m.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),C.width,C.height,C.x,C.y)};
+"";d=m.getSvg(null,null,null,null,null,null,null,null,null,null,d,null,null,null,!0,!0);var B=m.getGraphBounds();document.body.removeChild(m.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(d)),B.width,B.height,B.x,B.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,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){f.apply(b.view,
-arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,y){C=y.getProperty("edit").changes;for(y=0;y<C.length;y++)if(C[y]instanceof RenamePage||C[y]instanceof ChangePage||C[y]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==C.length&&C[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var m=b.sizeDidChange,d=null,q=this;b.sizeDidChange=
-function(){var C=m.apply(this,arguments);null!=q.currentPage&&d!=q.currentPage&&(d=q.currentPage,q.pageSelected());return C};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var x=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",x);this.editor.addListener("pagesPatched",x);this.editor.addListener("pageRenamed",x);this.editor.addListener("pageMoved",x);this.editor.addListener("fileLoaded",x);
-this.editor.addListener("pageSelected",mxUtils.bind(this,function(C,y){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(C,y){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
+arguments);null!=b.view.backgroundImage&&EditorUi.embedSvgImages(b.view.backgroundImage.node)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,y){B=y.getProperty("edit").changes;for(y=0;y<B.length;y++)if(B[y]instanceof RenamePage||B[y]instanceof ChangePage||B[y]instanceof mxRootChange){this.updateTabContainer();break}null==this.currentPage||1==B.length&&B[0]instanceof SelectPage||this.currentPage.setDiagramModified(!0)}));var m=b.sizeDidChange,d=null,q=this;b.sizeDidChange=
+function(){var B=m.apply(this,arguments);null!=q.currentPage&&d!=q.currentPage&&(d=q.currentPage,q.pageSelected());return B};b.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){b.checkDefaultParent()}));var x=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",x);this.editor.addListener("pagesPatched",x);this.editor.addListener("pageRenamed",x);this.editor.addListener("pageMoved",x);this.editor.addListener("fileLoaded",x);
+this.editor.addListener("pageSelected",mxUtils.bind(this,function(B,y){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(B,y){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,f){var m=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),d=null!=b?b:this.currentPage;null!=m&&null!=this.tabScroller&&this.tabScroller.children.length>m&&null!=this.tabScroller.children[m]&&(d!=this.lastScrollPage||f)&&(this.tabScroller.children[m].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[m].className="geTab gePageTab geActivePage",this.lastScrollPage=d)};
EditorUi.prototype.restoreViewState=function(b,f,m){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(m))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),q=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),C=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(I){I=I.split("^");return{name:I[0],url:I[1]}})}catch(I){console.log("ExtFonts format error: "+I.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!=f?"0"!=f:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:C,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(d)||isNaN(q)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),q=parseFloat(b.getAttribute("pageHeight")),x=b.getAttribute("background"),B=this.parseBackgroundImage(b.getAttribute("backgroundImage")),y=b.getAttribute("extFonts");if(y)try{y=y.split("|").map(function(I){I=I.split("^");return{name:I[0],url:I[1]}})}catch(I){console.log("ExtFonts format error: "+I.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!=f?"0"!=f:this.defaultPageVisible,background:null!=x&&0<x.length?x:null,backgroundImage:B,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(d)||isNaN(q)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,d,q),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:y||[]}};
Graph.prototype.saveViewState=function(b,f,m,d){m||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);m=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=m&&(f.setAttribute("pageWidth",m.width),f.setAttribute("pageHeight",m.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
@@ -14154,20 +14153,20 @@ d=!0;for(q=0;q<m.length;q++)if(m[q].name==b){d=!1;break}d&&this.extFonts.push({n
EditorUi.prototype.updatePageRoot=function(b,f){if(null==b.root){f=this.editor.extractGraphModel(b.node,null,f);var m=Editor.extractParserError(f);if(m)throw Error(m);null!=f?(b.graphModelNode=f,b.viewState=this.editor.graph.createViewState(f),m=new mxCodec(f.ownerDocument),b.root=m.decode(f).root):(b.root=this.editor.graph.model.createRoot(),b.root.setId("0"),b.root.children[0].setId("1"),b.needsUpdate=!0)}else if(null==b.viewState){if(null==b.graphModelNode){f=this.editor.extractGraphModel(b.node);
if(m=Editor.extractParserError(f))throw Error(m);null!=f&&(b.graphModelNode=f)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}if(null==b.root.children||0==b.root.children.length)f=new mxCell,f.setId("1"),b.root.insert(f),b.needsUpdate=!0;return b};EditorUi.prototype.getDiagramSnapshot=function(){return{node:this.editor.getGraphXml(),page:this.currentPage}};
EditorUi.prototype.updateDiagramData=function(b,f){if(null==this.getPageIndex(b.page))this.insertPage(null,null,f);else{var m=new mxCodec(b.node.ownerDocument),d=new mxGraphModel;m.decode(b.node,d);m=new mxCodec(f.ownerDocument);var q=new mxGraphModel;m.decode(f,q);this.selectPage(b.page);f=this.diffCells(d.root,q.root);this.patchPage(b.page,f,null,!0)}};EditorUi.prototype.replaceDiagramData=function(b){this.editor.graph.model.execute(new ReplaceDiagram(this,mxUtils.parseXml(b).documentElement))};
-EditorUi.prototype.selectPage=function(b,f,m){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);f=null!=f?f:!1;d.isMouseDown=!1;d.reset();var q=d.model.createUndoableEdit();q.ignoreEdit=!0;var x=new SelectPage(this,b,m);x.execute();q.add(x);q.notify();f||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",q))}}catch(C){this.handleError(C)}};
+EditorUi.prototype.selectPage=function(b,f,m){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);f=null!=f?f:!1;d.isMouseDown=!1;d.reset();var q=d.model.createUndoableEdit();q.ignoreEdit=!0;var x=new SelectPage(this,b,m);x.execute();q.add(x);q.notify();f||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",q))}}catch(B){this.handleError(B)}};
EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
EditorUi.prototype.insertPage=function(b,f,m){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId(),m),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,f,m){f=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f,m);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var m=this.pages[f].getName();null!=m&&0<m.length&&(b[m]=m)}f=this.pages.length;do m=mxResources.get("pageWithNumber",[++f]);while(null!=b[m]);return m};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,m=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=m){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(m==this.pages.length-1?m--:m++,d=this.pages[m]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(q){this.handleError(q)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var m=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var q=b.node.cloneNode(!1);q.removeAttribute("id");var x={},C=d.createCellLookup([d.model.root]);m=new DiagramPage(q);m.root=d.cloneCell(d.model.root,null,x);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(m.root);d.updateCustomLinks(d.createCellMapping(x,C),[m.root]);m.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(m);
+EditorUi.prototype.duplicatePage=function(b,f){var m=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var q=b.node.cloneNode(!1);q.removeAttribute("id");var x={},B=d.createCellLookup([d.model.root]);m=new DiagramPage(q);m.root=d.cloneCell(d.model.root,null,x);var y=new mxGraphModel;y.prefix=Editor.guid()+"-";y.setRoot(m.root);d.updateCustomLinks(d.createCellMapping(x,B),[m.root]);m.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(m);
m.viewState.scale=1;delete m.viewState.scrollLeft;delete m.viewState.scrollTop;delete m.viewState.currentRoot;delete m.viewState.defaultParent;m.setName(f);m=this.insertPage(m,mxUtils.indexOf(this.pages,b)+1)}}catch(I){this.handleError(I)}return m};EditorUi.prototype.initDiagramNode=function(b,f){null==f&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,f);EditorUi.removeChildNodes(b.node);b.node.appendChild(f)};
EditorUi.prototype.clonePages=function(b){for(var f=[],m=[],d=0;d<b.length;d++)try{m.push(this.clonePage(b[d]))}catch(q){f.push(mxResources.get("pageWithNumber",[d+1])+": "+q.toString())}if(0<f.length){b=Error(f.join("\n"));try{0<m.length&&(b.fallbackFileData=this.getXmlForPages(m))}catch(q){}throw b;}return m};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),m=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(m,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);f.diagramModified=b.diagramModified;return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(m){null!=m&&0<m.length&&this.editor.graph.model.execute(new RenamePage(this,b,m))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer geTabItem";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&!this.isTabContainerVisible())this.tabContainer.style.display="none";else if(null!=this.tabContainer&&null!=this.pages){this.tabContainer.style.display="";var b=this.editor.graph,f=document.createElement("div");f.className="geTabScroller";for(var m=null,d=0;d<this.pages.length;d++)mxUtils.bind(this,function(q,x){x.className="geTab gePageTab";this.pages[q]==this.currentPage&&x.classList.add("geActivePage");x.setAttribute("draggable",
-"true");mxEvent.addListener(x,"dragstart",mxUtils.bind(this,function(C){b.isEnabled()?(mxClient.IS_FF&&C.dataTransfer.setData("Text","<diagram/>"),m=q):mxEvent.consume(C)}));mxEvent.addListener(x,"dragend",mxUtils.bind(this,function(C){m=null;C.stopPropagation();C.preventDefault()}));mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(C){null!=m&&(C.dataTransfer.dropEffect="move");C.stopPropagation();C.preventDefault()}));mxEvent.addListener(x,"drop",mxUtils.bind(this,function(C){null!=m&&
-q!=m&&this.movePage(m,q);C.stopPropagation();C.preventDefault()}));f.appendChild(x)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
+"true");mxEvent.addListener(x,"dragstart",mxUtils.bind(this,function(B){b.isEnabled()?(mxClient.IS_FF&&B.dataTransfer.setData("Text","<diagram/>"),m=q):mxEvent.consume(B)}));mxEvent.addListener(x,"dragend",mxUtils.bind(this,function(B){m=null;B.stopPropagation();B.preventDefault()}));mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(B){null!=m&&(B.dataTransfer.dropEffect="move");B.stopPropagation();B.preventDefault()}));mxEvent.addListener(x,"drop",mxUtils.bind(this,function(B){null!=m&&
+q!=m&&this.movePage(m,q);B.stopPropagation();B.preventDefault()}));f.appendChild(x)})(d,this.createTabForPage(this.pages[d],d+1));d=null!=this.tabScroller?this.tabScroller.scrollLeft:0;this.tabContainer.innerText="";this.isPageInsertTabVisible()&&this.tabContainer.appendChild(this.createPageInsertTab());"simple"!=Editor.currentTheme&&(this.pageMenuTab=this.createPageMenuTab(),this.tabContainer.appendChild(this.pageMenuTab));this.tabContainer.appendChild(f);this.leftScrollTab=this.createLeftScrollTab();
this.tabContainer.appendChild(this.leftScrollTab);this.rightScrollTab=this.createRightScrollTab();this.tabContainer.appendChild(this.rightScrollTab);this.tabScroller=f;this.tabScroller.scrollLeft=d;this.checkTabScrollerOverflow();mxEvent.addListener(this.tabScroller,"scroll",mxUtils.bind(this,function(q){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.checkTabScrollerOverflow=function(){null!=this.tabScroller&&null!=this.tabContainer&&2<this.tabContainer.children.length&&(this.tabScroller.scrollWidth>this.tabScroller.offsetWidth?(this.leftScrollTab.style.display="",this.rightScrollTab.style.display="",0==this.tabScroller.scrollLeft?this.leftScrollTab.classList.add("mxDisabled"):this.leftScrollTab.classList.remove("mxDisabled"),Math.ceil(this.tabScroller.scrollLeft)+this.tabScroller.offsetWidth>=this.tabScroller.scrollWidth?this.rightScrollTab.classList.add("mxDisabled"):
this.rightScrollTab.classList.remove("mxDisabled")):(this.leftScrollTab.style.display="none",this.rightScrollTab.style.display="none"))};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};EditorUi.prototype.createTab=function(){var b=document.createElement("div");b.className="geTab";return b};
@@ -14177,25 +14176,25 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var f=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:f,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=f;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var f=new mxPopupMenu(mxUtils.bind(this,function(q,x){this.menus.get("pages").funct(q,x)}));f.smartSeparators=!0;f.showDisabled=!0;f.autoExpand=!0;f.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(f,arguments);f.destroy()});var m=mxEvent.getClientX(b),d=mxEvent.getClientY(b);f.popup(m,
d,null,b);this.setCurrentMenu(f);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,f){var m=this.createTab(),d=b.getName()||mxResources.get("untitled"),q=b.getId();m.setAttribute("title",d+(null!=q?" ("+q+")":"")+" ["+f+"]");f=document.createElement("span");f.style.maxWidth="160px";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,d);m.appendChild(f);this.addTabListeners(b,m);return m};
-EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var m=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(I){this.renamePage(b);mxEvent.consume(I)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";f.appendChild(d);var q=!1,x=!1,C=mxUtils.bind(this,function(I){q=null!=this.currentMenu;x=b==this.currentPage;this.scrollToPage(b);m.isMouseDown||x||this.selectPage(b)}),y=mxUtils.bind(this,
-function(I){if(!m.isMouseDown&&(x&&(mxEvent.isTouchEvent(I)||mxEvent.getSource(I)==d)||mxEvent.isPopupTrigger(I))&&(m.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(I)||!q)){var M=new mxPopupMenu(this.createPageMenu(b));M.smartSeparators=!0;M.showDisabled=!0;M.autoExpand=!0;M.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(M,arguments);this.resetCurrentMenu();M.destroy()});var H=mxEvent.getClientX(I),c=mxEvent.getClientY(I);M.popup(H,c,null,I);
-this.setCurrentMenu(M,f)}mxEvent.consume(I)});mxEvent.addGestureListeners(d,C,null,y);mxEvent.addGestureListeners(f,C,null,y)};
+EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var m=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(I){this.renamePage(b);mxEvent.consume(I)}));var d=document.createElement("div");d.style.backgroundImage="url("+Editor.thinExpandImage+")";d.className="geButton";f.appendChild(d);var q=!1,x=!1,B=mxUtils.bind(this,function(I){q=null!=this.currentMenu;x=b==this.currentPage;this.scrollToPage(b);m.isMouseDown||x||this.selectPage(b)}),y=mxUtils.bind(this,
+function(I){if(!m.isMouseDown&&(x&&(mxEvent.isTouchEvent(I)||mxEvent.getSource(I)==d)||mxEvent.isPopupTrigger(I))&&(m.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(I)||!q)){var L=new mxPopupMenu(this.createPageMenu(b));L.smartSeparators=!0;L.showDisabled=!0;L.autoExpand=!0;L.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(L,arguments);this.resetCurrentMenu();L.destroy()});var H=mxEvent.getClientX(I),c=mxEvent.getClientY(I);L.popup(H,c,null,I);
+this.setCurrentMenu(L,f)}mxEvent.consume(I)});mxEvent.addGestureListeners(d,B,null,y);mxEvent.addGestureListeners(f,B,null,y)};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(m,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));this.editor.graph.isEnabled()&&(m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),
d),m.addSeparator(d),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",m,d,mxResources.get("move")),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d),m.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d))})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,m,d){d.ui=f.ui;return m};b.afterDecode=function(f,m,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(f,m,d){d.setAttribute("relatedPage",m.relatedPage.getId());null==m.index&&(d.setAttribute("name",m.relatedPage.getName()),null!=m.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(m.relatedPage.viewState,function(q,x){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,q)?x:void 0})),null!=m.relatedPage.root&&f.encodeCell(m.relatedPage.root,d));return d};
b.beforeDecode=function(f,m,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(m.getAttribute("relatedPage"));if(null==d.relatedPage){var q=m.ownerDocument.createElement("diagram");q.setAttribute("id",m.getAttribute("relatedPage"));q.setAttribute("name",m.getAttribute("name"));d.relatedPage=new DiagramPage(q);q=m.getAttribute("viewState");null!=q&&(d.relatedPage.viewState=JSON.parse(q),m.removeAttribute("viewState"));m=m.cloneNode(!0);q=m.firstChild;if(null!=q)for(d.relatedPage.root=f.decodeCell(q,!1),d=
-q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodeType==mxConstants.NODETYPE_ELEMENT){var x=q.getAttribute("id");null==f.lookup(x)&&f.decodeCell(q)}q.parentNode.removeChild(q);q=d}}return m};b.afterDecode=function(f,m,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,q,x,C,y){q=null!=q?q:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var I=x.slice(),M=0;M<x.length;M++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[M]),"treeFolding","0")&&this.foldTreeCell(d,x[M]);x=I;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=function(d,q){this.model.beginUpdate();try{var x=
-[];this.traverse(q,!0,mxUtils.bind(this,function(y,I){var M=null!=I&&this.isTreeEdge(I);M&&x.push(I);y==q||null!=I&&!M||x.push(y);return(null==I||M)&&(y==q||!this.model.isCollapsed(y))}));this.model.setCollapsed(q,d);for(var C=0;C<x.length;C++)this.model.setVisible(x[C],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,q,x,C,y,I){return this.model.filterCells(this.getEdges(d,q,x,C,y,I),mxUtils.bind(this,
-function(M){return this.isTreeEdge(M)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(F){return p.isVertex(F)&&x(F)}function q(F){var J=!1;null!=F&&(J="1"==
-l.getCurrentCellStyle(F).treeMoving);return J}function x(F){var J=!1;null!=F&&(F=p.getParent(F),J=l.view.getState(F),J="tree"==(null!=J?J.style:l.getCellStyle(F)).containerType);return J}function C(F){var J=!1;null!=F&&(F=p.getParent(F),J=l.view.getState(F),l.view.getState(F),J=null!=(null!=J?J.style:l.getCellStyle(F)).childLayout);return J}function y(F){F=l.view.getState(F);if(null!=F){var J=l.getIncomingTreeEdges(F.cell);if(0<J.length&&(J=l.view.getState(J[0]),null!=J&&(J=J.absolutePoints,null!=
+q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodeType==mxConstants.NODETYPE_ELEMENT){var x=q.getAttribute("id");null==f.lookup(x)&&f.decodeCell(q)}q.parentNode.removeChild(q);q=d}}return m};b.afterDecode=function(f,m,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,q,x,B,y){q=null!=q?q:!1;null==x&&(x=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var I=x.slice(),L=0;L<x.length;L++)"1"==mxUtils.getValue(this.getCurrentCellStyle(x[L]),"treeFolding","0")&&this.foldTreeCell(d,x[L]);x=I;x=b.apply(this,arguments)}finally{this.model.endUpdate()}return x};Graph.prototype.foldTreeCell=function(d,q){this.model.beginUpdate();try{var x=
+[];this.traverse(q,!0,mxUtils.bind(this,function(y,I){var L=null!=I&&this.isTreeEdge(I);L&&x.push(I);y==q||null!=I&&!L||x.push(y);return(null==I||L)&&(y==q||!this.model.isCollapsed(y))}));this.model.setCollapsed(q,d);for(var B=0;B<x.length;B++)this.model.setVisible(x[B],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,q,x,B,y,I){return this.model.filterCells(this.getEdges(d,q,x,B,y,I),mxUtils.bind(this,
+function(L){return this.isTreeEdge(L)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(F){return p.isVertex(F)&&x(F)}function q(F){var J=!1;null!=F&&(J="1"==
+l.getCurrentCellStyle(F).treeMoving);return J}function x(F){var J=!1;null!=F&&(F=p.getParent(F),J=l.view.getState(F),J="tree"==(null!=J?J.style:l.getCellStyle(F)).containerType);return J}function B(F){var J=!1;null!=F&&(F=p.getParent(F),J=l.view.getState(F),l.view.getState(F),J=null!=(null!=J?J.style:l.getCellStyle(F)).childLayout);return J}function y(F){F=l.view.getState(F);if(null!=F){var J=l.getIncomingTreeEdges(F.cell);if(0<J.length&&(J=l.view.getState(J[0]),null!=J&&(J=J.absolutePoints,null!=
J&&0<J.length&&(J=J[J.length-1],null!=J)))){if(J.y==F.y&&Math.abs(J.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_SOUTH;if(J.y==F.y+F.height&&Math.abs(J.x-F.getCenterX())<F.width/2)return mxConstants.DIRECTION_NORTH;if(J.x>F.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function I(F,J){J=null!=J?J:!0;l.model.beginUpdate();try{var K=l.model.getParent(F),k=l.getIncomingTreeEdges(F),v=l.cloneCells([k[0],F]);l.model.setTerminal(v[0],l.model.getTerminal(k[0],
-!0),!0);var G=y(F),N=K.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=J?F.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=J?F.geometry.height+10:-v[1].geometry.height-10;l.view.currentRoot!=K&&(v[1].geometry.x-=N.x,v[1].geometry.y-=N.y);var O=l.view.getState(F),Q=l.view.scale;if(null!=O){var S=mxRectangle.fromRectangle(O);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(J?F.geometry.width+10:-v[1].geometry.width-10)*Q:S.y+=(J?
-F.geometry.height+10:-v[1].geometry.height-10)*Q;var V=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=N=k=0;X<V.length;X++){var Z=l.model.getTerminal(V[X],!1);if(G==y(Z)){var Y=l.view.getState(Z);Z!=F&&null!=Y&&(W&&J!=Y.getCenterX()<O.getCenterX()||!W&&J!=Y.getCenterY()<O.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/Q),N=10+Math.max(N,(Math.min(S.y+
-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/Q))}}W?N=0:k=0;for(X=0;X<V.length;X++)if(Z=l.model.getTerminal(V[X],!1),G==y(Z)&&(Y=l.view.getState(Z),Z!=F&&null!=Y&&(W&&J!=Y.getCenterX()<O.getCenterX()||!W&&J!=Y.getCenterY()<O.getCenterY()))){var ea=[];l.traverse(Y.cell,!0,function(ca,ka){var ba=null!=ka&&l.isTreeEdge(ka);ba&&ea.push(ka);(null==ka||ba)&&ea.push(ca);return null==ka||ba});l.moveCells(ea,(J?1:-1)*k,(J?1:-1)*N)}}}return l.addCells(v,K)}finally{l.model.endUpdate()}}function M(F){l.model.beginUpdate();
-try{var J=y(F),K=l.getIncomingTreeEdges(F),k=l.cloneCells([K[0],F]);l.model.setTerminal(K[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],F,!1);var v=l.model.getParent(F),G=v.geometry,N=[];l.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);l.traverse(F,!0,function(S,V){var W=null!=V&&l.isTreeEdge(V);W&&N.push(V);(null==V||W)&&N.push(S);return null==V||W});var O=F.geometry.width+40,Q=F.geometry.height+40;J==mxConstants.DIRECTION_SOUTH?O=0:J==mxConstants.DIRECTION_NORTH?
-(O=0,Q=-Q):J==mxConstants.DIRECTION_WEST?(O=-O,Q=0):J==mxConstants.DIRECTION_EAST&&(Q=0);l.moveCells(N,O,Q);return l.addCells(k,v)}finally{l.model.endUpdate()}}function H(F,J){l.model.beginUpdate();try{var K=l.model.getParent(F),k=l.getIncomingTreeEdges(F),v=y(F);0==k.length&&(k=[l.createEdge(K,null,"",null,null,l.createCurrentEdgeStyle())],v=J);var G=l.cloneCells([k[0],F]);l.model.setTerminal(G[0],F,!0);null==l.model.getTerminal(G[0],!1)&&(l.model.setTerminal(G[0],G[1],!1),l.applyNewEdgeStyle(G[1],
-[G[0]],v));k=l.getOutgoingTreeEdges(F);var N=K.geometry;J=[];l.view.currentRoot==K&&(N=new mxRectangle);for(var O=0;O<k.length;O++){var Q=l.model.getTerminal(k[O],!1);null!=Q&&J.push(Q)}var S=l.view.getBounds(J),V=l.view.translate,W=l.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?F.geometry.x+(F.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-N.x+10,G[1].geometry.y+=G[1].geometry.height-N.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?F.geometry.x+(F.geometry.width-
+!0),!0);var G=y(F),N=K.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=J?F.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=J?F.geometry.height+10:-v[1].geometry.height-10;l.view.currentRoot!=K&&(v[1].geometry.x-=N.x,v[1].geometry.y-=N.y);var O=l.view.getState(F),P=l.view.scale;if(null!=O){var S=mxRectangle.fromRectangle(O);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(J?F.geometry.width+10:-v[1].geometry.width-10)*P:S.y+=(J?
+F.geometry.height+10:-v[1].geometry.height-10)*P;var V=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=N=k=0;X<V.length;X++){var Z=l.model.getTerminal(V[X],!1);if(G==y(Z)){var Y=l.view.getState(Z);Z!=F&&null!=Y&&(W&&J!=Y.getCenterX()<O.getCenterX()||!W&&J!=Y.getCenterY()<O.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/P),N=10+Math.max(N,(Math.min(S.y+
+S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?N=0:k=0;for(X=0;X<V.length;X++)if(Z=l.model.getTerminal(V[X],!1),G==y(Z)&&(Y=l.view.getState(Z),Z!=F&&null!=Y&&(W&&J!=Y.getCenterX()<O.getCenterX()||!W&&J!=Y.getCenterY()<O.getCenterY()))){var ea=[];l.traverse(Y.cell,!0,function(ca,ka){var ba=null!=ka&&l.isTreeEdge(ka);ba&&ea.push(ka);(null==ka||ba)&&ea.push(ca);return null==ka||ba});l.moveCells(ea,(J?1:-1)*k,(J?1:-1)*N)}}}return l.addCells(v,K)}finally{l.model.endUpdate()}}function L(F){l.model.beginUpdate();
+try{var J=y(F),K=l.getIncomingTreeEdges(F),k=l.cloneCells([K[0],F]);l.model.setTerminal(K[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],F,!1);var v=l.model.getParent(F),G=v.geometry,N=[];l.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);l.traverse(F,!0,function(S,V){var W=null!=V&&l.isTreeEdge(V);W&&N.push(V);(null==V||W)&&N.push(S);return null==V||W});var O=F.geometry.width+40,P=F.geometry.height+40;J==mxConstants.DIRECTION_SOUTH?O=0:J==mxConstants.DIRECTION_NORTH?
+(O=0,P=-P):J==mxConstants.DIRECTION_WEST?(O=-O,P=0):J==mxConstants.DIRECTION_EAST&&(P=0);l.moveCells(N,O,P);return l.addCells(k,v)}finally{l.model.endUpdate()}}function H(F,J){l.model.beginUpdate();try{var K=l.model.getParent(F),k=l.getIncomingTreeEdges(F),v=y(F);0==k.length&&(k=[l.createEdge(K,null,"",null,null,l.createCurrentEdgeStyle())],v=J);var G=l.cloneCells([k[0],F]);l.model.setTerminal(G[0],F,!0);null==l.model.getTerminal(G[0],!1)&&(l.model.setTerminal(G[0],G[1],!1),l.applyNewEdgeStyle(G[1],
+[G[0]],v));k=l.getOutgoingTreeEdges(F);var N=K.geometry;J=[];l.view.currentRoot==K&&(N=new mxRectangle);for(var O=0;O<k.length;O++){var P=l.model.getTerminal(k[O],!1);null!=P&&J.push(P)}var S=l.view.getBounds(J),V=l.view.translate,W=l.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?F.geometry.x+(F.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-N.x+10,G[1].geometry.y+=G[1].geometry.height-N.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?F.geometry.x+(F.geometry.width-
G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-N.x+10,G[1].geometry.y-=G[1].geometry.height+N.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+N.x+40):G[1].geometry.x+(G[1].geometry.width-N.x+40),G[1].geometry.y=null==S?F.geometry.y+(F.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-N.y+10);return l.addCells(G,K)}finally{l.model.endUpdate()}}function c(F,J,K){F=l.getOutgoingTreeEdges(F);K=l.view.getState(K);var k=[];if(null!=K&&null!=F){for(var v=
0;v<F.length;v++){var G=l.view.getState(l.model.getTerminal(F[v],!1));null!=G&&(!J&&Math.min(G.x+G.width,K.x+K.width)>=Math.max(G.x,K.x)||J&&Math.min(G.y+G.height,K.y+K.height)>=Math.max(G.y,K.y))&&k.push(G)}k.sort(function(N,O){return J?N.x+N.width-O.x-O.width:N.y+N.height-O.y-O.height})}return k}function e(F,J){var K=y(F),k=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST;(K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST)==k&&K!=J?g.actions.get("selectParent").funct():K==
J?(J=l.getOutgoingTreeEdges(F),null!=J&&0<J.length&&l.setSelectionCell(l.model.getTerminal(J[0],!1))):(K=l.getIncomingTreeEdges(F),null!=K&&0<K.length&&(k=c(l.model.getTerminal(K[0],!0),k,F),F=l.view.getState(F),null!=F&&(F=mxUtils.indexOf(k,F),0<=F&&(F+=J==mxConstants.DIRECTION_NORTH||J==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=k.length-1&&l.setSelectionCell(k[F].cell)))))}var g=this,l=g.editor.graph,p=l.getModel(),u=g.menus.createPopupMenu;g.menus.createPopupMenu=function(F,J,K){u.apply(this,arguments);
@@ -14203,37 +14202,37 @@ if(1==l.getSelectionCount()){J=l.getSelectionCell();var k=l.getOutgoingTreeEdges
1==l.getSelectionCount()){var J=l.getSelectionCell();F=mxEvent.isControlDown(F)?null:l.getOutgoingTreeEdges(J);if(null!=F&&0<F.length){J=[];for(var K=0;K<F.length;K++)J.push(l.model.getTerminal(F[K],!1));l.setSelectionCells(J)}else l.setSelectionCells(l.model.getChildren(J))}},null,null,"Alt+Shift+C");g.actions.addAction("selectDescendants",function(F){var J=l.getSelectionCell();if(l.isEnabled()&&null!=J){var K=[];mxEvent.isControlDown(F)||l.traverse(J,!0,function(k,v){var G=null!=v&&l.isTreeEdge(v);
G&&mxEvent.isControlDown(F)&&K.push(v);(null==v||G)&&K.push(k);return null==v||G});if(0==K.length||1==K.length&&K[0]==J)K=l.model.getDescendants(J);l.setSelectionCells(K)}},null,null,"Alt+Shift+X");g.actions.addAction("selectParent",function(F){var J=l.getSelectionCell();l.isEnabled()&&null!=J&&(F=mxEvent.isControlDown(F)?null:l.getIncomingTreeEdges(J),null!=F&&0<F.length?l.setSelectionCell(l.model.getTerminal(F[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");g.actions.addAction("selectSiblings",
function(F){if(l.isEnabled()&&1==l.getSelectionCount()){var J=l.getSelectionCell(),K=mxEvent.isControlDown(F)?null:l.getIncomingTreeEdges(J);F=[];if(null!=K&&0<K.length&&(K=l.getOutgoingTreeEdges(l.model.getTerminal(K[0],!0)),null!=K))for(var k=0;k<K.length;k++)F.push(l.model.getTerminal(K[k],!1));0==F.length&&(F=l.model.getChildren(l.model.getParent(J)));l.setSelectionCells(F)}},null,null,"Alt+Shift+S");var z=l.removeCells;l.removeCells=function(F,J){J=null!=J?J:!0;null==F&&(F=this.getDeletableCells(this.getSelectionCells()));
-J&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var K=[],k=0;k<F.length;k++){var v=F[k];p.isEdge(v)&&x(v)&&(K.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];l.traverse(v,!0,function(N,O){var Q=null!=O&&l.isTreeEdge(O);Q&&G.push(O);(null==O||Q)&&G.push(N);return null==O||Q});0<G.length&&(K=K.concat(G),v=l.getIncomingTreeEdges(F[k]),F=F.concat(v))}else null!=v&&K.push(F[k])}F=K;return z.apply(this,arguments)};g.hoverIcons.getStateAt=function(F,J,K){return d(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(J,
-K))};var E=l.duplicateCells;l.duplicateCells=function(F,J){F=null!=F?F:this.getSelectionCells();for(var K=F.slice(0),k=0;k<K.length;k++){var v=l.view.getState(K[k]);if(null!=v&&d(v.cell)){var G=l.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],F)}}this.model.beginUpdate();try{var N=E.call(this,F,J);if(N.length==F.length)for(k=0;k<F.length;k++)if(d(F[k])){var O=l.getIncomingTreeEdges(N[k]);G=l.getIncomingTreeEdges(F[k]);if(0==O.length&&0<G.length){var Q=this.cloneCell(G[0]);
-this.addEdge(Q,l.getDefaultParent(),this.model.getTerminal(G[0],!0),N[k])}}}finally{this.model.endUpdate()}return N};var D=l.moveCells;l.moveCells=function(F,J,K,k,v,G,N){for(var O=null,Q=[],S=0;S<F.length;S++)(q(F[S])||d(F[S]))&&!C(F[S])&&this.isCellCollapsed(F[S])?Q=Q.concat(this.getSubtree(F[S])):Q.push(F[S]);F=mxUtils.removeDuplicates(Q);this.model.beginUpdate();try{Q=v;var V=this.getCurrentCellStyle(v);if(null!=F&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<F.length;S++)if(d(F[S])||
-l.model.isEdge(F[S])&&null==l.model.getTerminal(F[S],!0)){v=l.model.getParent(F[S]);break}if(null!=Q&&v!=Q&&null!=this.view.getState(F[0])){var W=l.getIncomingTreeEdges(F[0]);if(0<W.length){var X=l.view.getState(l.model.getTerminal(W[0],!0));if(null!=X){var Z=l.view.getState(Q);null!=Z&&(J=(Z.getCenterX()-X.getCenterX())/l.view.scale,K=(Z.getCenterY()-X.getCenterY())/l.view.scale)}}}}O=D.apply(this,arguments);if(null!=O&&null!=F&&O.length==F.length)for(S=0;S<O.length;S++)if(this.model.isEdge(O[S]))d(Q)&&
-0>mxUtils.indexOf(O,this.model.getTerminal(O[S],!0))&&this.model.setTerminal(O[S],Q,!0);else if(d(F[S])&&(W=l.getIncomingTreeEdges(F[S]),0<W.length))if(!k)d(Q)&&0>mxUtils.indexOf(F,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],Q,!0);else if(0==l.getIncomingTreeEdges(O[S]).length){V=Q;if(null==V||V==l.model.getParent(F[S]))V=l.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,l.getDefaultParent(),V,O[S])}}finally{this.model.endUpdate()}return O};if(null!=g.sidebar){var A=
-g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(F,J,K,k){var v=l.model,G=null;v.beginUpdate();try{if(G=A.apply(this,arguments),d(F))for(var N=0;N<G.length;N++)if(v.isEdge(G[N])&&null==v.getTerminal(G[N],!0)){v.setTerminal(G[N],F,!0);var O=l.getCellGeometry(G[N]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var P={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},
-R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},T=g.onKeyDown;g.onKeyDown=function(F){try{var J=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=J){var K=mxEvent.isAltDown(F)&&mxEvent.isShiftDown(F)?P[F.keyCode]:mxEvent.isAltDown(F)?R[F.keyCode]:null;null!=K?(K.funct(F),mxEvent.consume(F)):d(J)&&(K=null,0<l.getIncomingTreeEdges(J).length&&(9==F.which?K=mxEvent.isShiftDown(F)?M(J):H(J):13==F.which&&(K=I(J,!mxEvent.isShiftDown(F)))),null!=K&&0<K.length?(1==K.length&&l.model.isEdge(K[0])?
+J&&(F=this.getDeletableCells(this.addAllEdges(F)));for(var K=[],k=0;k<F.length;k++){var v=F[k];p.isEdge(v)&&x(v)&&(K.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];l.traverse(v,!0,function(N,O){var P=null!=O&&l.isTreeEdge(O);P&&G.push(O);(null==O||P)&&G.push(N);return null==O||P});0<G.length&&(K=K.concat(G),v=l.getIncomingTreeEdges(F[k]),F=F.concat(v))}else null!=v&&K.push(F[k])}F=K;return z.apply(this,arguments)};g.hoverIcons.getStateAt=function(F,J,K){return d(F.cell)?null:this.graph.view.getState(this.graph.getCellAt(J,
+K))};var E=l.duplicateCells;l.duplicateCells=function(F,J){F=null!=F?F:this.getSelectionCells();for(var K=F.slice(0),k=0;k<K.length;k++){var v=l.view.getState(K[k]);if(null!=v&&d(v.cell)){var G=l.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],F)}}this.model.beginUpdate();try{var N=E.call(this,F,J);if(N.length==F.length)for(k=0;k<F.length;k++)if(d(F[k])){var O=l.getIncomingTreeEdges(N[k]);G=l.getIncomingTreeEdges(F[k]);if(0==O.length&&0<G.length){var P=this.cloneCell(G[0]);
+this.addEdge(P,l.getDefaultParent(),this.model.getTerminal(G[0],!0),N[k])}}}finally{this.model.endUpdate()}return N};var D=l.moveCells;l.moveCells=function(F,J,K,k,v,G,N){for(var O=null,P=[],S=0;S<F.length;S++)(q(F[S])||d(F[S]))&&!B(F[S])&&this.isCellCollapsed(F[S])?P=P.concat(this.getSubtree(F[S])):P.push(F[S]);F=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=v;var V=this.getCurrentCellStyle(v);if(null!=F&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<F.length;S++)if(d(F[S])||
+l.model.isEdge(F[S])&&null==l.model.getTerminal(F[S],!0)){v=l.model.getParent(F[S]);break}if(null!=P&&v!=P&&null!=this.view.getState(F[0])){var W=l.getIncomingTreeEdges(F[0]);if(0<W.length){var X=l.view.getState(l.model.getTerminal(W[0],!0));if(null!=X){var Z=l.view.getState(P);null!=Z&&(J=(Z.getCenterX()-X.getCenterX())/l.view.scale,K=(Z.getCenterY()-X.getCenterY())/l.view.scale)}}}}O=D.apply(this,arguments);if(null!=O&&null!=F&&O.length==F.length)for(S=0;S<O.length;S++)if(this.model.isEdge(O[S]))d(P)&&
+0>mxUtils.indexOf(O,this.model.getTerminal(O[S],!0))&&this.model.setTerminal(O[S],P,!0);else if(d(F[S])&&(W=l.getIncomingTreeEdges(F[S]),0<W.length))if(!k)d(P)&&0>mxUtils.indexOf(F,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==l.getIncomingTreeEdges(O[S]).length){V=P;if(null==V||V==l.model.getParent(F[S]))V=l.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,l.getDefaultParent(),V,O[S])}}finally{this.model.endUpdate()}return O};if(null!=g.sidebar){var A=
+g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(F,J,K,k){var v=l.model,G=null;v.beginUpdate();try{if(G=A.apply(this,arguments),d(F))for(var N=0;N<G.length;N++)if(v.isEdge(G[N])&&null==v.getTerminal(G[N],!0)){v.setTerminal(G[N],F,!0);var O=l.getCellGeometry(G[N]);O.points=null;null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var Q={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},
+R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},T=g.onKeyDown;g.onKeyDown=function(F){try{var J=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=J){var K=mxEvent.isAltDown(F)&&mxEvent.isShiftDown(F)?Q[F.keyCode]:mxEvent.isAltDown(F)?R[F.keyCode]:null;null!=K?(K.funct(F),mxEvent.consume(F)):d(J)&&(K=null,0<l.getIncomingTreeEdges(J).length&&(9==F.which?K=mxEvent.isShiftDown(F)?L(J):H(J):13==F.which&&(K=I(J,!mxEvent.isShiftDown(F)))),null!=K&&0<K.length?(1==K.length&&l.model.isEdge(K[0])?
l.setSelectionCell(l.model.getTerminal(K[0],!1)):l.setSelectionCell(K[K.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(J)),l.startEditingAtCell(J),mxEvent.consume(F)):37==F.keyCode?(e(J,mxConstants.DIRECTION_WEST),mxEvent.consume(F)):38==F.keyCode?(e(J,mxConstants.DIRECTION_NORTH),mxEvent.consume(F)):39==F.keyCode?(e(J,mxConstants.DIRECTION_EAST),mxEvent.consume(F)):40==F.keyCode&&(e(J,mxConstants.DIRECTION_SOUTH),mxEvent.consume(F)))}}catch(k){g.handleError(k)}mxEvent.isConsumed(F)||
-T.apply(this,arguments)};var L=l.connectVertex;l.connectVertex=function(F,J,K,k,v,G,N){var O=l.getIncomingTreeEdges(F);if(d(F)){var Q=y(F),S=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,V=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST;return Q==J||0==O.length?H(F,J):S==V?M(F):I(F,J!=mxConstants.DIRECTION_NORTH&&J!=mxConstants.DIRECTION_WEST)}return L.apply(this,arguments)};l.getSubtree=function(F){var J=[F];!q(F)&&!d(F)||C(F)||l.traverse(F,!0,function(K,k){var v=null!=
-k&&l.isTreeEdge(k);v&&0>mxUtils.indexOf(J,k)&&J.push(k);(null==k||v)&&0>mxUtils.indexOf(J,K)&&J.push(K);return null==k||v});return J};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!C(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+T.apply(this,arguments)};var M=l.connectVertex;l.connectVertex=function(F,J,K,k,v,G,N){var O=l.getIncomingTreeEdges(F);if(d(F)){var P=y(F),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,V=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST;return P==J||0==O.length?H(F,J):S==V?L(F):I(F,J!=mxConstants.DIRECTION_NORTH&&J!=mxConstants.DIRECTION_WEST)}return M.apply(this,arguments)};l.getSubtree=function(F){var J=[F];!q(F)&&!d(F)||B(F)||l.traverse(F,!0,function(K,k){var v=null!=
+k&&l.isTreeEdge(k);v&&0>mxUtils.indexOf(J,k)&&J.push(k);(null==k||v)&&0>mxUtils.indexOf(J,K)&&J.push(K);return null==k||v});return J};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(F){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(F),mxEvent.getClientY(F),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=
mxEvent.isMouseEvent(F);this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(F)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var n=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){n.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:
-0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var t=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){t.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var B=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,J){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=
-null)}};if("undefined"!==typeof Sidebar){var m=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=m.apply(this,arguments),q=this.graph,x=this;return d.concat([this.addEntry("tree container",function(){var C=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var y=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-y.vertex=!0;var I=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");M.geometry.relative=!0;M.edge=!0;y.insertEdge(M,!0);I.insertEdge(M,!1);C.insert(M);C.insert(y);C.insert(I);
-return x.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var C=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");C.vertex=!0;var y=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-y.vertex=!0;var I=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');I.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-M.geometry.relative=!0;M.edge=!0;y.insertEdge(M,!0);I.insertEdge(M,!1);var H=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-H.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),M.style);c.geometry.relative=!0;c.edge=!0;y.insertEdge(c,!0);H.insertEdge(c,!1);var e=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),M.style);g.geometry.relative=!0;g.edge=!0;y.insertEdge(g,!0);e.insertEdge(g,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-l.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),M.style);p.geometry.relative=!0;p.edge=!0;y.insertEdge(p,!0);l.insertEdge(p,!1);C.insert(M);C.insert(c);C.insert(g);C.insert(p);C.insert(y);C.insert(I);C.insert(H);C.insert(e);C.insert(l);return x.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var C=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
-C.vertex=!0;return x.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var C=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-C.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;C.insertEdge(y,!1);return x.createVertexTemplateFromCells([C,y],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var C=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
-'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');C.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;C.insertEdge(y,!1);return x.createVertexTemplateFromCells([C,y],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree orgchart organization division",function(){var C=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.vertex=!0;var y=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var I=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"};');I.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-M.geometry.relative=!0;M.edge=!0;y.insertEdge(M,!0);I.insertEdge(M,!1);var H=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;y.insertEdge(c,!0);H.insertEdge(c,!1);C.insert(M);C.insert(c);C.insert(y);C.insert(I);C.insert(H);return x.createVertexTemplateFromCells([C],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree root",function(){var C=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(C,"treeRoot","1");C.vertex=!0;return x.createVertexTemplateFromCells([C],
-C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree division",function(){var C=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"};');C.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-y.geometry.setTerminalPoint(new mxPoint(0,0),!0);y.geometry.relative=!0;y.edge=!0;C.insertEdge(y,!1);return x.createVertexTemplateFromCells([C,y],C.geometry.width,C.geometry.height,C.value)}),this.addEntry("tree sub sections",function(){var C=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");C.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;C.insertEdge(y,!1);var I=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");I.vertex=!0;var M=new mxCell("",new mxGeometry(0,0,0,0),y.style);M.geometry.setTerminalPoint(new mxPoint(110,-40),!0);M.geometry.relative=!0;M.edge=!0;I.insertEdge(M,!1);return x.createVertexTemplateFromCells([y,M,C,I],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var t=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){t.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var C=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,J){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=
+null)}};if("undefined"!==typeof Sidebar){var m=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=m.apply(this,arguments),q=this.graph,x=this;return d.concat([this.addEntry("tree container",function(){var B=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var y=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+y.vertex=!0;var I=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');I.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");L.geometry.relative=!0;L.edge=!0;y.insertEdge(L,!0);I.insertEdge(L,!1);B.insert(L);B.insert(y);B.insert(I);
+return x.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var B=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");B.vertex=!0;var y=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+y.vertex=!0;var I=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');I.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+L.geometry.relative=!0;L.edge=!0;y.insertEdge(L,!0);I.insertEdge(L,!1);var H=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+H.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),L.style);c.geometry.relative=!0;c.edge=!0;y.insertEdge(c,!0);H.insertEdge(c,!1);var e=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),L.style);g.geometry.relative=!0;g.edge=!0;y.insertEdge(g,!0);e.insertEdge(g,!1);var l=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+l.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),L.style);p.geometry.relative=!0;p.edge=!0;y.insertEdge(p,!0);l.insertEdge(p,!1);B.insert(L);B.insert(c);B.insert(g);B.insert(p);B.insert(y);B.insert(I);B.insert(H);B.insert(e);B.insert(l);return x.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var B=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+B.vertex=!0;return x.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var B=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+B.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;B.insertEdge(y,!1);return x.createVertexTemplateFromCells([B,y],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var B=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
+'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+y.geometry.setTerminalPoint(new mxPoint(-40,40),!0);y.geometry.relative=!0;y.edge=!0;B.insertEdge(y,!1);return x.createVertexTemplateFromCells([B,y],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree orgchart organization division",function(){var B=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var y=new mxCell("Organization",new mxGeometry(80,
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(y,"treeRoot","1");y.vertex=!0;var I=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"};');I.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+L.geometry.relative=!0;L.edge=!0;y.insertEdge(L,!0);I.insertEdge(L,!1);var H=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;y.insertEdge(c,!0);H.insertEdge(c,!1);B.insert(L);B.insert(c);B.insert(y);B.insert(I);B.insert(H);return x.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return x.createVertexTemplateFromCells([B],
+B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+y.geometry.setTerminalPoint(new mxPoint(0,0),!0);y.geometry.relative=!0;y.edge=!0;B.insertEdge(y,!1);return x.createVertexTemplateFromCells([B,y],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
+y.geometry.setTerminalPoint(new mxPoint(110,-40),!0);y.geometry.relative=!0;y.edge=!0;B.insertEdge(y,!1);var I=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");I.vertex=!0;var L=new mxCell("",new mxGeometry(0,0,0,0),y.style);L.geometry.setTerminalPoint(new mxPoint(110,-40),!0);L.geometry.relative=!0;L.edge=!0;I.insertEdge(L,!1);return x.createVertexTemplateFromCells([y,L,B,I],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(H,c){if(EditorUi.windowed){var e=H.editor.graph;e.popupMenuHandler.hideMenu();null==H.formatWindow?(H.formatWindow=new WrapperWindow(H,"",Math.max(10,H.diagramContainer.clientWidth-248),60,240,Math.min(566,e.container.clientHeight-10),function(g){g.className="geSidebarContainer geFormatContainer";H.createFormat(g).init()}),H.dependsOnLanguage(mxUtils.bind(this,function(){H.formatWindow.window.setTitle(mxResources.get("format"))})),H.formatWindow.window.addListener(mxEvent.SHOW,
mxUtils.bind(this,function(){H.formatWindow.window.fit()})),H.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):H.formatWindow.window.setVisible(null!=c?c:!H.formatWindow.window.isVisible())}else null==H.formatElt&&(H.formatElt=H.createSidebarContainer(),H.createFormat(H.formatElt).init(),H.formatElt.style.border="none",H.formatElt.style.width="240px",H.formatElt.style.borderLeftWidth="1px",H.formatElt.style.borderLeftStyle="solid",H.formatElt.style.right="0px"),c=H.diagramContainer.parentNode,
null!=H.formatElt.parentNode?(H.formatElt.parentNode.removeChild(H.formatElt),c.style.right="0px"):(c.parentNode.appendChild(H.formatElt),c.style.right=H.formatElt.style.width)}function f(H,c){if(EditorUi.windowed){var e=H.editor.graph;e.popupMenuHandler.hideMenu();null==H.sidebarWindow?(H.sidebarWindow=new WrapperWindow(H,"",10,56,Math.min(e.container.clientWidth-10,218)-6,Math.min(e.container.clientHeight-40,650)-6,function(g){H.createShapesPanel(g)}),H.dependsOnLanguage(mxUtils.bind(this,function(){H.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
@@ -14242,61 +14241,61 @@ H.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){H.s
document.body.clientWidth}catch(H){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var d=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){d.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(H,c){null!=c.shortcut&&900>m&&!mxClient.IS_IOS?H.firstChild.nextSibling.setAttribute("title",c.shortcut):q.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(H){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=H?H:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();x.apply(this,arguments)};var C=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(H){C.apply(this,
+function(H){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=H?H:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var x=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();x.apply(this,arguments)};var B=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(H){B.apply(this,
arguments);if(H){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&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 H=this.editorUi;EditorUi.enablePlantUml&&!H.isOffline()&&H.actions.put("plantUml",new Action("plantUml...",function(){var g=new ParseDialog(H,mxResources.get("plantUml")+"...","plantUml");H.showDialog(g.container,620,420,!0,!1);g.init()}));H.actions.put("mermaid",new Action("mermaid...",function(){var g=new ParseDialog(H,mxResources.get("mermaid")+"...","mermaid");H.showDialog(g.container,620,420,!0,!1);g.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
e=function(g,l,p,u){g.addItem(p,null,mxUtils.bind(this,function(){var z=new CreateGraphDialog(H,p,u);H.showDialog(z.container,620,420,!0,!1);z.init()}),l)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(g,l){for(var p=0;p<c.length;p++)"-"==c[p]?g.addSeparator(l):e(g,l,mxResources.get(c[p])+"...",c[p])})))};EditorUi.prototype.installFormatToolbar=function(H){var c=this.editor.graph,e=document.createElement("div");e.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%;";
c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(g,l){0<c.getSelectionCount()?(H.appendChild(e),e.innerHTML="Selected: "+c.getSelectionCount()):null!=e.parentNode&&e.parentNode.removeChild(e)}))};var I=!1;EditorUi.prototype.initFormatWindow=function(){if(!I&&null!=this.formatWindow){I=!0;var H=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){H.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(e){mxEvent.getSource(e)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var M=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function H(v,G,N){var O=p.menus.get(v);G=E.addMenu(mxResources.get(v),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));G.className="geButton";G.setAttribute("title",mxResources.get(v));p.menus.menuCreated(O,G,"geButton");null!=N&&(G.style.backgroundImage="url("+N+")",G.innerText="");return G}function c(v,G,N,O,Q,S){var V=document.createElement("a");V.className="geButton";z.appendChild(V);null!=S?V.style.backgroundImage="url("+S+")":mxUtils.write(V,v);mxEvent.addListener(V,
-"click",function(W){"disabled"!=V.getAttribute("disabled")&&G(W);mxEvent.consume(W)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=Q&&(v=function(){Q.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},Q.addListener("stateChanged",v),u.addListener("enabledChanged",v),v());return V}function e(v,G,N){G=document.createElement("div");G.className="geButtonGroup";for(N=0;N<v.length;N++)null!=v[N]&&G.appendChild(v[N]);z.appendChild(G);return G}function g(){m=
+"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(e){mxEvent.getSource(e)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var L=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function H(v,G,N){var O=p.menus.get(v);G=E.addMenu(mxResources.get(v),mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));G.className="geButton";G.setAttribute("title",mxResources.get(v));p.menus.menuCreated(O,G,"geButton");null!=N&&(G.style.backgroundImage="url("+N+")",G.innerText="");return G}function c(v,G,N,O,P,S){var V=document.createElement("a");V.className="geButton";z.appendChild(V);null!=S?V.style.backgroundImage="url("+S+")":mxUtils.write(V,v);mxEvent.addListener(V,
+"click",function(W){"disabled"!=V.getAttribute("disabled")&&G(W);mxEvent.consume(W)});mxEvent.preventDefault(V);null!=O&&V.setAttribute("title",O);null!=P&&(v=function(){P.isEnabled()?V.removeAttribute("disabled"):V.setAttribute("disabled","disabled")},P.addListener("stateChanged",v),u.addListener("enabledChanged",v),v());return V}function e(v,G,N){G=document.createElement("div");G.className="geButtonGroup";for(N=0;N<v.length;N++)null!=v[N]&&G.appendChild(v[N]);z.appendChild(G);return G}function g(){m=
window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;z.innerHTML="";var v=1E3>m,G=H("diagram",null,v?Editor.menuImage:null);e([G,c(mxResources.get("shapes"),p.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),p.actions.get("image"),v?Editor.shapesImage:null),c(mxResources.get("format"),p.actions.get("format").funct,null,mxResources.get("format")+" ("+p.actions.get("format").shortcut+")",p.actions.get("image"),v?Editor.formatImage:null)]);G=H("insert",!0,
-v?T:null);e([G,c(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"),p.actions.get("delete"),v?Editor.trashImage:null)]);u.isEnabled()||G.setAttribute("disabled","disabled");J.setAttribute("title",mxResources.get("undo")+" ("+B.shortcut+")");K.setAttribute("title",mxResources.get("redo")+" ("+F.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=m&&(e([J,K]),520<=m&&e([k,640<=m?c("",n.funct,!0,mxResources.get("zoomIn")+" ("+
-Editor.ctrlKey+" +)",n,Editor.zoomInImage):null,640<=m?c("",t.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",t,Editor.zoomOutImage):null]));z.appendChild(p.statusContainer);z.appendChild(p.buttonContainer)}M.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
+v?T:null);e([G,c(mxResources.get("delete"),p.actions.get("delete").funct,null,mxResources.get("delete"),p.actions.get("delete"),v?Editor.trashImage:null)]);u.isEnabled()||G.setAttribute("disabled","disabled");J.setAttribute("title",mxResources.get("undo")+" ("+C.shortcut+")");K.setAttribute("title",mxResources.get("redo")+" ("+F.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=m&&(e([J,K]),520<=m&&e([k,640<=m?c("",n.funct,!0,mxResources.get("zoomIn")+" ("+
+Editor.ctrlKey+" +)",n,Editor.zoomInImage):null,640<=m?c("",t.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",t,Editor.zoomOutImage):null]));z.appendChild(p.statusContainer);z.appendChild(p.buttonContainer)}L.apply(this,arguments);var l=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=l&&(l.classList.add("geSimple"),l.classList.add("geMinimal"),l.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var p=this,u=p.editor.graph;p.toolbar=this.createToolbar(p.createDiv("geToolbar"));var z=document.createElement("div");z.className="geMenubarContainer";
var E=new Menubar(p,z),D=p.hideCurrentMenu;p.hideCurrentMenu=function(){D.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var A=p.descriptorChanged;p.descriptorChanged=function(){A.apply(this,arguments);var v=p.getCurrentFile();if(null!=v&&null!=v.getTitle()){var G=v.getMode();"google"==G?G="googleDrive":"github"==G?G="gitHub":"gitlab"==G?G="gitLab":"onedrive"==G&&(G="oneDrive");G=mxResources.get(G);z.setAttribute("title",v.getTitle()+(null!=G?" ("+G+")":""))}else z.removeAttribute("title")};
-p.setStatusText(p.editor.getStatus());z.appendChild(p.statusContainer);p.buttonContainer=this.createButtonContainer();z.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=this.createTabContainer();var P=this.createZoomInput(!0),R=p.updateTabContainer;p.updateTabContainer=function(){R.apply(this,arguments);p.tabContainer.appendChild(P)};var T=Editor.addBoxImage;if(null!=p.hoverIcons){var L=p.hoverIcons.update;p.hoverIcons.update=function(){u.freehand.isDrawing()||L.apply(this,
-arguments)}}if(null!=u.freehand){var U=u.freehand.createStyle;u.freehand.createStyle=function(v){return U.apply(this,arguments)+"sketch=0;"}}p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));p.setStatusText(p.editor.getStatus());var n=p.actions.get("zoomIn"),t=p.actions.get("zoomOut");l=p.actions.get("resetView");var B=p.actions.get("undo"),F=p.actions.get("redo"),J=c("",B.funct,null,"",B,Editor.undoImage),K=c("",F.funct,null,"",F,Editor.redoImage),
+p.setStatusText(p.editor.getStatus());z.appendChild(p.statusContainer);p.buttonContainer=this.createButtonContainer();z.appendChild(p.buttonContainer);p.menubarContainer=p.buttonContainer;p.tabContainer=this.createTabContainer();var Q=this.createZoomInput(!0),R=p.updateTabContainer;p.updateTabContainer=function(){R.apply(this,arguments);p.tabContainer.appendChild(Q)};var T=Editor.addBoxImage;if(null!=p.hoverIcons){var M=p.hoverIcons.update;p.hoverIcons.update=function(){u.freehand.isDrawing()||M.apply(this,
+arguments)}}if(null!=u.freehand){var U=u.freehand.createStyle;u.freehand.createStyle=function(v){return U.apply(this,arguments)+"sketch=0;"}}p.editor.addListener("statusChanged",mxUtils.bind(this,function(){p.setStatusText(p.editor.getStatus())}));p.setStatusText(p.editor.getStatus());var n=p.actions.get("zoomIn"),t=p.actions.get("zoomOut");l=p.actions.get("resetView");var C=p.actions.get("undo"),F=p.actions.get("redo"),J=c("",C.funct,null,"",C,Editor.undoImage),K=c("",F.funct,null,"",F,Editor.redoImage),
k=c("",function(v){mxEvent.isAltDown(v)?(p.hideCurrentMenu(),p.actions.get("customZoom").funct()):(p.hideCurrentMenu(),p.actions.get("smartFit").funct());mxEvent.consume(v)},!0,"",l,Editor.zoomFitImage);p.container.appendChild(p.tabContainer);p.container.appendChild(z);p.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);g();p.addListener("lockedChanged",g);p.addListener("languageChanged",g);p.editor.graph.addListener("enabledChanged",g);mxEvent.addListener(window,"resize",function(){g();
null!=p.sidebarWindow&&p.sidebarWindow.window.fit();null!=p.formatWindow&&p.formatWindow.window.fit();null!=p.actions.outlineWindow&&p.actions.outlineWindow.window.fit();null!=p.actions.layersWindow&&p.actions.layersWindow.window.fit();null!=p.menus.chatWindow&&p.menus.chatWindow.window.fit();null!=p.menus.tagsWindow&&p.menus.tagsWindow.window.fit();null!=p.menus.findWindow&&p.menus.findWindow.window.fit();null!=p.menus.findReplaceWindow&&p.menus.findReplaceWindow.window.fit()})}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,x,C){var y=q.y,I=q.x,M=!1,H=!1;if(null!=this.states&&null!=d&&null!=q){var c=this,e=new mxCellState,g=this.graph.getView().scale,l=Math.max(2,this.getGuideTolerance()/2);e.x=d.x+I;e.y=d.y+y;e.width=d.width;e.height=d.height;for(var p=[],u=[],z=0;z<this.states.length;z++){var E=this.states[z];E instanceof mxCellState&&(C||!this.graph.isCellSelected(E.cell))&&((e.x>=E.x&&e.x<=E.x+E.width||E.x>=e.x&&E.x<=e.x+e.width)&&(e.y>
-E.y+E.height+4||e.y+e.height+4<E.y)?p.push(E):(e.y>=E.y&&e.y<=E.y+E.height||E.y>=e.y&&E.y<=e.y+e.height)&&(e.x>E.x+E.width+4||e.x+e.width+4<E.x)&&u.push(E))}var D=0,A=0,P=E=0,R=0,T=0,L=0,U=0,n=5*g;if(1<p.length){p.push(e);p.sort(function(J,K){return J.y-K.y});var t=!1;z=e==p[0];g=e==p[p.length-1];if(!z&&!g)for(z=1;z<p.length-1;z++)if(e==p[z]){g=p[z-1];z=p[z+1];E=A=P=(z.y-g.y-g.height-e.height)/2;break}for(z=0;z<p.length-1;z++){g=p[z];var B=p[z+1],F=e==g||e==B;B=B.y-g.y-g.height;t|=e==g;if(0==A&&0==
-D)A=B,D=1;else if(Math.abs(A-B)<=(F||1==z&&t?l:0))D+=1;else if(1<D&&t){p=p.slice(0,z+1);break}else if(3<=p.length-z&&!t)D=0,E=A=0!=P?P:0,p.splice(0,0==z?1:z),z=-1;else break;0!=E||F||(A=E=B)}3==p.length&&p[1]==e&&(E=0)}if(1<u.length){u.push(e);u.sort(function(J,K){return J.x-K.x});t=!1;z=e==u[0];g=e==u[u.length-1];if(!z&&!g)for(z=1;z<u.length-1;z++)if(e==u[z]){g=u[z-1];z=u[z+1];L=T=U=(z.x-g.x-g.width-e.width)/2;break}for(z=0;z<u.length-1;z++){g=u[z];B=u[z+1];F=e==g||e==B;B=B.x-g.x-g.width;t|=e==g;
-if(0==T&&0==R)T=B,R=1;else if(Math.abs(T-B)<=(F||1==z&&t?l:0))R+=1;else if(1<R&&t){u=u.slice(0,z+1);break}else if(3<=u.length-z&&!t)R=0,L=T=0!=U?U:0,u.splice(0,0==z?1:z),z=-1;else break;0!=L||F||(T=L=B)}3==u.length&&u[1]==e&&(L=0)}l=function(J,K,k,v){var G=[];if(v){v=n;var N=0}else v=0,N=n;G.push(new mxPoint(J.x-v,J.y-N));G.push(new mxPoint(J.x+v,J.y+N));G.push(J);G.push(K);G.push(new mxPoint(K.x-v,K.y-N));G.push(new mxPoint(K.x+v,K.y+N));if(null!=k)return k.points=G,k;J=new mxPolyline(G,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);J.dialect=mxConstants.DIALECT_SVG;J.pointerEvents=!1;J.init(c.graph.getView().getOverlayPane());return J};T=function(J,K){if(J&&null!=c.guidesArrHor)for(J=0;J<c.guidesArrHor.length;J++)c.guidesArrHor[J].node.style.visibility="hidden";if(K&&null!=c.guidesArrVer)for(J=0;J<c.guidesArrVer.length;J++)c.guidesArrVer[J].node.style.visibility="hidden"};if(1<R&&R==u.length-1){R=[];U=c.guidesArrHor;M=[];I=0;z=u[0]==e?1:0;t=u[z].y+u[z].height;if(0<L)for(z=0;z<u.length-1;z++)g=
-u[z],B=u[z+1],e==g?(I=B.x-g.width-L,M.push(new mxPoint(I+g.width+n,t)),M.push(new mxPoint(B.x-n,t))):e==B?(M.push(new mxPoint(g.x+g.width+n,t)),I=g.x+g.width+L,M.push(new mxPoint(I-n,t))):(M.push(new mxPoint(g.x+g.width+n,t)),M.push(new mxPoint(B.x-n,t)));else g=u[0],z=u[2],I=g.x+g.width+(z.x-g.x-g.width-e.width)/2,M.push(new mxPoint(g.x+g.width+n,t)),M.push(new mxPoint(I-n,t)),M.push(new mxPoint(I+e.width+n,t)),M.push(new mxPoint(z.x-n,t));for(z=0;z<M.length;z+=2)u=M[z],L=M[z+1],u=l(u,L,null!=U?
-U[z/2]:null),u.node.style.visibility="visible",u.redraw(),R.push(u);for(z=M.length/2;null!=U&&z<U.length;z++)U[z].destroy();c.guidesArrHor=R;I-=d.x;M=!0}else T(!0);if(1<D&&D==p.length-1){R=[];U=c.guidesArrVer;H=[];y=0;z=p[0]==e?1:0;D=p[z].x+p[z].width;if(0<E)for(z=0;z<p.length-1;z++)g=p[z],B=p[z+1],e==g?(y=B.y-g.height-E,H.push(new mxPoint(D,y+g.height+n)),H.push(new mxPoint(D,B.y-n))):e==B?(H.push(new mxPoint(D,g.y+g.height+n)),y=g.y+g.height+E,H.push(new mxPoint(D,y-n))):(H.push(new mxPoint(D,g.y+
-g.height+n)),H.push(new mxPoint(D,B.y-n)));else g=p[0],z=p[2],y=g.y+g.height+(z.y-g.y-g.height-e.height)/2,H.push(new mxPoint(D,g.y+g.height+n)),H.push(new mxPoint(D,y-n)),H.push(new mxPoint(D,y+e.height+n)),H.push(new mxPoint(D,z.y-n));for(z=0;z<H.length;z+=2)u=H[z],L=H[z+1],u=l(u,L,null!=U?U[z/2]:null,!0),u.node.style.visibility="visible",u.redraw(),R.push(u);for(z=H.length/2;null!=U&&z<U.length;z++)U[z].destroy();c.guidesArrVer=R;y-=d.y;H=!0}else T(!1,!0)}if(M||H)return e=new mxPoint(I,y),p=b.call(this,
-d,e,x,C),M&&!H?e.y=p.y:H&&!M&&(e.x=p.x),p.y!=e.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=e.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),e;T(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var q=this.guidesArrVer,x=this.guidesArrHor;if(null!=q)for(var C=0;C<q.length;C++)q[C].node.style.visibility=d?"visible":"hidden";if(null!=
-x)for(C=0;C<x.length;C++)x[C].node.style.visibility=d?"visible":"hidden"};var m=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){m.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=q){for(x=0;x<q.length;x++)q[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,m,d){function q(){var D=b.getDiagramContainerOffset(),A=b.diagramContainer;c.style.top=A.offsetTop-D.y+"px";c.style.left=A.offsetLeft-D.x+"px";c.style.width=(m?0:A.offsetWidth)+I+"px";c.style.height=(m?A.offsetHeight:0)+I+"px"}function x(D,A,P){if(null!=C)return D;var R;return function(){var T=this,L=arguments,U=P&&!R;clearTimeout(R);R=setTimeout(function(){R=null;P||D.apply(T,L)},A);U&&D.apply(T,L)}}var C=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
-window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,I=this.RULER_THICKNESS,M=this;this.unit=f;var H=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
-function(){H=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[m?"borderRight":"borderBottom"]="0.5px solid "+H.strokeClr;c.style.borderLeft="0.5px solid "+H.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){M.editorUiRefresh.apply(b,
-arguments);q()};q();var e=document.createElement("canvas");e.width=c.offsetWidth;e.height=c.offsetHeight;c.style.overflow="hidden";e.style.position="relative";c.appendChild(e);var g=e.getContext("2d");this.ui=b;var l=b.editor.graph;this.graph=l;this.container=c;this.canvas=e;var p=function(D,A,P,R,T){D=Math.round(D);A=Math.round(A);P=Math.round(P);R=Math.round(R);g.beginPath();g.moveTo(D+.5,A+.5);g.lineTo(P+.5,R+.5);g.stroke();T&&(m?(g.save(),g.translate(D,A),g.rotate(-Math.PI/2),g.fillText(T,0,0),
-g.restore()):g.fillText(T,D,A))},u=function(){g.clearRect(0,0,e.width,e.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=H.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var D=l.view.scale,A=l.view.getBackgroundPageBounds(),P=l.view.translate,R=l.pageVisible;P=R?I+(m?A.y-l.container.scrollTop:A.x-l.container.scrollLeft):I+(m?P.y*D-l.container.scrollTop:P.x*D-l.container.scrollLeft);var T=0;R&&(T=l.getPageLayout(),T=m?T.y*l.pageFormat.height:T.x*l.pageFormat.width);var L;switch(M.unit){case mxConstants.POINTS:var U=
-L=10;var n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:L=10;U=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:L=20;U=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:L=.5>=D||4<=D?8:16,U=mxConstants.PIXELS_PER_INCH/L,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var t=U;2<=D?t=U/(2*Math.floor(D/2)):.5>=D&&(t=U*Math.floor(1/D/2)*(M.unit==mxConstants.MILLIMETERS?2:1));U=null;A=R?Math.min(P+(m?A.height:A.width),m?
-e.height:e.width):m?e.height:e.width;if(R)if(g.fillStyle=H.outBkgClr,m){var B=P-I;0<B&&g.fillRect(0,I,I,B);A<e.height&&g.fillRect(0,A,I,e.height)}else B=P-I,0<B&&g.fillRect(I,0,B,I),A<e.width&&g.fillRect(A,0,e.width,I);g.fillStyle=H.fontClr;for(R=R?P:P%(t*D);R<=A;R+=t*D)if(B=Math.round((R-P)/D/t),!(R<I||B==U)){U=B;var F=null;0==B%L&&(F=M.formatText(T+B*t)+"");m?p(I-n[Math.abs(B)%L],R,I,R,F):p(R,I-n[Math.abs(B)%L],R,I,F)}g.lineWidth=1;p(m?0:I,m?I:0,I,I);g.fillStyle=H.cornerClr;g.fillRect(0,0,I,I)},
-z=-1,E=function(){null!=C?(null!=y&&y(z),z=C(u)):u()};this.drawRuler=E;this.sizeListener=f=x(function(){var D=l.container;m?(D=D.offsetHeight+I,e.height!=D&&(e.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+I,e.width!=D&&(e.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=x(function(){var D=m?l.container.scrollTop:l.container.scrollLeft;M.lastScroll!=D&&(M.lastScroll=D,E())},10);this.unitListener=function(D,A){M.setUnit(A.getProperty("unit"))};
-l.addListener(mxEvent.SIZE,f);l.container.addEventListener("scroll",d);l.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){H=D;c.style.background=H.bkgClr;u()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,A,P,R){if(m&&4<D.height||!m&&4<D.width){if(null!=M.guidePart)try{g.putImageData(M.guidePart.imgData1,
-M.guidePart.x1,M.guidePart.y1),g.putImageData(M.guidePart.imgData2,M.guidePart.x2,M.guidePart.y2),g.putImageData(M.guidePart.imgData3,M.guidePart.x3,M.guidePart.y3)}catch(v){}var T=M.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=H.guideClr;g.setLineDash([2]);if(m){var L=D.y+T.y+I-this.graph.container.scrollTop;var U=0;var n=L+D.height/2;var t=I/2;var B=L+D.height;var F=0;var J=g.getImageData(U,L-1,I,3);p(U,L,I,L);L--;var K=g.getImageData(t,n-1,I,3);p(t,n,I,n);n--;var k=g.getImageData(F,
-B-1,I,3);p(F,B,I,B);B--}else L=0,U=D.x+T.x+I-this.graph.container.scrollLeft,n=I/2,t=U+D.width/2,B=0,F=U+D.width,J=g.getImageData(U-1,L,3,I),p(U,L,U,I),U--,K=g.getImageData(t-1,n,3,I),p(t,n,t,I),t--,k=g.getImageData(F-1,B,3,I),p(F,B,F,I),F--;if(null==M.guidePart||M.guidePart.x1!=U||M.guidePart.y1!=L)M.guidePart={imgData1:J,x1:U,y1:L,imgData2:K,x2:t,y2:n,imgData3:k,x3:F,y3:B}}catch(v){}}else T=M.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var D=M.origGuideDestroy.apply(this,arguments);if(null!=M.guidePart)try{g.putImageData(M.guidePart.imgData1,M.guidePart.x1,M.guidePart.y1),g.putImageData(M.guidePart.imgData2,M.guidePart.x2,M.guidePart.y2),g.putImageData(M.guidePart.imgData3,M.guidePart.x3,M.guidePart.y3),M.guidePart=null}catch(A){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,x,B){var y=q.y,I=q.x,L=!1,H=!1;if(null!=this.states&&null!=d&&null!=q){var c=this,e=new mxCellState,g=this.graph.getView().scale,l=Math.max(2,this.getGuideTolerance()/2);e.x=d.x+I;e.y=d.y+y;e.width=d.width;e.height=d.height;for(var p=[],u=[],z=0;z<this.states.length;z++){var E=this.states[z];E instanceof mxCellState&&(B||!this.graph.isCellSelected(E.cell))&&((e.x>=E.x&&e.x<=E.x+E.width||E.x>=e.x&&E.x<=e.x+e.width)&&(e.y>
+E.y+E.height+4||e.y+e.height+4<E.y)?p.push(E):(e.y>=E.y&&e.y<=E.y+E.height||E.y>=e.y&&E.y<=e.y+e.height)&&(e.x>E.x+E.width+4||e.x+e.width+4<E.x)&&u.push(E))}var D=0,A=0,Q=E=0,R=0,T=0,M=0,U=0,n=5*g;if(1<p.length){p.push(e);p.sort(function(J,K){return J.y-K.y});var t=!1;z=e==p[0];g=e==p[p.length-1];if(!z&&!g)for(z=1;z<p.length-1;z++)if(e==p[z]){g=p[z-1];z=p[z+1];E=A=Q=(z.y-g.y-g.height-e.height)/2;break}for(z=0;z<p.length-1;z++){g=p[z];var C=p[z+1],F=e==g||e==C;C=C.y-g.y-g.height;t|=e==g;if(0==A&&0==
+D)A=C,D=1;else if(Math.abs(A-C)<=(F||1==z&&t?l:0))D+=1;else if(1<D&&t){p=p.slice(0,z+1);break}else if(3<=p.length-z&&!t)D=0,E=A=0!=Q?Q:0,p.splice(0,0==z?1:z),z=-1;else break;0!=E||F||(A=E=C)}3==p.length&&p[1]==e&&(E=0)}if(1<u.length){u.push(e);u.sort(function(J,K){return J.x-K.x});t=!1;z=e==u[0];g=e==u[u.length-1];if(!z&&!g)for(z=1;z<u.length-1;z++)if(e==u[z]){g=u[z-1];z=u[z+1];M=T=U=(z.x-g.x-g.width-e.width)/2;break}for(z=0;z<u.length-1;z++){g=u[z];C=u[z+1];F=e==g||e==C;C=C.x-g.x-g.width;t|=e==g;
+if(0==T&&0==R)T=C,R=1;else if(Math.abs(T-C)<=(F||1==z&&t?l:0))R+=1;else if(1<R&&t){u=u.slice(0,z+1);break}else if(3<=u.length-z&&!t)R=0,M=T=0!=U?U:0,u.splice(0,0==z?1:z),z=-1;else break;0!=M||F||(T=M=C)}3==u.length&&u[1]==e&&(M=0)}l=function(J,K,k,v){var G=[];if(v){v=n;var N=0}else v=0,N=n;G.push(new mxPoint(J.x-v,J.y-N));G.push(new mxPoint(J.x+v,J.y+N));G.push(J);G.push(K);G.push(new mxPoint(K.x-v,K.y-N));G.push(new mxPoint(K.x+v,K.y+N));if(null!=k)return k.points=G,k;J=new mxPolyline(G,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);J.dialect=mxConstants.DIALECT_SVG;J.pointerEvents=!1;J.init(c.graph.getView().getOverlayPane());return J};T=function(J,K){if(J&&null!=c.guidesArrHor)for(J=0;J<c.guidesArrHor.length;J++)c.guidesArrHor[J].node.style.visibility="hidden";if(K&&null!=c.guidesArrVer)for(J=0;J<c.guidesArrVer.length;J++)c.guidesArrVer[J].node.style.visibility="hidden"};if(1<R&&R==u.length-1){R=[];U=c.guidesArrHor;L=[];I=0;z=u[0]==e?1:0;t=u[z].y+u[z].height;if(0<M)for(z=0;z<u.length-1;z++)g=
+u[z],C=u[z+1],e==g?(I=C.x-g.width-M,L.push(new mxPoint(I+g.width+n,t)),L.push(new mxPoint(C.x-n,t))):e==C?(L.push(new mxPoint(g.x+g.width+n,t)),I=g.x+g.width+M,L.push(new mxPoint(I-n,t))):(L.push(new mxPoint(g.x+g.width+n,t)),L.push(new mxPoint(C.x-n,t)));else g=u[0],z=u[2],I=g.x+g.width+(z.x-g.x-g.width-e.width)/2,L.push(new mxPoint(g.x+g.width+n,t)),L.push(new mxPoint(I-n,t)),L.push(new mxPoint(I+e.width+n,t)),L.push(new mxPoint(z.x-n,t));for(z=0;z<L.length;z+=2)u=L[z],M=L[z+1],u=l(u,M,null!=U?
+U[z/2]:null),u.node.style.visibility="visible",u.redraw(),R.push(u);for(z=L.length/2;null!=U&&z<U.length;z++)U[z].destroy();c.guidesArrHor=R;I-=d.x;L=!0}else T(!0);if(1<D&&D==p.length-1){R=[];U=c.guidesArrVer;H=[];y=0;z=p[0]==e?1:0;D=p[z].x+p[z].width;if(0<E)for(z=0;z<p.length-1;z++)g=p[z],C=p[z+1],e==g?(y=C.y-g.height-E,H.push(new mxPoint(D,y+g.height+n)),H.push(new mxPoint(D,C.y-n))):e==C?(H.push(new mxPoint(D,g.y+g.height+n)),y=g.y+g.height+E,H.push(new mxPoint(D,y-n))):(H.push(new mxPoint(D,g.y+
+g.height+n)),H.push(new mxPoint(D,C.y-n)));else g=p[0],z=p[2],y=g.y+g.height+(z.y-g.y-g.height-e.height)/2,H.push(new mxPoint(D,g.y+g.height+n)),H.push(new mxPoint(D,y-n)),H.push(new mxPoint(D,y+e.height+n)),H.push(new mxPoint(D,z.y-n));for(z=0;z<H.length;z+=2)u=H[z],M=H[z+1],u=l(u,M,null!=U?U[z/2]:null,!0),u.node.style.visibility="visible",u.redraw(),R.push(u);for(z=H.length/2;null!=U&&z<U.length;z++)U[z].destroy();c.guidesArrVer=R;y-=d.y;H=!0}else T(!1,!0)}if(L||H)return e=new mxPoint(I,y),p=b.call(this,
+d,e,x,B),L&&!H?e.y=p.y:H&&!L&&(e.x=p.x),p.y!=e.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=e.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),e;T(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var q=this.guidesArrVer,x=this.guidesArrHor;if(null!=q)for(var B=0;B<q.length;B++)q[B].node.style.visibility=d?"visible":"hidden";if(null!=
+x)for(B=0;B<x.length;B++)x[B].node.style.visibility=d?"visible":"hidden"};var m=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){m.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var x=0;x<d.length;x++)d[x].destroy();this.guidesArrVer=null}if(null!=q){for(x=0;x<q.length;x++)q[x].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,m,d){function q(){var D=b.getDiagramContainerOffset(),A=b.diagramContainer;c.style.top=A.offsetTop-D.y+"px";c.style.left=A.offsetLeft-D.x+"px";c.style.width=(m?0:A.offsetWidth)+I+"px";c.style.height=(m?A.offsetHeight:0)+I+"px"}function x(D,A,Q){if(null!=B)return D;var R;return function(){var T=this,M=arguments,U=Q&&!R;clearTimeout(R);R=setTimeout(function(){R=null;Q||D.apply(T,M)},A);U&&D.apply(T,M)}}var B=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||
+window.msRequestAnimationFrame,y=window.cancelAnimationFrame||window.mozCancelAnimationFrame,I=this.RULER_THICKNESS,L=this;this.unit=f;var H=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},c=document.createElement("div");c.className="geRuler";c.style.position="fixed";this.updateStyle=mxUtils.bind(this,
+function(){H=Editor.isDarkMode()?{outBkgClr:"#1B1D1E",cornerClr:"#1B1D1E",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#f1f3f4",cornerClr:"#f1f3f4",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};c.style[m?"borderRight":"borderBottom"]="0.5px solid "+H.strokeClr;c.style.borderLeft="0.5px solid "+H.strokeClr});this.updateStyle();b.diagramContainer.appendChild(c);mxEvent.disableContextMenu(c);this.editorUiRefresh=b.refresh;b.refresh=function(D){L.editorUiRefresh.apply(b,
+arguments);q()};q();var e=document.createElement("canvas");e.width=c.offsetWidth;e.height=c.offsetHeight;c.style.overflow="hidden";e.style.position="relative";c.appendChild(e);var g=e.getContext("2d");this.ui=b;var l=b.editor.graph;this.graph=l;this.container=c;this.canvas=e;var p=function(D,A,Q,R,T){D=Math.round(D);A=Math.round(A);Q=Math.round(Q);R=Math.round(R);g.beginPath();g.moveTo(D+.5,A+.5);g.lineTo(Q+.5,R+.5);g.stroke();T&&(m?(g.save(),g.translate(D,A),g.rotate(-Math.PI/2),g.fillText(T,0,0),
+g.restore()):g.fillText(T,D,A))},u=function(){g.clearRect(0,0,e.width,e.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=H.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var D=l.view.scale,A=l.view.getBackgroundPageBounds(),Q=l.view.translate,R=l.pageVisible;Q=R?I+(m?A.y-l.container.scrollTop:A.x-l.container.scrollLeft):I+(m?Q.y*D-l.container.scrollTop:Q.x*D-l.container.scrollLeft);var T=0;R&&(T=l.getPageLayout(),T=m?T.y*l.pageFormat.height:T.x*l.pageFormat.width);var M;switch(L.unit){case mxConstants.POINTS:var U=
+M=10;var n=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:M=10;U=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:M=20;U=mxConstants.PIXELS_PER_MM;n=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:M=.5>=D||4<=D?8:16,U=mxConstants.PIXELS_PER_INCH/M,n=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var t=U;2<=D?t=U/(2*Math.floor(D/2)):.5>=D&&(t=U*Math.floor(1/D/2)*(L.unit==mxConstants.MILLIMETERS?2:1));U=null;A=R?Math.min(Q+(m?A.height:A.width),m?
+e.height:e.width):m?e.height:e.width;if(R)if(g.fillStyle=H.outBkgClr,m){var C=Q-I;0<C&&g.fillRect(0,I,I,C);A<e.height&&g.fillRect(0,A,I,e.height)}else C=Q-I,0<C&&g.fillRect(I,0,C,I),A<e.width&&g.fillRect(A,0,e.width,I);g.fillStyle=H.fontClr;for(R=R?Q:Q%(t*D);R<=A;R+=t*D)if(C=Math.round((R-Q)/D/t),!(R<I||C==U)){U=C;var F=null;0==C%M&&(F=L.formatText(T+C*t)+"");m?p(I-n[Math.abs(C)%M],R,I,R,F):p(R,I-n[Math.abs(C)%M],R,I,F)}g.lineWidth=1;p(m?0:I,m?I:0,I,I);g.fillStyle=H.cornerClr;g.fillRect(0,0,I,I)},
+z=-1,E=function(){null!=B?(null!=y&&y(z),z=B(u)):u()};this.drawRuler=E;this.sizeListener=f=x(function(){var D=l.container;m?(D=D.offsetHeight+I,e.height!=D&&(e.height=D,c.style.height=D+"px",E())):(D=D.offsetWidth+I,e.width!=D&&(e.width=D,c.style.width=D+"px",E()))},10);this.pageListener=function(){E()};this.scrollListener=d=x(function(){var D=m?l.container.scrollTop:l.container.scrollLeft;L.lastScroll!=D&&(L.lastScroll=D,E())},10);this.unitListener=function(D,A){L.setUnit(A.getProperty("unit"))};
+l.addListener(mxEvent.SIZE,f);l.container.addEventListener("scroll",d);l.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(D){H=D;c.style.background=H.bkgClr;u()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(D,A,Q,R){if(m&&4<D.height||!m&&4<D.width){if(null!=L.guidePart)try{g.putImageData(L.guidePart.imgData1,
+L.guidePart.x1,L.guidePart.y1),g.putImageData(L.guidePart.imgData2,L.guidePart.x2,L.guidePart.y2),g.putImageData(L.guidePart.imgData3,L.guidePart.x3,L.guidePart.y3)}catch(v){}var T=L.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=H.guideClr;g.setLineDash([2]);if(m){var M=D.y+T.y+I-this.graph.container.scrollTop;var U=0;var n=M+D.height/2;var t=I/2;var C=M+D.height;var F=0;var J=g.getImageData(U,M-1,I,3);p(U,M,I,M);M--;var K=g.getImageData(t,n-1,I,3);p(t,n,I,n);n--;var k=g.getImageData(F,
+C-1,I,3);p(F,C,I,C);C--}else M=0,U=D.x+T.x+I-this.graph.container.scrollLeft,n=I/2,t=U+D.width/2,C=0,F=U+D.width,J=g.getImageData(U-1,M,3,I),p(U,M,U,I),U--,K=g.getImageData(t-1,n,3,I),p(t,n,t,I),t--,k=g.getImageData(F-1,C,3,I),p(F,C,F,I),F--;if(null==L.guidePart||L.guidePart.x1!=U||L.guidePart.y1!=M)L.guidePart={imgData1:J,x1:U,y1:M,imgData2:K,x2:t,y2:n,imgData3:k,x3:F,y3:C}}catch(v){}}else T=L.origGuideMove.apply(this,arguments);return T};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var D=L.origGuideDestroy.apply(this,arguments);if(null!=L.guidePart)try{g.putImageData(L.guidePart.imgData1,L.guidePart.x1,L.guidePart.y1),g.putImageData(L.guidePart.imgData2,L.guidePart.x2,L.guidePart.y2),g.putImageData(L.guidePart.imgData3,L.guidePart.x3,L.guidePart.y3),L.guidePart=null}catch(A){}return D}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,f){var m=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return m};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var q=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
-function(x){q=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!q){var C=new mxPopupMenu(mxUtils.bind(this,function(M,H){b.menus.addMenuItems(M,["points","inches","millimeters","meters"],H)}));C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);b.resetCurrentMenu();C.destroy()});var y=mxEvent.getClientX(x),I=mxEvent.getClientY(x);C.popup(y,I,null,x);b.setCurrentMenu(C,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var m=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],x,C=[],y,I=!1,M=!0,H=!0,c=!0,e=!0,g=[],l=!1,p=!1,u=!1,z="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(n){I=n};this.setAutoClose=function(n){M=n};this.setAutoInsert=
+function(x){q=null!=b.currentMenu;mxEvent.consume(x)}),null,mxUtils.bind(this,function(x){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(x)||mxEvent.isPopupTrigger(x))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(x)||!q){var B=new mxPopupMenu(mxUtils.bind(this,function(L,H){b.menus.addMenuItems(L,["points","inches","millimeters","meters"],H)}));B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,
+function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);b.resetCurrentMenu();B.destroy()});var y=mxEvent.getClientX(x),I=mxEvent.getClientY(x);B.popup(y,I,null,x);b.setCurrentMenu(B,d)}mxEvent.consume(x)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var m=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],x,B=[],y,I=!1,L=!0,H=!0,c=!0,e=!0,g=[],l=!1,p=!1,u=!1,z="default",E={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},D=!0;this.setClosedPath=function(n){I=n};this.setAutoClose=function(n){L=n};this.setAutoInsert=
function(n){H=n};this.setAutoScroll=function(n){c=n};this.setOpenFill=function(n){e=n};this.setStopClickEnabled=function(n){p=n};this.setSelectInserted=function(n){u=n};this.setSmoothing=function(n){m=n};this.getSmoothing=function(){return m};this.setPerfectFreehandMode=function(n){D=n};this.isPerfectFreehandMode=function(){return D};this.setBrushSize=function(n){E.size=n};this.getBrushSize=function(){return E.size};var A=function(n){l=n;b.getRubberband().setEnabled(!n);b.graphHandler.setSelectEnabled(!n);
-b.graphHandler.setMoveEnabled(!n);b.container.style.cursor=n?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return l};var P=mxUtils.bind(this,function(n){if(d){var t=y.length,B=p&&0<C.length&&null!=y&&2>y.length;B||C.push.apply(C,y);y=[];C.push(null);q.push(d);d=null;(B||H)&&this.stopDrawing();H&&(!B||2<=t)&&this.startDrawing();mxEvent.consume(n)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(n){var t=null!=
-z?z:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=t||n||(t=b.shapeForegroundColor);return t};this.setStrokeColor=function(n){z=n};this.createStyle=function(n){var t=";fillColor=none;";D&&(t=";lineShape=1;");t+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+n+t};this.stopDrawing=function(){if(0<q.length){if(D){for(var n=[],t=0;t<C.length;t++)null!=C[t]&&n.push([C[t].x,
-C[t].y]);n=PerfectFreehand.getStroke(n,E);C=[];for(t=0;t<n.length;t++)C.push({x:n[t][0],y:n[t][1]});C.push(null)}n=C[0].x;var B=C[0].x,F=C[0].y,J=C[0].y;for(t=1;t<C.length;t++)null!=C[t]&&(n=Math.max(n,C[t].x),B=Math.min(B,C[t].x),F=Math.max(F,C[t].y),J=Math.min(J,C[t].y));n-=B;F-=J;if(0<n&&0<F){var K=100/n,k=100/F;C.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-B)*K;Q.y=(Q.y-J)*k;return Q});var v='<shape strokewidth="inherit"><foreground>',G=0;for(t=0;t<C.length;t++){var N=C[t];if(null==N){N=!1;G=
-C[G];var O=C[t-1];!I&&M&&(N=G.x-O.x,O=G.y-O.y,N=Math.sqrt(N*N+O*O)<=b.tolerance);if(I||N)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(e||I||N?"<fillstroke/>":"<stroke/>");G=t+1}else v=t==G?v+('<path><move x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>'):v+('<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){t=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;
-t=new mxCell("",new mxGeometry(B/v-G.x,J/v-G.y,n/v,F/v),t);t.vertex=1;b.model.beginUpdate();try{t=b.addCell(t),b.fireEvent(new mxEventObject("cellsInserted","cells",[t])),b.fireEvent(new mxEventObject("freehandInserted","cell",t))}finally{b.model.endUpdate()}u&&b.setSelectionCells([t])}}for(t=0;t<q.length;t++)q[t].parentNode.removeChild(q[t]);d=null;q=[];C=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(n,t){n=t.getProperty("eventName");t=t.getProperty("event");n==mxEvent.MOUSE_MOVE&&
-l&&(null!=t.sourceState&&t.sourceState.setCursor("crosshair"),t.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(n,t){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(n=t.getEvent(),l&&!mxEvent.isPopupTrigger(n)&&!mxEvent.isMiddleMouseButton(n)&&!mxEvent.isMultiTouchEvent(n))){var B=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);B=Math.max(1,B*b.view.scale);var F=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");
-d.setAttribute("fill",D?F:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",F);d.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(F=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",F=F.split(" ").map(function(J){return parseFloat(J)*B}).join(" "),d.setAttribute("stroke-dasharray",F));g=[];n=T(n);L(n);x="M"+n.x+" "+n.y;C.push(n);y=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[n.x,n.y]],E):x);f.appendChild(d);t.consume()}}),
-mouseMove:mxUtils.bind(this,function(n,t){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){n=t.getEvent();n=T(n);L(n);var B=U(0);if(B)if(C.push(B),D){var F=[];for(B=0;B<C.length;B++)F.push([C[B].x,C[B].y]);y=[];for(var J=2;J<g.length;J+=2)B=U(J),F.push([B.x,B.y]),y.push(B);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(F,E))}else{x+=" L"+B.x+" "+B.y;F="";y=[];for(J=2;J<g.length;J+=2)B=U(J),F+=" L"+B.x+" "+B.y,y.push(B);d.setAttribute("d",x+F)}c&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(n.x-
-B.x,n.y-B.y)).grow(20)));t.consume()}}),mouseUp:mxUtils.bind(this,function(n,t){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(P(t.getEvent()),t.consume())})});var T=function(n){return mxUtils.convertPoint(b.container,mxEvent.getClientX(n),mxEvent.getClientY(n))},L=function(n){for(g.push(n);g.length>m;)g.shift()},U=function(n){var t=g.length;if(1===t%2||t>=m){var B=0,F=0,J,K=0;for(J=n;J<t;J++)K++,n=g[J],B+=n.x,F+=n.y;return{x:B/K,y:F/K}}return null}}}
-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,m,d,q){this.id=b;this.email=f;this.displayName=m;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,f,m,d,q,x,C){this.file=b;this.id=f;this.content=m;this.modifiedDate=d;this.createdDate=q;this.isResolved=x;this.user=C;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,m,d,q){f()};DrawioComment.prototype.editComment=function(b,f,m){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+b.graphHandler.setMoveEnabled(!n);b.container.style.cursor=n?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){A(!0)};this.isDrawing=function(){return l};var Q=mxUtils.bind(this,function(n){if(d){var t=y.length,C=p&&0<B.length&&null!=y&&2>y.length;C||B.push.apply(B,y);y=[];B.push(null);q.push(d);d=null;(C||H)&&this.stopDrawing();H&&(!C||2<=t)&&this.startDrawing();mxEvent.consume(n)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(n){var t=null!=
+z?z:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=t||n||(t=b.shapeForegroundColor);return t};this.setStrokeColor=function(n){z=n};this.createStyle=function(n){var t=";fillColor=none;";D&&(t=";lineShape=1;");t+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+n+t};this.stopDrawing=function(){if(0<q.length){if(D){for(var n=[],t=0;t<B.length;t++)null!=B[t]&&n.push([B[t].x,
+B[t].y]);n=PerfectFreehand.getStroke(n,E);B=[];for(t=0;t<n.length;t++)B.push({x:n[t][0],y:n[t][1]});B.push(null)}n=B[0].x;var C=B[0].x,F=B[0].y,J=B[0].y;for(t=1;t<B.length;t++)null!=B[t]&&(n=Math.max(n,B[t].x),C=Math.min(C,B[t].x),F=Math.max(F,B[t].y),J=Math.min(J,B[t].y));n-=C;F-=J;if(0<n&&0<F){var K=100/n,k=100/F;B.map(function(P){if(null==P)return P;P.x=(P.x-C)*K;P.y=(P.y-J)*k;return P});var v='<shape strokewidth="inherit"><foreground>',G=0;for(t=0;t<B.length;t++){var N=B[t];if(null==N){N=!1;G=
+B[G];var O=B[t-1];!I&&L&&(N=G.x-O.x,O=G.y-O.y,N=Math.sqrt(N*N+O*O)<=b.tolerance);if(I||N)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(e||I||N?"<fillstroke/>":"<stroke/>");G=t+1}else v=t==G?v+('<path><move x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>'):v+('<line x="'+N.x.toFixed(2)+'" y="'+N.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){t=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;
+t=new mxCell("",new mxGeometry(C/v-G.x,J/v-G.y,n/v,F/v),t);t.vertex=1;b.model.beginUpdate();try{t=b.addCell(t),b.fireEvent(new mxEventObject("cellsInserted","cells",[t])),b.fireEvent(new mxEventObject("freehandInserted","cell",t))}finally{b.model.endUpdate()}u&&b.setSelectionCells([t])}}for(t=0;t<q.length;t++)q[t].parentNode.removeChild(q[t]);d=null;q=[];B=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(n,t){n=t.getProperty("eventName");t=t.getProperty("event");n==mxEvent.MOUSE_MOVE&&
+l&&(null!=t.sourceState&&t.sourceState.setCursor("crosshair"),t.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(n,t){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(n=t.getEvent(),l&&!mxEvent.isPopupTrigger(n)&&!mxEvent.isMiddleMouseButton(n)&&!mxEvent.isMultiTouchEvent(n))){var C=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);C=Math.max(1,C*b.view.scale);var F=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");
+d.setAttribute("fill",D?F:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",F);d.setAttribute("stroke-width",C);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(F=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",F=F.split(" ").map(function(J){return parseFloat(J)*C}).join(" "),d.setAttribute("stroke-dasharray",F));g=[];n=T(n);M(n);x="M"+n.x+" "+n.y;B.push(n);y=[];d.setAttribute("d",D?PerfectFreehand.getSvgPathFromStroke([[n.x,n.y]],E):x);f.appendChild(d);t.consume()}}),
+mouseMove:mxUtils.bind(this,function(n,t){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){n=t.getEvent();n=T(n);M(n);var C=U(0);if(C)if(B.push(C),D){var F=[];for(C=0;C<B.length;C++)F.push([B[C].x,B[C].y]);y=[];for(var J=2;J<g.length;J+=2)C=U(J),F.push([C.x,C.y]),y.push(C);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(F,E))}else{x+=" L"+C.x+" "+C.y;F="";y=[];for(J=2;J<g.length;J+=2)C=U(J),F+=" L"+C.x+" "+C.y,y.push(C);d.setAttribute("d",x+F)}c&&(C=b.view.translate,b.scrollRectToVisible((new mxRectangle(n.x-
+C.x,n.y-C.y)).grow(20)));t.consume()}}),mouseUp:mxUtils.bind(this,function(n,t){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(Q(t.getEvent()),t.consume())})});var T=function(n){return mxUtils.convertPoint(b.container,mxEvent.getClientX(n),mxEvent.getClientY(n))},M=function(n){for(g.push(n);g.length>m;)g.shift()},U=function(n){var t=g.length;if(1===t%2||t>=m){var C=0,F=0,J,K=0;for(J=n;J<t;J++)K++,n=g[J],C+=n.x,F+=n.y;return{x:C/K,y:F/K}}return null}}}
+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,m,d,q){this.id=b;this.email=f;this.displayName=m;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,f,m,d,q,x,B){this.file=b;this.id=f;this.content=m;this.modifiedDate=d;this.createdDate=q;this.isResolved=x;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,m,d,q){f()};DrawioComment.prototype.editComment=function(b,f,m){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function u(f){if(f&&null!=LucidImporter.imgSrcRepl){var p=LucidImporter.imgSrcRepl.attMap;if(p[f])f=p[f];else{p=LucidImporter.imgSrcRepl.imgRepl;for(var n=0;n<p.length;n++){var e=p[n];f=f.replace(e.searchVal,e.replVal)}LucidImporter.hasExtImgs=!0}}return f}function A(f){gb="";try{if(f){var p=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(p=LucidImporter.advImpConfig.fontMapping[f]);if(p){for(var n in p)gb+=n+"="+p[n]+";";return p.fontFamily?"font-family: "+p.fontFamily:
diff --git a/src/main/webapp/js/main.js b/src/main/webapp/js/main.js
new file mode 100644
index 000000000..404ea513c
--- /dev/null
+++ b/src/main/webapp/js/main.js
@@ -0,0 +1,15 @@
+/**
+ * Main
+ */
+if (urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function")
+{
+ window.addEventListener('load', function()
+ {
+ mxWinLoaded = true;
+ checkAllLoaded();
+ });
+}
+else
+{
+ App.main();
+}
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 2d73e94dc..9731f7805 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -29,7 +29,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.5",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -167,17 +167,17 @@ function(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_D
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,"gesturechange",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,"gestureend",function(g){mxEvent.consume(g)})}else{var d=
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
-a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},
-isMouseEvent:function(a){return!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in
-a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||
-null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",
-CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",
-BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",
-CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",
-EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
-mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};
-mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
+a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.type&&0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.type&&0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return!mxClient.IS_ANDROID&&
+mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.type&&0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
+mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
+(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},
+LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",
+FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",
+BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",
+REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",
+UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;
+mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&this.acceptResponse&&(this.acceptResponse=!1,a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),null!=b&&(this.request.onerror=
mxUtils.bind(this,function(e){this.acceptResponse&&(this.acceptResponse=!1,b(this,e))})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
@@ -1971,100 +1971,99 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,v){e.undoableEditHappened(v.getProperty("edit"))};var g=mxUtils.bind(this,function(m,v){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,v){m=v.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);v=!1;if(0<m.length){for(var n=[],A=0;A<m.length;A++)null!=b.view.getState(m[A])&&(n.push(m[A]),
v||(b.scrollCellToVisible(m[A]),v=!0));b.setSelectionCells(n)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,g,m,v,n,A,G,S,F,K){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));v&&document.body.appendChild(this.bg);v=b.createDiv(S?"geTransDialog":"geDialog");v.style.width=g+60+"px";v.style.height=m+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(v.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",v.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");v.appendChild(e);document.body.appendChild(v);if(n&&(e=document.createElement("div"),
-e.className="geButton",e.setAttribute("title",mxResources.get("close")),e.style.backgroundImage="url("+Editor.crossImage+")",e.style.position="absolute",e.style.top="0px",e.style.right="0px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),v.appendChild(e),!K)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(f){c=!0}),null,mxUtils.bind(this,function(f){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=A;this.container=v;b.editor.fireEvent(new mxEventObject("showDialog"))}
+function Dialog(b,e,g,m,v,n,A,G,R,F,J){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));v&&document.body.appendChild(this.bg);v=b.createDiv(R?"geTransDialog":"geDialog");v.style.width=g+60+"px";v.style.height=m+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(v.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",v.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");v.appendChild(e);document.body.appendChild(v);if(n&&(e=document.createElement("div"),
+e.className="geButton",e.setAttribute("title",mxResources.get("close")),e.style.backgroundImage="url("+Editor.crossImage+")",e.style.position="absolute",e.style.top="0px",e.style.right="0px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),v.appendChild(e),!J)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(f){c=!0}),null,mxUtils.bind(this,function(f){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=A;this.container=v;b.editor.fireEvent(new mxEventObject("showDialog"))}
Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};
Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,g,m,v,n,A,G,S,F,K){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="10px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,e);f.setAttribute("title",e);c.appendChild(f)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);c.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=n&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=K&&K()}),F.className="geBtn",g.appendChild(F));
-var l=mxUtils.button(m,function(){S&&b.hideDialog();null!=v&&v()});l.className="geBtn";g.appendChild(l);null!=A&&(m=mxUtils.button(A,function(){S&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){l.focus()};c.appendChild(g);this.container=c},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};
-PrintDialog.prototype.create=function(b){function e(l){var t=A.checked||F.checked,q=parseInt(c.value)/100;isNaN(q)&&(q=1,c.value="100%");mxClient.IS_SF&&(q*=.75);var D=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/g.pageScale;if(t){var N=A.checked?1:parseInt(K.value);isNaN(N)||(H=mxUtils.getScaleForPageCount(N,g,D))}var L=N=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*q);D.height=Math.ceil(D.height*q);H*=q;!t&&g.pageVisible?(q=g.getPageLayout(),N-=q.x*D.width,L-=q.y*D.height):
-t=!0;t=PrintDialog.createPrintPreview(g,H,D,0,N,L,t);t.open();l&&PrintDialog.printPreview(t)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var n=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-G.appendChild(S);mxEvent.addListener(S,"click",function(l){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(l)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});n.appendChild(G);v.appendChild(n);n=n.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");G.appendChild(S);mxEvent.addListener(S,
-"click",function(l){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(l)});n.appendChild(G);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(K);mxUtils.write(G," "+mxResources.get("pages")+" (max)");n.appendChild(G);v.appendChild(n);mxEvent.addListener(F,"change",
-function(){F.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");A.checked=!F.checked});n=n.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");n.appendChild(G);G=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";G.appendChild(c);n.appendChild(G);v.appendChild(n);n=document.createElement("tr");G=document.createElement("td");G.colSpan=2;
-G.style.paddingTop="20px";G.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&G.appendChild(S);if(PrintDialog.previewEnabled){var f=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});f.className="geBtn";G.appendChild(f)}f=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||
-G.appendChild(S);n.appendChild(G);v.appendChild(n);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};
-PrintDialog.createPrintPreview=function(b,e,g,m,v,n,A){e=new mxPrintPreview(b,e,g,m,v,n);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};
+var ErrorDialog=function(b,e,g,m,v,n,A,G,R,F,J){R=null!=R?R:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="10px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,e);f.setAttribute("title",e);c.appendChild(f)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);c.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=n&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=J&&J()}),F.className="geBtn",g.appendChild(F));
+var l=mxUtils.button(m,function(){R&&b.hideDialog();null!=v&&v()});l.className="geBtn";g.appendChild(l);null!=A&&(m=mxUtils.button(A,function(){R&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){l.focus()};c.appendChild(g);this.container=c},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};
+PrintDialog.prototype.create=function(b){function e(l){var t=A.checked||F.checked,q=parseInt(c.value)/100;isNaN(q)&&(q=1,c.value="100%");mxClient.IS_SF&&(q*=.75);var D=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/g.pageScale;if(t){var N=A.checked?1:parseInt(J.value);isNaN(N)||(H=mxUtils.getScaleForPageCount(N,g,D))}var L=N=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*q);D.height=Math.ceil(D.height*q);H*=q;!t&&g.pageVisible?(q=g.getPageLayout(),N-=q.x*D.width,L-=q.y*D.height):
+t=!0;t=PrintDialog.createPrintPreview(g,H,D,0,N,L,t);t.open();l&&PrintDialog.printPreview(t)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var n=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
+G.appendChild(R);mxEvent.addListener(R,"click",function(l){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(l)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});n.appendChild(G);v.appendChild(n);n=n.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");G.appendChild(R);mxEvent.addListener(R,
+"click",function(l){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(l)});n.appendChild(G);var J=document.createElement("input");J.setAttribute("value","1");J.setAttribute("type","number");J.setAttribute("min","1");J.setAttribute("size","4");J.setAttribute("disabled","disabled");J.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(J);mxUtils.write(G," "+mxResources.get("pages")+" (max)");n.appendChild(G);v.appendChild(n);mxEvent.addListener(F,"change",
+function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");A.checked=!F.checked});n=n.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");n.appendChild(G);G=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";G.appendChild(c);n.appendChild(G);v.appendChild(n);n=document.createElement("tr");G=document.createElement("td");G.colSpan=2;
+G.style.paddingTop="20px";G.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&G.appendChild(R);if(PrintDialog.previewEnabled){var f=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});f.className="geBtn";G.appendChild(f)}f=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||
+G.appendChild(R);n.appendChild(G);v.appendChild(n);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};
+PrintDialog.createPrintPreview=function(b,e,g,m,v,n,A){e=new mxPrintPreview(b,e,g,m,v,n);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var R=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(R.apply(this,arguments))};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){var q=c;null!=q&&null!=q.originalSrc&&(q=b.createImageForPageLink(q.originalSrc,null));null!=q&&null!=q.src?(K.style.backgroundImage="url("+q.src+")",K.style.display="inline-block"):(K.style.backgroundImage="",K.style.display="none");K.style.backgroundColor="";null!=f&&f!=mxConstants.NONE&&(K.style.backgroundColor=f,K.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");
+var PageSetupDialog=function(b){function e(){var q=c;null!=q&&null!=q.originalSrc&&(q=b.createImageForPageLink(q.originalSrc,null));null!=q&&null!=q.src?(J.style.backgroundImage="url("+q.src+")",J.style.display="inline-block"):(J.style.backgroundImage="",J.style.display="none");J.style.backgroundColor="";null!=f&&f!=mxConstants.NONE&&(J.style.backgroundColor=f,J.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");
var n=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");n.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var G=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");n.appendChild(A);
-A=document.createElement("td");A.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();A.appendChild(S);mxEvent.addListener(S,"change",function(){var q=parseInt(S.value);S.value=Math.max(1,isNaN(q)?g.getGridSize():q)});n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");
-n.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var K=document.createElement("div");K.style.display="inline-block";K.style.verticalAlign="middle";K.style.backgroundPosition="center center";K.style.backgroundRepeat="no-repeat";K.style.backgroundSize="contain";K.style.border="1px solid lightGray";K.style.borderRadius="4px";K.style.marginRight="14px";K.style.height="32px";
-K.style.width="64px";K.style.cursor="pointer";K.style.padding="4px";var c=g.backgroundImage,f=g.background,l=g.shadowVisible,t=function(q){b.showBackgroundImageDialog(function(D,H,N,L){H||(null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src}),c=D,l=L);f=N;e()},c,f,!0);mxEvent.consume(q)};mxEvent.addListener(F,"click",t);mxEvent.addListener(K,"click",t);e();A.appendChild(K);A.appendChild(F);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");
-A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);t=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var q=parseInt(S.value);isNaN(q)||g.gridSize===q||g.setGridSize(q);q=new ChangePageSetup(b,f,c,G.get());q.ignoreColor=g.background==f;q.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
+A=document.createElement("td");A.style.whiteSpace="nowrap";var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","0");R.style.width="40px";R.style.marginLeft="6px";R.value=g.getGridSize();A.appendChild(R);mxEvent.addListener(R,"change",function(){var q=parseInt(R.value);R.value=Math.max(1,isNaN(q)?g.getGridSize():q)});n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");
+n.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var J=document.createElement("div");J.style.display="inline-block";J.style.verticalAlign="middle";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="contain";J.style.border="1px solid lightGray";J.style.borderRadius="4px";J.style.marginRight="14px";J.style.height="32px";
+J.style.width="64px";J.style.cursor="pointer";J.style.padding="4px";var c=g.backgroundImage,f=g.background,l=g.shadowVisible,t=function(q){b.showBackgroundImageDialog(function(D,H,N,L){H||(null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src}),c=D,l=L);f=N;e()},c,f,!0);mxEvent.consume(q)};mxEvent.addListener(F,"click",t);mxEvent.addListener(J,"click",t);e();A.appendChild(J);A.appendChild(F);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");
+A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);t=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var q=parseInt(R.value);isNaN(q)||g.gridSize===q||g.setGridSize(q);q=new ChangePageSetup(b,f,c,G.get());q.ignoreColor=g.background==f;q.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
(q.shadowVisible=l);g.pageFormat.width==q.previousFormat.width&&g.pageFormat.height==q.previousFormat.height&&q.ignoreColor&&q.ignoreImage&&q.shadowVisible==g.shadowVisible||g.model.execute(q)});t.className="geBtn gePrimaryBtn";A.appendChild(t);b.editor.cancelFirst||A.appendChild(F);n.appendChild(A);v.appendChild(n);m.appendChild(v);this.container=m};
PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var v=document.createElement("input");v.setAttribute("name",e);v.setAttribute("type","radio");v.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",e);n.setAttribute("type","radio");n.setAttribute("value","landscape");var A=document.createElement("select");A.style.position="relative";A.style.marginBottom="4px";A.style.borderRadius="4px";A.style.borderWidth="1px";A.style.borderStyle="solid";
-A.style.boxSizing="border-box";A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);n.style.marginLeft="10px";n.style.marginRight="6px";G.appendChild(n);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
-mxResources.get("landscape"));G.appendChild(S);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var K=document.createElement("input");K.setAttribute("size","7");K.setAttribute("title",mxResources.get("width"));K.style.textAlign="right";F.appendChild(K);mxUtils.write(F," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+A.style.boxSizing="border-box";A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);n.style.marginLeft="10px";n.style.marginRight="6px";G.appendChild(n);var R=document.createElement("span");R.style.width="100px";mxUtils.write(R,
+mxResources.get("landscape"));G.appendChild(R);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var J=document.createElement("input");J.setAttribute("size","7");J.setAttribute("title",mxResources.get("width"));J.style.textAlign="right";F.appendChild(J);mxUtils.write(F," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
"right";F.appendChild(c);var f=document.createElement("select");f.style.marginLeft="4px";f.style.maxWidth="78px";f.style.width="78px";for(var l=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],t=0;t<l.length;t++){var q=document.createElement("option");q.setAttribute("value",l[t].unit);mxUtils.write(q,l[t].label);f.appendChild(q)}f.value=Editor.pageSizeUnit;F.appendChild(f);
-G.style.display="none";F.style.display="none";var D={},H=PageSetupDialog.getFormats();for(t=0;t<H.length;t++)l=H[t],D[l.key]=l,q=document.createElement("option"),q.setAttribute("value",l.key),mxUtils.write(q,l.title),A.appendChild(q);var N=function(){A.value="custom";for(var J=0;J<H.length;J++){var Y=H[J];null!=Y.format&&("a4"==Y.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==Y.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),
-g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==Y.format.width&&g.height==Y.format.height?(A.value=Y.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,detected=!0):g.width==Y.format.height&&g.height==Y.format.width&&(A.value=Y.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,detected=n.checked=!0))}"custom"==
-A.value?(K.value=Editor.toUnit(g.width,f.value),c.value=Editor.toUnit(g.height,f.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};N();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var L=function(J,Y){J=D[A.value];null!=J.format?(K.value=Editor.toUnit(n.checked?J.format.height:J.format.width,f.value),c.value=Editor.toUnit(n.checked?J.format.width:J.format.height,f.value),F.style.display=
-"none",G.style.display=""):(G.style.display="none",F.style.display="");J=parseFloat(K.value);if(isNaN(J)||0>=J)K.value=Editor.toUnit(g.width,f.value);J=parseFloat(c.value);if(isNaN(J)||0>=J)c.value=Editor.toUnit(g.height,f.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(K.value),f.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),f.value)));Y||J.width==g.width&&J.height==g.height||(g=J,null!=m&&m(g))};mxEvent.addListener(e,"click",function(J){v.checked=!0;L(J);mxEvent.consume(J)});
-mxEvent.addListener(S,"click",function(J){n.checked=!0;L(J);mxEvent.consume(J)});mxEvent.addListener(K,"blur",L);mxEvent.addListener(K,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(n,"change",L);mxEvent.addListener(v,"change",L);mxEvent.addListener(A,"change",function(J){L(J,"custom"==A.value);mxEvent.consume(J)});mxEvent.addListener(f,"change",function(J){K.value=Editor.toUnit(Editor.fromUnit(K.value,Editor.pageSizeUnit),f.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
-Editor.pageSizeUnit),f.value);Editor.pageSizeUnit=f.value;L(J,!0);mxEvent.consume(J)});L(null,!0);return{set:function(J){g=J;N(null,null,!0)},get:function(){return g},widthInput:K,heightInput:c}};
+G.style.display="none";F.style.display="none";var D={},H=PageSetupDialog.getFormats();for(t=0;t<H.length;t++)l=H[t],D[l.key]=l,q=document.createElement("option"),q.setAttribute("value",l.key),mxUtils.write(q,l.title),A.appendChild(q);var N=function(){A.value="custom";for(var I=0;I<H.length;I++){var Z=H[I];null!=Z.format&&("a4"==Z.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==Z.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),
+g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==Z.format.width&&g.height==Z.format.height?(A.value=Z.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,detected=!0):g.width==Z.format.height&&g.height==Z.format.width&&(A.value=Z.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,detected=n.checked=!0))}"custom"==
+A.value?(J.value=Editor.toUnit(g.width,f.value),c.value=Editor.toUnit(g.height,f.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};N();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var L=function(I,Z){I=D[A.value];null!=I.format?(J.value=Editor.toUnit(n.checked?I.format.height:I.format.width,f.value),c.value=Editor.toUnit(n.checked?I.format.width:I.format.height,f.value),F.style.display=
+"none",G.style.display=""):(G.style.display="none",F.style.display="");I=parseFloat(J.value);if(isNaN(I)||0>=I)J.value=Editor.toUnit(g.width,f.value);I=parseFloat(c.value);if(isNaN(I)||0>=I)c.value=Editor.toUnit(g.height,f.value);I=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(J.value),f.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),f.value)));Z||I.width==g.width&&I.height==g.height||(g=I,null!=m&&m(g))};mxEvent.addListener(e,"click",function(I){v.checked=!0;L(I);mxEvent.consume(I)});
+mxEvent.addListener(R,"click",function(I){n.checked=!0;L(I);mxEvent.consume(I)});mxEvent.addListener(J,"blur",L);mxEvent.addListener(J,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(n,"change",L);mxEvent.addListener(v,"change",L);mxEvent.addListener(A,"change",function(I){L(I,"custom"==A.value);mxEvent.consume(I)});mxEvent.addListener(f,"change",function(I){J.value=Editor.toUnit(Editor.fromUnit(J.value,Editor.pageSizeUnit),f.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+Editor.pageSizeUnit),f.value);Editor.pageSizeUnit=f.value;L(I,!0);mxEvent.consume(I)});L(null,!0);return{set:function(I){g=I;N(null,null,!0)},get:function(){return g},widthInput:J,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,g,m,v,n,A,G,S,F,K){S=null!=S?S:!0;var c=document.createElement("div"),f=document.createElement("div");f.style.width="100%";f.style.display="grid";f.style.gap="5px 8px";f.style.gridAutoColumns="auto 1fr";f.style.boxSizing="border-box";f.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var t=document.createElement("div");t.style.display="inline-block";
-t.style.textOverflow="ellipsis";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.fontSize="10pt";t.style.padding="2px 0";t.setAttribute("title",v||mxResources.get("filename"));mxUtils.write(t,(v||mxResources.get("filename"))+":");l.appendChild(t);f.appendChild(l);var q=document.createElement("input");q.setAttribute("value",e||"");q.style.flexGrow="1";var D=mxUtils.button(g,function(){if(null==n||n(q.value))S&&b.hideDialog(),m(q.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-v||null==A)if(null!=K?Editor.selectFilename(q):(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=f.parentNode;if(null!=H){var N=null;mxEvent.addListener(H,"dragleave",function(L){null!=N&&(N.style.backgroundColor="",N=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=q,N.style.backgroundColor=
+var FilenameDialog=function(b,e,g,m,v,n,A,G,R,F,J){R=null!=R?R:!0;var c=document.createElement("div"),f=document.createElement("div");f.style.width="100%";f.style.display="grid";f.style.gap="5px 8px";f.style.gridAutoColumns="auto 1fr";f.style.boxSizing="border-box";f.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var t=document.createElement("div");t.style.display="inline-block";
+t.style.textOverflow="ellipsis";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.fontSize="10pt";t.style.padding="2px 0";t.setAttribute("title",v||mxResources.get("filename"));mxUtils.write(t,(v||mxResources.get("filename"))+":");l.appendChild(t);f.appendChild(l);var q=document.createElement("input");q.setAttribute("value",e||"");q.style.flexGrow="1";var D=mxUtils.button(g,function(){if(null==n||n(q.value))R&&b.hideDialog(),m(q.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+v||null==A)if(null!=J?Editor.selectFilename(q):(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=f.parentNode;if(null!=H){var N=null;mxEvent.addListener(H,"dragleave",function(L){null!=N&&(N.style.backgroundColor="",N=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=q,N.style.backgroundColor=
"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),D.click());L.stopPropagation();L.preventDefault()}))}}};l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.gap="4px";l.style.whiteSpace="nowrap";l.appendChild(q);f.appendChild(l);
-null==v&&null!=A||null==K||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),f.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",f.appendChild(l),e=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
-e.style.width="100%",l.appendChild(e));null!=A&&f.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=K?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});l.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));
+null==v&&null!=A||null==J||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),f.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",f.appendChild(l),e=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
+e.style.width="100%",l.appendChild(e));null!=A&&f.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=J?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});l.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));
b.editor.cancelFirst&&row.appendChild(l);mxEvent.addListener(q,"keypress",function(H){13==H.keyCode&&D.click()});row.appendChild(D);b.editor.cancelFirst||row.appendChild(l);f.appendChild(row);c.appendChild(f);this.container=c};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var v=document.createElement("option");v.setAttribute("value",b);mxUtils.write(v,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(v)}mxEvent.addListener(m,"change",function(n){n=g[m.value].extension;var A=e.value.lastIndexOf(".drawio.");A=0<A?A:e.value.lastIndexOf(".");"drawio"!=n&&(n="drawio."+n);e.value=0<A?e.value.substring(0,A+1)+n:e.value+"."+n;"createEvent"in
-document?(n=document.createEvent("HTMLEvents"),n.initEvent("change",!1,!0),e.dispatchEvent(n)):e.fireEvent("onchange")});b=function(n){n=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var S=g[G].extension,F=null;"drawio"!=S&&(F=S,S=".drawio."+S);if(n.substring(n.length-S.length-1)=="."+S||null!=F&&n.substring(n.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+document?(n=document.createEvent("HTMLEvents"),n.initEvent("change",!1,!0),e.dispatchEvent(n)):e.fireEvent("onchange")});b=function(n){n=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var R=g[G].extension,F=null;"drawio"!=R&&(F=R,R=".drawio."+R);if(n.substring(n.length-R.length-1)=="."+R||null!=F&&n.substring(n.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
var WrapperWindow=function(b,e,g,m,v,n,A,G){G=null!=G?G:document.createElement("div");this.window=new mxWindow(e,G,g,m,v,n,!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);A(G)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=A.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(A.container),S.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=A.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(A.container),R.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=
A.tooltipHandler&&A.tooltipHandler.isHideOnHover()&&A.tooltipHandler.hide();A.isMouseDown&&!mxEvent.isConsumed(F)&&A.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(F))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=G,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(A,G,S){var F=this.graph;A=null!=A?A:1;var K=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,c=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,f=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",l="none",t="";"simple"==F.getAdaptiveColors()&&F.background!=mxConstants.NONE&&null!=F.background&&(K=F.background);if(F.isGridEnabled()||F.gridVisible){t=
-10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(f,A))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",t=F.gridSize*this.scale*this.gridSteps*A):l="url("+this.gridImage+")";var q=f=0;G=null!=G?G-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var D=F.gridSize*this.scale*this.gridSteps,H=G%D;D=S%D;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);t=-Math.round(t-mxUtils.mod(this.translate.x*
-this.scale-f+G,t)+H*A)+"px "+-Math.round(t-mxUtils.mod(this.translate.y*this.scale-q+S,t)+D*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);f=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=t,F.view.backgroundPageShape.node.style.backgroundImage=l,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor=c,F.view.backgroundPageShape.node.style.colorScheme=
-"none"==F.getAdaptiveColors()?"light":"",A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=f?F.diagramBackgroundColor:""):(A.style.backgroundPosition=t,A.style.backgroundImage=l,"1"==urlParams.transparent?F.container.style.background="transparent":!f||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=K:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,
-G){for(var S=this.graph.gridSize*this.scale*(null!=G?G:1);S<this.minGridSize;)S*=2;G=this.gridSteps*S;for(var F=[],K=1;K<this.gridSteps;K++){var c=K*S;F.push("M 0 "+c+" L "+G+" "+c+" M "+c+" 0 L "+c+" "+G)}A=mxUtils.getLightDarkColor(A);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+mxGraphView.prototype.validateBackgroundStyles=function(A,G,R){var F=this.graph;A=null!=A?A:1;var J=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,c=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,f=null!=J&&this.gridColor!=J.toLowerCase()?this.gridColor:"#ffffff",l="none",t="";"simple"==F.getAdaptiveColors()&&F.background!=mxConstants.NONE&&null!=F.background&&(J=F.background);if(F.isGridEnabled()||F.gridVisible){t=
+10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(f,A))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",t=F.gridSize*this.scale*this.gridSteps*A):l="url("+this.gridImage+")";var q=f=0;G=null!=G?G-this.translate.x*this.scale:0;R=null!=R?R-this.translate.y*this.scale:0;var D=F.gridSize*this.scale*this.gridSteps,H=G%D;D=R%D;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);t=-Math.round(t-mxUtils.mod(this.translate.x*
+this.scale-f+G,t)+H*A)+"px "+-Math.round(t-mxUtils.mod(this.translate.y*this.scale-q+R,t)+D*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);f=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=t,F.view.backgroundPageShape.node.style.backgroundImage=l,F.view.backgroundPageShape.node.style.backgroundColor=J,F.view.backgroundPageShape.node.style.borderColor=c,F.view.backgroundPageShape.node.style.colorScheme=
+"none"==F.getAdaptiveColors()?"light":"",A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=f?F.diagramBackgroundColor:""):(A.style.backgroundPosition=t,A.style.backgroundImage=l,"1"==urlParams.transparent?F.container.style.background="transparent":!f||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=J:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,
+G){for(var R=this.graph.gridSize*this.scale*(null!=G?G:1);R<this.minGridSize;)R*=2;G=this.gridSteps*R;for(var F=[],J=1;J<this.gridSteps;J++){var c=J*R;F.push("M 0 "+c+" L "+G+" "+c+" M "+c+" 0 L "+c+" "+G)}A=mxUtils.getLightDarkColor(A);R="color-scheme: light dark;";mxClient.IS_SF&&(R="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+R+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
G+'" height="'+G+'" patternUnits="userSpaceOnUse"><path d="'+F.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" opacity="0.2" stroke-width="1"/><path d="M '+G+" 0 L 0 0 0 "+G+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+G,F))+"px";S.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.view.scale,K=this.view.translate,c=this.pageFormat,f=F*this.pageScale,l=this.view.getBackgroundPageBounds();
-G=l.width;S=l.height;var t=new mxRectangle(F*K.x,F*K.y,c.width*f,c.height*f),q=(A=A&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(S/t.height)-1:0,D=A?Math.ceil(G/t.width)-1:0,H=l.x+G,N=l.y+S;null==this.horizontalPageBreaks&&0<q&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(L){if(null!=L){for(var J=L==this.horizontalPageBreaks?q:D,Y=0;Y<=J;Y++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
-Math.round(l.y+(Y+1)*t.height)),new mxPoint(Math.round(H),Math.round(l.y+(Y+1)*t.height))]:[new mxPoint(Math.round(l.x+(Y+1)*t.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Y+1)*t.width),Math.round(N))];null!=L[Y]?(L[Y].points=ha,L[Y].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Y]=ha)}for(Y=J;Y<L.length;Y++)null!=L[Y]&&L[Y].destroy();L.splice(J,L.length-J)}});
-A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,S){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var K=this.graph.getCellGeometry(G[F]);if(null!=K&&K.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,S=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,
-K=this.graph.pageScale,c=F.width*K;F=F.height*K;K=Math.floor(Math.min(0,G)/c);var f=Math.floor(Math.min(0,S)/F);return new mxRectangle(this.scale*(this.translate.x+K*c),this.scale*(this.translate.y+f*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/c)-K)*c,this.scale*(Math.ceil(Math.max(1,S+A.height/this.scale)/F)-f)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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=A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,S,F,K,c){var f=v.apply(this,arguments);null==c||c||mxEvent.addListener(f,"mousedown",function(l){mxEvent.consume(l)});return f};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(A,G,S){var F=this.graph.model.getParent(A);if(G){var K=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);K=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=K&&K.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(K=n.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))K=F,this.graph.isTable(K)||(K=this.graph.model.getParent(K)),K=!this.graph.selectionCellsHandler.isHandled(K)||this.graph.isCellSelected(K)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(A)&&this.graph.isCellSelected(F);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),S=G.getParent(A),F=this.graph.view.getState(S),K=this.graph.isCellSelected(A);null!=F&&(G.isVertex(S)||G.isEdge(S));){var c=this.graph.isCellSelected(S);K=K||c;if(c||!K&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=S;S=G.getParent(S)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var n=v.getGraphBounds;v.getGraphBounds=function(){var W=n.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ja=this.view.translate,ca=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ja.x+ba.x)*ca,(ja.y+ba.y)*ca,ba.width*ca,ba.height*ca))}return W};v.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){v.isEnabled=
-function(){return!1};v.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=v.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,S=!1;this.setDefaultStyle=function(W){try{v.getModel().isEdge(W)?
-S=v.pasteEdgeStyle=!1:G=!1;var ba=v.getCellStyle(W,!1),ja=[],ca=[],la;for(la in ba)ja.push(ba[la]),ca.push(la);v.getModel().isEdge(W)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",ja,"cells",[W],"force",!0));v.getModel().isEdge(W)?S=v.pasteEdgeStyle=!0:G=!0}catch(Q){this.handleError(Q)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=
-S=v.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(W,ba){v.pasteCellStyles(v.includeDescendants(ba.getProperty("cells")))});v.addListener("textInserted",function(W,ba){v.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(W){null==W&&(W=window.event);return v.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var W=
-null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ja){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect",
-"none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return F(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=
-!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var K=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();K.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-
-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(W){16==W.which?this.shiftDown=!0:32!=W.which||v.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||
-this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||mxEvent.getSource(W)!=v.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(W){return f.apply(this,
-arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var l=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(W){return l.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};
-var t=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||t.apply(this,arguments)};var q=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var W=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var ja=ba.getAttribute("data-min-width");null!=ja&&parseInt(ja)>W?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),D=!1,H=null,N=null,L=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&
-D!=v.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ja=W.nextSibling;W.parentNode.removeChild(W);ba.push(W);W=ja}W=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var ca=0;ca<L.length;ca++)this.toolbar.container.appendChild(L[ca]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=N}D=v.cellEditor.isContentEditing();H=W;N=ja;L=ba;q()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);
-this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",q);mxEvent.addListener(window,"resize",q);q();var Y=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){Y.apply(this,arguments);J();if(v.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ja=v.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),
-m.toolbar.setFontSize(parseInt(ja.fontSize))));W=!1},0))};mxEvent.addListener(v.cellEditor.textarea,"input",ba);mxEvent.addListener(v.cellEditor.textarea,"touchend",ba);mxEvent.addListener(v.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(v.cellEditor.textarea,"keyup",ba);ba()}};var ha=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(W,ba){try{ha.apply(this,arguments),J()}catch(ja){m.handleError(ja)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===
-window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(W){}var ea=v.fireMouseEvent;v.fireMouseEvent=function(W,ba,ja){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ca){m.handleError(ca)}};var aa=v.foldCells;v.foldCells=function(W,ba,ja,ca,la){try{aa.apply(this,arguments)}catch(Q){m.handleError(Q)}};v.popupMenuHandler.autoExpand=!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ja){this.menus.createPopupMenu(W,
-ba,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){v.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ja=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ja.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(v.view.getState(ja[ja.length-1]))},0));v.pasteCellStyles(ja)});this.addListener("styleChanged",
-mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&v.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,S);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&
-"1"==v.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||null==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?
-this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),
-null!=this.toolbar.edgeShapeMenu&&("link"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=
-v.currentVertexStyle.fontFamily||"Helvetica",ba=String(v.currentVertexStyle.fontSize||"12"),ja=v.getView().getState(v.getSelectionCell());null!=ja&&(W=ja.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ja.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,b));v.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");
-ba=ba.getProperty("parent");null!=ba&&v.getModel().isLayer(ba)&&!v.isCellVisible(ba)&&null!=W&&0<W.length&&v.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var W=v.getLayerForCells(v.getSelectionCells());null!=W&&v.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
-this.gestureHandler);var na=null;this.resizeHandler=mxUtils.bind(this,function(){null!=na&&window.clearTimeout(na);na=window.setTimeout(mxUtils.bind(this,function(){na=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=
-mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));
-this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,g){function m(G,S){var F=n;n+=S;return G.substring(F,n)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var n=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(n-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
+if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+G,F))+"px";R.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,R){var F=this.view.scale,J=this.view.translate,c=this.pageFormat,f=F*this.pageScale,l=this.view.getBackgroundPageBounds();
+G=l.width;R=l.height;var t=new mxRectangle(F*J.x,F*J.y,c.width*f,c.height*f),q=(A=A&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(R/t.height)-1:0,D=A?Math.ceil(G/t.width)-1:0,H=l.x+G,N=l.y+R;null==this.horizontalPageBreaks&&0<q&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(L){if(null!=L){for(var I=L==this.horizontalPageBreaks?q:D,Z=0;Z<=I;Z++){var ia=L==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
+Math.round(l.y+(Z+1)*t.height)),new mxPoint(Math.round(H),Math.round(l.y+(Z+1)*t.height))]:[new mxPoint(Math.round(l.x+(Z+1)*t.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Z+1)*t.width),Math.round(N))];null!=L[Z]?(L[Z].points=ia,L[Z].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(),L[Z]=ia)}for(Z=I;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(I,L.length-I)}});
+A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,R){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var J=this.graph.getCellGeometry(G[F]);if(null!=J&&J.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,R=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,
+J=this.graph.pageScale,c=F.width*J;F=F.height*J;J=Math.floor(Math.min(0,G)/c);var f=Math.floor(Math.min(0,R)/F);return new mxRectangle(this.scale*(this.translate.x+J*c),this.scale*(this.translate.y+f*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/c)-J)*c,this.scale*(Math.ceil(Math.max(1,R+A.height/this.scale)/F)-f)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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=A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,R,F,J,c){var f=v.apply(this,arguments);null==c||c||mxEvent.addListener(f,"mousedown",function(l){mxEvent.consume(l)});return f};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(A,G,R){var F=this.graph.model.getParent(A);if(G){var J=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);J=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=J&&J.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(J=n.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))J=F,this.graph.isTable(J)||(J=this.graph.model.getParent(J)),J=!this.graph.selectionCellsHandler.isHandled(J)||this.graph.isCellSelected(J)&&this.graph.isToggleEvent(R.getEvent())||
+this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(A)&&this.graph.isCellSelected(F);return J};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),R=G.getParent(A),F=this.graph.view.getState(R),J=this.graph.isCellSelected(A);null!=F&&(G.isVertex(R)||G.isEdge(R));){var c=this.graph.isCellSelected(R);J=J||c;if(c||!J&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=R;R=G.getParent(R)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var n=v.getGraphBounds;v.getGraphBounds=function(){var X=n.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ka=this.view.translate,da=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ka.x+ca.x)*da,(ka.y+ca.y)*da,ca.width*da,ca.height*da))}return X};v.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ca){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){v.isEnabled=
+function(){return!1};v.panningHandler.isForcePanningEvent=function(X){for(var ca=X.getSource();null!=ca&&ca!=v.container;){if("foreignObject"===ca.nodeName||"text"===ca.nodeName)return!1;ca=ca.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,R=!1;this.setDefaultStyle=function(X){try{v.getModel().isEdge(X)?
+R=v.pasteEdgeStyle=!1:G=!1;var ca=v.getCellStyle(X,!1),ka=[],da=[],W;for(W in ca)ka.push(ca[W]),da.push(W);v.getModel().isEdge(X)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ka,"cells",[X],"force",!0));v.getModel().isEdge(X)?R=v.pasteEdgeStyle=!0:G=!0}catch(S){this.handleError(S)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=R=v.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(X,ca){v.pasteCellStyles(v.includeDescendants(ca.getProperty("cells")))});v.addListener("textInserted",function(X,ca){v.pasteCellStyles(ca.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(X){null==X&&(X=window.event);return v.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ca=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ca[1],10),parseInt(ca[2],10),parseInt(ca[3]||0,10)]}catch(ka){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ca=mxEvent.getSource(X);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return F(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&
+(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var J=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(X){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ca.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ca){return m.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){16==X.which?this.shiftDown=!0:32!=X.which||v.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||
+mxEvent.getSource(X)!=v.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(X){return f.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&
+(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var l=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(X){return l.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var t=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||t.apply(this,arguments)};var q=mxUtils.bind(this,
+function(){if(null!=this.toolbar)for(var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ca=this.toolbar.container.firstChild;null!=ca;){var ka=ca.getAttribute("data-min-width");null!=ka&&parseInt(ka)>X?ca.style.display="none":ca.style.display="";ca=ca.nextSibling}}),D=!1,H=null,N=null,L=null,I=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=v.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ca=[];null!=X;){var ka=X.nextSibling;
+X.parentNode.removeChild(X);ca.push(X);X=ka}X=this.toolbar.fontMenu;ka=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var da=0;da<L.length;da++)this.toolbar.container.appendChild(L[da]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=N}D=v.cellEditor.isContentEditing();H=X;N=ka;L=ca;q()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();I()}));this.addListener("currentThemeChanged",
+q);mxEvent.addListener(window,"resize",q);q();var Z=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){Z.apply(this,arguments);I();if(v.cellEditor.isContentEditing()){var X=!1,ca=function(){X||(X=!0,window.setTimeout(function(){var ka=v.getSelectedEditingElement();null!=ka&&(ka=mxUtils.getCurrentStyle(ka),null!=ka&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ka.fontFamily)),m.toolbar.setFontSize(parseInt(ka.fontSize))));X=!1},0))};mxEvent.addListener(v.cellEditor.textarea,
+"input",ca);mxEvent.addListener(v.cellEditor.textarea,"touchend",ca);mxEvent.addListener(v.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(v.cellEditor.textarea,"keyup",ca);ca()}};var ia=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(X,ca){try{ia.apply(this,arguments),I()}catch(ka){m.handleError(ka)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(X){}var fa=v.fireMouseEvent;
+v.fireMouseEvent=function(X,ca,ka){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),fa.apply(this,arguments)}catch(da){m.handleError(da)}};var ba=v.foldCells;v.foldCells=function(X,ca,ka,da,W){try{ba.apply(this,arguments)}catch(S){m.handleError(S)}};v.popupMenuHandler.autoExpand=!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ca,ka){this.menus.createPopupMenu(X,ca,ka)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){v.popupMenuHandler.hideMenu()}));
+this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(X,ca){var ka=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ka.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(v.view.getState(ka[ka.length-1]))},0));v.pasteCellStyles(ka)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ca){X=ca.getProperty("force");(this.updateDefaultStyle||
+X)&&v.copyCellStyles(ca.getProperty("cells"),ca.getProperty("keys"),ca.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,R);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&"1"==v.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,
+Format.curvedImage.src):"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||null==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):
+this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,
+Format.linkEdgeImage.src):"flexArrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=v.currentVertexStyle.fontFamily||"Helvetica",ca=String(v.currentVertexStyle.fontSize||"12"),ka=v.getView().getState(v.getSelectionCell());
+null!=ka&&(X=ka.style[mxConstants.STYLE_FONTFAMILY]||X,ca=ka.style[mxConstants.STYLE_FONTSIZE]||ca,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ca)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,b));v.addListener(mxEvent.CELLS_ADDED,function(X,ca){X=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&&v.getModel().isLayer(ca)&&!v.isCellVisible(ca)&&null!=X&&0<X.length&&v.getModel().setVisible(ca,
+!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var X=v.getLayerForCells(v.getSelectionCells());null!=X&&v.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var na=null;this.resizeHandler=mxUtils.bind(this,function(){null!=na&&window.clearTimeout(na);
+na=window.setTimeout(mxUtils.bind(this,function(){na=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));
+this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,e,g){function m(G,R){var F=n;n+=R;return G.substring(F,n)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var n=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(n-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2072,33 +2071,33 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,v=0;v<e.length;v++){var n=b.getCurrentCellStyle(e[v]);"0"!=mxUtils.getValue(n,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[v],e,m),m=!1)}this.updateSelectionStateForTableCells(g);if(Editor.enableCustomProperties&&null!=this.format){g.customProperties={};b=g.vertices;e=g.edges;for(v=0;v<b.length;v++)this.findCommonProperties(b[v],g.customProperties,
0==v,g);for(v=0;v<e.length;v++)this.findCommonProperties(e[v],g.customProperties,0==b.length&&0==v,g)}return g};
-EditorUi.prototype.findCommonProperties=function(b,e,g,m){if(null!=e){var v=mxUtils.bind(this,function(A){if(null!=A)if(g)for(var G=0;G<A.length;G++){if("function"!==typeof A[G].isVisible||A[G].isVisible(m,this.format))e[A[G].name]=A[G]}else for(var S in e){var F=!1;for(G=0;G<A.length;G++)if(A[G].name==S&&A[G].type==e[S].type){F=!0;break}F||delete e[S]}}),n=this.editor.graph.view.getState(b);null!=n&&null!=n.shape&&(n.shape.commonCustomPropAdded||(n.shape.commonCustomPropAdded=!0,n.shape.customProperties=
+EditorUi.prototype.findCommonProperties=function(b,e,g,m){if(null!=e){var v=mxUtils.bind(this,function(A){if(null!=A)if(g)for(var G=0;G<A.length;G++){if("function"!==typeof A[G].isVisible||A[G].isVisible(m,this.format))e[A[G].name]=A[G]}else for(var R in e){var F=!1;for(G=0;G<A.length;G++)if(A[G].name==R&&A[G].type==e[R].type){F=!0;break}F||delete e[R]}}),n=this.editor.graph.view.getState(b);null!=n&&null!=n.shape&&(n.shape.commonCustomPropAdded||(n.shape.commonCustomPropAdded=!0,n.shape.customProperties=
n.shape.customProperties||[],n.cell.vertex?Array.prototype.push.apply(n.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(n.shape.customProperties,Editor.commonEdgeProperties)),v(n.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{v(JSON.parse(b))}catch(A){}}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var n=m.getIndex(e[0]),A=v.getIndex(m),G=null,S=1,F=1,K=0,c=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),n):null;K<e.length-1;){var f=e[++K];null==c||c!=f||null!=G&&S!=G||(G=S,S=0,F++,m=g.getParent(c),c=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),n):null);var l=this.editor.graph.view.getState(f);
-if(f==g.getChildAt(m,n+S)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))S++;else break}K==F*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var n=m.getIndex(e[0]),A=v.getIndex(m),G=null,R=1,F=1,J=0,c=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),n):null;J<e.length-1;){var f=e[++J];null==c||c!=f||null!=G&&R!=G||(G=R,R=0,F++,m=g.getParent(c),c=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),n):null);var l=this.editor.graph.view.getState(f);
+if(f==g.getChildAt(m,n+R)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))R++;else break}J==F*R-1&&(b.mergeCell=e[0],b.colspan=R,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,v=null,n=mxUtils.bind(this,function(G){v.clear()&&(m=!1,G=null!=G?G:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(G):this.handleError(G))}),A=window.setTimeout(n,null!=b?b:this.timeout);v={clear:function(){window.clearTimeout(A);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(v)}),n);return v};
EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,n=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var S=0;S<v.length;S++)try{var F=G[v[S]];if(mxUtils.isLightDarkColor(F)){var K=mxUtils.getLightDarkColor(F);m.setCellStyles(v[S],K.light,[b[A]])}}catch(f){}e&&m.isHtmlLabel(b[A])&&
-"0"!=mxUtils.getValue(G,"html","0")&&(n.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(n,null,null,function(f,l,t){return mxUtils.isLightDarkColor(t)?(t=mxUtils.getLightDarkColor(t),f.style.setProperty(l,t.light),!0):!1})&&m.cellLabelChanged(b[A],n.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){K=mxUtils.getLightDarkColor(m.background);var c=new ChangePageSetup(this,K.light);c.ignoreImage=!0;m.model.execute(c)}}finally{m.model.endUpdate()}return b};
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,n=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var R=0;R<v.length;R++)try{var F=G[v[R]];if(mxUtils.isLightDarkColor(F)){var J=mxUtils.getLightDarkColor(F);m.setCellStyles(v[R],J.light,[b[A]])}}catch(f){}e&&m.isHtmlLabel(b[A])&&
+"0"!=mxUtils.getValue(G,"html","0")&&(n.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(n,null,null,function(f,l,t){return mxUtils.isLightDarkColor(t)?(t=mxUtils.getLightDarkColor(t),f.style.setProperty(l,t.light),!0):!1})&&m.cellLabelChanged(b[A],n.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){J=mxUtils.getLightDarkColor(m.background);var c=new ChangePageSetup(this,J.light);c.ignoreImage=!0;m.model.execute(c)}}finally{m.model.endUpdate()}return b};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);
b.vertices.push(e);var v=g.getCellGeometry(e);if(null!=v&&(0<v.width?null==b.width?b.width=v.width:b.width!=v.width&&(b.width=""):b.containsLabel=!0,0<v.height?null==b.height?b.height=v.height:b.height!=v.height&&(b.height=""):b.containsLabel=!0,!v.relative||null!=v.offset)){var n=v.relative?v.offset.x:v.x;v=v.relative?v.offset.y:v.y;null==b.x?b.x=n:b.x!=n&&(b.x="");null==b.y?b.y=v:b.y!=v&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);n=g.view.getState(e);null!=n&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(n),b.glass=b.glass&&g.isGlassState(n),b.rounded=b.rounded&&g.isRoundedState(n),b.lineJumps=b.lineJumps&&g.isLineJumpState(n),b.image=b.image||g.isImageState(n),b.shadow=b.shadow&&g.isShadowState(n),b.fill=b.fill&&g.isFillState(n),b.gradient=b.fill&&g.isGradientState(n),b.stroke=b.stroke&&g.isStrokeState(n),e=mxUtils.getValue(n.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
"image"==e,g.mergeStyle(n.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(S,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(S,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-g);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();n.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(S,F,K){var c=K.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?A.apply(this,arguments):this.graph.connectVertex(S.cell,F,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(f,l,t){var q=b.getCompositeParent(S.cell);f=b.getCellGeometry(q);for(K.consume();null!=q&&b.model.isVertex(q)&&null!=f&&f.relative;)cell=
-q,q=b.model.getParent(cell),f=b.getCellGeometry(q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.getGraphX(),K.getGraphY(),q,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),F)}),30)}),mxUtils.bind(this,function(f){this.graph.selectCellsForConnectVertex(f,c,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var K=
-F.getProperty("arrow"),c=F.getProperty("direction"),f=F.getProperty("event");K=K.getBoundingClientRect();var l=mxUtils.getOffset(b.container),t=b.container.scrollLeft+K.x-l.x;l=b.container.scrollTop+K.y-l.y;var q=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,l,q,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(q,c,b.defaultEdgeLength,f,!0,!1,function(N,L,J){J(H);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(H))},
-function(N){b.selectCellsForConnectVertex(N)},f,this.hoverIcons)}),c,!0);null!=D&&(this.centerShapePicker(D,K,t,l,c),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(S,F){null!=G&&window.clearTimeout(G)}))}};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(R,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var J=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(J.x,J.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+g);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();n.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(R,F,J){var c=J.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?A.apply(this,arguments):this.graph.connectVertex(R.cell,F,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(f,l,t){var q=b.getCompositeParent(R.cell);f=b.getCellGeometry(q);for(J.consume();null!=q&&b.model.isVertex(q)&&null!=f&&f.relative;)cell=
+q,q=b.model.getParent(cell),f=b.getCellGeometry(q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(J.getGraphX(),J.getGraphY(),q,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),F)}),30)}),mxUtils.bind(this,function(f){this.graph.selectCellsForConnectVertex(f,c,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var J=
+F.getProperty("arrow"),c=F.getProperty("direction"),f=F.getProperty("event");J=J.getBoundingClientRect();var l=mxUtils.getOffset(b.container),t=b.container.scrollLeft+J.x-l.x;l=b.container.scrollTop+J.y-l.y;var q=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,l,q,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(q,c,b.defaultEdgeLength,f,!0,!1,function(N,L,I){I(H);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(H))},
+function(N){b.selectCellsForConnectVertex(N)},f,this.hoverIcons)}),c,!0);null!=D&&(this.centerShapePicker(D,J,t,l,c),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(R,F){null!=G&&window.clearTimeout(G)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,g,m,v){if(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();v==mxConstants.DIRECTION_NORTH?(g-=n.width/2-10,m-=n.height+6):v==mxConstants.DIRECTION_SOUTH?(g-=n.width/2-10,m+=e.height+6):v==mxConstants.DIRECTION_WEST?(g-=n.width+6,m-=n.height/2-10):v==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=n.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};
-EditorUi.prototype.showShapePicker=function(b,e,g,m,v,n,A,G,S){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,n,G),n,A,G,S),null!=F&&(null==this.hoverIcons||n||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};
-EditorUi.prototype.createShapePicker=function(b,e,g,m,v,n,A,G,S,F,K){K=null!=K?K:!0;var c=this.editor.graph,f=null;S=null!=S?S:function(q){q=q[0];var D=0,H=0,N=q.geometry;null!=N&&(c.model.isEdge(q)&&(q=N.getTerminalPoint(!1),N=new mxRectangle(0,0,q.x,q.y)),D=N.width/2,H=N.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-D),c.snap(Math.round(e/c.view.scale)-c.view.translate.y-H))};if(null!=A&&0<A.length){var l=this;c=this.editor.graph;f=document.createElement("div");
+EditorUi.prototype.showShapePicker=function(b,e,g,m,v,n,A,G,R){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,n,G),n,A,G,R),null!=F&&(null==this.hoverIcons||n||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};
+EditorUi.prototype.createShapePicker=function(b,e,g,m,v,n,A,G,R,F,J){J=null!=J?J:!0;var c=this.editor.graph,f=null;R=null!=R?R:function(q){q=q[0];var D=0,H=0,N=q.geometry;null!=N&&(c.model.isEdge(q)&&(q=N.getTerminalPoint(!1),N=new mxRectangle(0,0,q.x,q.y)),D=N.width/2,H=N.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-D),c.snap(Math.round(e/c.view.scale)-c.view.translate.y-H))};if(null!=A&&0<A.length){var l=this;c=this.editor.graph;f=document.createElement("div");
v=c.view.getState(g);var t=null==g||null!=v&&c.isTransparentState(v)?null:c.copyStyle(g);f.className="geShapePicker";f.setAttribute("title",mxResources.get("sidebarTooltip"));f.style.left=Math.round(b)+"px";f.style.top=Math.round(e)+"px";mxClient.IS_POINTER&&(f.style.touchAction="none");G||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");c.container.appendChild(f);v=mxUtils.bind(this,function(q){var D=document.createElement("a");f.appendChild(D);null!=t&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(t,[q]):this.sidebar.graph.pasteCellStyles([q],c.currentVertexStyle,c.currentEdgeStyle);var H=q.geometry;c.model.isEdge(q)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([q],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(N){if(!mxEvent.isShiftDown(N)||null==g&&c.isSelectionEmpty()){var L=c.cloneCell(q);if(null!=m)m(L);else{var J=S([L]);c.model.isEdge(L)?L.geometry.translate(J.x,J.y):(L.geometry.x=
-J.x,L.geometry.y=J.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);K&&c.startEditing(L);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=g?[g]:c.getSelectionCells()),c.updateShapes(q,L);null!=n&&n(N);mxEvent.consume(N)}),25,25,null,null,g),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",D.appendChild(H))});
+this.sidebar.graph.pasteStyle(t,[q]):this.sidebar.graph.pasteCellStyles([q],c.currentVertexStyle,c.currentEdgeStyle);var H=q.geometry;c.model.isEdge(q)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([q],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(N){if(!mxEvent.isShiftDown(N)||null==g&&c.isSelectionEmpty()){var L=c.cloneCell(q);if(null!=m)m(L);else{var I=R([L]);c.model.isEdge(L)?L.geometry.translate(I.x,I.y):(L.geometry.x=
+I.x,L.geometry.y=I.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);J&&c.startEditing(L);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=g?[g]:c.getSelectionCells()),c.updateShapes(q,L);null!=n&&n(N);mxEvent.consume(N)}),25,25,null,null,g),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",D.appendChild(H))});
for(F=0;F<(G?Math.min(A.length,4):A.length);F++)v(A[F]);A=f.offsetTop+f.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<A&&(f.style.top=Math.max(c.container.scrollTop+22,e-A)+"px");A=f.offsetLeft+f.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<A&&(f.style.left=Math.max(c.container.scrollLeft+22,b-A)+"px")}return f};
-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(n,A,G,S){return m.createVertex(null,null,S||"",0,0,A||120,G||60,n,!1)});e=mxUtils.bind(this,function(n,A,G){n=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),n);n.geometry.setTerminalPoint(new mxPoint(0,0),!0);n.geometry.setTerminalPoint(new mxPoint(n.geometry.width,null!=A?A:0),!1);n.geometry.points=null!=A?[new mxPoint(n.geometry.width/2,A)]:[];n.geometry.relative=!0;n.edge=
+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(n,A,G,R){return m.createVertex(null,null,R||"",0,0,A||120,G||60,n,!1)});e=mxUtils.bind(this,function(n,A,G){n=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),n);n.geometry.setTerminalPoint(new mxPoint(0,0),!0);n.geometry.setTerminalPoint(new mxPoint(n.geometry.width,null!=A?A:0),!1);n.geometry.points=null!=A?[new mxPoint(n.geometry.width/2,A)]:[];n.geometry.relative=!0;n.edge=
!0;return n});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(n){b=null}null==b&&(b=v(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,v("whiteSpace=wrap;html=1;"),v("ellipse;whiteSpace=wrap;html=1;",80,80),v("rhombus;whiteSpace=wrap;html=1;",
80,80),v("rounded=1;whiteSpace=wrap;html=1;"),v("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),v("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),v("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),v("triangle;whiteSpace=wrap;html=1;",
60,80),v("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),v("shape=tape;whiteSpace=wrap;html=1;",120,100),v("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),v("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),v("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),
@@ -2113,48 +2112,48 @@ EditorUi.prototype.getImageForMarker=function(b,e,g){return"flexArrow"==g?null!=
b?"1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:
"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(n){n.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(n){var A=null;if(n.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||n.getSelectionCells();A=n.getExportableCells(n.model.getTopmostCells(A));for(var G={},S=n.createCellLookup(A),F=n.cloneCells(A,null,G),K=new mxGraphModel,c=K.getChildAt(K.getRoot(),
-0),f=0;f<F.length;f++){K.add(c,F[f]);var l=n.view.getState(A[f]);if(null!=l){var t=n.getCellGeometry(F[f]);null!=t&&t.relative&&!K.isEdge(A[f])&&null==S[mxObjectIdentity.get(K.getParent(A[f]))]&&(t.offset=null,t.relative=!1,t.x=l.x/l.view.scale-l.view.translate.x,t.y=l.y/l.view.scale-l.view.translate.y)}}n.updateCustomLinks(n.createCellMapping(G,S),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(n){var A=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(n){n.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(n){var A=null;if(n.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||n.getSelectionCells();A=n.getExportableCells(n.model.getTopmostCells(A));for(var G={},R=n.createCellLookup(A),F=n.cloneCells(A,null,G),J=new mxGraphModel,c=J.getChildAt(J.getRoot(),
+0),f=0;f<F.length;f++){J.add(c,F[f]);var l=n.view.getState(A[f]);if(null!=l){var t=n.getCellGeometry(F[f]);null!=t&&t.relative&&!J.isEdge(A[f])&&null==R[mxObjectIdentity.get(J.getParent(A[f]))]&&(t.offset=null,t.relative=!1,t.x=l.x/l.view.scale-l.view.translate.x,t.y=l.y/l.view.scale-l.view.translate.y)}}n.updateCustomLinks(n.createCellMapping(G,R),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(n){var A=
null;n.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):A=g.apply(this,arguments);b.updatePasteActionStates();return A};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var v=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(n,A){v.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,
-this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,X){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,X,Z){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;Z=null!=Z?Z:0;var ka=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),va=mxUtils.hasScrollbars(b.container),ua=b.view.translate,qa=b.view.scale,
-Ba=mxRectangle.fromRectangle(ka);Ba.x=Ba.x/qa-ua.x;Ba.y=Ba.y/qa-ua.y;Ba.width/=qa;Ba.height/=qa;ua=b.container.scrollTop;var ya=b.container.scrollLeft,La=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)La+=3;var za=b.container.offsetWidth-La;La=b.container.offsetHeight-La;P=P?Math.max(.3,Math.min(T||1,za/Ba.width)):qa;T=(za-P*Ba.width)/2/P;var Ea=0==this.lightboxVerticalDivider?0:(La-P*Ba.height)/this.lightboxVerticalDivider/P;va&&(T=Math.max(T,0),Ea=Math.max(Ea,
-0));if(va||ka.width<za||ka.height<La)b.view.scaleAndTranslate(P,Math.floor(T-Ba.x),Math.floor(Ea-Ba.y)),b.container.scrollTop=ua*P/qa,b.container.scrollLeft=ya*P/qa;else if(0!=X||0!=Z)ka=b.view.translate,b.view.setTranslate(Math.floor(ka.x+X/qa),Math.floor(ka.y+Z/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,
+this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,Y){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,Y,aa){if(null!=b.container&&!b.isViewer()){Y=null!=Y?Y:0;aa=null!=aa?aa:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),va=mxUtils.hasScrollbars(b.container),ua=b.view.translate,qa=b.view.scale,
+Ba=mxRectangle.fromRectangle(la);Ba.x=Ba.x/qa-ua.x;Ba.y=Ba.y/qa-ua.y;Ba.width/=qa;Ba.height/=qa;ua=b.container.scrollTop;var ya=b.container.scrollLeft,La=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)La+=3;var Aa=b.container.offsetWidth-La;La=b.container.offsetHeight-La;P=P?Math.max(.3,Math.min(U||1,Aa/Ba.width)):qa;U=(Aa-P*Ba.width)/2/P;var Ea=0==this.lightboxVerticalDivider?0:(La-P*Ba.height)/this.lightboxVerticalDivider/P;va&&(U=Math.max(U,0),Ea=Math.max(Ea,
+0));if(va||la.width<Aa||la.height<La)b.view.scaleAndTranslate(P,Math.floor(U-Ba.x),Math.floor(Ea-Ba.y)),b.container.scrollTop=ua*P/qa,b.container.scrollLeft=ya*P/qa;else if(0!=Y||0!=aa)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+Y/qa),Math.floor(la.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var v=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 n=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var A=0;n=mxUtils.bind(this,function(P,T,X){A++;
-var Z=document.createElement("span");Z.style.paddingLeft="8px";Z.style.paddingRight="8px";Z.style.cursor="pointer";mxEvent.addListener(Z,"click",P);null!=X&&Z.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";Z.appendChild(P);this.chromelessToolbar.appendChild(Z);return Z});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&n(mxUtils.bind(this,function(P){window.location.href=
-G;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=n(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.chevronLeftImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var K=n(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,P+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());K.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";K.style.paddingLeft="4px";K.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display=
-"",F.style.display="inline-block"):(K.style.display="none",S.style.display="none",F.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(l.funct);T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var X=mxUtils.getOffset(F);T.popup(X.x,X.y+F.offsetHeight,null,P);mxEvent.addListener(T.div,
-"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c)}n(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){b.isLightboxView()?
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var A=0;n=mxUtils.bind(this,function(P,U,Y){A++;
+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=Y&&aa.setAttribute("title",Y);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&n(mxUtils.bind(this,function(P){window.location.href=
+G;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=n(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.chevronLeftImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var J=n(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,P+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+
+": "+this.currentPage.getName());R.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());J.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});R.style.paddingLeft="0px";R.style.paddingRight="4px";J.style.paddingLeft="4px";J.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(J.style.display="",R.style.display=
+"",F.style.display="inline-block"):(J.style.display="none",R.style.display="none",F.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(l.funct);U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var Y=mxUtils.getOffset(F);U.popup(Y.x,Y.y+F.offsetHeight,null,P);mxEvent.addListener(U.div,
+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c)}n(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var t=null,q=null,D=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);t=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);t=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),
600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=n(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=N.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=
-T.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));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){N.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var J=this.lightboxToolbarActions[f];J.elem=n(J.fn,J.icon,J.tooltip)}if(null!=v.refreshBtn){var Y=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);n(mxUtils.bind(this,function(P){null!=
-Y?window.location.href=Y:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(P){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=N.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){N.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var I=this.lightboxToolbarActions[f];I.elem=n(I.fn,I.icon,I.tooltip)}if(null!=v.refreshBtn){var Z=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);n(mxUtils.bind(this,function(P){null!=
+Z?window.location.href=Z:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(P){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&n(mxUtils.bind(this,function(P){"1"==urlParams.close||v.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),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(P){mxEvent.isTouchEvent(P)||
(mxEvent.isShiftDown(P)||H(30),D())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?D():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?D():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ha=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ha&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ha&&Math.abs(this.startX-T.getGraphX())<ha&&Math.abs(this.startY-T.getGraphY())<ha&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?D():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,aa=new mxPoint,na=!1,W=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&W!=g.currentPage){W=g.currentPage;na=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,aa,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var X=b.getPageSize();P=T.x-(this.x0||0)*X.width;T=T.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}ea.apply(this,arguments)};
-if(!b.isViewer()){var ba=b.sizeDidChange;b.sizeDidChange=function(){var P=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),X=this.getDefaultTranslate(T),Z=this.view.translate.x,ka=this.view.translate.y;if(X.x!=Z||X.y!=ka){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-Z)*this.view.scale),this.container.scrollTop+=
-Math.round((X.y-ka)*this.view.scale));return}}ba.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Q=null,k=null,B=null,I=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||B)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
-(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=
-"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),Z=b.view.scale,ka=0,va=0;null!=Q&&(ka=b.container.offsetWidth/2-Q.x+X.x,va=b.container.offsetHeight/2-Q.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=Z&&(null!=k&&(ka+=T.x-k.x,va+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ka*(b.cumulativeZoomFactor-1),va*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ka&&0==va||(b.container.scrollLeft-=
-ka*(b.cumulativeZoomFactor-1),b.container.scrollTop-=va*(b.cumulativeZoomFactor-1)));null!=I&&ca.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=B=Q=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,X,Z){Z=null!=Z?Z:this.zoomFactor;(T=T||!b.scrollbars)&&(Q=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=Z,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/=Z,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,
-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=ca.getAttribute("filter")&&(I=ca.getAttribute("filter"),ca.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);Z=T||null==Q?b.container.scrollLeft+b.container.clientWidth/2:Q.x+b.container.scrollLeft-b.container.offsetLeft;var ka=T||null==Q?b.container.scrollTop+b.container.clientHeight/2:Q.y+b.container.scrollTop-
-b.container.offsetTop;ca.style.transformOrigin=Z+"px "+ka+"px";ca.style.transform="scale("+P+")";ja.style.transformOrigin=Z+"px "+ka+"px";ja.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,"transform-origin",(T||null==Q?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":Q.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Q?b.container.clientHeight/
-2+b.container.scrollTop-Z.offsetTop+"px":Q.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,Z,ka);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
-null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,X,Z,ka){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),Z=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(T?-Z:Z),X.y):b.view.setTranslate(X.x,X.y+(T?Z:-Z));
-else if(X||b.isZoomWheelEvent(P))for(var va=mxEvent.getSource(P);null!=va;){if(va==b.container)return b.tooltipHandler.hideTooltip(),Q=null!=Z&&null!=ka?new mxPoint(Z,ka):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),B=X,X=b.zoomFactor,Z=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),Z=-1),b.lazyZoom(T,null,Z,X),mxEvent.consume(P),
-!1;va=va.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
-EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ia=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ia&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ia&&Math.abs(this.startX-U.getGraphX())<ia&&Math.abs(this.startY-U.getGraphY())<ia&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?D():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate,ba=new mxPoint,na=!1,X=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&X!=g.currentPage){X=g.currentPage;na=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ba,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var Y=b.getPageSize();P=U.x-(this.x0||0)*Y.width;U=U.y-(this.y0||0)*Y.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}fa.apply(this,arguments)};
+if(!b.isViewer()){var ca=b.sizeDidChange;b.sizeDidChange=function(){var P=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),Y=this.getDefaultTranslate(U),aa=this.view.translate.x,la=this.view.translate.y;if(Y.x!=aa||Y.y!=la){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(Y.x,Y.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((Y.x-aa)*this.view.scale),
+this.container.scrollTop+=Math.round((Y.y-la)*this.view.scale));return}}ca.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ka=b.view.getBackgroundPane(),da=b.view.getDrawPane();b.cumulativeZoomFactor=1;var W=null,S=null,k=null,B=null,K=null,T=function(P){null!=W&&window.clearTimeout(W);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||B)W=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)),da.style.transformOrigin="",ka.style.transformOrigin="",mxClient.IS_SF?(da.style.transform="scale(1)",ka.style.transform="scale(1)",window.setTimeout(function(){da.style.transform="";ka.style.transform=""},0)):(da.style.transform="",ka.style.transform=""),b.view.getDecoratorPane().style.opacity=
+"",b.view.getOverlayPane().style.opacity="");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Y=mxUtils.getOffset(b.container),aa=b.view.scale,la=0,va=0;null!=S&&(la=b.container.offsetWidth/2-S.x+Y.x,va=b.container.offsetHeight/2-S.y+Y.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(la+=U.x-k.x,va+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-1),va*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||
+0==la&&0==va||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=va*(b.cumulativeZoomFactor-1)));null!=K&&da.setAttribute("filter",K);b.cumulativeZoomFactor=1;K=B=S=k=W=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,Y,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(S=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?
+this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
+this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==K&&""!=da.getAttribute("filter")&&(K=da.getAttribute("filter"),da.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==S?b.container.scrollLeft+b.container.clientWidth/2:S.x+b.container.scrollLeft-b.container.offsetLeft;var la=U||null==S?b.container.scrollTop+b.container.clientHeight/
+2:S.y+b.container.scrollTop-b.container.offsetTop;da.style.transformOrigin=aa+"px "+la+"px";da.style.transform="scale("+P+")";ka.style.transformOrigin=aa+"px "+la+"px";ka.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==S?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":S.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+
+"px")+" "+(U||null==S?b.container.clientHeight/2+b.container.scrollTop-aa.offsetTop+"px":S.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?Y:0)};mxEvent.addGestureListeners(b.container,
+function(P){null!=W&&window.clearTimeout(W)},null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==W||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,Y,aa,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!Y&&b.isScrollWheelEvent(P))Y=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(Y.x+(U?
+-aa:aa),Y.y):b.view.setTranslate(Y.x,Y.y+(U?aa:-aa));else if(Y||b.isZoomWheelEvent(P))for(var va=mxEvent.getSource(P);null!=va;){if(va==b.container)return b.tooltipHandler.hideTooltip(),S=null!=aa&&null!=la?new mxPoint(aa,la):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),B=Y,Y=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?Y=1+Math.abs(P.deltaY)/20*(Y-1):null!=P.movementY&&"pointermove"==P.type&&(Y=1+Math.max(1,Math.abs(P.movementY))/
+20*(Y-1),aa=-1),b.lazyZoom(U,null,aa,Y),mxEvent.consume(P),!1;va=va.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
+EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;if(null!=this.format){var e=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+e+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),
1E3*e)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};
@@ -2174,7 +2173,7 @@ g.width-e.clientWidth,g.x-10)),g.y>e.scrollTop+.9*e.clientHeight&&(e.scrollTop=M
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,v=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,v=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var n=e.getSelectionCells();e.clearSelection();e.setSelectionCells(n)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-v);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(v,n){if(!this.minimized){var A=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;v=Math.min(v,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());n=Math.min(n,A-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(v,n){var A=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-S));n=Math.max(0,Math.min(n,G-F));this.getX()==v&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),n=b.window.getY();b.window.setLocation(v,n)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-R));n=Math.max(0,Math.min(n,G-F));this.getX()==v&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(R,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),n=b.window.getY();b.window.setLocation(v,n)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,g,m,v){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=v;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,
@@ -2204,22 +2203,22 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.className="geStatusDiv";e.setAttribute("title",b);e.innerText=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.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(c){if(null!=A){var f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));m(Math.max(0,G+(e?f.x-A.x:A.y-f.y)-g));mxEvent.consume(c);G!=K()&&(S=!0,F=null)}}function n(c){v(c);A=G=null}var A=null,G=null,S=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var c=parseInt(e?b.offsetLeft:b.offsetTop);e||(c+=g);return c});mxEvent.addGestureListeners(b,function(c){A=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));G=K();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var f=null!=F?F-g:0;F=K();m(f);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,v,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,n)})};
+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(c){if(null!=A){var f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));m(Math.max(0,G+(e?f.x-A.x:A.y-f.y)-g));mxEvent.consume(c);G!=J()&&(R=!0,F=null)}}function n(c){v(c);A=G=null}var A=null,G=null,R=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var J=mxUtils.bind(this,function(){var c=parseInt(e?b.offsetLeft:b.offsetTop);e||(c+=g);return c});mxEvent.addGestureListeners(b,function(c){A=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));G=J();R=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!R&&this.hsplitClickEnabled){var f=null!=F?F-g:0;F=J();m(f);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,v,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,n)})};
EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,g,m,v){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(v=mxUtils.htmlEntities(b.message));this.showError(e,v,n,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};
-EditorUi.prototype.showError=function(b,e,g,m,v,n,A,G,S,F,K,c,f){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,n,A,c,G,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,K||100+20*e,!0,!1,f);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,n,A,G,S,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,n,A,G,S,F);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,g,m,v,n,A,G,R,F,J,c,f){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,n,A,c,G,R);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,J||100+20*e,!0,!1,f);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,n,A,G,R,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,n,A,G,R,F);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var v=this.dialogs.length-1;0<=v;v--)if(!this.dialogs[v].closing){m=this.dialogs[v];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],v=0;v<e.length;v++){var n=b.isTableCell(e[v])?b.model.getParent(e[v]):e[v];null==n||g.get(n)||(g.put(n,!0),m.push(n))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(A){this.handleError(A)}};
-EditorUi.prototype.pickColor=function(b,e,g,m,v){var n=this.editor.graph,A=n.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){n.cellEditor.restoreSelection(A);e(S)},function(){n.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};
+EditorUi.prototype.pickColor=function(b,e,g,m,v){var n=this.editor.graph,A=n.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(R){n.cellEditor.restoreSelection(A);e(R)},function(){n.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),n=0;n<m;++n){for(var A=1024*n,G=Math.min(A+1024,g),S=Array(G-A),F=0;A<G;++F,++A)S[F]=b[A].charCodeAt(0);v[n]=new Uint8Array(S)}return new Blob(v,{type:e})};
+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),n=0;n<m;++n){for(var A=1024*n,G=Math.min(A+1024,g),R=Array(G-A),F=0;A<G;++F,++A)R[F]=b[A].charCodeAt(0);v[n]=new Uint8Array(R)}return new Blob(v,{type:e})};
EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var v=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};
EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>g&&(e=b.substring(g,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(v){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(v){try{var n=this.parseHtmlData(v),A="text/plain"!=n.getAttribute("data-type")?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var G=A.lastIndexOf("%3E");
-0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(K){}try{var S=n.getElementsByTagName("span"),F=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(K){}}catch(K){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(J){}try{var R=n.getElementsByTagName("span"),F=null!=R&&0<R.length?mxUtils.trim(decodeURIComponent(R[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(J){}}catch(J){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(g){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&
"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&
@@ -2237,12 +2236,12 @@ EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroun
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
EditorUi.prototype.createKeyHandler=function(b){function e(c,f,l){if(!m.isSelectionEmpty()&&m.isEnabled()){f=null!=f?f:1;var t=m.getCompositeParents(m.getSelectionCells()),q=0<t.length?t[0]:null;if(null!=q)if(l){m.getModel().beginUpdate();try{for(q=0;q<t.length;q++)if(m.getModel().isVertex(t[q])&&m.isCellResizable(t[q])){var D=m.getCellGeometry(t[q]);null!=D&&(D=D.clone(),37==c?D.width=Math.max(0,D.width-f):38==c?D.height=Math.max(0,D.height-f):39==c?D.width+=f:40==c&&(D.height+=f),m.getModel().setGeometry(t[q],
D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(q);var H=m.getView().scale;l=null;1==m.getSelectionCount()&&m.model.isVertex(q)&&null!=m.layoutManager&&!m.isCellLocked(q)&&(l=m.layoutManager.getLayout(D));if(null!=l&&l.constructor==mxStackLayout)f=D.getIndex(q),37==c||38==c?m.model.add(D,q,Math.max(0,f-1)):(39==c||40==c)&&m.model.add(D,q,Math.min(m.model.getChildCount(D),f+1));else{var N=m.graphHandler;null!=N&&(null==N.first&&N.start(q,0,0,m.getMovableCells(t)),null!=N.first&&(q=
-t=0,37==c?t=-f:38==c?q=-f:39==c?t=f:40==c&&(q=f),N.currentDx+=t*H,N.currentDy+=q*H,N.checkPreview(),N.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=N.first){var L=N.roundLength(N.currentDx/H),J=N.roundLength(N.currentDy/H);N.moveCells(N.cells,L,J);N.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),n=v.isEventIgnored;v.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
+t=0,37==c?t=-f:38==c?q=-f:39==c?t=f:40==c&&(q=f),N.currentDx+=t*H,N.currentDy+=q*H,N.checkPreview(),N.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=N.first){var L=N.roundLength(N.currentDx/H),I=N.roundLength(N.currentDy/H);N.moveCells(N.cells,L,I);N.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),n=v.isEventIgnored;v.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};v.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==g.dialogs||0==g.dialogs.length)};v.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=v.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(m.isEnabled()){var f=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?f=g.actions.get(g.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+(null==g.dialogs||0==g.dialogs.length)};v.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=v.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(m.isEnabled()){var f=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?f=g.actions.get(g.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
f=g.actions.get(g.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(f=g.actions.get(g.ctrlAltActions[c.keyCode]));if(null!=f)return f.funct;if(null!=G[c.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(m.model.isVertex(m.getSelectionCell()))return function(){var l=m.connectVertex(m.getSelectionCell(),G[c.keyCode],m.defaultEdgeLength,c,!0);null!=l&&0<l.length&&(1==l.length&&m.model.isEdge(l[0])?m.setSelectionCell(m.model.getTerminal(l[0],
-!1)):m.setSelectionCell(l[l.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(c)?function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null,!0)}:function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null)}}return S.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(c,f,l,t){var q=this.actions.get(l);null!=q&&(l=function(){q.isEnabled()&&q.funct.apply(this,arguments)},
-f?t?v.bindControlShiftKey(c,l):v.bindControlKey(c,l):t?v.bindShiftKey(c,l):v.bindKey(c,l))});var F=this,K=v.escape;v.escape=function(c){K.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,
+!1)):m.setSelectionCell(l[l.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(c)?function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null,!0)}:function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null)}}return R.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(c,f,l,t){var q=this.actions.get(l);null!=q&&(l=function(){q.isEnabled()&&q.funct.apply(this,arguments)},
+f?t?v.bindControlShiftKey(c,l):v.bindControlKey(c,l):t?v.bindShiftKey(c,l):v.bindKey(c,l))});var F=this,J=v.escape;v.escape=function(c){J.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,
"zoomIn");v.bindAction(222,!0,"zoomIn");v.bindAction(173,!0,"zoomOut");v.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)v.bindAction(79,!0,"outline",!0),v.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),v.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),v.bindControlKey(13,function(){F.ctrlEnter()}),v.bindAction(8,!1,"delete"),v.bindAction(8,!0,"deleteAll"),v.bindAction(8,!1,"deleteLabels",!0),v.bindAction(46,!1,"delete"),v.bindAction(46,!0,
"deleteAll"),v.bindAction(46,!1,"deleteLabels",!0),v.bindAction(36,!1,"resetView"),v.bindAction(72,!0,"fitWindow",!0),v.bindAction(74,!0,"fitPage"),v.bindAction(74,!0,"fitTwoPages",!0),v.bindAction(48,!0,"customZoom"),v.bindAction(82,!0,"turn"),v.bindAction(82,!0,"clearDefaultStyle",!0),v.bindAction(83,!0,"save"),v.bindAction(83,!0,"saveAs",!0),v.bindAction(65,!0,"selectAll"),v.bindAction(65,!0,"selectNone",!0),v.bindAction(73,!0,"selectVertices",!0),v.bindAction(69,!0,"selectEdges",!0),v.bindAction(69,
!0,"editStyle"),v.bindAction(66,!0,"bold"),v.bindAction(66,!0,"toBack",!0),v.bindAction(70,!0,"toFront",!0),v.bindAction(68,!0,"duplicate"),v.bindAction(68,!0,"setAsDefaultStyle",!0),v.bindAction(90,!0,"undo"),v.bindAction(90,!0,"redo",!0),v.bindAction(89,!0,"redo"),v.bindAction(89,!0,"autosize",!0),v.bindAction(88,!0,"cut"),v.bindAction(67,!0,"copy"),v.bindAction(86,!0,"paste"),v.bindAction(71,!0,"group"),v.bindAction(77,!0,"editData"),v.bindAction(71,!0,"grid",!0),v.bindAction(73,!0,"italic"),v.bindAction(76,
@@ -2253,7 +2252,7 @@ mxUtils.getOffset(b);A.popup(G.x,G.y+b.offsetHeight,null,n);this.setCurrentMenu(
this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(n)&&this.hideCurrentMenu();m=null==this.currentMenu;"INPUT"!=mxEvent.getSource(n).nodeName?n.preventDefault():n.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){v(n);m=!0}))}};
EditorUi.prototype.createZoomInput=function(b){var e=document.createElement("input");e.className="geButton geZoomInput";e.style.backgroundImage="url("+Editor.thinExpandImage+")";e.setAttribute("type","text");e.setAttribute("value","100%");var g=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){e.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&e.setAttribute("readonly","true");var m=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,
function(v){m=!1;mxClient.IS_TOUCH||mxEvent.getSource(v)!=e||document.activeElement==e||(e.focus(),mxClient.IS_GC||mxClient.IS_FF?e.select():document.execCommand("selectAll",!1,null),m=!0)}),mxUtils.bind(this,function(v){mxEvent.getSource(v)==e&&m&&mxEvent.consume(v)}),mxUtils.bind(this,function(v){m&&(mxEvent.consume(v),m=!1)}));this.addMenuHandler(e,g.funct);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(A){mxEvent.isAltDown(A)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(A)):mxEvent.isShiftDown(A)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(A))}));var n=mxUtils.bind(this,function(A,G,S){e.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==e&&this.editor.graph.container.focus()});mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(A){if(27==A.keyCode||13==A.keyCode||9==A.keyCode)27==A.keyCode||isNaN(parseInt(e.value))?n():this.editor.graph.zoomTo(parseInt(e.value)/100),
+mxEvent.consume(A)):mxEvent.isShiftDown(A)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(A))}));var n=mxUtils.bind(this,function(A,G,R){e.value=Math.round(100*this.editor.graph.view.scale*(null!=R?R:1))+"%";document.activeElement==e&&this.editor.graph.container.focus()});mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(A){if(27==A.keyCode||13==A.keyCode||9==A.keyCode)27==A.keyCode||isNaN(parseInt(e.value))?n():this.editor.graph.zoomTo(parseInt(e.value)/100),
this.hideCurrentMenu(),mxEvent.consume(A)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,n);this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",n);mxEvent.addListener(e,"blur",n);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(A,G){n(A,G,G.getProperty("factor"))}))})(e);return e};
EditorUi.prototype.createHelpIcon=function(b,e){e=document.createElement("img");e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));e.className="geHelpIcon";mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(g)}));return e};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(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&&
@@ -2262,46 +2261,46 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.g
null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var v=0;v<b.length;v++)m=m.replace(new RegExp("&"+b[v][0]+";","g"),"&#"+b[v][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,v,n,A){return g(Graph.sanitizeHtml(m),v,n,A)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var v=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=1<arguments.length?arguments[1]:void 0,A;if("undefined"!==typeof n){if(!e(n))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(A=
-arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var S=e(this)?Object(new this(G)):Array(G),F=0,K;F<G;)K=v[F],S[F]=n?"undefined"===typeof A?n(K,F):n.call(A,K,F):K,F+=1;S.length=G;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var R=e(this)?Object(new this(G)):Array(G),F=0,J;F<G;)J=v[F],R[F]=n?"undefined"===typeof A?n(J,F):n.call(A,J,F):J,F+=1;R.length=G;return R}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,v,n){return"default"==v&&null!=n?"fillcolor"==m.nodeName?n.shapeBackgroundColor:n.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,n,A,G,S){var F=b.apply(this,arguments);if(null!=g){var K=F.getElementsByTagName("img");0<K.length&&(K[0].className="geButton")}return F}})();
-Graph=function(b,e,g,m,v,n){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!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(Q){Q=this.getCurrentCellStyle(Q);
-return null!=Q?"1"==Q.html||"wrap"==Q[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,S=null,F=null,K=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Q=k.getProperty("event");var B=Q.getState();k=this.view.scale;if(!mxEvent.isAltDown(Q.getEvent())&&null!=B&&(c=this.isCellSelected(B.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Q.getEvent()))){var I=this.selectionCellsHandler.getHandler(B.cell);
-if(null==I||null==I.getHandleForEvent(Q)){var U=new mxRectangle(Q.getGraphX()-1,Q.getGraphY()-1),P=mxEvent.isTouchEvent(Q.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;U.grow(P);if(this.isTableCell(B.cell)&&this.isCellMovable(B.cell)&&!this.isCellSelected(B.cell)&&!(mxUtils.contains(B,Q.getGraphX()-I,Q.getGraphY()-I)&&mxUtils.contains(B,Q.getGraphX()-I,Q.getGraphY()+I)&&mxUtils.contains(B,Q.getGraphX()+I,Q.getGraphY()+I)&&mxUtils.contains(B,Q.getGraphX()+
-I,Q.getGraphY()-I))){var T=this.model.getParent(B.cell);I=this.model.getParent(T);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=T&&mxUtils.intersects(U,new mxRectangle(B.x,B.y-P,B.width,X))||this.model.getChildAt(T,0)!=B.cell&&mxUtils.intersects(U,new mxRectangle(B.x-P,B.y,X,B.height))||mxUtils.intersects(U,new mxRectangle(B.x,B.y+B.height-P,B.width,X))||mxUtils.intersects(U,new mxRectangle(B.x+B.width-P,B.y,X,B.height)))T=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,
-Q.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Q),null!=P&&(I.start(Q.getGraphX(),Q.getGraphY(),P),I.blockDelayedSelection=!T,Q.consume()))}}for(;!Q.isConsumed()&&null!=B&&(this.isTableCell(B.cell)||this.isTableRow(B.cell)||this.isTable(B.cell));)this.isSwimlane(B.cell)&&this.isCellMovable(B.cell)&&(I=this.getActualStartSize(B.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(B.x+(I.x-I.width-1)*k+(0==I.x?B.width:0),B.y,1,B.height))||(0<I.y||
-0<I.height)&&mxUtils.intersects(U,new mxRectangle(B.x,B.y+(I.y-I.height-1)*k+(0==I.y?B.height:0),B.width,1)))&&(this.selectCellForEvent(B.cell,Q.getEvent()),I=this.selectionCellsHandler.getHandler(B.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Q.getGraphX(),Q.getGraphY(),P),Q.consume())),B=this.view.getState(this.model.getParent(B.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){if("mouseDown"==k.getProperty("eventName")&&
-this.isEnabled()){Q=k.getProperty("event");var B=Q.getState();mxEvent.isAltDown(Q.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||c||null==B||!this.model.isEdge(B.cell)||(A=new mxPoint(Q.getGraphX(),Q.getGraphY()),K=this.isCellSelected(B.cell),S=B,G=Q,null!=B.text&&null!=B.text.boundingBox&&mxUtils.contains(B.text.boundingBox,Q.getGraphX(),Q.getGraphY())?F=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(B.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(F=k.getHandleForEvent(Q))))}}));
-this.addMouseListener({mouseDown:function(Q,k){},mouseMove:mxUtils.bind(this,function(Q,k){Q=this.selectionCellsHandler.handlers.map;for(var B in Q)if(null!=Q[B].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=A&&null!=S&&null!=G){if(B=S,null!=F||Math.abs(A.x-k.getGraphX())>I||Math.abs(A.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(B.cell));if(null!=U&&null!=
-U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=F?F:U.getHandleForEvent(G),T=this.view.getEdgeStyle(B),X=T==mxEdgeStyle.EntityRelation;I=B.absolutePoints;K||(P=F);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=F,null==P&&(Q=new mxRectangle(A.x,A.y),Q.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Q,I[0].x,I[0].y)?P=0:mxUtils.contains(Q,I[I.length-1].x,I[I.length-1].y)?P=U.bends.length-1:null!=I&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&
-(null!=T&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(B,A.x,A.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Q=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!X&&(null!=B.visibleSourceState||null!=B.visibleTargetState)||Q)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?
-this.isCellSelected(B.cell)||(this.selectionCellsHandler.handlers.put(B.cell,U),this.selectCellForEvent(B.cell,k.getEvent())):this.isCellSelected(B.cell)||U.destroy());K=!1;A=G=S=F=null}}else if(B=k.getState(),null!=B&&this.isCellEditable(B.cell)){Q=this.model.getParent(B.cell);U=null;if(this.model.isEdge(B.cell)&&!this.isCellSelected(B.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(B.cell)&&(this.isSwimlane(Q)||this.model.isLayer(Q)||this.getCurrentRoot()==
-Q)){if(Q=new mxRectangle(k.getGraphX(),k.getGraphY()),Q.grow(mxEdgeHandler.prototype.handleImage.width/2),I=B.absolutePoints,null!=I)null!=B.text&&null!=B.text.boundingBox&&mxUtils.contains(B.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Q,I[0].x,I[0].y)||mxUtils.contains(Q,I[I.length-1].x,I[I.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(B),T==mxEdgeStyle.EntityRelation||null==B.visibleSourceState&&null==B.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&
-T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(B,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Q=new mxRectangle(k.getGraphX(),k.getGraphY());Q.grow(I);if(this.isTableCell(B.cell)&&this.isCellMovable(B.cell)&&(k=this.model.getParent(B.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Q,new mxRectangle(B.x,
-B.y-2,B.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Q,new mxRectangle(B.x,B.y+B.height-2,B.width,4)))U="row-resize";else if(mxUtils.intersects(Q,new mxRectangle(B.x-2,B.y,4,B.height))&&this.model.getChildAt(k,0)!=B.cell||mxUtils.intersects(Q,new mxRectangle(B.x+B.width-2,B.y,4,B.height)))U="col-resize";for(k=B;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),
-P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Q,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Q,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&B.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Q,k){F=A=G=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var f=document.createElement("div");this.cellRenderer.getLabelValue=
-function(Q){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Q.view.graph.isHtmlLabel(Q.cell)&&("0"==mxUtils.getValue(Q.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Q.lastLabelValue!=k&&(Q.lastLabelValue=k,Q.lastSanitizedLabelValue=Graph.sanitizeHtml(k),f.innerHTML=Q.lastSanitizedLabelValue,Graph.addLightDarkColors(f,null,"simple"==Q.view.graph.getAdaptiveColors())&&(Q.lastSanitizedLabelValue=f.innerHTML)),k=Q.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Q,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var Q=l.apply(this,arguments);if(this.graph.pageVisible){var k=[],B=this.graph.pageFormat,I=this.graph.pageScale,U=B.width*I;B=B.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),X=0;X<T.width;X++)k.push(new mxRectangle(((T.x+X)*U+I.x)*P,(T.y*B+I.y)*P,U*P,B*P));for(X=1;X<T.height;X++)k.push(new mxRectangle((T.x*U+I.x)*P,((T.y+X)*B+I.y)*P,U*P,B*P));Q=k.concat(Q)}return Q};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Q,k){return null==Q.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Q){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var t=this.graphHandler.getCells;this.graphHandler.getCells=function(Q){for(var k=t.apply(this,arguments),B=new mxDictionary,I=[],U=0;U<k.length;U++){var P=
-this.graph.isTableCell(Q)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Q)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||B.get(P)||(B.put(P,!0),I.push(P))}return I};var q=this.graphHandler.start;this.graphHandler.start=function(Q,k,B,I){var U=!1;this.graph.isTableCell(Q)&&(this.graph.isCellSelected(Q)?U=!0:Q=this.graph.model.getParent(Q));U||this.graph.isTableRow(Q)&&
-this.graph.isCellSelected(Q)||(Q=this.graph.getCompositeParent(Q));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Q,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Q,k,B,I,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[T]);return T};var D=new mxRubberband(this);this.getRubberband=function(){return D};
-var H=(new Date).getTime(),N=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Q=this.currentState;L.apply(this,arguments);Q!=this.currentState?(H=(new Date).getTime(),N=0):N=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Q){return mxEvent.isShiftDown(Q.getEvent())&&mxEvent.isAltDown(Q.getEvent())?!1:null!=this.currentState&&Q.getState()==this.currentState&&2E3<N||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var Y=this.isToggleEvent;this.isToggleEvent=function(Q){return Y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Q)};var ha=D.isForceRubberbandEvent;D.isForceRubberbandEvent=function(Q){return ha.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Q.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Q.getState()&&mxEvent.isTouchEvent(Q.getEvent())};
-var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Q){return mxEvent.isMouseEvent(Q.getEvent())};var aa=this.click;this.click=function(Q){var k=null==Q.state&&
-null!=Q.sourceState&&this.isCellLocked(this.getLayerForCell(Q.sourceState.cell));if(this.isEnabled()&&!k||Q.isConsumed())return aa.apply(this,arguments);var B=k?Q.sourceState.cell:Q.getCell();if(null!=B){var I=this.getClickableLinkForCell(B);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,B):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Q){return Q.sourceState};var na=this.tooltipHandler.show;this.tooltipHandler.show=function(){na.apply(this,arguments);
-if(null!=this.div)for(var Q=this.div.getElementsByTagName("a"),k=0;k<Q.length;k++)null!=Q[k].getAttribute("href")&&null==Q[k].getAttribute("target")&&Q[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Q){return Q.sourceState};this.getCursorForMouseEvent=function(Q){var k=null==Q.state&&null!=Q.sourceState&&this.isCellLocked(Q.sourceState.cell);return this.getCursorForCell(k?Q.sourceState.cell:Q.getCell())};var W=this.getCursorForCell;this.getCursorForCell=function(Q){if(!this.isEnabled()||
-this.isCellLocked(Q)){if(null!=this.getClickableLinkForCell(Q))return"pointer";if(this.isCellLocked(Q))return"default"}return W.apply(this,arguments)};this.selectRegion=function(Q,k){var B=mxEvent.isAltDown(k)?Q:null;Q=this.getCells(Q.x,Q.y,Q.width,Q.height,null,null,B,null,!0);if(this.isToggleEvent(k))for(B=0;B<Q.length;B++)this.selectCellForEvent(Q[B],k);else this.selectCellsForEvent(Q,k);return Q};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(Q,k,B){return this.graph.isCellSelected(Q)?!1:ba.apply(this,arguments)};var ja=this.updateMouseEvent;this.updateMouseEvent=function(Q){Q=ja.apply(this,arguments);null!=Q.state&&this.isCellLocked(this.getLayerForCell(Q.getCell()))&&(null==this.getLinkForCell(Q.getCell())?Q.state=this.view.getState(this.getCellAt(Q.getGraphX(),Q.getGraphY(),null,null,null,mxUtils.bind(this,function(k,B,I){return Q.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
-Q.state=null);return Q};var ca=this.isCellSelectable;this.isCellSelectable=function(Q){return ca.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Q))};this.isCellLocked=function(Q){for(;null!=Q;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Q),"locked","0"))return!0;Q=this.model.getParent(Q)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){"mouseDown"==k.getProperty("eventName")&&(Q=k.getProperty("event").getState(),la=null==Q||this.isSelectionEmpty()||
-this.isCellSelected(Q.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Q,k){if(!mxEvent.isMultiTouchEvent(k)){Q=k.getProperty("event");var B=k.getProperty("cell");null==B?(Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q)),D.start(Q.x,Q.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(B)&&this.removeSelectionCell(B);la=null;k.consume()}}));this.connectionHandler.selectCells=
-function(Q,k){this.graph.setSelectionCell(k||Q)};this.connectionHandler.constraintHandler.isStateIgnored=function(Q,k){var B=Q.view.graph;return k&&(B.isCellSelected(Q.cell)||B.isTableRow(Q.cell)&&B.selectionCellsHandler.isHandled(B.model.getParent(Q.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Q=this.connectionHandler.constraintHandler;null!=Q.currentFocus&&Q.isStateIgnored(Q.currentFocus,!0)&&(Q.currentFocus=null,Q.constraints=null,Q.destroyIcons());Q.destroyFocusHighlight()}));
-Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,n,A,G,R){var F=b.apply(this,arguments);if(null!=g){var J=F.getElementsByTagName("img");0<J.length&&(J[0].className="geButton")}return F}})();
+Graph=function(b,e,g,m,v,n){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!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(W){W=this.getCurrentCellStyle(W);
+return null!=W?"1"==W.html||"wrap"==W[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,R=null,F=null,J=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,S){if("mouseDown"==S.getProperty("eventName")&&this.isEnabled()){W=S.getProperty("event");var k=W.getState();S=this.view.scale;if(!mxEvent.isAltDown(W.getEvent())&&null!=k&&(c=this.isCellSelected(k.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(W.getEvent()))){var B=this.selectionCellsHandler.getHandler(k.cell);
+if(null==B||null==B.getHandleForEvent(W)){var K=new mxRectangle(W.getGraphX()-1,W.getGraphY()-1),T=mxEvent.isTouchEvent(W.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;B=T+2;K.grow(T);if(this.isTableCell(k.cell)&&this.isCellMovable(k.cell)&&!this.isCellSelected(k.cell)&&!(mxUtils.contains(k,W.getGraphX()-B,W.getGraphY()-B)&&mxUtils.contains(k,W.getGraphX()-B,W.getGraphY()+B)&&mxUtils.contains(k,W.getGraphX()+B,W.getGraphY()+B)&&mxUtils.contains(k,W.getGraphX()+
+B,W.getGraphY()-B))){var P=this.model.getParent(k.cell);B=this.model.getParent(P);if(!this.isCellSelected(B)){T*=S;var U=2*T;if(this.model.getChildAt(B,0)!=P&&mxUtils.intersects(K,new mxRectangle(k.x,k.y-T,k.width,U))||this.model.getChildAt(P,0)!=k.cell&&mxUtils.intersects(K,new mxRectangle(k.x-T,k.y,U,k.height))||mxUtils.intersects(K,new mxRectangle(k.x,k.y+k.height-T,k.width,U))||mxUtils.intersects(K,new mxRectangle(k.x+k.width-T,k.y,U,k.height)))P=this.selectionCellsHandler.isHandled(B),this.selectCellForEvent(B,
+W.getEvent()),B=this.selectionCellsHandler.getHandler(B),null!=B&&(T=B.getHandleForEvent(W),null!=T&&(B.start(W.getGraphX(),W.getGraphY(),T),B.blockDelayedSelection=!P,W.consume()))}}for(;!W.isConsumed()&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(B=this.getActualStartSize(k.cell),(0<B.x||0<B.width)&&mxUtils.intersects(K,new mxRectangle(k.x+(B.x-B.width-1)*S+(0==B.x?k.width:0),k.y,1,k.height))||(0<B.y||
+0<B.height)&&mxUtils.intersects(K,new mxRectangle(k.x,k.y+(B.y-B.height-1)*S+(0==B.y?k.height:0),k.width,1)))&&(this.selectCellForEvent(k.cell,W.getEvent()),B=this.selectionCellsHandler.getHandler(k.cell),null!=B&&null!=B.customHandles&&(T=mxEvent.CUSTOM_HANDLE-B.customHandles.length+1,B.start(W.getGraphX(),W.getGraphY(),T),W.consume())),k=this.view.getState(this.model.getParent(k.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(W,S){if("mouseDown"==S.getProperty("eventName")&&
+this.isEnabled()){W=S.getProperty("event");var k=W.getState();mxEvent.isAltDown(W.getEvent())||mxEvent.isControlDown(S)||mxEvent.isShiftDown(S)||c||null==k||!this.model.isEdge(k.cell)||(A=new mxPoint(W.getGraphX(),W.getGraphY()),J=this.isCellSelected(k.cell),R=k,G=W,null!=k.text&&null!=k.text.boundingBox&&mxUtils.contains(k.text.boundingBox,W.getGraphX(),W.getGraphY())?F=mxEvent.LABEL_HANDLE:(S=this.selectionCellsHandler.getHandler(k.cell),null!=S&&null!=S.bends&&0<S.bends.length&&(F=S.getHandleForEvent(W))))}}));
+this.addMouseListener({mouseDown:function(W,S){},mouseMove:mxUtils.bind(this,function(W,S){W=this.selectionCellsHandler.handlers.map;for(var k in W)if(null!=W[k].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(S.getEvent())){var B=this.tolerance;if(null!=A&&null!=R&&null!=G){if(k=R,null!=F||Math.abs(A.x-S.getGraphX())>B||Math.abs(A.y-S.getGraphY())>B){var K=null;mxEvent.isShiftDown(S.getEvent())||(K=this.selectionCellsHandler.getHandler(k.cell));if(null!=K&&null!=
+K.bends&&0<K.bends.length){K.redrawHandles();var T=null!=F?F:K.getHandleForEvent(G),P=this.view.getEdgeStyle(k),U=P==mxEdgeStyle.EntityRelation;B=k.absolutePoints;J||(T=F);T!=mxEvent.LABEL_HANDLE&&null!=B&&(T=F,null==T&&(W=new mxRectangle(A.x,A.y),W.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(W,B[0].x,B[0].y)?T=0:mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?T=K.bends.length-1:null!=B&&(null==P&&null==T||P==mxEdgeStyle.SegmentConnector||P==mxEdgeStyle.OrthConnector)&&
+(null!=P&&(2==B.length||3==B.length&&(0==Math.round(B[0].x-B[1].x)&&0==Math.round(B[1].x-B[2].x)||0==Math.round(B[0].y-B[1].y)&&0==Math.round(B[1].y-B[2].y)))?T=2:(T=mxUtils.findNearestSegment(k,A.x,A.y),T=null==P?mxEvent.VIRTUAL_HANDLE-T:T+1))),null==T&&(T=mxEvent.VIRTUAL_HANDLE));W=T==mxEvent.LABEL_HANDLE||0==T||T==K.bends.length-1;if(!U&&(null!=k.visibleSourceState||null!=k.visibleTargetState)||W)K.start(S.getGraphX(),S.getGraphX(),T),S.consume(),this.graphHandler.reset()}null!=K&&(this.selectionCellsHandler.isHandlerActive(K)?
+this.isCellSelected(k.cell)||(this.selectionCellsHandler.handlers.put(k.cell,K),this.selectCellForEvent(k.cell,S.getEvent())):this.isCellSelected(k.cell)||K.destroy());J=!1;A=G=R=F=null}}else if(k=S.getState(),null!=k&&this.isCellEditable(k.cell)){W=this.model.getParent(k.cell);K=null;if(this.model.isEdge(k.cell)&&!this.isCellSelected(k.cell)&&!mxEvent.isAltDown(S.getEvent())&&!mxEvent.isShiftDown(S.getEvent())&&!this.isAncestorSelected(k.cell)&&(this.isSwimlane(W)||this.model.isLayer(W)||this.getCurrentRoot()==
+W)){if(W=new mxRectangle(S.getGraphX(),S.getGraphY()),W.grow(mxEdgeHandler.prototype.handleImage.width/2),B=k.absolutePoints,null!=B)null!=k.text&&null!=k.text.boundingBox&&mxUtils.contains(k.text.boundingBox,S.getGraphX(),S.getGraphY())?K="move":mxUtils.contains(W,B[0].x,B[0].y)||mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?K="pointer":(P=this.view.getEdgeStyle(k),P==mxEdgeStyle.EntityRelation||null==k.visibleSourceState&&null==k.visibleTargetState||(K="crosshair",P!=mxEdgeStyle.SegmentConnector&&
+P!=mxEdgeStyle.OrthConnector))||(S=mxUtils.findNearestSegment(k,S.getGraphX(),S.getGraphY()),S<B.length-1&&0<=S&&(K=0==Math.round(B[S].x-B[S+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(S.getEvent())){B=mxShape.prototype.svgStrokeTolerance/2;W=new mxRectangle(S.getGraphX(),S.getGraphY());W.grow(B);if(this.isTableCell(k.cell)&&this.isCellMovable(k.cell)&&(S=this.model.getParent(k.cell),B=this.model.getParent(S),!this.isCellSelected(B)))if(mxUtils.intersects(W,new mxRectangle(k.x,
+k.y-2,k.width,4))&&this.model.getChildAt(B,0)!=S||mxUtils.intersects(W,new mxRectangle(k.x,k.y+k.height-2,k.width,4)))K="row-resize";else if(mxUtils.intersects(W,new mxRectangle(k.x-2,k.y,4,k.height))&&this.model.getChildAt(S,0)!=k.cell||mxUtils.intersects(W,new mxRectangle(k.x+k.width-2,k.y,4,k.height)))K="col-resize";for(S=k;null==K&&null!=S&&(this.isTableCell(S.cell)||this.isTableRow(S.cell)||this.isTable(S.cell));)this.isSwimlane(S.cell)&&this.isCellMovable(S.cell)&&(B=this.getActualStartSize(S.cell),
+T=this.view.scale,(0<B.x||0<B.width)&&mxUtils.intersects(W,new mxRectangle(S.x+(B.x-B.width-1)*T+(0==B.x?S.width*T:0),S.y,1,S.height))?K="col-resize":(0<B.y||0<B.height)&&mxUtils.intersects(W,new mxRectangle(S.x,S.y+(B.y-B.height-1)*T+(0==B.y?S.height:0),S.width,1))&&(K="row-resize")),S=this.view.getState(this.model.getParent(S.cell))}null!=K&&k.setCursor(K)}}}),mouseUp:mxUtils.bind(this,function(W,S){F=A=G=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var f=document.createElement("div");this.cellRenderer.getLabelValue=
+function(W){var S=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);W.view.graph.isHtmlLabel(W.cell)&&("0"==mxUtils.getValue(W.style,"html","0")?S=mxUtils.htmlEntities(S,!1):(W.lastLabelValue!=S&&(W.lastLabelValue=S,W.lastSanitizedLabelValue=Graph.sanitizeHtml(S),f.innerHTML=W.lastSanitizedLabelValue,Graph.addLightDarkColors(f,null,"simple"==W.view.graph.getAdaptiveColors())&&(W.lastSanitizedLabelValue=f.innerHTML)),S=W.lastSanitizedLabelValue));return S};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(W,S){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
+this.graphHandler.getGuideStates=function(){var W=l.apply(this,arguments);if(this.graph.pageVisible){var S=[],k=this.graph.pageFormat,B=this.graph.pageScale,K=k.width*B;k=k.height*B;B=this.graph.view.translate;for(var T=this.graph.view.scale,P=this.graph.getPageLayout(),U=0;U<P.width;U++)S.push(new mxRectangle(((P.x+U)*K+B.x)*T,(P.y*k+B.y)*T,K*T,k*T));for(U=1;U<P.height;U++)S.push(new mxRectangle((P.x*K+B.x)*T,((P.y+U)*k+B.y)*T,K*T,k*T));W=S.concat(W)}return W};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(W,S){return null==W.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(W){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var t=this.graphHandler.getCells;this.graphHandler.getCells=function(W){for(var S=t.apply(this,arguments),k=new mxDictionary,B=[],K=0;K<S.length;K++){var T=
+this.graph.isTableCell(W)&&this.graph.isTableCell(S[K])&&this.graph.isCellSelected(S[K])?this.graph.model.getParent(S[K]):this.graph.isTableRow(W)&&this.graph.isTableRow(S[K])&&this.graph.isCellSelected(S[K])?S[K]:this.graph.getCompositeParent(S[K]);null==T||k.get(T)||(k.put(T,!0),B.push(T))}return B};var q=this.graphHandler.start;this.graphHandler.start=function(W,S,k,B){var K=!1;this.graph.isTableCell(W)&&(this.graph.isCellSelected(W)?K=!0:W=this.graph.model.getParent(W));K||this.graph.isTableRow(W)&&
+this.graph.isCellSelected(W)||(W=this.graph.getCompositeParent(W));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(W,S){S=this.graph.getCompositeParent(S);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(W,S,k,B,K,T){var P=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=B&&this.graph.applyNewEdgeStyle(B,[P]);return P};var D=new mxRubberband(this);this.getRubberband=function(){return D};
+var H=(new Date).getTime(),N=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var W=this.currentState;L.apply(this,arguments);W!=this.currentState?(H=(new Date).getTime(),N=0):N=(new Date).getTime()-H};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(W){return mxEvent.isShiftDown(W.getEvent())&&mxEvent.isAltDown(W.getEvent())?!1:null!=this.currentState&&W.getState()==this.currentState&&2E3<N||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(W){return Z.apply(this,arguments)||mxEvent.isShiftDown(W)};var ia=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ia=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=
+ia)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(W){return mxEvent.isMouseEvent(W.getEvent())};var fa=this.click;this.click=function(W){var S=null==W.state&&null!=W.sourceState&&this.isCellLocked(this.getLayerForCell(W.sourceState.cell));if(this.isEnabled()&&!S||W.isConsumed())return fa.apply(this,arguments);var k=S?W.sourceState.cell:W.getCell();if(null!=k){var B=this.getClickableLinkForCell(k);null!=B?this.isCustomLink(B)?this.customLinkClicked(B,k):this.openLink(B):
+S&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var W=this.div.getElementsByTagName("a"),S=0;S<W.length;S++)null!=W[S].getAttribute("href")&&null==W[S].getAttribute("target")&&W[S].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};this.getCursorForMouseEvent=function(W){var S=null==
+W.state&&null!=W.sourceState&&this.isCellLocked(W.sourceState.cell);return this.getCursorForCell(S?W.sourceState.cell:W.getCell())};var na=this.getCursorForCell;this.getCursorForCell=function(W){if(!this.isEnabled()||this.isCellLocked(W)){if(null!=this.getClickableLinkForCell(W))return"pointer";if(this.isCellLocked(W))return"default"}return na.apply(this,arguments)};this.selectRegion=function(W,S){var k=mxEvent.isAltDown(S)?W:null;W=this.getCells(W.x,W.y,W.width,W.height,null,null,k,null,!0);if(this.isToggleEvent(S))for(k=
+0;k<W.length;k++)this.selectCellForEvent(W[k],S);else this.selectCellsForEvent(W,S);return W};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(W,S,k){return this.graph.isCellSelected(W)?!1:X.apply(this,arguments)};var ca=this.updateMouseEvent;this.updateMouseEvent=function(W){W=ca.apply(this,arguments);null!=W.state&&this.isCellLocked(this.getLayerForCell(W.getCell()))&&(null==this.getLinkForCell(W.getCell())?W.state=this.view.getState(this.getCellAt(W.getGraphX(),
+W.getGraphY(),null,null,null,mxUtils.bind(this,function(S,k,B){return W.state==S||this.isCellLocked(this.getLayerForCell(S.cell))&&null==this.getLinkForCell(S.cell)}))):W.state=null);return W};var ka=this.isCellSelectable;this.isCellSelectable=function(W){return ka.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(W))};this.isCellLocked=function(W){for(;null!=W;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(W),"locked","0"))return!0;W=this.model.getParent(W)}return!1};var da=null;
+this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,S){"mouseDown"==S.getProperty("eventName")&&(W=S.getProperty("event").getState(),da=null==W||this.isSelectionEmpty()||this.isCellSelected(W.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(W,S){if(!mxEvent.isMultiTouchEvent(S)){W=S.getProperty("event");var k=S.getProperty("cell");null==k?(W=mxUtils.convertPoint(this.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),D.start(W.x,
+W.y)):null!=da?this.addSelectionCells(da):1<this.getSelectionCount()&&this.isCellSelected(k)&&this.removeSelectionCell(k);da=null;S.consume()}}));this.connectionHandler.selectCells=function(W,S){this.graph.setSelectionCell(S||W)};this.connectionHandler.constraintHandler.isStateIgnored=function(W,S){var k=W.view.graph;return S&&(k.isCellSelected(W.cell)||k.isTableRow(W.cell)&&k.selectionCellsHandler.isHandled(k.model.getParent(W.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var W=this.connectionHandler.constraintHandler;null!=W.currentFocus&&W.isStateIgnored(W.currentFocus,!0)&&(W.currentFocus=null,W.constraints=null,W.destroyIcons());W.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";
+Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved linecap linejoin".split(" ");Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shadow glass dashed dashPattern comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents opacity strokeColor strokeWidth align verticalAlign spacingLeft spacingRight spacingTop spacingBottom spacing arcSize absoluteArcSize comicStyle swimlaneFillColor shadowOffsetX shadowOffsetY shadowBlur shadowColor shadowOpacity".split(" "),Graph.textStyles),
Graph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";
@@ -2311,36 +2310,36 @@ Graph.createSvgImage=function(b,e,g,m,v){g=unescape(encodeURIComponent(Graph.svg
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
Graph.createSvgNode=function(b,e,g,m,v){var n=mxUtils.createXmlDocument(),A=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=v&&A.setAttribute("style","background: "+v.light+"; background-color: "+v.cssText+";");null==n.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);A.setAttribute("version","1.1");A.setAttribute("width",
g+"px");A.setAttribute("height",m+"px");A.setAttribute("viewBox",b+" "+e+" "+g+" "+m);n.appendChild(A);return A};
-Graph.htmlToPng=function(b,e,g,m,v,n){v=null!=v?v:"";n=null!=n?n:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*n;A.height=g*n;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(n,n);F.drawImage(G,0,0);m(A.toDataURL())}catch(K){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);G.onerror=
+Graph.htmlToPng=function(b,e,g,m,v,n){v=null!=v?v:"";n=null!=n?n:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*n;A.height=g*n;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(n,n);F.drawImage(G,0,0);m(A.toDataURL())}catch(J){m(null)}});var R=mxUtils.createXmlDocument();R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"svg"):R.createElement("svg");b=(new mxSvgCanvas2D(R)).convertHtml(b);G.onerror=
function(F){m(null)};G.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=v?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+v+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,e,g,m){function v(f,l,t){return null!=m?m(f,l,t):mxUtils.isValidColor(t)?(null==A&&null!=e&&(A={}),null!=A&&(A[l]=f.style.getPropertyValue(l)),t=mxUtils.getLightDarkColor(t,null,null,g),f.style.setProperty(l,t.cssText),!0):!1}for(var n=b.getElementsByTagName("*"),A=null,G=!1,S=0;S<n.length;S++)if(n[S]!=b&&null!=n[S].style){A=null;for(var F=0;F<n[S].style.length;F++){var K=n[S].style.item(F),c=n[S].style.getPropertyValue(K);G=v(n[S],K,c)||G}"FONT"==n[S].nodeName&&
-""==n[S].style.getPropertyValue("color")&&(c=n[S].getAttribute("color"),G=v(n[S],"color",c)||G);null!=e&&null!=A&&n[S].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var n=JSON.parse(v),A;for(A in n){var G=n[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(S){}return g};
+Graph.addLightDarkColors=function(b,e,g,m){function v(f,l,t){return null!=m?m(f,l,t):mxUtils.isValidColor(t)?(null==A&&null!=e&&(A={}),null!=A&&(A[l]=f.style.getPropertyValue(l)),t=mxUtils.getLightDarkColor(t,null,null,g),f.style.setProperty(l,t.cssText),!0):!1}for(var n=b.getElementsByTagName("*"),A=null,G=!1,R=0;R<n.length;R++)if(n[R]!=b&&null!=n[R].style){A=null;for(var F=0;F<n[R].style.length;F++){var J=n[R].style.item(F),c=n[R].style.getPropertyValue(J);G=v(n[R],J,c)||G}"FONT"==n[R].nodeName&&
+""==n[R].style.getPropertyValue("color")&&(c=n[R].getAttribute("color"),G=v(n[R],"color",c)||G);null!=e&&null!=A&&n[R].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var n=JSON.parse(v),A;for(A in n){var G=n[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(R){}return g};
Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var v=JSON.parse(m);null!=v&&null!=v[e]&&("color"==e&&"FONT"==b.nodeName&&""==v[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=v[e]&&(g=v[e]))}}catch(n){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};
-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",n=b.getElementsByTagName("*"),A=[],G=0;G<n.length;G++)A.push({node:n[G],value:n[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(n=b[G].getAttribute(Graph.backupStyleAttribute),null!=n){var S=JSON.parse(n);S[v]=
-"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{n=b[G].getAttribute(Graph.backupStyleAttribute),S=null!=n?JSON.parse(n):{},S[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=
+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",n=b.getElementsByTagName("*"),A=[],G=0;G<n.length;G++)A.push({node:n[G],value:n[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(n=b[G].getAttribute(Graph.backupStyleAttribute),null!=n){var R=JSON.parse(n);R[v]=
+"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{n=b[G].getAttribute(Graph.backupStyleAttribute),R=null!=n?JSON.parse(n):{},R[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=
g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)v=m.nextSibling,e.appendChild(m),m=v;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),v=1,n=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){n=g;break}for(g=n+1;-1<n&&g<b.byteLength&&g<n+e.length-1;g++){if(b[g]!=e.charCodeAt(v))return Graph.arrayBufferIndexOfString(b,e,n+1);v++}return v==e.length-1?n:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};
Graph.fadeNodes=function(b,e,g,m,v){v=null!=v?v:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+v+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},v)},0)};
-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function n(K,c){if(K.getModel().isVertex(c)){var f=K.container.scrollWidth/2,l=K.container.scrollHeight/2;K.rootCell=c.referenceCell||c;K.getModel().beginUpdate();try{for(var t=c.referenceCell||c,q=m.model.getCell(t.sourceCellId),D=m.getEdges(q,null,!0,!0,!1,!0),H=[],N=0;N<D.length;N++)null!=D[N].getTerminal(!0)&&null!=D[N].getTerminal(!1)&&m.isCellVisible(D[N])&&
-!m.isEdgeIgnored(D[N])&&m.isCellVisible(D[N].getTerminal(!0))&&m.isCellVisible(D[N].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(D[N]))&&H.push(D[N]);H=D=H;if(null!=c.startIndex||0<pageSize&&D.length>pageSize){var L=c.startIndex||0;H=D.slice(Math.max(0,L),Math.min(D.length,L+pageSize))}H=m.getOpposites(H,q).concat(H);var J=K.cloneCells(H);for(N=0;N<H.length;N++)if(J[N].sourceCellId=H[N].id,K.model.isEdge(J[N]))for(J[N].geometry.x=0,J[N].geometry.y=0,J[N].geometry.points=null,J[N].setStyle(J[N].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),J[N].setTerminal(t,null==J[N].getTerminal(!0)),q=0;q<J[N].getChildCount();q++){var Y=J[N].getChildAt(q);null!=Y.geometry&&Y.geometry.relative&&(Y.setStyle(Y.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),Y.geometry.offset=new mxPoint(0,0),Y.geometry.y=0,Y.geometry.x=.5>Y.geometry.x?-.8:.5<Y.geometry.x?.8:0)}if(0<c.startIndex){var ha=K.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((c.startIndex||0)/pageSize)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ha.referenceCell=t;ha.startIndex=Math.max(0,(c.startIndex||0)-pageSize);J.splice(0,0,ha)}if(D.length>(c.startIndex||0)+pageSize){var ea=K.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((c.startIndex||0)/pageSize)+2)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-ea.referenceCell=t;ea.startIndex=(c.startIndex||0)+pageSize;J.splice(0,0,ea)}for(var aa in K.getModel().cells){var na=K.getModel().getCell(aa);na!=K.rootCell&&!K.getModel().isAncestor(K.rootCell,na)&&K.getModel().isVertex(na)&&K.removeCells([na])}K.addCells(J);var W=K.getModel().getGeometry(K.rootCell);null!=W&&(W=W.clone(),W.x=f-W.width/2,W.y=l-W.height/3,K.getModel().setGeometry(K.rootCell,W));c=[];for(aa in K.getModel().cells)na=K.getModel().getCell(aa),na!=K.rootCell&&K.getModel().isVertex(na)&&
-K.getModel().getParent(na)==K.getDefaultParent()&&(c.push(na),W=K.getModel().getGeometry(na),null!=W&&(W.x=f-W.width/2,W.y=l-W.height/2));var ba=c.length,ja=2*Math.PI/ba,ca=Math.max(minSize,Math.min(K.container.scrollWidth/2.5-80,K.container.scrollHeight/2.5-80));for(f=0;f<ba;f++)W=K.getModel().getGeometry(c[f]),null!=W&&(W=W.clone(),W.x+=ca*Math.sin(f*ja),W.y+=ca*Math.cos(f*ja),K.getModel().setGeometry(c[f],W))}finally{K.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position=
-"absolute";A.style.display="block";A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=
-"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));A.appendChild(S);document.body.appendChild(A);var F=function(K){27==K.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(K){if(mxClient.isBrowserSupported()){var c=new Graph(K);c.keepEdgesInBackground=!0;c.isCellResizable=function(){return!1};c.isCellRotatable=function(){return!1};c.getCursorForCell=function(H){return this.model.isVertex(H)?"pointer":null};c.getFoldingImage=
-function(){return null};var f=function(){mxEvent.removeListener(document,"keydown",F);K.parentNode.removeChild(K);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",f);mxEvent.addListener(S,"click",f);c.setEnabled(!1);var l=c.click;c.click=function(H){var N=H.getCell(),L=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&c.rootCell!=N&&0<c.getEdges(L).length?n(c,N):l.apply(this,arguments)};f=c.container.scrollWidth/2;var t=c.container.scrollHeight/3;c.model.beginUpdate();var q=c.importCells([v])[0];
-q.sourceCellId=v.id;q.geometry.x=f-q.geometry.width/2;q.geometry.y=t-q.geometry.height/2;c.model.endUpdate();var D=!1;c.getModel().addListener(mxEvent.CHANGE,function(H,N){D||(H=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,c.labelsVisible=!1,D=!0,mxEffects.animateChanges(c,H,function(){var L=new mxParallelEdgeLayout(c);L.spacing=60;var J=L.layout;L.layout=function(Y){L.spacing=Math.min(60,Math.max(30,60-5*Y.length));J.apply(this,arguments)};L.execute(c.getDefaultParent());mxText.prototype.enableBoundingBox=
+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function n(J,c){if(J.getModel().isVertex(c)){var f=J.container.scrollWidth/2,l=J.container.scrollHeight/2;J.rootCell=c.referenceCell||c;J.getModel().beginUpdate();try{for(var t=c.referenceCell||c,q=m.model.getCell(t.sourceCellId),D=m.getEdges(q,null,!0,!0,!1,!0),H=[],N=0;N<D.length;N++)null!=D[N].getTerminal(!0)&&null!=D[N].getTerminal(!1)&&m.isCellVisible(D[N])&&
+!m.isEdgeIgnored(D[N])&&m.isCellVisible(D[N].getTerminal(!0))&&m.isCellVisible(D[N].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(D[N]))&&H.push(D[N]);H=D=H;if(null!=c.startIndex||0<pageSize&&D.length>pageSize){var L=c.startIndex||0;H=D.slice(Math.max(0,L),Math.min(D.length,L+pageSize))}H=m.getOpposites(H,q).concat(H);var I=J.cloneCells(H);for(N=0;N<H.length;N++)if(I[N].sourceCellId=H[N].id,J.model.isEdge(I[N]))for(I[N].geometry.x=0,I[N].geometry.y=0,I[N].geometry.points=null,I[N].setStyle(I[N].getStyle()+
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),I[N].setTerminal(t,null==I[N].getTerminal(!0)),q=0;q<I[N].getChildCount();q++){var Z=I[N].getChildAt(q);null!=Z.geometry&&Z.geometry.relative&&(Z.setStyle(Z.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),Z.geometry.offset=new mxPoint(0,0),Z.geometry.y=0,Z.geometry.x=.5>Z.geometry.x?-.8:.5<Z.geometry.x?.8:0)}if(0<c.startIndex){var ia=J.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((c.startIndex||0)/pageSize)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ia.referenceCell=t;ia.startIndex=Math.max(0,(c.startIndex||0)-pageSize);I.splice(0,0,ia)}if(D.length>(c.startIndex||0)+pageSize){var fa=J.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((c.startIndex||0)/pageSize)+2)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+fa.referenceCell=t;fa.startIndex=(c.startIndex||0)+pageSize;I.splice(0,0,fa)}for(var ba in J.getModel().cells){var na=J.getModel().getCell(ba);na!=J.rootCell&&!J.getModel().isAncestor(J.rootCell,na)&&J.getModel().isVertex(na)&&J.removeCells([na])}J.addCells(I);var X=J.getModel().getGeometry(J.rootCell);null!=X&&(X=X.clone(),X.x=f-X.width/2,X.y=l-X.height/3,J.getModel().setGeometry(J.rootCell,X));c=[];for(ba in J.getModel().cells)na=J.getModel().getCell(ba),na!=J.rootCell&&J.getModel().isVertex(na)&&
+J.getModel().getParent(na)==J.getDefaultParent()&&(c.push(na),X=J.getModel().getGeometry(na),null!=X&&(X.x=f-X.width/2,X.y=l-X.height/2));var ca=c.length,ka=2*Math.PI/ca,da=Math.max(minSize,Math.min(J.container.scrollWidth/2.5-80,J.container.scrollHeight/2.5-80));for(f=0;f<ca;f++)X=J.getModel().getGeometry(c[f]),null!=X&&(X=X.clone(),X.x+=da*Math.sin(f*ka),X.y+=da*Math.cos(f*ka),J.getModel().setGeometry(c[f],X))}finally{J.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position=
+"absolute";A.style.display="block";A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var R=document.createElement("div");R.style.position="absolute";R.style.cursor="pointer";R.style.right="38px";R.style.top=
+"14px";R.style.textAlign="right";R.style.verticalAlign="top";mxUtils.write(R,mxResources.get("close"));A.appendChild(R);document.body.appendChild(A);var F=function(J){27==J.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(J){if(mxClient.isBrowserSupported()){var c=new Graph(J);c.keepEdgesInBackground=!0;c.isCellResizable=function(){return!1};c.isCellRotatable=function(){return!1};c.getCursorForCell=function(H){return this.model.isVertex(H)?"pointer":null};c.getFoldingImage=
+function(){return null};var f=function(){mxEvent.removeListener(document,"keydown",F);J.parentNode.removeChild(J);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",f);mxEvent.addListener(R,"click",f);c.setEnabled(!1);var l=c.click;c.click=function(H){var N=H.getCell(),L=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&c.rootCell!=N&&0<c.getEdges(L).length?n(c,N):l.apply(this,arguments)};f=c.container.scrollWidth/2;var t=c.container.scrollHeight/3;c.model.beginUpdate();var q=c.importCells([v])[0];
+q.sourceCellId=v.id;q.geometry.x=f-q.geometry.width/2;q.geometry.y=t-q.geometry.height/2;c.model.endUpdate();var D=!1;c.getModel().addListener(mxEvent.CHANGE,function(H,N){D||(H=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,c.labelsVisible=!1,D=!0,mxEffects.animateChanges(c,H,function(){var L=new mxParallelEdgeLayout(c);L.spacing=60;var I=L.layout;L.layout=function(Z){L.spacing=Math.min(60,Math.max(30,60-5*Z.length));I.apply(this,arguments)};L.execute(c.getDefaultParent());mxText.prototype.enableBoundingBox=
!0;c.labelsVisible=!0;c.tooltipHandler.hide();c.refresh();D=!1}))});n(c,q)}else mxUtils.error("Browser is not supported!",200,!1)})(A)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};
Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==
g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};
Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var v=e.getElementsByTagName("svg");if(0<v.length){document.body.appendChild(e);try{m=g=1;var n=v[0].getAttribute("width"),A=v[0].getAttribute("height");n=null!=n&&"%"!=n.charAt(n.length-
-1)?parseFloat(n):NaN;A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;var G=v[0].getAttribute("viewBox");if(null!=G&&!isNaN(n)&&!isNaN(A)){var S=G.split(" ");4<=G.length&&(g=parseFloat(S[2])/n,m=parseFloat(S[3])/A,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var F=v[0].getBBox();if(0<F.width&&0<F.height){n=0;var K=v[0].querySelectorAll("[stroke-width]");for(A=0;A<K.length;A++)n=Math.max(n,parseFloat(K[A].getAttribute("stroke-width")));F=new mxRectangle(F.x,
+1)?parseFloat(n):NaN;A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;var G=v[0].getAttribute("viewBox");if(null!=G&&!isNaN(n)&&!isNaN(A)){var R=G.split(" ");4<=G.length&&(g=parseFloat(R[2])/n,m=parseFloat(R[3])/A,new mxRectangle(parseFloat(R[0]),parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])))}var F=v[0].getBBox();if(0<F.width&&0<F.height){n=0;var J=v[0].querySelectorAll("[stroke-width]");for(A=0;A<J.length;A++)n=Math.max(n,parseFloat(J[A].getAttribute("stroke-width")));F=new mxRectangle(F.x,
F.y,F.width,F.height);F.grow(n/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",F.x+" "+F.y+" "+F.width+" "+F.height);e.getElementsByTagName("svg")[0].setAttribute("width",F.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",F.height/m)}}catch(c){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(v[0]))}}}catch(c){}return b};
Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
Graph.rewritePageLinks=function(b,e){function g(v,n){var A=v.getAttribute(n);if(null!=A){Graph.isPageLink(A)&&(A="#"+A.substring(A.indexOf(":")+1));var G=n;e&&"xlink:href"==n&&(v.removeAttribute(n),G="href");v.setAttribute(G,A)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
@@ -2349,33 +2348,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,n=!0,A=null,G=mxUtils.bind(this,function(K){n=!0;A=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){n=n&&null!=A&&Math.abs(A.x-mxEvent.getClientX(K))<v&&Math.abs(A.y-mxEvent.getClientY(K))<v}),F=mxUtils.bind(this,function(K){if(n)for(var c=mxEvent.getSource(K);null!=
-c&&c!=m.node;){if("a"==c.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,c,K);break}c=c.parentNode}});mxEvent.addGestureListeners(m.node,G,S,F);mxEvent.addListener(m.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,n=!0,A=null,G=mxUtils.bind(this,function(J){n=!0;A=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J))}),R=mxUtils.bind(this,function(J){n=n&&null!=A&&Math.abs(A.x-mxEvent.getClientX(J))<v&&Math.abs(A.y-mxEvent.getClientY(J))<v}),F=mxUtils.bind(this,function(J){if(n)for(var c=mxEvent.getSource(J);null!=
+c&&c!=m.node;){if("a"==c.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,c,J);break}c=c.parentNode}});mxEvent.addGestureListeners(m.node,G,R,F);mxEvent.addListener(m.node,"click",function(J){mxEvent.consume(J)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(A){return!this.isSpecialColor(A.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(A.style,"lineShape",null)&&(this.model.isVertex(A.cell)||"arrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(A.style,
-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var S=G?"color":"background-color",F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,
-S);null==F&&null!=A&&A!=this.cellEditor.textarea.parentNode;)F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,S),A=A.parentNode;if("rgba(0, 0, 0, 0)"==F||"transparent"==F)F=mxConstants.NONE;return F};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return"label"==A||"rectangle"==
+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var R=G?"color":"background-color",F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,
+R);null==F&&null!=A&&A!=this.cellEditor.textarea.parentNode;)F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,R),A=A.parentNode;if("rgba(0, 0, 0, 0)"==F||"transparent"==F)F=mxConstants.NONE;return F};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return"label"==A||"rectangle"==
A||"internalStorage"==A||"ext"==A||"umlLifeline"==A||"swimlane"==A||"process"==A};Graph.prototype.isRoundedState=function(A){return null!=A.shape?A.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(A){var G=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(A.style,mxConstants.STYLE_CURVED,!1)&&("connector"==G||"filledEdge"==G||"wire"==G)};Graph.prototype.isAutoSizeState=
-function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var S=this.model;return S.filterDescendants(function(F){return A&&S.isVertex(F)||G&&S.isEdge(F)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(A,G,S){A=this.getCellStyle(A).newEdgeStyle;
-if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),K;for(K in F)this.setCellStyles(K,F[K],G),"edgeStyle"==K&&"elbowEdgeStyle"==F[K]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},S=0;S<A.length;S++){var F=this.view.getState(A[S]);null!=F&&this.mergeStyle(F.style,G,0==S)}return G};Graph.prototype.mergeStyle=function(A,G,S){if(null!=
-A){var F={},K;for(K in A){var c=A[K];null!=c&&(F[K]=!0,null==G[K]&&S?G[K]=c:G[K]!=c&&delete G[K])}for(K in G)F[K]||delete G[K]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(A)&&
-(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var S=this.model.getChildAt(A,G);if(this.isCellEditable(S)){A=S;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,S,F){null!=A&&(F||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(A,function(K){return 0>mxUtils.indexOf(S,K)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=function(A,G,S,
-F,K,c,f){var l=!1,t=!1;if(0<A.length)for(var q=0;q<A.length&&(l=this.getModel().isVertex(A[q])||l,!(t=this.getModel().isEdge(A[q])||t)||!l);q++);else t=l=!0;l=l&&!c;t=t&&!f;for(q=0;q<G.length;q++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[q]),"strokeColor"!=G[q]||null!=S[q]&&"none"!=S[q])if(0<=mxUtils.indexOf(Graph.cellStyles,G[q])||"shape"==G[q])if("shape"!=G[q]&&(l||A)&&(null==S[q]?delete F[G[q]]:F[G[q]]=S[q]),t||A)null==S[q]?delete K[G[q]]:K[G[q]]=S[q]};Graph.prototype.includeDescendants=function(A){for(var G=
-[],S=0;S<A.length;S++)G=G.concat(this.model.getDescendants(A[S]));return G};Graph.prototype.pasteCellStyles=function(A,G,S,F,K){G=null!=G?G:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;K=null!=K?K:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<A.length;c++){var f=A[c],l=this.model.getStyle(f),t=!1;null!=f.style&&(pairs=f.style.split(";"),t=t||0<=mxUtils.indexOf(pairs,"text"));if(t)var q=Graph.textStyles;else if(q=Graph.cellStyles.slice(),!F)for(var D=null!=l?l.split(";"):
-[],H=0;H<D.length;H++){var N=D[H],L=N.indexOf("=");if(0<=L){var J=N.substring(0,L),Y=mxUtils.indexOf(q,J);0<=Y&&q.splice(Y,1);for(t=0;t<Graph.cellStyleGroups.length;t++){var ha=Graph.cellStyleGroups[t];if(0<=mxUtils.indexOf(ha,J))for(var ea=0;ea<ha.length;ea++){var aa=mxUtils.indexOf(q,ha[ea]);0<=aa&&q.splice(aa,1)}}}}var na=this.model.isEdge(f);t=na?S:G;for(H=0;H<q.length;H++){J=q[H];var W=t[J];null!=W&&("edgeStyle"!=J||K)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(l=mxUtils.setStyle(l,
-J,W),"fontFamily"==J&&null==t.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==J&&"1"==W&&null==t.curved&&(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(f,l)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var S=0;S<G.length;S++)if(this.model.isVertex(G[S])||this.model.isEdge(G[S])){var F=this.getCellStyle(G[S],
-!1),K=F[mxConstants.STYLE_PERIMETER],c=!1;for(l in A){var f=A[l];if(F[l]!=f){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[l]&&"umlLifeline"!=f){c=!0;var l="participant"}this.setCellStyles(l,f,[G[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,K,[G[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(A,G,S,F,K,c){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,S,F,K,c){F=null!=F?F:!0;K=null!=K?K:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var f=
-this.model.getChildCount(S)-1;0<=f;f--){var l=this.model.getChildAt(S,f),t=this.getScaledCellAt(A,G,l,F,K,c);if(null!=t)return t;if(this.isCellVisible(l)&&(K&&this.model.isEdge(l)||F&&this.model.isVertex(l))&&(t=this.view.getState(l),null!=t&&(null==c||!c(t,A,G))&&this.intersects(t,A,G)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",
-"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,S=[],F=0;F<A.length;F++){var K=this.getCompositeParent(A[F]);
-this.isTableCell(K)&&(K=this.graph.model.getParent(K));this.isTableRow(K)&&(K=this.graph.model.getParent(K));null==K||G.get(K)||(G.put(K,!0),S.push(K))}return S};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);
-if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var S=[],F=0;F<G.length;F++)A(G[F])||S.push(G[F]);G=S}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,S=this.currentTranslate;A=new mxRectangle((A.x+2*S.x)*G-S.x,(A.y+2*S.y)*G-S.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
-function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,S=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*S,(A.y+G.y)*S,A.width*S,A.height*S)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;
+function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var R=this.model;return R.filterDescendants(function(F){return A&&R.isVertex(F)||G&&R.isEdge(F)},R.getRoot())};Graph.prototype.applyNewEdgeStyle=function(A,G,R){A=this.getCellStyle(A).newEdgeStyle;
+if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),J;for(J in F)this.setCellStyles(J,F[J],G),"edgeStyle"==J&&"elbowEdgeStyle"==F[J]&&null!=R&&this.setCellStyles("elbow",R==mxConstants.DIRECTION_SOUTH||R==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},R=0;R<A.length;R++){var F=this.view.getState(A[R]);null!=F&&this.mergeStyle(F.style,G,0==R)}return G};Graph.prototype.mergeStyle=function(A,G,R){if(null!=
+A){var F={},J;for(J in A){var c=A[J];null!=c&&(F[J]=!0,null==G[J]&&R?G[J]=c:G[J]!=c&&delete G[J])}for(J in G)F[J]||delete G[J]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(A)&&
+(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var R=this.model.getChildAt(A,G);if(this.isCellEditable(R)){A=R;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,R,F){null!=A&&(F||(R=null!=R?R:Graph.cellStyles,Graph.removeKeys(A,function(J){return 0>mxUtils.indexOf(R,J)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=function(A,G,R,
+F,J,c,f){var l=!1,t=!1;if(0<A.length)for(var q=0;q<A.length&&(l=this.getModel().isVertex(A[q])||l,!(t=this.getModel().isEdge(A[q])||t)||!l);q++);else t=l=!0;l=l&&!c;t=t&&!f;for(q=0;q<G.length;q++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[q]),"strokeColor"!=G[q]||null!=R[q]&&"none"!=R[q])if(0<=mxUtils.indexOf(Graph.cellStyles,G[q])||"shape"==G[q])if("shape"!=G[q]&&(l||A)&&(null==R[q]?delete F[G[q]]:F[G[q]]=R[q]),t||A)null==R[q]?delete J[G[q]]:J[G[q]]=R[q]};Graph.prototype.includeDescendants=function(A){for(var G=
+[],R=0;R<A.length;R++)G=G.concat(this.model.getDescendants(A[R]));return G};Graph.prototype.pasteCellStyles=function(A,G,R,F,J){G=null!=G?G:this.currentVertexStyle;R=null!=R?R:this.currentEdgeStyle;J=null!=J?J:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<A.length;c++){var f=A[c],l=this.model.getStyle(f),t=!1;null!=f.style&&(pairs=f.style.split(";"),t=t||0<=mxUtils.indexOf(pairs,"text"));if(t)var q=Graph.textStyles;else if(q=Graph.cellStyles.slice(),!F)for(var D=null!=l?l.split(";"):
+[],H=0;H<D.length;H++){var N=D[H],L=N.indexOf("=");if(0<=L){var I=N.substring(0,L),Z=mxUtils.indexOf(q,I);0<=Z&&q.splice(Z,1);for(t=0;t<Graph.cellStyleGroups.length;t++){var ia=Graph.cellStyleGroups[t];if(0<=mxUtils.indexOf(ia,I))for(var fa=0;fa<ia.length;fa++){var ba=mxUtils.indexOf(q,ia[fa]);0<=ba&&q.splice(ba,1)}}}}var na=this.model.isEdge(f);t=na?R:G;for(H=0;H<q.length;H++){I=q[H];var X=t[I];null!=X&&("edgeStyle"!=I||J)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,I))&&(l=mxUtils.setStyle(l,
+I,X),"fontFamily"==I&&null==t.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==I&&"1"==X&&null==t.curved&&(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(f,l)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var R=0;R<G.length;R++)if(this.model.isVertex(G[R])||this.model.isEdge(G[R])){var F=this.getCellStyle(G[R],
+!1),J=F[mxConstants.STYLE_PERIMETER],c=!1;for(l in A){var f=A[l];if(F[l]!=f){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[l]&&"umlLifeline"!=f){c=!0;var l="participant"}this.setCellStyles(l,f,[G[R]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,J,[G[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(A,G,R,F,J,c){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,R,F,J,c){F=null!=F?F:!0;J=null!=J?J:!0;null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var f=
+this.model.getChildCount(R)-1;0<=f;f--){var l=this.model.getChildAt(R,f),t=this.getScaledCellAt(A,G,l,F,J,c);if(null!=t)return t;if(this.isCellVisible(l)&&(J&&this.model.isEdge(l)||F&&this.model.isVertex(l))&&(t=this.view.getState(l),null!=t&&(null==c||!c(t,A,G))&&this.intersects(t,A,G)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",
+"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,R=[],F=0;F<A.length;F++){var J=this.getCompositeParent(A[F]);
+this.isTableCell(J)&&(J=this.graph.model.getParent(J));this.isTableRow(J)&&(J=this.graph.model.getParent(J));null==J||G.get(J)||(G.put(J,!0),R.push(J))}return R};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);
+if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var R=[],F=0;F<G.length;F++)A(G[F])||R.push(G[F]);G=R}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,R=this.currentTranslate;A=new mxRectangle((A.x+2*R.x)*G-R.x,(A.y+2*R.y)*G-R.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
+function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,R=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*R,(A.y+G.y)*R,A.width*R,A.height*R)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;
mxGraphView.prototype.validate=function(A){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;
-Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTable(A[S])||this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=
-A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};
-var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,S=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=S)};var n=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.useCssTransforms,K=this.view.scale,c=this.view.translate;F&&(this.view.scale=1,this.view.translate=
-new mxPoint(0,0),this.useCssTransforms=!1);n.apply(this,arguments);F&&(this.view.scale=K,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],R=0;R<A.length;R++)this.isTableRow(A[R])||this.isTableCell(A[R])||G.push(A[R]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],R=0;R<A.length;R++)this.isTable(A[R])||this.isTableRow(A[R])||this.isTableCell(A[R])||G.push(A[R]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=
+A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var R=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};
+var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,R=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=R)};var n=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,R){var F=this.useCssTransforms,J=this.view.scale,c=this.view.translate;F&&(this.view.scale=1,this.view.translate=
+new mxPoint(0,0),this.useCssTransforms=!1);n.apply(this,arguments);F&&(this.view.scale=J,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};
Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var v=b.split("#")[1];window.location.hash=="#"+v&&(window.location.hash="");window.location.hash=v}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(n){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2390,7 +2389,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=
Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var v={};v.id=b[m].id;var n=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(v.value=this.getLabel(b[m]));if(null!=n)for(var A=0;A<n.length;A++)v[n[A].nodeName]=n[A].nodeValue;else v.label=this.convertValueToString(b[m]);g.push(v)}return g};
Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var v=this.cellRenderer.getShapesForState(m),n=0;n<v.length;n++)null!=v[n]&&null!=v[n].node&&e.push(v[n].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var v=this.view.getState(b[m]);null!=v&&null!=v.shape&&(this.model.isEdge(v.cell)&&null!=v.absolutePoints&&1<v.absolutePoints.length?g.push(this.createEdgeWipeAnimation(v,e)):this.model.isVertex(v.cell)&&null!=v.shape.bounds&&g.push(this.createVertexWipeAnimation(v,e)))}return g};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,n=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var S=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,K=1;K<n;K++)if(F<=m[K-1]){S.push(new mxPoint(g[K-1].x+(g[K].x-g[K-1].x)*F/m[K-1],g[K-1].y+(g[K].y-g[K-1].y)*F/m[K-1]));break}else F-=m[K-1],S.push(g[K]);b.shape.points=S;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,n=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var R=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,J=1;J<n;J++)if(F<=m[J-1]){R.push(new mxPoint(g[J-1].x+(g[J].x-g[J-1].x)*F/m[J-1],g[J-1].y+(g[J].y-g[J-1].y)*F/m[J-1]));break}else F-=m[J-1],R.push(g[J]);b.shape.points=R;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=G)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,v){null!=b.shape&&(v=m/v,e||(v=1-v),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*v,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=v))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var v=null,n=0,A=mxUtils.bind(this,function(){if(n==g||this.stoppingCustomActions){window.clearInterval(v);for(var G=0;G<b.length;G++)b[G].stop();null!=e&&e()}else for(G=0;G<b.length;G++)b[G].execute(n,g);n++});v=window.setInterval(A,m);A()};
@@ -2405,17 +2404,17 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);ret
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,g){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,A=function(H,N){H=String(H);for(N=N||2;H.length<N;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",S=b[G+"Date"](),F=b[G+"Day"](),K=b[G+"Month"](),c=b[G+"FullYear"](),f=b[G+"Hours"](),l=b[G+"Minutes"](),t=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var q=g?0:b.getTimezoneOffset(),D={d:S,dd:A(S),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:K+1,mm:A(K+1),mmm:m.i18n.monthNames[K],mmmm:m.i18n.monthNames[K+
-12],yy:String(c).slice(2),yyyy:c,h:f%12||12,hh:A(f%12||12),H:f,HH:A(f),M:l,MM:A(l),s:t,ss:A(t),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+A(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in D?D[H]:H.slice(1,
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",R=b[G+"Date"](),F=b[G+"Day"](),J=b[G+"Month"](),c=b[G+"FullYear"](),f=b[G+"Hours"](),l=b[G+"Minutes"](),t=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var q=g?0:b.getTimezoneOffset(),D={d:R,dd:A(R),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:J+1,mm:A(J+1),mmm:m.i18n.monthNames[J],mmmm:m.i18n.monthNames[J+
+12],yy:String(c).slice(2),yyyy:c,h:f%12||12,hh:A(f%12||12),H:f,HH:A(f),M:l,MM:A(l),s:t,ss:A(t),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+A(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in D?D[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),n=0;n<v;n++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var S=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
-"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";e&&(K.style.filter="invert(100%)",K.style.top="-2px");F.appendChild(K);mxUtils.write(F,S);g.appendChild(F);
+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),n=0;n<v;n++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(J.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(J.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var R=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
+"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[R]));var J=document.createElement("img");J.setAttribute("draggable","false");J.setAttribute("align","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.width="16px";J.style.padding="0px 6px 0 4px";e&&(J.style.filter="invert(100%)",J.style.top="-2px");F.appendChild(J);mxUtils.write(F,R);g.appendChild(F);
mxEvent.addListener(F,"click",function(){m.setVisible(A,!m.isVisible(A));G();null!=b&&b(A)});G()})(m.getChildAt(m.root,n));return g};
-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=n.substring(1);else{var G=n.substring(1,n.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);
-null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,S[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])))}else if(0>G.indexOf("{"))for(S=b;null==A&&null!=
-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=S.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=S.hasAttribute(G)?null!=S.getAttribute(G)?S.getAttribute(G):"":null)),S=this.model.getParent(S);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:n));v=match.index+n.length}}m.push(e.substring(v))}return m.join("")};
+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=n.substring(1);else{var G=n.substring(1,n.length-1),R={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);
+null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,R[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,R[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,R[G.substring(7)])))}else if(0>G.indexOf("{"))for(R=b;null==A&&null!=
+R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=R.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=R.hasAttribute(G)?null!=R.getAttribute(G)?R.getAttribute(G):"":null)),R=this.model.getParent(R);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:n));v=match.index+n.length}}m.push(e.substring(v))}return m.join("")};
Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),n=this.model.getParent(e);if(v==this.model.getParent(n)){b=m.getIndex(b);m=v.getIndex(m);var A=n.getIndex(e),G=v.getIndex(n);n=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=n;m++){G=this.model.getChildAt(v,m);for(var S=e;S<=b;S++)A.push(this.model.getChildAt(G,S))}0<A.length&&(1<A.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),n=this.model.getParent(e);if(v==this.model.getParent(n)){b=m.getIndex(b);m=v.getIndex(m);var A=n.getIndex(e),G=v.getIndex(n);n=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=n;m++){G=this.model.getChildAt(v,m);for(var R=e;R<=b;R++)A.push(this.model.getChildAt(G,R))}0<A.length&&(1<A.length||1<this.getSelectionCount()||
!this.isCellSelected(A[0]))&&(this.setSelectionCells(A),g=!0)}}return g};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],v=this.getCellGeometry(m);if(null!=v){v=v.clone();if(this.getModel().isVertex(m))v.x=Math.round(v.x/e)*e,v.y=Math.round(v.y/e)*e,v.width=Math.round(v.width/e)*e,v.height=Math.round(v.height/e)*e;else if(this.getModel().isEdge(m)&&null!=v.points)for(var n=0;n<v.points.length;n++)v.points[n].x=Math.round(v.points[n].x/e)*e,v.points[n].y=Math.round(v.points[n].y/e)*e;this.getModel().setGeometry(m,
v)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};
@@ -2423,13 +2422,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=
this.model.isEdge(b)&&this.model.isEdge(e[n]))if(g){var A=this.model.getStyle(e[n]);if(null!=A){var G=A.split(";");0<G.length&&0>G[0].indexOf("=")&&(G=G.slice(1));this.model.setStyle(e[n],G.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[n]]);this.setCellStyles("points",null,[e[n]]);this.pasteStyle(v,[e[n]],null,!0)}else v=this.copyStyle(e[n]),this.model.setStyle(e[n],m),this.pasteStyle(v,[e[n]]);"1"==mxUtils.getValue(this.getCellStyle(e[n],!1),"composite","0")&&this.removeChildCells(e[n])}}finally{this.model.endUpdate()}};
Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};
-Graph.prototype.connectVertex=function(b,e,g,m,v,n,A,G){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),F=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(K.x+=F.geometry.width/2,K.y-=g):e==
-mxConstants.DIRECTION_SOUTH?(K.x+=F.geometry.width/2,K.y+=F.geometry.height+g):(K.x=e==mxConstants.DIRECTION_WEST?K.x-g:K.x+(F.geometry.width+g),K.y+=F.geometry.height/2);var c=this.view.getState(this.model.getParent(b));g=this.view.scale;var f=this.view.translate;F=f.x*g;f=f.y*g;null!=c&&this.model.isVertex(c.cell)&&(F=c.x,f=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(F+K.x*g,f+K.y*g)).grow(40*g);n=null!=n?
+Graph.prototype.connectVertex=function(b,e,g,m,v,n,A,G){n=n?n:!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),F=R?b:this.getCompositeParent(b),J=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(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(J.x+=F.geometry.width/2,J.y-=g):e==
+mxConstants.DIRECTION_SOUTH?(J.x+=F.geometry.width/2,J.y+=F.geometry.height+g):(J.x=e==mxConstants.DIRECTION_WEST?J.x-g:J.x+(F.geometry.width+g),J.y+=F.geometry.height/2);var c=this.view.getState(this.model.getParent(b));g=this.view.scale;var f=this.view.translate;F=f.x*g;f=f.y*g;null!=c&&this.model.isVertex(c.cell)&&(F=c.x,f=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(J.x+=b.parent.geometry.x,J.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(F+J.x*g,f+J.y*g)).grow(40*g);n=null!=n?
this.getCells(0,0,0,0,null,null,n,null,!0):null;c=this.view.getState(b);var l=null,t=null;if(null!=n){n=n.reverse();for(var q=0;q<n.length;q++)if(!this.isCellLocked(n[q])&&!this.model.isEdge(n[q])&&n[q]!=b)if(!this.model.isAncestor(b,n[q])&&this.isContainer(n[q])&&(null==l||n[q]==this.model.getParent(b)))l=n[q];else if(null==t&&this.isCellConnectable(n[q])&&!this.model.isAncestor(n[q],b)&&!this.isSwimlane(n[q])){var D=this.view.getState(n[q]);null==c||null==D||mxUtils.intersects(c,D)||(t=n[q])}}var H=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;H&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var N=[],L=t;t=l;v=mxUtils.bind(this,function(J){if(null==A||null!=J||null==t&&S){this.model.beginUpdate();try{if(null==L&&H){var Y=this.getAbsoluteParent(null!=J?J:b);Y=S?b:this.getCompositeParent(Y);L=null!=J?J:this.duplicateCells([Y],
-!1)[0];null!=J&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=J&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?K.y-=ha.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=ha.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-ha.width/2:K.x+ha.width/2),ha.x=K.x-ha.width/2,ha.y=K.y-ha.height/2);null!=l?(this.addCells([L],l,null,null,null,!0),t=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&H||null==t&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ea&&(N.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==t&&null!=L&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==t&&null!=L&&N.push(L);null==L&&null!=ea&&ea.geometry.setTerminalPoint(K,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=G)G(N);else return N});if(null==A||null!=L||!H||null==t&&S)return v(L);A(F+K.x*g,f+K.y*g,v)};
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;H&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?J.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?J.y+=b.geometry.height/2:J.x=e==mxConstants.DIRECTION_WEST?J.x-b.geometry.width/2:J.x+b.geometry.width/2);var N=[],L=t;t=l;v=mxUtils.bind(this,function(I){if(null==A||null!=I||null==t&&R){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=I?I:b);Z=R?b:this.getCompositeParent(Z);L=null!=I?I:this.duplicateCells([Z],
+!1)[0];null!=I&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(L);null!=ia&&(null!=I&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?J.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?J.y+=ia.height/2:J.x=e==mxConstants.DIRECTION_WEST?J.x-ia.width/2:J.x+ia.width/2),ia.x=J.x-ia.width/2,ia.y=J.y-ia.height/2);null!=l?(this.addCells([L],l,null,null,null,!0),t=null):H&&!R&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var fa=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&H||null==t&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=fa&&(N.push(fa),this.applyNewEdgeStyle(b,[fa],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(fa,b));if(null==t&&null!=L&&null!=b.parent&&R&&e==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==t&&null!=L&&N.push(L);null==L&&null!=fa&&fa.geometry.setTerminalPoint(J,!1);null!=fa&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[fa]))}finally{this.model.endUpdate()}}if(null!=G)G(N);else return N});if(null==A||null!=L||!H||null==t&&R)return v(L);A(F+J.x*g,f+J.y*g,v)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,v=0;v<b.length;v++)if(m=b[v],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),
null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
@@ -2440,8 +2439,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STY
Graph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<g.length;n++){var A=this.view.getState(g[n]),G=this.getCellGeometry(g[n]);if(null!=A&&null!=G){var S=0,F=0;if(G.alternateBounds)S=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var K=this.useCssTransforms?1:this.view.scale;
-S=Math.round(G.width-A.width/K);F=Math.round(G.height-A.height/K)}if(0!=F||0!=S){var c=this.model.getParent(g[n]),f=this.layoutManager.getLayout(c);null==f?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,c,S,F):null!=v&&mxEvent.isAltDown(v)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,S,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
+Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<g.length;n++){var A=this.view.getState(g[n]),G=this.getCellGeometry(g[n]);if(null!=A&&null!=G){var R=0,F=0;if(G.alternateBounds)R=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var J=this.useCssTransforms?1:this.view.scale;
+R=Math.round(G.width-A.width/J);F=Math.round(G.height-A.height/J)}if(0!=F||0!=R){var c=this.model.getParent(g[n]),f=this.layoutManager.getLayout(c);null==f?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,c,R,F):null!=v&&mxEvent.isAltDown(v)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,R,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var v=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<v.length;e++)if(v[e]!=b.cell){var n=this.view.getState(v[e]),A=this.getCellGeometry(v[e]);null!=n&&null!=A&&(A=A.clone(),A.translate(Math.round(g*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(v[e],A))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var v=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==v&&!e.resizeLast;){var n=this.getCellGeometry(b),A=this.view.getState(b);null!=A&&null!=n&&(n=n.clone(),e.horizontal?n.width+=g+Math.min(0,A.width/this.view.scale-n.width):n.height+=m+Math.min(0,A.height/this.view.scale-n.height),this.model.setGeometry(b,
n));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2482,10 +2481,10 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),v=g.getGraphX(),n=
HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(G,S,F){if(null!=g){var K=new mxRectangle(S,F,G.clientWidth,G.clientHeight);mxUtils.intersects(K,g)&&(G==this.arrowUp?F-=K.y+K.height-g.y:G==this.arrowRight?S+=g.x+g.width-K.x:G==this.arrowDown?F+=g.y+g.height-K.y:G==this.arrowLeft&&(S-=K.x+K.width-g.x))}G.style.left=S+"px";G.style.top=F+"px";mxUtils.setOpacity(G,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(G,R,F){if(null!=g){var J=new mxRectangle(R,F,G.clientWidth,G.clientHeight);mxUtils.intersects(J,g)&&(G==this.arrowUp?F-=J.y+J.height-g.y:G==this.arrowRight?R+=g.x+g.width-J.x:G==this.arrowDown?F+=g.y+g.height-J.y:G==this.arrowLeft&&(R-=J.x+J.width-g.x))}G.style.left=R+"px";G.style.top=F+"px";mxUtils.setOpacity(G,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()),v=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==v&&v==b&&(b=v=m=e=null);var n=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,S){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,
-this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==n||F.height<3*n.height&&F.width<3*n.width)?S.style.visibility="visible":S.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,this.arrowUp);A(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),v=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==v&&v==b&&(b=v=m=e=null);var n=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,R){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,
+this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==n||F.height<3*n.height&&F.width<3*n.width)?R.style.visibility="visible":R.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,this.arrowUp);A(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};
@@ -2495,43 +2494,43 @@ b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var v=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(v=v.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));v=Editor.convertHtmlToText(v);this.cellLabelChanged(b,v);m=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return m};Graph.prototype.createParent=function(b,e,g,m,v){b=this.cloneCell(b);for(var n=0;n<g;n++){var A=this.cloneCell(e),G=this.getCellGeometry(A);null!=G&&(G.x+=n*m,G.y+=n*v);b.insert(A)}return b};
-Graph.prototype.createTable=function(b,e,g,m,v,n,A,G,S){g=null!=g?g:60;m=null!=m?m:40;n=null!=n?n:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=v?v:"",0,0,e*g,b*m+(null!=v?n:0),null!=A?A:"shape=table;startSize="+(null!=v?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};
+Graph.prototype.createTable=function(b,e,g,m,v,n,A,G,R){g=null!=g?g:60;m=null!=m?m:40;n=null!=n?n:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=v?v:"",0,0,e*g,b*m+(null!=v?n:0),null!=A?A:"shape=table;startSize="+(null!=v?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,R),e,g,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),v=0;v<m.length;v++)if(null!=g&&(m[v].value=g[v]),null!=e)for(var n=this.model.getChildCells(m[v],!0),A=0;A<n.length;A++)null!=e[v][A]&&(n[A].value=e[v][A]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,n,A,G,S){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=n?n:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");n=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=n;v.geometry.height+=
-n;A=this.createVertex(null,null,"",0,n,e*g+n,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",n,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+n,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",n,0,g,m,S),e,g,0),b-1,0,m)):v};
-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var n=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),S=null,F=[],K=0;K<A.length;K++){var c=this.getCellGeometry(A[K]),f={cell:A[K],rospan:1,colspan:1,row:v,col:K,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;f.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+n.x),c.height+(null!=g&&null!=
-g[0]?g[0].point.y:b.y+n.y));f.actual=f;null!=g&&null!=g[K]&&1<g[K].rowspan?(f.rowspan=g[K].rowspan-1,f.colspan=g[K].colspan,f.actual=g[K].actual):null!=S&&1<S.colspan?(f.rowspan=S.rowspan,f.colspan=S.colspan-1,f.actual=S.actual):(S=this.getCurrentCellStyle(A[K],!0),null!=S&&(f.rowspan=parseInt(S.rowspan||1),f.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(f,A.length,
-m.length,b.x+(S?n.x:0),b.y+(S?n.y:0));F.push(f);S=f}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(n,A,G,S,F){e&&n.row<G-1&&(null==m[n.row]&&(m[n.row]=[new mxPoint(S,n.point.y)]),1<n.rowspan&&m[n.row].push(null),m[n.row].push(n.point));g&&n.col<A-1&&(null==v[n.col]&&(v[n.col]=[new mxPoint(n.point.x,F)]),1<n.colspan&&v[n.col].push(null),v[n.col].push(n.point))}));return m.concat(v)};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,n,A,G,R){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;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;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=n?n:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");n=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=n;v.geometry.height+=
+n;A=this.createVertex(null,null,"",0,n,e*g+n,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",n,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+n,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",n,0,g,m,R),e,g,0),b-1,0,m)):v};
+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var n=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),R=null,F=[],J=0;J<A.length;J++){var c=this.getCellGeometry(A[J]),f={cell:A[J],rospan:1,colspan:1,row:v,col:J,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;f.point=new mxPoint(c.width+(null!=R?R.point.x:b.x+n.x),c.height+(null!=g&&null!=
+g[0]?g[0].point.y:b.y+n.y));f.actual=f;null!=g&&null!=g[J]&&1<g[J].rowspan?(f.rowspan=g[J].rowspan-1,f.colspan=g[J].colspan,f.actual=g[J].actual):null!=R&&1<R.colspan?(f.rowspan=R.rowspan,f.colspan=R.colspan-1,f.actual=R.actual):(R=this.getCurrentCellStyle(A[J],!0),null!=R&&(f.rowspan=parseInt(R.rowspan||1),f.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(f,A.length,
+m.length,b.x+(R?n.x:0),b.y+(R?n.y:0));F.push(f);R=f}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(n,A,G,R,F){e&&n.row<G-1&&(null==m[n.row]&&(m[n.row]=[new mxPoint(R,n.point.y)]),1<n.rowspan&&m[n.row].push(null),m[n.row].push(n.point));g&&n.col<A-1&&(null==v[n.col]&&(v[n.col]=[new mxPoint(n.point.x,F)]),1<n.colspan&&v[n.col].push(null),v[n.col].push(n.point))}));return m.concat(v)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var n=m.getParent(b),A=m.getChildCells(n,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var S=A[G+1],F=this.getCellGeometry(S);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(S,F))}}var K=this.getCellGeometry(n);null!=K&&(g||(g=b==A[A.length-1]),g&&(K=K.clone(),K.height+=e,m.setGeometry(n,K)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),n=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var S=m.getChildCells(n,!0),F=0;F<S.length;F++){v=S[F];A=m.getChildCells(v,!0);var K=A[b],c=this.getCellGeometry(K);null!=c&&(c=c.clone(),c.width+=e,null!=c.alternateBounds&&(c.alternateBounds.width+=e),m.setGeometry(K,c));b<A.length-1&&(K=A[b+1],c=this.getCellGeometry(K),null!=c&&(c=c.clone(),
-c.x+=e,g||(c.width-=e,null!=c.alternateBounds&&(c.alternateBounds.width-=e)),m.setGeometry(K,c)))}if(G||g){var f=this.getCellGeometry(n);null!=f&&(f=f.clone(),f.width+=e,m.setGeometry(n,f))}null!=this.layoutManager&&this.layoutManager.executeLayout(n)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var n=m.getParent(b),A=m.getChildCells(n,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var R=A[G+1],F=this.getCellGeometry(R);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(R,F))}}var J=this.getCellGeometry(n);null!=J&&(g||(g=b==A[A.length-1]),g&&(J=J.clone(),J.height+=e,m.setGeometry(n,J)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),n=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var R=m.getChildCells(n,!0),F=0;F<R.length;F++){v=R[F];A=m.getChildCells(v,!0);var J=A[b],c=this.getCellGeometry(J);null!=c&&(c=c.clone(),c.width+=e,null!=c.alternateBounds&&(c.alternateBounds.width+=e),m.setGeometry(J,c));b<A.length-1&&(J=A[b+1],c=this.getCellGeometry(J),null!=c&&(c=c.clone(),
+c.x+=e,g||(c.width-=e,null!=c.alternateBounds&&(c.alternateBounds.width-=e)),m.setGeometry(J,c)))}if(G||g){var f=this.getCellGeometry(n);null!=f&&(f=f.clone(),f.width+=e,m.setGeometry(n,f))}null!=this.layoutManager&&this.layoutManager.executeLayout(n)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var v=this.graph.getCellGeometry(b[m]);null!=v&&(g+=e?v.width:v.height)}return g};
TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var v=[];m=m.x;for(var n=0;n<g.length;n++){var A=this.graph.getCellGeometry(g[n]);null!=A&&(m+=(null!=A.alternateBounds?A.alternateBounds.width:A.width)*e/b,v.push(Math.round(m)))}return v};
-TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),n=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<n.length;S++){var F=this.graph.getCellGeometry(n[S]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[S],F.width=e[S+1]-F.x,S==n.length-1&&S<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,S==n.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,
-0,F.width,F.height),v.setGeometry(n[S],F))}return G};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),n="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var S=g.height-e.y-e.height,F=g.width-e.x-e.width,K=A.getChildCells(b,!0),c=0;c<K.length;c++)A.setVisible(K[c],!0);var f=this.getSize(K,!1);if(0<S&&0<F&&0<
-K.length&&0<f){if(v){var l=this.graph.getCellGeometry(K[K.length-1]);null!=l&&(l=l.clone(),l.height=S-f+l.height,A.setGeometry(K[K.length-1],l))}var t=n?null:this.getRowLayout(K[0],F),q=[],D=e.y;for(c=0;c<K.length;c++)l=this.graph.getCellGeometry(K[c]),null!=l&&(l=l.clone(),l.x=e.x,l.width=F,l.y=Math.round(D),D=v||m?D+l.height:D+l.height/f*S,l.height=Math.round(D)-l.y,A.setGeometry(K[c],l)),G=Math.max(G,this.layoutRow(K[c],t,l.height,F,q));m&&S<f&&(g=g.clone(),g.height=D+e.height,A.setGeometry(b,
-g));n&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){A.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=N.width}H.actual.col==H.col&&(N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=N.height)}}))}else for(c=0;c<K.length;c++)A.setVisible(K[c],
+TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),n=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var R=0;R<n.length;R++){var F=this.graph.getCellGeometry(n[R]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[R],F.width=e[R+1]-F.x,R==n.length-1&&R<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,R==n.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,
+0,F.width,F.height),v.setGeometry(n[R],F))}return G};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),n="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var R=g.height-e.y-e.height,F=g.width-e.x-e.width,J=A.getChildCells(b,!0),c=0;c<J.length;c++)A.setVisible(J[c],!0);var f=this.getSize(J,!1);if(0<R&&0<F&&0<
+J.length&&0<f){if(v){var l=this.graph.getCellGeometry(J[J.length-1]);null!=l&&(l=l.clone(),l.height=R-f+l.height,A.setGeometry(J[J.length-1],l))}var t=n?null:this.getRowLayout(J[0],F),q=[],D=e.y;for(c=0;c<J.length;c++)l=this.graph.getCellGeometry(J[c]),null!=l&&(l=l.clone(),l.x=e.x,l.width=F,l.y=Math.round(D),D=v||m?D+l.height:D+l.height/f*R,l.height=Math.round(D)-l.y,A.setGeometry(J[c],l)),G=Math.max(G,this.layoutRow(J[c],t,l.height,F,q));m&&R<f&&(g=g.clone(),g.height=D+e.height,A.setGeometry(b,
+g));n&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){A.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=N.width}H.actual.col==H.col&&(N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=N.height)}}))}else for(c=0;c<J.length;c++)A.setVisible(J[c],
!1)}finally{A.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(c,f){f=null!=f?f:!0;var l=this.getState(c);null!=l&&f&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&!l.invalid&&this.updateLineJumps(l)&&this.graph.cellRenderer.redraw(l,!1,this.isRendering());l=e.apply(this,
arguments);null!=l&&f&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(l);return l};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var c=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
c)for(var f=0;f<c.length;f++)if("hidden"!=c[f].getAttribute("visibility"))return c[f];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(c){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(c){c=m.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var v=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,f){return v.apply(this,arguments)||null!=c.routedPoints&&null!=f.routedPoints&&!mxUtils.equalPoints(f.routedPoints,c.routedPoints)};var n=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){n.apply(this,arguments);
-this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var f=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,t=null;if(null!=f&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var q=function(ca,la,Q){var k=new mxPoint(la,Q);k.type=ca;t.push(k);k=null!=c.routedPoints?c.routedPoints[t.length-1]:null;return null==k||k.type!=ca||k.x!=la||k.y!=Q},D=.5*this.scale;
-l=!1;t=[];for(var H=0;H<f.length-1;H++){for(var N=f[H+1],L=f[H],J=[],Y=f[H+2];H<f.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Y.x,Y.y,N.x,N.y)<1*this.scale*this.scale;)N=Y,H++,Y=f[H+2];l=q(0,L.x,L.y)||l;for(var ha=0;ha<this.validEdges.length;ha++){var ea=this.validEdges[ha],aa=ea.absolutePoints;if(null!=aa&&mxUtils.intersects(c,ea)&&"1"!=ea.style.noJump){var na=null;for(ea=0;ea<aa.length-1;ea++){var W=aa[ea+1],ba=aa[ea];for(Y=aa[ea+2];ea<aa.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,Y.x,Y.y,W.x,W.y)<1*this.scale*
-this.scale;)W=Y,ea++,Y=aa[ea+2];var ja=mxUtils.intersection(L.x,L.y,N.x,N.y,ba.x,ba.y,W.x,W.y);if(null!=ja&&(Math.abs(ja.x-L.x)>D||Math.abs(ja.y-L.y)>D)&&(Math.abs(ja.x-N.x)>D||Math.abs(ja.y-N.y)>D)&&(null==na||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,na.x,na.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,ba.x,ba.y)>D)&&(null==Y||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,Y.x,Y.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,W.x,W.y)>D)){Y=ja.x-L.x;na=ja.y-L.y;ja={distSq:Y*Y+na*na,x:ja.x,y:ja.y};for(Y=0;Y<J.length;Y++)if(J[Y].distSq>
-ja.distSq){J.splice(Y,0,ja);ja=null;break}null==ja||0!=J.length&&J[J.length-1].x===ja.x&&J[J.length-1].y===ja.y||J.push(ja)}na=ba}}}for(ea=0;ea<J.length;ea++)l=q(1,J[ea].x,J[ea].y)||l}ja=f[f.length-1];l=q(0,ja.x,ja.y)||l}c.routedPoints=t;return l}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,f,l){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)A.apply(this,
-arguments);else{var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,q=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,D=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,N=null,L=null,J=[],Y=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ea=this.state.routedPoints[ha],aa=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==ha?aa=f[0]:ha==this.state.routedPoints.length-1&&(aa=f[f.length-1]);var na=
-!1;if(null!=N&&1==ea.type){var W=this.state.routedPoints[ha+1];ea=W.x/this.scale-aa.x;W=W.y/this.scale-aa.y;ea=ea*ea+W*W;null==Y&&(Y=new mxPoint(aa.x-N.x,aa.y-N.y),L=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<L?(Y.x=Y.x*q/L,Y.y=Y.y*q/L):Y=null);ea>q*q&&0<L&&(ea=N.x-aa.x,W=N.y-aa.y,ea=ea*ea+W*W,ea>q*q&&(na=new mxPoint(aa.x-Y.x,aa.y-Y.y),ea=new mxPoint(aa.x+Y.x,aa.y+Y.y),J.push(na),this.addPoints(c,J,l,t,!1,null,H),J=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,H=!1,"sharp"==D?(c.lineTo(na.x-Y.y*
-J,na.y+Y.x*J),c.lineTo(ea.x-Y.y*J,ea.y+Y.x*J),c.lineTo(ea.x,ea.y)):"line"==D?(c.moveTo(na.x+Y.y*J,na.y-Y.x*J),c.lineTo(na.x-Y.y*J,na.y+Y.x*J),c.moveTo(ea.x-Y.y*J,ea.y+Y.x*J),c.lineTo(ea.x+Y.y*J,ea.y-Y.x*J),c.moveTo(ea.x,ea.y)):"arc"==D?(J*=1.3,c.curveTo(na.x-Y.y*J,na.y+Y.x*J,ea.x-Y.y*J,ea.y+Y.x*J,ea.x,ea.y)):(c.moveTo(ea.x,ea.y),H=!0),J=[ea],na=!0))}else Y=null;na||(J.push(aa),N=aa)}this.addPoints(c,J,l,t,!1,null,H);c.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
-function(c,f,l,t){return null!=f&&"centerPerimeter"==f.style[mxConstants.STYLE_PERIMETER]?new mxPoint(f.getCenterX(),f.getCenterY()):G.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,f,l,t){if(null==f||null==c||"1"!=f.style.snapToPoint&&"1"!=c.style.snapToPoint)S.apply(this,arguments);else{f=this.getTerminalPort(c,f,t);var q=this.getNextPoint(c,l,t),D=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||
-"0")),N=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=H){var L=Math.cos(-H),J=Math.sin(-H);q=mxUtils.getRotatedPoint(q,L,J,N)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[t?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);q=this.getPerimeterPoint(f,q,0==H&&D,L);0!=H&&(L=Math.cos(H),J=Math.sin(H),q=mxUtils.getRotatedPoint(q,L,J,N));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,f,l,t,q),t)}};mxGraphView.prototype.snapToAnchorPoint=
+this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var f=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,t=null;if(null!=f&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var q=function(da,W,S){var k=new mxPoint(W,S);k.type=da;t.push(k);k=null!=c.routedPoints?c.routedPoints[t.length-1]:null;return null==k||k.type!=da||k.x!=W||k.y!=S},D=.5*this.scale;
+l=!1;t=[];for(var H=0;H<f.length-1;H++){for(var N=f[H+1],L=f[H],I=[],Z=f[H+2];H<f.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Z.x,Z.y,N.x,N.y)<1*this.scale*this.scale;)N=Z,H++,Z=f[H+2];l=q(0,L.x,L.y)||l;for(var ia=0;ia<this.validEdges.length;ia++){var fa=this.validEdges[ia],ba=fa.absolutePoints;if(null!=ba&&mxUtils.intersects(c,fa)&&"1"!=fa.style.noJump){var na=null;for(fa=0;fa<ba.length-1;fa++){var X=ba[fa+1],ca=ba[fa];for(Z=ba[fa+2];fa<ba.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Z.x,Z.y,X.x,X.y)<1*this.scale*
+this.scale;)X=Z,fa++,Z=ba[fa+2];var ka=mxUtils.intersection(L.x,L.y,N.x,N.y,ca.x,ca.y,X.x,X.y);if(null!=ka&&(Math.abs(ka.x-L.x)>D||Math.abs(ka.y-L.y)>D)&&(Math.abs(ka.x-N.x)>D||Math.abs(ka.y-N.y)>D)&&(null==na||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,na.x,na.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,ca.x,ca.y)>D)&&(null==Z||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,Z.x,Z.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,X.x,X.y)>D)){Z=ka.x-L.x;na=ka.y-L.y;ka={distSq:Z*Z+na*na,x:ka.x,y:ka.y};for(Z=0;Z<I.length;Z++)if(I[Z].distSq>
+ka.distSq){I.splice(Z,0,ka);ka=null;break}null==ka||0!=I.length&&I[I.length-1].x===ka.x&&I[I.length-1].y===ka.y||I.push(ka)}na=ca}}}for(fa=0;fa<I.length;fa++)l=q(1,I[fa].x,I[fa].y)||l}ka=f[f.length-1];l=q(0,ka.x,ka.y)||l}c.routedPoints=t;return l}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,f,l){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)A.apply(this,
+arguments);else{var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,q=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,D=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,N=null,L=null,I=[],Z=null;c.begin();for(var ia=0;ia<this.state.routedPoints.length;ia++){var fa=this.state.routedPoints[ia],ba=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==ia?ba=f[0]:ia==this.state.routedPoints.length-1&&(ba=f[f.length-1]);var na=
+!1;if(null!=N&&1==fa.type){var X=this.state.routedPoints[ia+1];fa=X.x/this.scale-ba.x;X=X.y/this.scale-ba.y;fa=fa*fa+X*X;null==Z&&(Z=new mxPoint(ba.x-N.x,ba.y-N.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*q/L,Z.y=Z.y*q/L):Z=null);fa>q*q&&0<L&&(fa=N.x-ba.x,X=N.y-ba.y,fa=fa*fa+X*X,fa>q*q&&(na=new mxPoint(ba.x-Z.x,ba.y-Z.y),fa=new mxPoint(ba.x+Z.x,ba.y+Z.y),I.push(na),this.addPoints(c,I,l,t,!1,null,H),I=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==D?(c.lineTo(na.x-Z.y*
+I,na.y+Z.x*I),c.lineTo(fa.x-Z.y*I,fa.y+Z.x*I),c.lineTo(fa.x,fa.y)):"line"==D?(c.moveTo(na.x+Z.y*I,na.y-Z.x*I),c.lineTo(na.x-Z.y*I,na.y+Z.x*I),c.moveTo(fa.x-Z.y*I,fa.y+Z.x*I),c.lineTo(fa.x+Z.y*I,fa.y-Z.x*I),c.moveTo(fa.x,fa.y)):"arc"==D?(I*=1.3,c.curveTo(na.x-Z.y*I,na.y+Z.x*I,fa.x-Z.y*I,fa.y+Z.x*I,fa.x,fa.y)):(c.moveTo(fa.x,fa.y),H=!0),I=[fa],na=!0))}else Z=null;na||(I.push(ba),N=ba)}this.addPoints(c,I,l,t,!1,null,H);c.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
+function(c,f,l,t){return null!=f&&"centerPerimeter"==f.style[mxConstants.STYLE_PERIMETER]?new mxPoint(f.getCenterX(),f.getCenterY()):G.apply(this,arguments)};var R=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,f,l,t){if(null==f||null==c||"1"!=f.style.snapToPoint&&"1"!=c.style.snapToPoint)R.apply(this,arguments);else{f=this.getTerminalPort(c,f,t);var q=this.getNextPoint(c,l,t),D=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||
+"0")),N=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=H){var L=Math.cos(-H),I=Math.sin(-H);q=mxUtils.getRotatedPoint(q,L,I,N)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[t?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);q=this.getPerimeterPoint(f,q,0==H&&D,L);0!=H&&(L=Math.cos(H),I=Math.sin(H),q=mxUtils.getRotatedPoint(q,L,I,N));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,f,l,t,q),t)}};mxGraphView.prototype.snapToAnchorPoint=
function(c,f,l,t,q){if(null!=f&&null!=c){c=this.graph.getAllConnectionConstraints(f);t=l=null;if(null!=c)for(var D=0;D<c.length;D++){var H=this.graph.getConnectionPoint(f,c[D]);if(null!=H){var N=(H.x-q.x)*(H.x-q.x)+(H.y-q.y)*(H.y-q.y);if(null==t||N<t)l=H,t=N}}null!=l&&(q=l)}return q};var F=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,f,l){var t=F.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=l.state&&(t=l.state.view.graph.replacePlaceholders(l.state.cell,
-t));return t};var K=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var l=f.substring(8,f.length-1),t=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(t.documentElement))}catch(q){null!=window.console&&console.log("Error in shape: "+q)}}return K.apply(this,arguments)}})();
+t));return t};var J=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var l=f.substring(8,f.length-1),t=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(t.documentElement))}catch(q){null!=window.console&&console.log("Error in shape: "+q)}}return J.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var v=e[m];if(!mxStencilRegistry.isFileLoaded(v))if(mxStencilRegistry.setFileLoaded(v),".xml"==v.toLowerCase().substring(v.length-4,v.length))mxStencilRegistry.loadStencilSet(v,
null);else if(".js"==v.toLowerCase().substring(v.length-3,v.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(v);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,v,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
@@ -2545,153 +2544,153 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)||mxEvent.isShiftDown(y)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return g.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(y){return m.apply(this,arguments)||this.graph.isEdgeIgnored(y)};var v=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=v.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var V=JSON.parse(R);for(O in V)y.style[O]=V[O]}catch(fa){}}y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};
-var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=n.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return y};mxConnectionHandler.prototype.updatePreview=function(y){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=A.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(R){var V=O.apply(this,arguments);this.error=null;return V});
-return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<O.length;R++)null!=
-this.currentEdgeStyle[O[R]]&&(y+=O[R]+"="+this.currentEdgeStyle[O[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(O in V)y.style[O]=V[O]}catch(ha){}}y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};
+var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=n.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return y};mxConnectionHandler.prototype.updatePreview=function(y){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=A.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(Q){var V=O.apply(this,arguments);this.error=null;return V});
+return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<O.length;Q++)null!=
+this.currentEdgeStyle[O[Q]]&&(y+=O[Q]+"="+this.currentEdgeStyle[O[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var R=0;R<y.length;R++){var V=y[R];O[mxObjectIdentity.get(V)]=V.getId();for(var fa=this.model.getChildCount(V),ia=0;ia<fa;ia++)this.createCellLookup([this.model.getChildAt(V,ia)],O)}return O};Graph.prototype.createCellMapping=function(y,O,R){R=null!=R?R:{};for(var V in y){var fa=O[V];null==R[fa]&&(R[fa]=y[V].getId()||"")}return R};Graph.prototype.importGraphModel=function(y,
-O,R,V){O=null!=O?O:0;R=null!=R?R:0;var fa=new mxCodec(y.ownerDocument),ia=new mxGraphModel;fa.decode(y,ia);y=[];fa={};var oa={},ta=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),fa));if(null!=ta){var ra=this.createCellLookup([ia.root]);ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<ta.length;ia++)xa=this.model.getChildren(this.moveCells([ta[ia]],O,R,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=
-ia.getChildren(ta[0]);null!=xa&&(y=this.moveCells(xa,O,R,!1,this.getDefaultParent()),oa[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(fa,ra,oa),this.updateCustomLinks(oa,y),V)){this.isGridEnabled()&&(O=this.snap(O),R=this.snap(R));var Da=this.getBoundingBoxFromGeometry(y,!0);null!=Da&&this.moveCells(y,O-Da.x,R-Da.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},R=this.cloneCells(y,null,O),V=
-new mxDictionary,fa=0;fa<y.length;fa++)V.put(y[fa],!0);var ia=new mxCodec,oa=new mxGraphModel,ta=oa.getChildAt(oa.getRoot(),0);for(fa=0;fa<R.length;fa++){oa.add(ta,R[fa]);var ra=this.view.getState(y[fa]);if(null!=ra){var xa=this.getCellGeometry(R[fa]);null!=xa&&xa.relative&&!this.model.isEdge(y[fa])&&null==V.get(this.model.getParent(y[fa]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,
-this.createCellLookup(y)),R);return ia.encode(oa)};Graph.prototype.isSwimlane=function(y,O){var R=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(R=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(y){return null!=y&&G.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellEditable(this.model.getParent(y)):
-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(y){return null!=y&&S.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellMovable(this.model.getParent(y)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var R=this.getCurrentCellStyle(O);if(null!=R.expand)return"0"!=R.expand}return F.apply(this,arguments)&&(null==O||!this.isTable(O))};var K=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(y,O,R,V,fa,ia,oa,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(ia,oa,null,!0,!1));R=null;this.model.beginUpdate();try{R=K.apply(this,[y,O,R,V,fa,ia,oa,ta]);this.model.setValue(R,"");var ra=this.getChildCells(R,!0);for(O=0;O<ra.length;O++){var xa=this.getCellGeometry(ra[O]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[O])}var Da=this.getChildCells(y,!0);for(O=0;O<Da.length;O++)xa=this.getCellGeometry(Da[O]),
-null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Da[O]);var Ia=this.model.getTerminal(R,!1);if(null!=Ia){var Ya=this.getCurrentCellStyle(Ia);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,
-O,R){if(O||R)c.apply(this,arguments);else{var V=this.getSelectionCell(),fa=null,ia=[],oa=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(ia.push(ta),ta==V)fa=ia.length-1;else if(y&&null==V&&0<ia.length||null!=fa&&y&&ia.length>fa||!y&&0<fa)return;for(var ra=0;ra<this.model.getChildCount(ta);ra++)oa(this.model.getChildAt(ta,ra))});oa(this.model.root);0<ia.length&&(fa=null!=fa?mxUtils.mod(fa+(y?1:-1),ia.length):0,this.setSelectionCell(ia[fa]))}};
-Graph.prototype.swapShapes=function(y,O){if(this.model.isVertex(y)&&this.model.isVertex(O)&&2==this.getMovableCells([y,O]).length){var R=this.getCellGeometry(y),V=this.getCellGeometry(O);if(null!=R&&null!=V){var fa=R.clone(),ia=V.clone();this.model.beginUpdate();try{fa.x=V.getCenterX()-R.width/2,fa.y=V.getCenterY()-R.height/2,ia.x=R.getCenterX()-V.width/2,ia.y=R.getCenterY()-V.height/2,this.model.setGeometry(y,fa),this.model.setGeometry(O,ia)}finally{this.model.endUpdate()}}}};var f=Graph.prototype.moveCells;
-Graph.prototype.moveCells=function(y,O,R,V,fa,ia,oa){oa=null!=oa?oa:{};if(this.isTable(fa)){for(var ta=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ta=ta.concat(this.model.getChildCells(y[ra],!0).reverse()):ta.push(y[ra]);y=ta}this.model.beginUpdate();try{ta=[];for(ra=0;ra<y.length;ra++)if(null!=fa&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Da=this.getCellGeometry(y[ra]);this.isTable(xa)&&ta.push(xa);if(null!=xa&&null!=Da&&this.isTable(xa)&&this.isTable(fa)&&(V||xa!=fa)){if(!V){var Ia=
-this.getCellGeometry(xa);null!=Ia&&(Ia=Ia.clone(),Ia.height-=Da.height,this.model.setGeometry(xa,Ia))}Ia=this.getCellGeometry(fa);null!=Ia&&(Ia=Ia.clone(),Ia.height+=Da.height,this.model.setGeometry(fa,Ia));var Ya=this.model.getChildCells(fa,!0);if(0<Ya.length){y[ra]=V?this.cloneCell(y[ra]):y[ra];var Za=this.model.getChildCells(y[ra],!0),$a=this.model.getChildCells(Ya[0],!0),Pa=$a.length-Za.length;if(0<Pa)for(var Na=0;Na<Pa;Na++){var jb=this.cloneCell(Za[Za.length-1]);null!=jb&&(jb.value="",this.model.add(y[ra],
+y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var Q=0;Q<y.length;Q++){var V=y[Q];O[mxObjectIdentity.get(V)]=V.getId();for(var ha=this.model.getChildCount(V),ja=0;ja<ha;ja++)this.createCellLookup([this.model.getChildAt(V,ja)],O)}return O};Graph.prototype.createCellMapping=function(y,O,Q){Q=null!=Q?Q:{};for(var V in y){var ha=O[V];null==Q[ha]&&(Q[ha]=y[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(y,
+O,Q,V){O=null!=O?O:0;Q=null!=Q?Q:0;var ha=new mxCodec(y.ownerDocument),ja=new mxGraphModel;ha.decode(y,ja);y=[];ha={};var oa={},ta=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ha));if(null!=ta){var ra=this.createCellLookup([ja.root]);ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ta.length;ja++)xa=this.model.getChildren(this.moveCells([ta[ja]],O,Q,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=
+ja.getChildren(ta[0]);null!=xa&&(y=this.moveCells(xa,O,Q,!1,this.getDefaultParent()),oa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(ha,ra,oa),this.updateCustomLinks(oa,y),V)){this.isGridEnabled()&&(O=this.snap(O),Q=this.snap(Q));var Da=this.getBoundingBoxFromGeometry(y,!0);null!=Da&&this.moveCells(y,O-Da.x,Q-Da.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},Q=this.cloneCells(y,null,O),V=
+new mxDictionary,ha=0;ha<y.length;ha++)V.put(y[ha],!0);var ja=new mxCodec,oa=new mxGraphModel,ta=oa.getChildAt(oa.getRoot(),0);for(ha=0;ha<Q.length;ha++){oa.add(ta,Q[ha]);var ra=this.view.getState(y[ha]);if(null!=ra){var xa=this.getCellGeometry(Q[ha]);null!=xa&&xa.relative&&!this.model.isEdge(y[ha])&&null==V.get(this.model.getParent(y[ha]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,
+this.createCellLookup(y)),Q);return ja.encode(oa)};Graph.prototype.isSwimlane=function(y,O){var Q=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(Q=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(y){return null!=y&&G.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellEditable(this.model.getParent(y)):
+!0:!1};var R=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(y){return null!=y&&R.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellMovable(this.model.getParent(y)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var Q=this.getCurrentCellStyle(O);if(null!=Q.expand)return"0"!=Q.expand}return F.apply(this,arguments)&&(null==O||!this.isTable(O))};var J=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(y,O,Q,V,ha,ja,oa,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(ja,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=J.apply(this,[y,O,Q,V,ha,ja,oa,ta]);this.model.setValue(Q,"");var ra=this.getChildCells(Q,!0);for(O=0;O<ra.length;O++){var xa=this.getCellGeometry(ra[O]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[O])}var Da=this.getChildCells(y,!0);for(O=0;O<Da.length;O++)xa=this.getCellGeometry(Da[O]),
+null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Da[O]);var Ia=this.model.getTerminal(Q,!1);if(null!=Ia){var Ya=this.getCurrentCellStyle(Ia);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,
+O,Q){if(O||Q)c.apply(this,arguments);else{var V=this.getSelectionCell(),ha=null,ja=[],oa=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(ja.push(ta),ta==V)ha=ja.length-1;else if(y&&null==V&&0<ja.length||null!=ha&&y&&ja.length>ha||!y&&0<ha)return;for(var ra=0;ra<this.model.getChildCount(ta);ra++)oa(this.model.getChildAt(ta,ra))});oa(this.model.root);0<ja.length&&(ha=null!=ha?mxUtils.mod(ha+(y?1:-1),ja.length):0,this.setSelectionCell(ja[ha]))}};
+Graph.prototype.swapShapes=function(y,O){if(this.model.isVertex(y)&&this.model.isVertex(O)&&2==this.getMovableCells([y,O]).length){var Q=this.getCellGeometry(y),V=this.getCellGeometry(O);if(null!=Q&&null!=V){var ha=Q.clone(),ja=V.clone();this.model.beginUpdate();try{ha.x=V.getCenterX()-Q.width/2,ha.y=V.getCenterY()-Q.height/2,ja.x=Q.getCenterX()-V.width/2,ja.y=Q.getCenterY()-V.height/2,this.model.setGeometry(y,ha),this.model.setGeometry(O,ja)}finally{this.model.endUpdate()}}}};var f=Graph.prototype.moveCells;
+Graph.prototype.moveCells=function(y,O,Q,V,ha,ja,oa){oa=null!=oa?oa:{};if(this.isTable(ha)){for(var ta=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ta=ta.concat(this.model.getChildCells(y[ra],!0).reverse()):ta.push(y[ra]);y=ta}this.model.beginUpdate();try{ta=[];for(ra=0;ra<y.length;ra++)if(null!=ha&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Da=this.getCellGeometry(y[ra]);this.isTable(xa)&&ta.push(xa);if(null!=xa&&null!=Da&&this.isTable(xa)&&this.isTable(ha)&&(V||xa!=ha)){if(!V){var Ia=
+this.getCellGeometry(xa);null!=Ia&&(Ia=Ia.clone(),Ia.height-=Da.height,this.model.setGeometry(xa,Ia))}Ia=this.getCellGeometry(ha);null!=Ia&&(Ia=Ia.clone(),Ia.height+=Da.height,this.model.setGeometry(ha,Ia));var Ya=this.model.getChildCells(ha,!0);if(0<Ya.length){y[ra]=V?this.cloneCell(y[ra]):y[ra];var Za=this.model.getChildCells(y[ra],!0),$a=this.model.getChildCells(Ya[0],!0),Pa=$a.length-Za.length;if(0<Pa)for(var Na=0;Na<Pa;Na++){var jb=this.cloneCell(Za[Za.length-1]);null!=jb&&(jb.value="",this.model.add(y[ra],
jb))}else if(0>Pa)for(Na=0;Na>Pa;Na--)this.model.remove(Za[Za.length+Na-1]);Za=this.model.getChildCells(y[ra],!0);for(Na=0;Na<$a.length;Na++){var cb=this.getCellGeometry($a[Na]),ab=this.getCellGeometry(Za[Na]);null!=cb&&null!=ab&&(ab=ab.clone(),ab.width=cb.width,this.model.setGeometry(Za[Na],ab))}}}}var db=f.apply(this,arguments);for(ra=0;ra<ta.length;ra++)!V&&this.model.contains(ta[ra])&&0==this.model.getChildCount(ta[ra])&&this.model.remove(ta[ra]);V&&this.updateCustomLinks(this.createCellMapping(oa,
-this.createCellLookup(y)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var R=[];this.model.beginUpdate();try{for(var V=0;V<y.length;V++)if(this.isTableCell(y[V])){var fa=this.model.getParent(y[V]),ia=this.model.getParent(fa);1==this.model.getChildCount(fa)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(y,ia)&&0>mxUtils.indexOf(R,ia)&&R.push(ia):this.labelChanged(y[V],"")}else{if(this.isTableRow(y[V])&&(ia=this.model.getParent(y[V]),
-0>mxUtils.indexOf(y,ia)&&0>mxUtils.indexOf(R,ia))){for(var oa=this.model.getChildCells(ia,!0),ta=0,ra=0;ra<oa.length;ra++)0<=mxUtils.indexOf(y,oa[ra])&&ta++;ta==oa.length&&R.push(ia)}R.push(y[V])}R=l.apply(this,[R,O])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(y,O,R){R=null!=R?R:new Graph;for(var V=0;V<O.length;V++)null!=O[V]&&R.updateCustomLinksForCell(y,O[V],R)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var R=
-this.model.getChildCount(O),V=0;V<R;V++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,V))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var R=JSON.parse(O);for(O=0;O<R.length;O++){var V=R[O];y.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ia){}return y}if(null!=
-y.shape&&null!=y.shape.bounds){V=y.shape.direction;O=y.shape.bounds;var fa=y.shape.scale;R=O.width/fa;O=O.height/fa;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=R,R=O,O=V;O=y.shape.getConstraints(y.style,R,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=
-mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),R=0,V=0;V<O;V++){var fa=this.model.getChildAt(y,V);this.model.isVertex(fa)&&(fa=this.getCellGeometry(fa),null==fa||fa.relative||R++)}return 0<R||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,
-R){for(var V=this.getCurrentCellStyle(y),fa=!0,ia=!0,oa=0;oa<O.length&&ia;oa++)fa=fa&&this.isTable(O[oa]),ia=ia&&this.isTableRow(O[oa]);return!this.isCellLocked(y)&&(this.isTargetShape(y,O,R)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ia||fa))};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,
-arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var R=this.model.getParent(y);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=function(y,O,R){R=null!=R?R:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=
-10,V.height+=4,R&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(y,O){var R=this.getModel(),V=[];R.beginUpdate();try{for(var fa=0;fa<y.length;fa++){var ia=y[fa];if(R.isEdge(ia)){var oa=R.getTerminal(ia,!0),ta=R.getTerminal(ia,!1);R.setTerminal(ia,ta,!0);R.setTerminal(ia,oa,!1);var ra=R.getGeometry(ia);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);ra.setTerminalPoint(xa,
-!1);ra.setTerminalPoint(Da,!0);R.setGeometry(ia,ra);var Ia=this.view.getState(ia),Ya=this.view.getState(oa),Za=this.view.getState(ta);if(null!=Ia){var $a=null!=Ya?this.getConnectionConstraint(Ia,Ya,!0):null,Pa=null!=Za?this.getConnectionConstraint(Ia,Za,!1):null;this.setConnectionConstraint(ia,oa,!0,Pa);this.setConnectionConstraint(ia,ta,!1,$a);var Na=mxUtils.getValue(Ia.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ia.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Na,[ia])}V.push(ia)}}else if(R.isVertex(ia)&&(ra=this.getCellGeometry(ia),null!=ra)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var jb=ra.width;ra.width=ra.height;ra.height=jb;R.setGeometry(ia,ra)}var cb=this.view.getState(ia);if(null!=cb){var ab=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,ab[mxUtils.mod(mxUtils.indexOf(ab,db)+(O?-1:1),ab.length)],[ia])}V.push(ia)}}}finally{R.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
-y=y.nextSibling}return!1};var t=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var R=this.view.getState(O);null!=R&&null!=R.shape&&(this.view.invalidate(O),R.shape.bounds=null)}t.apply(this,arguments);
-y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var R=this.view.getState(y[O]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(y[O]):this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};
-Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var R=Array.prototype.slice.call(y.attributes);attr=R.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var R=0;R<y.length;R++)null!=y[R]&&O(y[R])}};Graph.prototype.updateLabelElements=function(y,O,R){y=null!=y?y:this.getSelectionCells();for(var V=document.createElement("div"),
-fa=0;fa<y.length;fa++){var ia=this.getCurrentCellStyle(y[fa]);if(null!=ia&&"1"==ia.html&&(ia=this.convertValueToString(y[fa]),null!=ia&&0<ia.length)){V.innerHTML=Graph.sanitizeHtml(ia);for(var oa=V.getElementsByTagName(null!=R?R:"*"),ta=0;ta<oa.length;ta++)O(oa[ta]);V.innerHTML!=ia&&this.cellLabelChanged(y[fa],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,R){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
-null!=y.getAttribute("placeholder"))for(var V=y.getAttribute("placeholder"),fa=y;null!=fa;){if(fa==this.model.getRoot()||null!=fa.value&&"object"==typeof fa.value&&fa.hasAttribute(V)){this.setAttributeForCell(fa,V,O);break}fa=this.model.getParent(fa)}var ia=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,O):ia.setAttribute("label",O);O=ia}mxGraph.prototype.cellLabelChanged.apply(this,
-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,R=0;R<y.length;R++)O.put(y[R],!0);var V=[];for(R=0;R<y.length;R++){var fa=this.model.getParent(y[R]);null==fa||O.get(fa)||(O.put(fa,!0),V.push(fa))}for(R=0;R<V.length;R++)if(fa=this.view.getState(V[R]),null!=fa&&(this.model.isEdge(fa.cell)||this.model.isVertex(fa.cell))&&this.isCellDeletable(fa.cell)&&this.isTransparentState(fa)){for(var ia=!0,oa=0;oa<this.model.getChildCount(fa.cell)&&
-ia;oa++)O.get(this.model.getChildAt(fa.cell,oa))||(ia=!1);ia&&y.push(fa.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],R=0;R<y.length;R++)this.isCellDeletable(y[R])&&this.isTransparentState(this.view.getState(y[R]))&&O.push(y[R]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
-O){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,R,O)};Graph.prototype.getAttributeForCell=function(y,O,R){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:R};Graph.prototype.setAttributeForCell=function(y,O,R){if(null!=y.value&&"object"==typeof y.value)var V=y.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),
-V.setAttribute("label",y.value||"");null!=R?V.setAttribute(O,R):V.removeAttribute(O);this.model.setValue(y,V)};Graph.prototype.isTargetShape=function(y,O,R){y=mxUtils.getValue(this.getCurrentCellStyle(y),mxConstants.STYLE_SHAPE,"");for(R=0;R<O.length;R++){var V=mxUtils.getValue(this.getCurrentCellStyle(O[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,y))return!0}return!1};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,R,V){if(mxEvent.isAltDown(O))return null;
-for(var fa=0;fa<y.length;fa++){var ia=this.model.getParent(y[fa]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(y,ia))return null}ia=q.apply(this,arguments);var oa=!0;for(fa=0;fa<y.length&&oa;fa++)oa=oa&&this.isTableRow(y[fa]);oa&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};
-Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(O)){var V=this.model.isEdge(O)?this.view.getState(O):null,fa=mxEvent.getSource(y);this.firstClickState!=V||this.firstClickSource!=fa||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&
-(mxUtils.contains(V.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(y)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&fa==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(R.x,R.y))),O=this.addText(R.x,R.y,V))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=
-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),fa=this.getPageSize();O=Math.max(O,V.x*fa.width);R=Math.max(R,V.y*fa.height)}return new mxPoint(this.snap(O+y),this.snap(R+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,O=this.getGraphBounds(),R=this.getInsertPoint(),V=this.snap(Math.round(Math.max(R.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(R.y,(O.y+O.height)/y.scale-
+this.createCellLookup(y)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var Q=[];this.model.beginUpdate();try{for(var V=0;V<y.length;V++)if(this.isTableCell(y[V])){var ha=this.model.getParent(y[V]),ja=this.model.getParent(ha);1==this.model.getChildCount(ha)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(Q,ja)&&Q.push(ja):this.labelChanged(y[V],"")}else{if(this.isTableRow(y[V])&&(ja=this.model.getParent(y[V]),
+0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(Q,ja))){for(var oa=this.model.getChildCells(ja,!0),ta=0,ra=0;ra<oa.length;ra++)0<=mxUtils.indexOf(y,oa[ra])&&ta++;ta==oa.length&&Q.push(ja)}Q.push(y[V])}Q=l.apply(this,[Q,O])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(y,O,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<O.length;V++)null!=O[V]&&Q.updateCustomLinksForCell(y,O[V],Q)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var Q=
+this.model.getChildCount(O),V=0;V<Q;V++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,V))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var Q=JSON.parse(O);for(O=0;O<Q.length;O++){var V=Q[O];y.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ja){}return y}if(null!=
+y.shape&&null!=y.shape.bounds){V=y.shape.direction;O=y.shape.bounds;var ha=y.shape.scale;Q=O.width/ha;O=O.height/ha;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=O,O=V;O=y.shape.getConstraints(y.style,Q,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=
+mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),Q=0,V=0;V<O;V++){var ha=this.model.getChildAt(y,V);this.model.isVertex(ha)&&(ha=this.getCellGeometry(ha),null==ha||ha.relative||Q++)}return 0<Q||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,
+Q){for(var V=this.getCurrentCellStyle(y),ha=!0,ja=!0,oa=0;oa<O.length&&ja;oa++)ha=ha&&this.isTable(O[oa]),ja=ja&&this.isTableRow(O[oa]);return!this.isCellLocked(y)&&(this.isTargetShape(y,O,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ja||ha))};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,
+arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var Q=this.model.getParent(y);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=function(y,O,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=
+10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(y,O){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ha=0;ha<y.length;ha++){var ja=y[ha];if(Q.isEdge(ja)){var oa=Q.getTerminal(ja,!0),ta=Q.getTerminal(ja,!1);Q.setTerminal(ja,ta,!0);Q.setTerminal(ja,oa,!1);var ra=Q.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);ra.setTerminalPoint(xa,
+!1);ra.setTerminalPoint(Da,!0);Q.setGeometry(ja,ra);var Ia=this.view.getState(ja),Ya=this.view.getState(oa),Za=this.view.getState(ta);if(null!=Ia){var $a=null!=Ya?this.getConnectionConstraint(Ia,Ya,!0):null,Pa=null!=Za?this.getConnectionConstraint(Ia,Za,!1):null;this.setConnectionConstraint(ja,oa,!0,Pa);this.setConnectionConstraint(ja,ta,!1,$a);var Na=mxUtils.getValue(Ia.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ia.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Na,[ja])}V.push(ja)}}else if(Q.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var jb=ra.width;ra.width=ra.height;ra.height=jb;Q.setGeometry(ja,ra)}var cb=this.view.getState(ja);if(null!=cb){var ab=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,ab[mxUtils.mod(mxUtils.indexOf(ab,db)+(O?-1:1),ab.length)],[ja])}V.push(ja)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
+y=y.nextSibling}return!1};var t=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var Q=this.view.getState(O);null!=Q&&null!=Q.shape&&(this.view.invalidate(O),Q.shape.bounds=null)}t.apply(this,arguments);
+y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var Q=this.view.getState(y[O]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(y[O]):this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};
+Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var Q=Array.prototype.slice.call(y.attributes);attr=Q.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var Q=0;Q<y.length;Q++)null!=y[Q]&&O(y[Q])}};Graph.prototype.updateLabelElements=function(y,O,Q){y=null!=y?y:this.getSelectionCells();for(var V=document.createElement("div"),
+ha=0;ha<y.length;ha++){var ja=this.getCurrentCellStyle(y[ha]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(y[ha]),null!=ja&&0<ja.length)){V.innerHTML=Graph.sanitizeHtml(ja);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),ta=0;ta<oa.length;ta++)O(oa[ta]);V.innerHTML!=ja&&this.cellLabelChanged(y[ha],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,Q){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
+null!=y.getAttribute("placeholder"))for(var V=y.getAttribute("placeholder"),ha=y;null!=ha;){if(ha==this.model.getRoot()||null!=ha.value&&"object"==typeof ha.value&&ha.hasAttribute(V)){this.setAttributeForCell(ha,V,O);break}ha=this.model.getParent(ha)}var ja=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,O):ja.setAttribute("label",O);O=ja}mxGraph.prototype.cellLabelChanged.apply(this,
+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,Q=0;Q<y.length;Q++)O.put(y[Q],!0);var V=[];for(Q=0;Q<y.length;Q++){var ha=this.model.getParent(y[Q]);null==ha||O.get(ha)||(O.put(ha,!0),V.push(ha))}for(Q=0;Q<V.length;Q++)if(ha=this.view.getState(V[Q]),null!=ha&&(this.model.isEdge(ha.cell)||this.model.isVertex(ha.cell))&&this.isCellDeletable(ha.cell)&&this.isTransparentState(ha)){for(var ja=!0,oa=0;oa<this.model.getChildCount(ha.cell)&&
+ja;oa++)O.get(this.model.getChildAt(ha.cell,oa))||(ja=!1);ja&&y.push(ha.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],Q=0;Q<y.length;Q++)this.isCellDeletable(y[Q])&&this.isTransparentState(this.view.getState(y[Q]))&&O.push(y[Q]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
+O){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,Q,O)};Graph.prototype.getAttributeForCell=function(y,O,Q){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:Q};Graph.prototype.setAttributeForCell=function(y,O,Q){if(null!=y.value&&"object"==typeof y.value)var V=y.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),
+V.setAttribute("label",y.value||"");null!=Q?V.setAttribute(O,Q):V.removeAttribute(O);this.model.setValue(y,V)};Graph.prototype.isTargetShape=function(y,O,Q){y=mxUtils.getValue(this.getCurrentCellStyle(y),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<O.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(O[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,y))return!0}return!1};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,Q,V){if(mxEvent.isAltDown(O))return null;
+for(var ha=0;ha<y.length;ha++){var ja=this.model.getParent(y[ha]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(y,ja))return null}ja=q.apply(this,arguments);var oa=!0;for(ha=0;ha<y.length&&oa;ha++)oa=oa&&this.isTableRow(y[ha]);oa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};
+Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(O)){var V=this.model.isEdge(O)?this.view.getState(O):null,ha=mxEvent.getSource(y);this.firstClickState!=V||this.firstClickSource!=ha||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&
+(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(y)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ha==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),O=this.addText(Q.x,Q.y,V))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=
+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ha=this.getPageSize();O=Math.max(O,V.x*ha.width);Q=Math.max(Q,V.y*ha.height)}return new mxPoint(this.snap(O+y),this.snap(Q+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,O=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(Q.y,(O.y+O.height)/y.scale-
y.translate.y+2*this.gridSize)));return new mxPoint(V,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/
-2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(y,O){y=null!=y?y:"";null!=O&&(0<y.length&&";"!=y.charAt(y.length-1)&&(y+=";"),y+="fontSize="+O+";");return y};Graph.prototype.addText=function(y,O,R){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){V.style=
-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var fa=this.view.getRelativePoint(R,y,O);V.geometry.x=Math.round(1E4*fa.x)/1E4;V.geometry.y=Math.round(fa.y);V.geometry.offset=new mxPoint(0,0);fa=this.view.getPoint(R,V.geometry);var ia=this.view.scale;V.geometry.offset=new mxPoint(Math.round((y-fa.x)/ia),Math.round((O-fa.y)/ia))}else fa=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(y/this.view.scale)-fa.x-(null!=R?R.origin.x:0),V.geometry.y=Math.round(O/this.view.scale)-fa.y-(null!=R?R.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(y,O,R){var V=mxUtils.bind(this,
-function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Da=this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Da&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Da),null!=O&&mxEvent.addGestureListeners(ra[xa],null,null,O))}});this.model.addListener(mxEvent.CHANGE,V);V();var fa=this.container.style.cursor,ia=this.getTolerance(),oa=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&
+2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(y,O){y=null!=y?y:"";null!=O&&(0<y.length&&";"!=y.charAt(y.length-1)&&(y+=";"),y+="fontSize="+O+";");return y};Graph.prototype.addText=function(y,O,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=
+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ha=this.view.getRelativePoint(Q,y,O);V.geometry.x=Math.round(1E4*ha.x)/1E4;V.geometry.y=Math.round(ha.y);V.geometry.offset=new mxPoint(0,0);ha=this.view.getPoint(Q,V.geometry);var ja=this.view.scale;V.geometry.offset=new mxPoint(Math.round((y-ha.x)/ja),Math.round((O-ha.y)/ja))}else ha=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(y/this.view.scale)-ha.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(O/this.view.scale)-ha.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(y,O,Q){var V=mxUtils.bind(this,
+function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Da=this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Da&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Da),null!=O&&mxEvent.addGestureListeners(ra[xa],null,null,O))}});this.model.addListener(mxEvent.CHANGE,V);V();var ha=this.container.style.cursor,ja=this.getTolerance(),oa=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&
y!=mxConstants.NONE?new mxCellHighlight(oa,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var xa=ra.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))ra=oa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Da,Ia,Ya){return null==oa.getLinkForCell(Da.cell)}),xa=null==xa||oa.model.isAncestor(ra,xa.cell)?oa.view.getState(ra):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},
-mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(oa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>ia||xa>ia)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=
+mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(oa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>ja||xa>ja)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=
ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ra,xa){var Da=xa.getSource();for(ra=xa.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==
-Da&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-oa.container.scrollTop)<ia&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==O||O(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||
-(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?oa.linkTarget:"_top",oa.openLink(this.currentLink,ra),xa.consume())):null!=R&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-oa.container.scrollTop)<ia&&Math.abs(this.startX-xa.getGraphX())<ia&&Math.abs(this.startY-xa.getGraphY())<ia&&R(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ra.cell));null!=this.currentLink&&
-(this.currentTarget=oa.getLinkTargetForCell(ra.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=oa.container&&(oa.container.style.cursor=fa);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ra){};oa.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(ra){ta.clear()})};Graph.prototype.duplicateCells=
-function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var R=0;R<y.length;R++)this.isTableCell(y[R])&&(y[R]=this.model.getParent(y[R]));y=this.model.getTopmostCells(y);var V=this.getModel(),fa=this.gridSize,ia=[];V.beginUpdate();try{var oa={},ta=this.createCellLookup(y),ra=this.cloneCells(y,!1,oa,!0);for(R=0;R<y.length;R++){var xa=V.getParent(y[R]);if(null!=xa){var Da=this.moveCells([ra[R]],fa,fa,!1)[0];ia.push(Da);if(O)V.add(xa,ra[R]);else{var Ia=xa.getIndex(y[R]);V.add(xa,ra[R],Ia+
-1)}if(this.isTable(xa)){var Ya=this.getCellGeometry(ra[R]),Za=this.getCellGeometry(xa);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,V.setGeometry(xa,Za))}}else ia.push(ra[R])}this.updateCustomLinks(this.createCellMapping(oa,ta),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{V.endUpdate()}return ia};Graph.prototype.insertImage=function(y,O,R){if(null!=y&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),fa=
-[],ia=0;ia<V.length;ia++)fa.push(V[ia]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==fa.length+1)for(ia=y.length-1;0<=ia;ia--)if(0==ia||y[ia]!=fa[ia-1]){y[ia].setAttribute("width",O);y[ia].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),R=[],V=
-0;V<O.length;V++)R.push(O[V]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==R.length+1)for(V=O.length-1;0<=V;V--)if(O[V]!=R[V-1]){for(O=O[V].getElementsByTagName("a");0<O.length;){for(R=O[0].parentNode;null!=O[0].firstChild;)R.insertBefore(O[0].firstChild,O[0]);R.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,
-arguments),R=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,R){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var V=[],fa=null,ia=null,oa=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var ra=this.view.getState(O[ta]);if(null!=ra){var xa=y?ra.getCenterX():ra.getCenterY();fa=null!=fa?Math.max(fa,
-xa):xa;ia=null!=ia?Math.min(ia,xa):xa;R&&(oa+=y?ra.width:ra.height);V.push(ra)}}if(2<V.length){V.sort(function($a,Pa){return y?$a.x-Pa.x:$a.y-Pa.y});R&&(oa-=y?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ra=this.view.translate;xa=this.view.scale;ia=ia/xa-(y?ra.x:ra.y);fa=fa/xa-(y?ra.x:ra.y);this.getModel().beginUpdate();try{var Da=(fa-ia-oa)/(V.length-1),Ia=ia+(R?y?V[0].width/2:V[0].height/2:0);for(ta=1;ta<V.length-1;ta++){var Ya=this.view.getState(this.model.getParent(V[ta].cell)),
-Za=this.getCellGeometry(V[ta].cell);Ia+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),y?Za.x=Math.round(Ia-(R?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Ia-(R?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(V[ta].cell,Za));R&&(Ia+=y?V[ta].width:V[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(y){y=new mxImageExport;y.addCellData=
-function(R,V,fa){V.setAttribute("data-cell-id",R.id);if(fa)if(mxUtils.isNode(R.value))for(fa=0;fa<R.value.attributes.length;fa++){var ia=R.value.attributes[fa];V.setAttribute("data-cell-"+ia.name,ia.value)}else if("object"===typeof R.value)for(ia in R.value)V.setAttribute("data-cell-"+ia,R.value[ia]);else null!=R.value&&V.setAttribute("data-cell-value",R.value);return V};var O=y.visitStatesRecursive;y.visitStatesRecursive=function(R,V,fa){if(null!=R){var ia=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(R.cell,
-null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ia.appendChild(V.root);O.apply(this,arguments);V.root=ia}};y.getLinkForCellState=mxUtils.bind(this,function(R,V){return this.getLinkForCell(R.cell)});y.getTitleForCellState=mxUtils.bind(this,function(R,V){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return y};Graph.prototype.parseBackgroundImage=function(y){var O=null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,
-y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,R,V,fa,ia,oa,ta,ra,xa,Da,Ia,Ya,Za,$a,Pa){var Na=null;if(null!=Za)for(Na=new mxDictionary,Da=0;Da<Za.length;Da++)Na.put(Za[Da],!0);Za=this.useCssTransforms;var jb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{O=null!=O?O:1;R=null!=R?R:0;fa=null!=fa?fa:!0;ia=null!=ia?ia:!0;oa=null!=oa?oa:
-!0;xa=null!=xa?xa:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ia&&null==Na||V||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ab=this.backgroundImage,db=this.view.translate,lb=this.view.scale;"diagram"==Ya&&null!=ab&&null!=ab.width&&null!=ab.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((db.x+ab.x)*lb,(db.y+ab.y)*lb,ab.width*lb,ab.height*lb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=O/lb;var kb=Math.max(1,Math.ceil(cb.width*
-V)+2*R)+(xa&&0==R?5:0),pb=Math.max(1,Math.ceil(cb.height*V)+2*R)+(xa&&0==R?5:0);xa=fa?-.5:0;var fb=mxUtils.getLightDarkColor(y),ob=Graph.createSvgNode(xa,xa,kb,pb,fb),tb=ob.ownerDocument;if(null!=y){var eb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,"rect");eb.setAttribute("fill",fb.light);eb.style.fill=fb.cssText;eb.setAttribute("width","100%");eb.setAttribute("height","100%");eb.setAttribute("x","0");eb.setAttribute("y","0");ob.appendChild(eb)}var nb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,
-"g");ob.appendChild(nb);var mb=this.createSvgCanvas(nb);mb.foOffset=fa?-.5:0;mb.textOffset=fa?-.5:0;mb.imageOffset=fa?-.5:0;mb.translate(Math.floor(R/O-cb.x/lb),Math.floor(R/O-cb.y/lb));mb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=mb.getAlternateText;mb.getAlternateText=function(hb,Ab,sb,wb,yb,rb,Bb,d,p,z,u,x,C){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var E=
-Math.ceil(2*wb/this.state.fontSize),da=[],M=0,sa=0;(0==E||M<E)&&sa<rb.length;){var ma=rb.charCodeAt(sa);if(10==ma||13==ma){if(0<M)break}else da.push(rb.charAt(sa)),255>ma&&M++;sa++}da.length<rb.length&&1<rb.length-da.length&&(rb=mxUtils.trim(da.join(""))+"...");return rb}catch(Wa){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=ab&&null!=ab.width&&null!=ab.height&&(y=lb/O,xa=new mxRectangle((ab.x+db.x)*y,(ab.y+db.y)*y,ab.width*y,ab.height*y),mxUtils.intersects(cb,xa)&&
+Da&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==O||O(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||
+(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?oa.linkTarget:"_top",oa.openLink(this.currentLink,ra),xa.consume())):null!=Q&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&Math.abs(this.startX-xa.getGraphX())<ja&&Math.abs(this.startY-xa.getGraphY())<ja&&Q(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ra.cell));null!=this.currentLink&&
+(this.currentTarget=oa.getLinkTargetForCell(ra.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ha);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ra){};oa.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(ra){ta.clear()})};Graph.prototype.duplicateCells=
+function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var Q=0;Q<y.length;Q++)this.isTableCell(y[Q])&&(y[Q]=this.model.getParent(y[Q]));y=this.model.getTopmostCells(y);var V=this.getModel(),ha=this.gridSize,ja=[];V.beginUpdate();try{var oa={},ta=this.createCellLookup(y),ra=this.cloneCells(y,!1,oa,!0);for(Q=0;Q<y.length;Q++){var xa=V.getParent(y[Q]);if(null!=xa){var Da=this.moveCells([ra[Q]],ha,ha,!1)[0];ja.push(Da);if(O)V.add(xa,ra[Q]);else{var Ia=xa.getIndex(y[Q]);V.add(xa,ra[Q],Ia+
+1)}if(this.isTable(xa)){var Ya=this.getCellGeometry(ra[Q]),Za=this.getCellGeometry(xa);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,V.setGeometry(xa,Za))}}else ja.push(ra[Q])}this.updateCustomLinks(this.createCellMapping(oa,ta),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{V.endUpdate()}return ja};Graph.prototype.insertImage=function(y,O,Q){if(null!=y&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ha=
+[],ja=0;ja<V.length;ja++)ha.push(V[ja]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==ha.length+1)for(ja=y.length-1;0<=ja;ja--)if(0==ja||y[ja]!=ha[ja-1]){y[ja].setAttribute("width",O);y[ja].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=
+0;V<O.length;V++)Q.push(O[V]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==Q.length+1)for(V=O.length-1;0<=V;V--)if(O[V]!=Q[V-1]){for(O=O[V].getElementsByTagName("a");0<O.length;){for(Q=O[0].parentNode;null!=O[0].firstChild;)Q.insertBefore(O[0].firstChild,O[0]);Q.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,
+arguments),Q=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,Q){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var V=[],ha=null,ja=null,oa=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var ra=this.view.getState(O[ta]);if(null!=ra){var xa=y?ra.getCenterX():ra.getCenterY();ha=null!=ha?Math.max(ha,
+xa):xa;ja=null!=ja?Math.min(ja,xa):xa;Q&&(oa+=y?ra.width:ra.height);V.push(ra)}}if(2<V.length){V.sort(function($a,Pa){return y?$a.x-Pa.x:$a.y-Pa.y});Q&&(oa-=y?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ra=this.view.translate;xa=this.view.scale;ja=ja/xa-(y?ra.x:ra.y);ha=ha/xa-(y?ra.x:ra.y);this.getModel().beginUpdate();try{var Da=(ha-ja-oa)/(V.length-1),Ia=ja+(Q?y?V[0].width/2:V[0].height/2:0);for(ta=1;ta<V.length-1;ta++){var Ya=this.view.getState(this.model.getParent(V[ta].cell)),
+Za=this.getCellGeometry(V[ta].cell);Ia+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),y?Za.x=Math.round(Ia-(Q?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Ia-(Q?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(V[ta].cell,Za));Q&&(Ia+=y?V[ta].width:V[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(y){y=new mxImageExport;y.addCellData=
+function(Q,V,ha){V.setAttribute("data-cell-id",Q.id);if(ha)if(mxUtils.isNode(Q.value))for(ha=0;ha<Q.value.attributes.length;ha++){var ja=Q.value.attributes[ha];V.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof Q.value)for(ja in Q.value)V.setAttribute("data-cell-"+ja,Q.value[ja]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var O=y.visitStatesRecursive;y.visitStatesRecursive=function(Q,V,ha){if(null!=Q){var ja=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,
+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ja.appendChild(V.root);O.apply(this,arguments);V.root=ja}};y.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});y.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return y};Graph.prototype.parseBackgroundImage=function(y){var O=null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,
+y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,Q,V,ha,ja,oa,ta,ra,xa,Da,Ia,Ya,Za,$a,Pa){var Na=null;if(null!=Za)for(Na=new mxDictionary,Da=0;Da<Za.length;Da++)Na.put(Za[Da],!0);Za=this.useCssTransforms;var jb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{O=null!=O?O:1;Q=null!=Q?Q:0;ha=null!=ha?ha:!0;ja=null!=ja?ja:!0;oa=null!=oa?oa:
+!0;xa=null!=xa?xa:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ja&&null==Na||V||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ab=this.backgroundImage,db=this.view.translate,lb=this.view.scale;"diagram"==Ya&&null!=ab&&null!=ab.width&&null!=ab.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((db.x+ab.x)*lb,(db.y+ab.y)*lb,ab.width*lb,ab.height*lb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=O/lb;var kb=Math.max(1,Math.ceil(cb.width*
+V)+2*Q)+(xa&&0==Q?5:0),pb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(xa&&0==Q?5:0);xa=ha?-.5:0;var fb=mxUtils.getLightDarkColor(y),ob=Graph.createSvgNode(xa,xa,kb,pb,fb),tb=ob.ownerDocument;if(null!=y){var eb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,"rect");eb.setAttribute("fill",fb.light);eb.style.fill=fb.cssText;eb.setAttribute("width","100%");eb.setAttribute("height","100%");eb.setAttribute("x","0");eb.setAttribute("y","0");ob.appendChild(eb)}var nb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,
+"g");ob.appendChild(nb);var mb=this.createSvgCanvas(nb);mb.foOffset=ha?-.5:0;mb.textOffset=ha?-.5:0;mb.imageOffset=ha?-.5:0;mb.translate(Math.floor(Q/O-cb.x/lb),Math.floor(Q/O-cb.y/lb));mb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=mb.getAlternateText;mb.getAlternateText=function(hb,Ab,sb,wb,yb,rb,Bb,d,p,z,u,x,C){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var E=
+Math.ceil(2*wb/this.state.fontSize),ea=[],M=0,sa=0;(0==E||M<E)&&sa<rb.length;){var ma=rb.charCodeAt(sa);if(10==ma||13==ma){if(0<M)break}else ea.push(rb.charAt(sa)),255>ma&&M++;sa++}ea.length<rb.length&&1<rb.length-ea.length&&(rb=mxUtils.trim(ea.join(""))+"...");return rb}catch(Wa){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=ab&&null!=ab.width&&null!=ab.height&&(y=lb/O,xa=new mxRectangle((ab.x+db.x)*y,(ab.y+db.y)*y,ab.width*y,ab.height*y),mxUtils.intersects(cb,xa)&&
mb.image(ab.x+db.x,ab.y+db.y,ab.width,ab.height,ab.src,!0));mb.scale(V);mb.textEnabled=oa;ta=null!=ta?ta:this.createSvgImageExport();var zb=ta.getLinkForCellState;ta.getLinkForCellState=function(hb,Ab){var sb=hb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==sb||hb.view.graph.isCustomLink(sb)?null:sb};ta.getLinkTargetForCellState=function(hb,Ab){return hb.view.graph.getLinkTargetForCell(hb.cell)};var Cb=ta.drawCellState,xb=null,vb=mxUtils.bind(this,function(){if(null==xb){xb="ge-flow-animation-"+
-Editor.guid();var hb=null!=tb.createElementNS?tb.createElementNS(mxConstants.NS_SVG,"style"):tb.createElement("style");hb.innerHTML=this.createFlowAnimationCss(xb);tb.getElementsByTagName("defs")[0].appendChild(hb)}return xb});ta.drawCellState=function(hb,Ab){for(var sb=hb.view.graph,wb=null!=Na?Na.get(hb.cell):sb.isCellSelected(hb.cell),yb=sb.model.getParent(hb.cell);!(ia&&null==Na||wb)&&null!=yb;)wb=null!=Na?Na.get(yb):sb.isCellSelected(yb),yb=sb.model.getParent(yb);if(null!=hb.shape)try{var rb=
-hb.shape.isFlowAnimationEnabled,Bb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return jb&&sb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,O,vb())};if(ia&&null==Na||wb)sb.view.redrawEnumerationState(hb),Cb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Ab)}finally{hb.shape.isFlowAnimationEnabled=rb,hb.shape.addFlowAnimationToShape=
-Bb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ta.drawState(this.getView().getState(ib),mb);this.addForeignObjectWarning(mb,ob);Pa?this.disableSvgLinks(ob):this.updateSvgLinks(ob,ra,!0);return ob}finally{this.enableFlowAnimation=jb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var R=y.createElement("switch"),
-V=y.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var fa=y.createElement("a");fa.setAttribute("transform","translate(0,-5)");null==fa.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(fa.setAttribute("xlink:href",Graph.foreignObjectWarningLink),fa.setAttribute("target","_blank")):(fa.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),fa.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));
-y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);R.appendChild(V);fa.appendChild(y);R.appendChild(fa);O.appendChild(R)}};Graph.prototype.disableSvgLinks=function(y,O){y=y.getElementsByTagName("a");for(var R=0;R<y.length;R++){var V=y[R].getAttribute("href");null==V&&(V=y[R].getAttribute("xlink:href"));null!=V&&(y[R].style.pointerEvents="none",y[R].setAttribute("href",
-""));O&&O(y[R])}};Graph.prototype.updateSvgLinks=function(y,O,R){y=y.getElementsByTagName("a");for(var V=0;V<y.length;V++)if(null==y[V].getAttribute("target")){var fa=y[V].getAttribute("href");null==fa&&(fa=y[V].getAttribute("xlink:href"));null!=fa&&(null!=O&&/^https?:\/\//.test(fa)?y[V].setAttribute("target",O):R&&this.isCustomLink(fa)&&y[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
+Editor.guid();var hb=null!=tb.createElementNS?tb.createElementNS(mxConstants.NS_SVG,"style"):tb.createElement("style");hb.innerHTML=this.createFlowAnimationCss(xb);tb.getElementsByTagName("defs")[0].appendChild(hb)}return xb});ta.drawCellState=function(hb,Ab){for(var sb=hb.view.graph,wb=null!=Na?Na.get(hb.cell):sb.isCellSelected(hb.cell),yb=sb.model.getParent(hb.cell);!(ja&&null==Na||wb)&&null!=yb;)wb=null!=Na?Na.get(yb):sb.isCellSelected(yb),yb=sb.model.getParent(yb);if(null!=hb.shape)try{var rb=
+hb.shape.isFlowAnimationEnabled,Bb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return jb&&sb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,O,vb())};if(ja&&null==Na||wb)sb.view.redrawEnumerationState(hb),Cb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Ab)}finally{hb.shape.isFlowAnimationEnabled=rb,hb.shape.addFlowAnimationToShape=
+Bb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ta.drawState(this.getView().getState(ib),mb);this.addForeignObjectWarning(mb,ob);Pa?this.disableSvgLinks(ob):this.updateSvgLinks(ob,ra,!0);return ob}finally{this.enableFlowAnimation=jb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var Q=y.createElement("switch"),
+V=y.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ha=y.createElement("a");ha.setAttribute("transform","translate(0,-5)");null==ha.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ha.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ha.setAttribute("target","_blank")):(ha.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ha.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));
+y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);Q.appendChild(V);ha.appendChild(y);Q.appendChild(ha);O.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(y,O){y=y.getElementsByTagName("a");for(var Q=0;Q<y.length;Q++){var V=y[Q].getAttribute("href");null==V&&(V=y[Q].getAttribute("xlink:href"));null!=V&&(y[Q].style.pointerEvents="none",y[Q].setAttribute("href",
+""));O&&O(y[Q])}};Graph.prototype.updateSvgLinks=function(y,O,Q){y=y.getElementsByTagName("a");for(var V=0;V<y.length;V++)if(null==y[V].getAttribute("target")){var ha=y[V].getAttribute("href");null==ha&&(ha=y[V].getAttribute("xlink:href"));null!=ha&&(null!=O&&/^https?:\/\//.test(ha)?y[V].setAttribute("target",O):Q&&this.isCustomLink(ha)&&y[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
y.adaptiveColors=this.getAdaptiveColors();y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(y=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){var y=null;if(null!=this.cellEditor.textarea)for(y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=
-y.parentNode;return y};Graph.prototype.getParentByName=function(y,O,R){for(;null!=y&&y.nodeName!=O;){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,R){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var R=document.createRange();R.selectNode(y);O.removeAllRanges();O.addRange(R)}}else(O=
-document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),R=O.createRange(),R.setEndPoint("StartToStart",y),R.select())};Graph.prototype.flipEdgePoints=function(y,O,R){var V=this.getCellGeometry(y);if(null!=V){V=V.clone();if(null!=V.points)for(var fa=0;fa<V.points.length;fa++)O?V.points[fa].x=R+(R-V.points[fa].x):V.points[fa].y=R+(R-V.points[fa].y);fa=function(ia){null!=ia&&(O?ia.x=R+(R-ia.x):ia.y=R+(R-ia.y))};fa(V.getTerminalPoint(!0));fa(V.getTerminalPoint(!1));this.model.setGeometry(y,
-V)}};Graph.prototype.flipChildren=function(y,O,R){this.model.beginUpdate();try{for(var V=this.model.getChildCount(y),fa=0;fa<V;fa++){var ia=this.model.getChildAt(y,fa);if(this.model.isEdge(ia))this.flipEdgePoints(ia,O,R);else{var oa=this.getCellGeometry(ia);null!=oa&&(oa=oa.clone(),O?oa.x=R+(R-oa.x-oa.width):oa.y=R+(R-oa.y-oa.height),this.model.setGeometry(ia,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);
-for(var R=[],V=0;V<y.length;V++)if(this.model.isEdge(y[V])){var fa=this.view.getState(y[V]);null!=fa&&this.flipEdgePoints(y[V],O,(O?fa.getCenterX():fa.getCenterY())/this.view.scale-(O?fa.origin.x:fa.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(y[V]);null!=ia&&this.flipChildren(y[V],O,O?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);R.push(y[V])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};
-Graph.prototype.deleteCells=function(y,O){var R=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var V=0;V<y.length;V++){var fa=this.model.getParent(y[V]);if(this.isTable(fa)){var ia=this.getCellGeometry(y[V]),oa=this.getCellGeometry(fa);null!=ia&&null!=oa&&(oa=oa.clone(),oa.height-=ia.height,this.model.setGeometry(fa,oa))}}var ta=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(R=[],V=0;V<ta.length;V++)this.model.contains(ta[V])&&
-(this.model.isVertex(ta[V])||this.model.isEdge(ta[V]))&&R.push(ta[V])}return R};Graph.prototype.insertTableColumn=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=y,fa=0;if(this.isTableCell(y)){var ia=R.getParent(y);V=R.getParent(ia);fa=mxUtils.indexOf(R.getChildCells(ia,!0),y)}else this.isTableRow(y)?V=R.getParent(y):y=R.getChildCells(V,!0)[0],O||(fa=R.getChildCells(y,!0).length-1);var oa=R.getChildCells(V,!0),ta=Graph.minTableColumnWidth;for(y=0;y<oa.length;y++){var ra=R.getChildCells(oa[y],
-!0)[fa],xa=R.cloneCell(ra,!1);null==xa&&(xa=this.createVertex());var Da=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ta=Da.width;var Ia=this.getCellGeometry(oa[y]);null!=Ia&&(Da.height=Ia.height)}R.add(oa[y],xa,fa+(O?0:1))}var Ya=this.getCellGeometry(V);null!=Ya&&(Ya=Ya.clone(),Ya.width+=
-ta,R.setGeometry(V,Ya))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var V=O.getChildCells(R,!0);0==V.length?O.remove(R):(R==y&&(y=V[V.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){V=y;var fa=R.getChildCells(V,
-!0);y=fa[O?0:fa.length-1]}else V=R.getParent(y);var ia=V.getIndex(y);y=R.cloneCell(y,!1);y.value=null;R.add(V,y,ia+(O?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=y,fa=y;if(this.isTableCell(y))fa=R.getParent(y),V=R.getParent(fa);else if(this.isTableRow(y))V=R.getParent(y);else{var ia=R.getChildCells(V,!0);fa=ia[O?0:ia.length-1]}var oa=R.getChildCells(fa,!0),ta=V.getIndex(fa);fa=R.cloneCell(fa,!1);fa.value=null;var ra=this.getCellGeometry(fa);
-if(null!=ra){for(ia=0;ia<oa.length;ia++){y=R.cloneCell(oa[ia],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);fa.insert(y)}R.add(V,fa,ta+(O?0:1));var Da=this.getCellGeometry(V);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,R.setGeometry(V,Da))}}finally{R.endUpdate()}};
-Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(V=O.getParent(y));this.isTableRow(V)&&(R=O.getParent(V));var fa=O.getChildCells(R,!0);if(0==fa.length)O.remove(R);else{this.isTableRow(V)||(V=fa[0]);var ia=O.getChildCells(V,!0);if(1>=ia.length)O.remove(R);else{var oa=ia.length-1;this.isTableCell(y)&&(oa=mxUtils.indexOf(ia,y));for(V=y=0;V<fa.length;V++){var ta=O.getChildCells(fa[V],!0)[oa];O.remove(ta);var ra=this.getCellGeometry(ta);
-null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(R);null!=xa&&(xa=xa.clone(),xa.width-=y,O.setGeometry(R,xa))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(y=V=O.getParent(y));this.isTableRow(y)&&(R=O.getParent(V));var fa=O.getChildCells(R,!0);if(1>=fa.length)O.remove(R);else{this.isTableRow(V)||(V=fa[fa.length-1]);O.remove(V);y=0;var ia=this.getCellGeometry(V);null!=ia&&(y=ia.height);
-var oa=this.getCellGeometry(R);null!=oa&&(oa=oa.clone(),oa.height-=y,O.setGeometry(R,oa))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var R=y.tBodies[0],V=R.rows[0].cells,fa=y=0;fa<V.length;fa++){var ia=V[fa].getAttribute("colspan");y+=null!=ia?parseInt(ia):1}O=R.insertRow(O);for(fa=0;fa<y;fa++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var R=y.tHead;if(null!=
-R)for(var V=0;V<R.rows.length;V++){var fa=document.createElement("th");R.rows[V].appendChild(fa);mxUtils.br(fa)}y=y.tBodies[0];for(R=0;R<y.rows.length;R++)V=y.rows[R].insertCell(O),mxUtils.br(V);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var R=0;R<y.length;R++)y[R].cells.length>O&&y[R].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&
-O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var R=document.createElement("div");R.innerHTML=y;y=document.createDocumentFragment();for(var V;V=R.firstChild;)lastNode=y.appendChild(V);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O,R){function V(ia,oa){ia.length>oa&&(ia=ia.substring(0,Math.round(oa/2))+"..."+ia.substring(ia.length-Math.round(oa/4)));return ia}y=null!=y?y:"javascript:void(0);";if(null==
-O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var fa=document.createElement("a");fa.setAttribute("rel",this.linkRelation);fa.setAttribute("href",this.getAbsoluteUrl(y));fa.setAttribute("title",V(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&fa.setAttribute("target",this.linkTarget);mxUtils.write(fa,V(O,40));this.isCustomLink(y)&&mxEvent.addListener(fa,"click",mxUtils.bind(this,function(ia){this.customLinkClicked(y,R);mxEvent.consume(ia)}));return fa};Graph.prototype.initTouch=
-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,oa){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=y.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var oa=this.getCellAt(ia.graphX,ia.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ia.graphX,ia.graphY)||(ia.state=this.view.getState(oa),
-null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var O=!1,R=!1,V=!1,fa=this.fireMouseEvent;this.fireMouseEvent=function(ia,oa,ta){ia==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),O=this.isCellSelected(oa.getCell()),R=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());fa.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,
-function(ia,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var ta=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!ta&&(R&&null==oa.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(oa.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();
-this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ra,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,oa,ta])}})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
-"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),R=O.getRangeAt(0);y=Graph.createTabNode(y);R.insertNode(y);R.setStartAfter(y);R.setEndAfter(y);O.removeAllRanges();O.addRange(R)};mxCellEditor.prototype.alignText=function(y,O){var R=this.graph.getView().getState(this.editingCell);
-if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=R&&"vertical-"==R.substring(0,9),fa=null!=O&&mxEvent.isShiftDown(O);if(fa||null!=window.getSelection&&null!=window.getSelection().containsNode){var ia=!0;this.graph.processElements(this.textarea,function(oa){fa||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ia=!1});(ia||V)&&this.graph.cellEditor.setAlign(y)}V||document.execCommand("justify"+
-y.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],R=0,V=y.rangeCount;R<V;++R)O.push(y.getRangeAt(R));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,R=y.length;O<
-R;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(V){}};var D=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));D.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var N=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);N.apply(this,arguments);var R=this.graph.view.getState(y);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?
-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y)};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,
-ta.length-1));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),fa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(y.style,
+y.parentNode;return y};Graph.prototype.getParentByName=function(y,O,Q){for(;null!=y&&y.nodeName!=O;){if(y==Q)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,Q){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==Q)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var Q=document.createRange();Q.selectNode(y);O.removeAllRanges();O.addRange(Q)}}else(O=
+document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),Q=O.createRange(),Q.setEndPoint("StartToStart",y),Q.select())};Graph.prototype.flipEdgePoints=function(y,O,Q){var V=this.getCellGeometry(y);if(null!=V){V=V.clone();if(null!=V.points)for(var ha=0;ha<V.points.length;ha++)O?V.points[ha].x=Q+(Q-V.points[ha].x):V.points[ha].y=Q+(Q-V.points[ha].y);ha=function(ja){null!=ja&&(O?ja.x=Q+(Q-ja.x):ja.y=Q+(Q-ja.y))};ha(V.getTerminalPoint(!0));ha(V.getTerminalPoint(!1));this.model.setGeometry(y,
+V)}};Graph.prototype.flipChildren=function(y,O,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(y),ha=0;ha<V;ha++){var ja=this.model.getChildAt(y,ha);if(this.model.isEdge(ja))this.flipEdgePoints(ja,O,Q);else{var oa=this.getCellGeometry(ja);null!=oa&&(oa=oa.clone(),O?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ja,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);
+for(var Q=[],V=0;V<y.length;V++)if(this.model.isEdge(y[V])){var ha=this.view.getState(y[V]);null!=ha&&this.flipEdgePoints(y[V],O,(O?ha.getCenterX():ha.getCenterY())/this.view.scale-(O?ha.origin.x:ha.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var ja=this.getCellGeometry(y[V]);null!=ja&&this.flipChildren(y[V],O,O?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);Q.push(y[V])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};
+Graph.prototype.deleteCells=function(y,O){var Q=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var V=0;V<y.length;V++){var ha=this.model.getParent(y[V]);if(this.isTable(ha)){var ja=this.getCellGeometry(y[V]),oa=this.getCellGeometry(ha);null!=ja&&null!=oa&&(oa=oa.clone(),oa.height-=ja.height,this.model.setGeometry(ha,oa))}}var ta=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(Q=[],V=0;V<ta.length;V++)this.model.contains(ta[V])&&
+(this.model.isVertex(ta[V])||this.model.isEdge(ta[V]))&&Q.push(ta[V])}return Q};Graph.prototype.insertTableColumn=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=y,ha=0;if(this.isTableCell(y)){var ja=Q.getParent(y);V=Q.getParent(ja);ha=mxUtils.indexOf(Q.getChildCells(ja,!0),y)}else this.isTableRow(y)?V=Q.getParent(y):y=Q.getChildCells(V,!0)[0],O||(ha=Q.getChildCells(y,!0).length-1);var oa=Q.getChildCells(V,!0),ta=Graph.minTableColumnWidth;for(y=0;y<oa.length;y++){var ra=Q.getChildCells(oa[y],
+!0)[ha],xa=Q.cloneCell(ra,!1);null==xa&&(xa=this.createVertex());var Da=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ta=Da.width;var Ia=this.getCellGeometry(oa[y]);null!=Ia&&(Da.height=Ia.height)}Q.add(oa[y],xa,ha+(O?0:1))}var Ya=this.getCellGeometry(V);null!=Ya&&(Ya=Ya.clone(),Ya.width+=
+ta,Q.setGeometry(V,Ya))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var V=O.getChildCells(Q,!0);0==V.length?O.remove(Q):(Q==y&&(y=V[V.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){V=y;var ha=Q.getChildCells(V,
+!0);y=ha[O?0:ha.length-1]}else V=Q.getParent(y);var ja=V.getIndex(y);y=Q.cloneCell(y,!1);y.value=null;Q.add(V,y,ja+(O?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=y,ha=y;if(this.isTableCell(y))ha=Q.getParent(y),V=Q.getParent(ha);else if(this.isTableRow(y))V=Q.getParent(y);else{var ja=Q.getChildCells(V,!0);ha=ja[O?0:ja.length-1]}var oa=Q.getChildCells(ha,!0),ta=V.getIndex(ha);ha=Q.cloneCell(ha,!1);ha.value=null;var ra=this.getCellGeometry(ha);
+if(null!=ra){for(ja=0;ja<oa.length;ja++){y=Q.cloneCell(oa[ja],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);ha.insert(y)}Q.add(V,ha,ta+(O?0:1));var Da=this.getCellGeometry(V);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,Q.setGeometry(V,Da))}}finally{Q.endUpdate()}};
+Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var Q=y,V=y;this.isTableCell(y)&&(V=O.getParent(y));this.isTableRow(V)&&(Q=O.getParent(V));var ha=O.getChildCells(Q,!0);if(0==ha.length)O.remove(Q);else{this.isTableRow(V)||(V=ha[0]);var ja=O.getChildCells(V,!0);if(1>=ja.length)O.remove(Q);else{var oa=ja.length-1;this.isTableCell(y)&&(oa=mxUtils.indexOf(ja,y));for(V=y=0;V<ha.length;V++){var ta=O.getChildCells(ha[V],!0)[oa];O.remove(ta);var ra=this.getCellGeometry(ta);
+null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(Q);null!=xa&&(xa=xa.clone(),xa.width-=y,O.setGeometry(Q,xa))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var Q=y,V=y;this.isTableCell(y)&&(y=V=O.getParent(y));this.isTableRow(y)&&(Q=O.getParent(V));var ha=O.getChildCells(Q,!0);if(1>=ha.length)O.remove(Q);else{this.isTableRow(V)||(V=ha[ha.length-1]);O.remove(V);y=0;var ja=this.getCellGeometry(V);null!=ja&&(y=ja.height);
+var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=y,O.setGeometry(Q,oa))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var Q=y.tBodies[0],V=Q.rows[0].cells,ha=y=0;ha<V.length;ha++){var ja=V[ha].getAttribute("colspan");y+=null!=ja?parseInt(ja):1}O=Q.insertRow(O);for(ha=0;ha<y;ha++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var Q=y.tHead;if(null!=
+Q)for(var V=0;V<Q.rows.length;V++){var ha=document.createElement("th");Q.rows[V].appendChild(ha);mxUtils.br(ha)}y=y.tBodies[0];for(Q=0;Q<y.rows.length;Q++)V=y.rows[Q].insertCell(O),mxUtils.br(V);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var Q=0;Q<y.length;Q++)y[Q].cells.length>O&&y[Q].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&
+O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var Q=document.createElement("div");Q.innerHTML=y;y=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=y.appendChild(V);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O,Q){function V(ja,oa){ja.length>oa&&(ja=ja.substring(0,Math.round(oa/2))+"..."+ja.substring(ja.length-Math.round(oa/4)));return ja}y=null!=y?y:"javascript:void(0);";if(null==
+O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var ha=document.createElement("a");ha.setAttribute("rel",this.linkRelation);ha.setAttribute("href",this.getAbsoluteUrl(y));ha.setAttribute("title",V(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&ha.setAttribute("target",this.linkTarget);mxUtils.write(ha,V(O,40));this.isCustomLink(y)&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(y,Q);mxEvent.consume(ja)}));return ha};Graph.prototype.initTouch=
+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,oa){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=y.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var oa=this.getCellAt(ja.graphX,ja.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(oa),
+null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var O=!1,Q=!1,V=!1,ha=this.fireMouseEvent;this.fireMouseEvent=function(ja,oa,ta){ja==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),O=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ha.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,
+function(ja,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var ta=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!ta&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(oa.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();
+this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ra,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,oa,ta])}})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
+"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),Q=O.getRangeAt(0);y=Graph.createTabNode(y);Q.insertNode(y);Q.setStartAfter(y);Q.setEndAfter(y);O.removeAllRanges();O.addRange(Q)};mxCellEditor.prototype.alignText=function(y,O){var Q=this.graph.getView().getState(this.editingCell);
+if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ha=null!=O&&mxEvent.isShiftDown(O);if(ha||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(oa){ha||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ja=!1});(ja||V)&&this.graph.cellEditor.setAlign(y)}V||document.execCommand("justify"+
+y.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],Q=0,V=y.rangeCount;Q<V;++Q)O.push(y.getRangeAt(Q));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,Q=y.length;O<
+Q;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(V){}};var D=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));D.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var N=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);N.apply(this,arguments);var Q=this.graph.view.getState(y);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?
+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y)};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,
+ta.length-1));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ha=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(y.style,
mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(ra)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=fa?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,
+Math.round(ra)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ha?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,
"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var ta=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className=
"mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding=
-"2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var R=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&
-0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var V=null!=y.text?y.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-
-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
-R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
-var R=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(y,O){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(y.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
+"2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var Q=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&
+0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=y.text?y.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-
+4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
+Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
+var Q=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(y,O){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(y.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var O=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(y.style,"nl2Br","1")?(O=O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<O.length&&("<br/>"==O.substring(O.length-5)||"<br>"==O.substring(O.length-4))&&(O=O.substring(0,O.lastIndexOf("<br"))+"<div><br/></div>")):
-O=O.replace(/\r\n/g,"").replace(/\n/g,"");return O};var J=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();J.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&
+O=O.replace(/\r\n/g,"").replace(/\n/g,"");return O};var I=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();I.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&
0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getBorderColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getMinimumSize=
function(y){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,O){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,R=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/R-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/R-O.y);R=this.graph.view.unit;this.hint.innerHTML=e(y,R)+", "+e(O,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){ha.apply(this,arguments);var R=this.graph.getCellStyle(y);if(null==R.childLayout){var V=this.graph.model.getParent(y),fa=null!=V?this.graph.getCellGeometry(V):null;if(null!=fa&&(R=this.graph.getCellStyle(V),"stackLayout"==R.childLayout)){var ia=
-parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);fa=fa.clone();R?fa.height=O.height+oa.y+oa.height+2*ia:fa.width=O.width+oa.x+oa.width+2*ia;this.graph.model.setGeometry(V,fa)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){R.get(ta)||(R.put(ta,!0),fa.push(ta))}for(var O=ea.apply(this,
-arguments),R=new mxDictionary,V=this.graph.model,fa=[],ia=0;ia<O.length;ia++){var oa=O[ia];this.graph.isTableCell(oa)?y(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&y(V.getParent(oa));y(oa)}return fa};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(y){return aa.apply(this,arguments)&&!mxEvent.isControlDown(y.getEvent())&&!mxEvent.isShiftDown(y.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
-function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var W=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=W.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ba=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
-function(y){var O=ba.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 ca=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||la.apply(this,arguments)&&
-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,B=mxVertexHandler.prototype.createCustomHandles;
-mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var y=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var O=function($a,Pa,Na){for(var jb=[],cb=0;cb<$a.length;cb++){var ab=$a[cb];jb.push(null==ab?null:new mxPoint((ra+ab.x+Pa)*ia,(xa+ab.y+Na)*ia))}return jb},R=this,V=this.graph,fa=V.model,ia=V.view.scale,oa=this.state,ta=this.selectionBorder,ra=this.state.origin.x+V.view.translate.x,
-xa=this.state.origin.y+V.view.translate.y;null==y&&(y=[]);var Da=V.view.getCellStates(fa.getChildCells(this.state.cell,!0));if(0<Da.length){var Ia=fa.getChildCells(Da[0].cell,!0),Ya=V.getTableLines(this.state.cell,!1,!0),Za=V.getTableLines(this.state.cell,!0,!1);for(fa=0;fa<Da.length;fa++)mxUtils.bind(this,function($a){var Pa=Da[$a],Na=null;if(V.isCellMovable(Pa.cell)){Na=$a<Da.length-1?Da[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na.cell):null;var jb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,Q=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/Q-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/Q-O.y);Q=this.graph.view.unit;this.hint.innerHTML=e(y,Q)+", "+e(O,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ia=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){ia.apply(this,arguments);var Q=this.graph.getCellStyle(y);if(null==Q.childLayout){var V=this.graph.model.getParent(y),ha=null!=V?this.graph.getCellGeometry(V):null;if(null!=ha&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ja=
+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ha=ha.clone();Q?ha.height=O.height+oa.y+oa.height+2*ja:ha.width=O.width+oa.x+oa.width+2*ja;this.graph.model.setGeometry(V,ha)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){Q.get(ta)||(Q.put(ta,!0),ha.push(ta))}for(var O=fa.apply(this,
+arguments),Q=new mxDictionary,V=this.graph.model,ha=[],ja=0;ja<O.length;ja++){var oa=O[ja];this.graph.isTableCell(oa)?y(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&y(V.getParent(oa));y(oa)}return ha};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(y){return ba.apply(this,arguments)&&!mxEvent.isControlDown(y.getEvent())&&!mxEvent.isShiftDown(y.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
+function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=X.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ca=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+function(y){var O=ca.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};
+mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.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 da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var W=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||W.apply(this,arguments)&&
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var S=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return S.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,B=mxVertexHandler.prototype.createCustomHandles;
+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var y=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var O=function($a,Pa,Na){for(var jb=[],cb=0;cb<$a.length;cb++){var ab=$a[cb];jb.push(null==ab?null:new mxPoint((ra+ab.x+Pa)*ja,(xa+ab.y+Na)*ja))}return jb},Q=this,V=this.graph,ha=V.model,ja=V.view.scale,oa=this.state,ta=this.selectionBorder,ra=this.state.origin.x+V.view.translate.x,
+xa=this.state.origin.y+V.view.translate.y;null==y&&(y=[]);var Da=V.view.getCellStates(ha.getChildCells(this.state.cell,!0));if(0<Da.length){var Ia=ha.getChildCells(Da[0].cell,!0),Ya=V.getTableLines(this.state.cell,!1,!0),Za=V.getTableLines(this.state.cell,!0,!1);for(ha=0;ha<Da.length;ha++)mxUtils.bind(this,function($a){var Pa=Da[$a],Na=null;if(V.isCellMovable(Pa.cell)){Na=$a<Da.length-1?Da[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na.cell):null;var jb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:
Na;Na=null!=Za[$a]?new k(Za[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Na=new mxHandle(Pa,"row-resize",null,Na);Na.tableHandle=!0;var cb=0;Na.shape.node.parentNode.insertBefore(Na.shape.node,Na.shape.node.parentNode.firstChild);Na.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Za[$a],0,cb),this.shape.updateBoundsFromLine();else{var db=
-V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ia;this.shape.bounds.x=oa.x+($a==Da.length-1?0:db.x*ia);this.shape.bounds.width=oa.width-($a==Da.length-1?0:db.width+db.x+ia)}this.shape.redraw()}};var ab=!1;Na.setPosition=function(db,lb,kb){cb=Math.max(Graph.minTableRowHeight-db.height,lb.y-db.y-db.height);ab=mxEvent.isShiftDown(kb.getEvent());null!=jb&&ab&&(cb=Math.min(cb,jb.height-Graph.minTableRowHeight))};Na.execute=function(db){if(0!=
-cb)V.setTableRowHeight(this.state.cell,cb,!ab);else if(!R.blockDelayedSelection){var lb=V.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(lb,db)}cb=0};Na.reset=function(){cb=0}}y.push(Na)})(fa);for(fa=0;fa<Ia.length;fa++)mxUtils.bind(this,function($a){var Pa=V.view.getState(Ia[$a]),Na=V.getCellGeometry(Ia[$a]),jb=null!=Na.alternateBounds?Na.alternateBounds:Na;null==Pa&&(Pa=new mxCellState(V.view,Ia[$a],V.getCellStyle(Ia[$a])),Pa.x=oa.x+Na.x*ia,Pa.y=oa.y+Na.y*ia,
-Pa.width=jb.width*ia,Pa.height=jb.height*ia,Pa.updateCachedBounds());Na=$a<Ia.length-1?Ia[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na):null;var cb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:Na;Na=null!=Ya[$a]?new k(Ya[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Na);Pa.tableHandle=!0;var ab=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);
-Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Ya[$a],ab,0),this.shape.updateBoundsFromLine();else{var lb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(jb.width+ab)*ia;this.shape.bounds.y=oa.y+($a==Ia.length-1?0:lb.y*ia);this.shape.bounds.height=oa.height-($a==Ia.length-1?0:(lb.height+lb.y)*ia)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(lb,kb,pb){ab=
-Math.max(Graph.minTableColumnWidth-jb.width,kb.x-lb.x-jb.width);db=mxEvent.isShiftDown(pb.getEvent());null==cb||db||(ab=Math.min(ab,cb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=ab)V.setTableColumnWidth(this.state.cell,ab,db);else if(!R.blockDelayedSelection){var kb=V.getCellAt(lb.getGraphX(),lb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(kb,lb)}ab=0};Pa.positionChanged=function(){};Pa.reset=function(){ab=0};y.push(Pa)})(fa)}}return null!=y?y.reverse():null};var I=
-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){I.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)null!=this.moveHandles[O]&&(this.moveHandles[O].node.style.visibility=y?"":"hidden");if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
+V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ja;this.shape.bounds.x=oa.x+($a==Da.length-1?0:db.x*ja);this.shape.bounds.width=oa.width-($a==Da.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var ab=!1;Na.setPosition=function(db,lb,kb){cb=Math.max(Graph.minTableRowHeight-db.height,lb.y-db.y-db.height);ab=mxEvent.isShiftDown(kb.getEvent());null!=jb&&ab&&(cb=Math.min(cb,jb.height-Graph.minTableRowHeight))};Na.execute=function(db){if(0!=
+cb)V.setTableRowHeight(this.state.cell,cb,!ab);else if(!Q.blockDelayedSelection){var lb=V.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(lb,db)}cb=0};Na.reset=function(){cb=0}}y.push(Na)})(ha);for(ha=0;ha<Ia.length;ha++)mxUtils.bind(this,function($a){var Pa=V.view.getState(Ia[$a]),Na=V.getCellGeometry(Ia[$a]),jb=null!=Na.alternateBounds?Na.alternateBounds:Na;null==Pa&&(Pa=new mxCellState(V.view,Ia[$a],V.getCellStyle(Ia[$a])),Pa.x=oa.x+Na.x*ja,Pa.y=oa.y+Na.y*ja,
+Pa.width=jb.width*ja,Pa.height=jb.height*ja,Pa.updateCachedBounds());Na=$a<Ia.length-1?Ia[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na):null;var cb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:Na;Na=null!=Ya[$a]?new k(Ya[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Na);Pa.tableHandle=!0;var ab=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);
+Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Ya[$a],ab,0),this.shape.updateBoundsFromLine();else{var lb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(jb.width+ab)*ja;this.shape.bounds.y=oa.y+($a==Ia.length-1?0:lb.y*ja);this.shape.bounds.height=oa.height-($a==Ia.length-1?0:(lb.height+lb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(lb,kb,pb){ab=
+Math.max(Graph.minTableColumnWidth-jb.width,kb.x-lb.x-jb.width);db=mxEvent.isShiftDown(pb.getEvent());null==cb||db||(ab=Math.min(ab,cb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=ab)V.setTableColumnWidth(this.state.cell,ab,db);else if(!Q.blockDelayedSelection){var kb=V.getCellAt(lb.getGraphX(),lb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(kb,lb)}ab=0};Pa.positionChanged=function(){};Pa.reset=function(){ab=0};y.push(Pa)})(ha)}}return null!=y?y.reverse():null};var K=
+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){K.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)null!=this.moveHandles[O]&&(this.moveHandles[O].node.style.visibility=y?"":"hidden");if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.isMoveHandlesVisible();y&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():y||null==this.moveHandles||this.destroyMoveHandles();if(y&&null==this.moveHandles){for(y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var y=
-this.graph,O=y.model,R=[],V=0;V<O.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(fa){if(null!=fa&&O.isVertex(fa.cell)&&y.isCellMovable(fa.cell)){var ia=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ia=new mxImageShape(ia,this.rowHandleImage.src);ia.rowState=fa;ia.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ia.init(this.graph.getView().getOverlayPane());ia.node.style.cursor="move";mxEvent.addGestureListeners(ia.node,
-mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(fa.cell)||this.graph.selectCellForEvent(fa.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
-null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),fa.cell,oa),mxEvent.consume(oa))}));R.push(ia)}else R.push(null)})(this.graph.view.getState(O.getChildAt(this.state.cell,V)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
-function(){if(null!=this.cornerHandles){for(var y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
+this.graph,O=y.model,Q=[],V=0;V<O.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ha){if(null!=ha&&O.isVertex(ha.cell)&&y.isCellMovable(ha.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ha;ja.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,
+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ha.cell)||this.graph.selectCellForEvent(ha.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ha.cell,oa),mxEvent.consume(oa))}));Q.push(ja)}else Q.push(null)})(this.graph.view.getState(O.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
+function(){if(null!=this.cornerHandles){for(var y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var y=0;4>y;y++){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)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();
-y=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),O=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
-this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var fa=this.customHandles[V].shape.bounds,ia=fa.getCenterX(),oa=fa.getCenterY();if(Math.abs(this.state.x-ia)<fa.width/2||Math.abs(this.state.y-oa)<fa.height/2||Math.abs(this.state.x+this.state.width-ia)<fa.width/2||Math.abs(this.state.y+this.state.height-oa)<fa.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=
+y=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),O=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
+this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ha=this.customHandles[V].shape.bounds,ja=ha.getCenterX(),oa=ha.getCenterY();if(Math.abs(this.state.x-ja)<ha.width/2||Math.abs(this.state.y-oa)<ha.height/2||Math.abs(this.state.x+this.state.width-ja)<ha.width/2||Math.abs(this.state.y+this.state.height-oa)<ha.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=
this.sizers[0].bounds.width+O,y.y=this.sizers[0].bounds.height+O):y=P.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),O)+" x "+e(this.roundLength(this.bounds.height/
y),O)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
-"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var y=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
-var Z=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){Z.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,fa=this.graph.view.scale,ia=this.roundLength(O.x/fa-V.x);V=this.roundLength(O.y/fa-V.y);var oa=
-this.graph.view.unit;this.hint.innerHTML=e(ia,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(R.length/fa):e(R.length/fa,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*
-R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var y=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var Y=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){Y.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
+var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ha=this.graph.view.scale,ja=this.roundLength(O.x/ha-V.x);V=this.roundLength(O.y/ha-V.y);var oa=
+this.graph.view.unit;this.hint.innerHTML=e(ja,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ha):e(Q.length/ha,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*
+Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
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="'+
@@ -2703,63 +2702,63 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
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(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(y){return mxEvent.isMouseEvent(y.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==y.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};
-mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var R=
-null!=this.div&&"none"!=this.div.style.display,V=null,fa=null,ia=y=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,fa=this.first.y,y=(this.currentX-V)/this.graph.view.scale,ia=(this.currentY-fa)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(R){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();
-try{var oa=this.graph.getCellsBeyond(V,fa,this.graph.getDefaultParent(),!0,!0);for(R=0;R<oa.length;R++)if(this.graph.isCellMovable(oa[R])){var ta=this.graph.view.getState(oa[R]),ra=this.graph.getCellGeometry(oa[R]);null!=ta&&null!=ra&&(ra=ra.clone(),ra.translate(y,ia),this.graph.model.setGeometry(oa[R],ra))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,
-O){if(!O.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);y=mxUtils.getOffset(this.graph.container);R.x-=y.x;R.y-=y.y;y=O.getX()+R.x;R=O.getY()+R.y;var V=this.first.x-y,fa=this.first.y-R,ia=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ia||Math.abs(fa)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,R),this.isSpaceEvent(O)?(y=this.x+this.width,R=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||
-(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var Q=
+null!=this.div&&"none"!=this.div.style.display,V=null,ha=null,ja=y=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ha=this.first.y,y=(this.currentX-V)/this.graph.view.scale,ja=(this.currentY-ha)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(Q){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();
+try{var oa=this.graph.getCellsBeyond(V,ha,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var ta=this.graph.view.getState(oa[Q]),ra=this.graph.getCellGeometry(oa[Q]);null!=ta&&null!=ra&&(ra=ra.clone(),ra.translate(y,ja),this.graph.model.setGeometry(oa[Q],ra))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,
+O){if(!O.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);y=mxUtils.getOffset(this.graph.container);Q.x-=y.x;Q.y-=y.y;y=O.getX()+Q.x;Q=O.getY()+Q.y;var V=this.first.x-y,ha=this.first.y-Q,ja=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ja||Math.abs(ha)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,Q),this.isSpaceEvent(O)?(y=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||
+(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
-(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var ka=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ka.apply(this,arguments)};var va=(new Date).getTime(),ua=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(y,O,R,V){qa.apply(this,arguments);R!=this.currentTerminalState?(va=(new Date).getTime(),ua=0):ua=(new Date).getTime()-va;this.currentTerminalState=R};var Ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<ua||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(y,O,R){O=null!=y&&0==y;var V=this.state.getVisibleTerminalState(O);y=null!=y&&null!=this.state.absolutePoints&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,V,O):null;R=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
-null!=y&&null!=V?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ya=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,R,V){V=O==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return ya.apply(this,arguments)};var La=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),R=O.getParent(y[0]),V=this.graph.getCellGeometry(y[0]);if(O.isEdge(R)&&null!=V&&V.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return La.apply(this,
-arguments)};var za=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var y=za.apply(this,arguments),O=[],R=0;R<y.length;R++)"1"!=mxUtils.getValue(y[R].style,"part","0")&&O.push(y[R]);return O};var Ea=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),R=O.getParent(y.cell),V=this.graph.getCellGeometry(y.cell);return O.isEdge(R)&&null!=V&&V.relative&&2>y.width&&2>y.height&&null!=
-y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):Ea.apply(this,arguments)};var pa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var R=this.graph.getModel(),V=R.getParent(this.state.cell),fa=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!R.isEdge(V)||null==fa||!fa.relative||null==this.state||
+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var va=(new Date).getTime(),ua=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
+function(y,O,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(va=(new Date).getTime(),ua=0):ua=(new Date).getTime()-va;this.currentTerminalState=Q};var Ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<ua||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(y,O,Q){O=null!=y&&0==y;var V=this.state.getVisibleTerminalState(O);y=null!=y&&null!=this.state.absolutePoints&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,V,O):null;Q=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:
+null!=y&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ya=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,Q,V){V=O==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return ya.apply(this,arguments)};var La=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),Q=O.getParent(y[0]),V=this.graph.getCellGeometry(y[0]);if(O.isEdge(Q)&&null!=V&&V.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return La.apply(this,
+arguments)};var Aa=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var y=Aa.apply(this,arguments),O=[],Q=0;Q<y.length;Q++)"1"!=mxUtils.getValue(y[Q].style,"part","0")&&O.push(y[Q]);return O};var Ea=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),Q=O.getParent(y.cell),V=this.graph.getCellGeometry(y.cell);return O.isEdge(Q)&&null!=V&&V.relative&&2>y.width&&2>y.height&&null!=
+y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):Ea.apply(this,arguments)};var pa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ha=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ha||!ha.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&pa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&O==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
-y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(y,O){Aa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=y||null!=O&&0<O.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var V=R.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y){var fa=document.createElement("div");
-fa.style.display="flex";fa.style.alignItems="center";fa.appendChild(this.graph.createLinkForHint(y,null,this.state.cell));this.linkHint.appendChild(fa);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ia=R.cloneNode(!0);fa.appendChild(ia);mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ta){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ta)}));var oa=V.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener(oa,
-"click",mxUtils.bind(this,function(ta){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ta)}))}}if(null!=O)for(fa=0;fa<O.length;fa++)mxUtils.bind(this,function(ta,ra){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=y||0<ra?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(ta.getAttribute("href"),mxUtils.getTextContent(ta),this.state.cell));var Da=R.cloneNode(!0);xa.appendChild(Da);var Ia=mxUtils.bind(this,function(Ya){var Za=
+y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var za=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(y,O){za.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=y||null!=O&&0<O.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y){var ha=document.createElement("div");
+ha.style.display="flex";ha.style.alignItems="center";ha.appendChild(this.graph.createLinkForHint(y,null,this.state.cell));this.linkHint.appendChild(ha);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=Q.cloneNode(!0);ha.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ta){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ta)}));var oa=V.cloneNode(!0);ha.appendChild(oa);mxEvent.addListener(oa,
+"click",mxUtils.bind(this,function(ta){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ta)}))}}if(null!=O)for(ha=0;ha<O.length;ha++)mxUtils.bind(this,function(ta,ra){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=y||0<ra?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(ta.getAttribute("href"),mxUtils.getTextContent(ta),this.state.cell));var Da=Q.cloneNode(!0);xa.appendChild(Da);var Ia=mxUtils.bind(this,function(Ya){var Za=
document.createElement("div");Za.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var $a=Za.getElementsByTagName("a")[ra];if(null!=$a){if(null==Ya||""==Ya){for(Ya=$a.cloneNode(!0).firstChild;null!=Ya;)$a.parentNode.insertBefore(Ya.cloneNode(!0),$a),Ya=Ya.nextSibling;$a.parentNode.removeChild($a)}else $a.setAttribute("href",Ya);this.graph.labelChanged(this.state.cell,Za.innerHTML)}});mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){this.graph.showLinkDialog(ta.getAttribute("href")||
-"",mxResources.get("ok"),Ia);mxEvent.consume(Ya)}));Da=V.cloneNode(!0);xa.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Ia();mxEvent.consume(Ya)}));this.linkHint.appendChild(xa)})(O[fa],fa)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ta){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var wa=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var y=wa.apply(this,
+"",mxResources.get("ok"),Ia);mxEvent.consume(Ya)}));Da=V.cloneNode(!0);xa.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Ia();mxEvent.consume(Ya)}));this.linkHint.appendChild(xa)})(O[ha],ha)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ta){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var wa=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var y=wa.apply(this,
arguments);y.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return y};var Xa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Xa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Qa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)null!=
-this.moveHandles[y]&&(this.moveHandles[y].bounds.x=Math.round(this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-this.moveHandles[y].bounds.width/2),this.moveHandles[y].bounds.y=Math.round(this.moveHandles[y].rowState.y+(this.moveHandles[y].rowState.height-this.moveHandles[y].bounds.height)/2),this.moveHandles[y].redraw());if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,R=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=
-this.state.y-R+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Qa.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=R?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=O&&(R=Math.max(R,O.y+O.height)),this.linkHint.style.left=y.x+y.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);
+this.moveHandles[y]&&(this.moveHandles[y].bounds.x=Math.round(this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-this.moveHandles[y].bounds.width/2),this.moveHandles[y].bounds.y=Math.round(this.moveHandles[y].rowState.y+(this.moveHandles[y].rowState.height-this.moveHandles[y].bounds.height)/2),this.moveHandles[y].redraw());if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,Q=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=
+this.state.y-Q+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Qa.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=Q?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=O&&(Q=Math.max(Q,O.y+O.height)),this.linkHint.style.left=y.x+y.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Sa=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Sa.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=y.x+y.width/2+"px";this.linkHint.style.top=Math.round(y.y+y.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){Ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,z){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=z?z:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function n(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function c(){mxShape.call(this)}
-function f(){mxShape.call(this)}function l(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1}function t(){mxActor.call(this)}function q(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function H(){mxActor.call(this)}function N(){mxActor.call(this)}function L(){mxActor.call(this)}function J(){mxActor.call(this)}function Y(){mxActor.call(this)}function ha(){mxActor.call(this)}function ea(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function W(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function B(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}
-function P(){mxShape.call(this)}function T(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function ka(){mxShape.call(this)}function va(){mxShape.call(this)}function ua(){mxShape.call(this)}function qa(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function ya(){mxCylinder.call(this)}function La(){mxRectangleShape.call(this)}function za(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Aa(){mxActor.call(this)}function wa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Ma(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function fa(){mxEllipse.call(this)}
-function ia(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ta(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function $a(){mxActor.call(this)}function Pa(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function jb(d,p,z,u,x,C,E,da,M,sa){E+=M;var ma=u.clone();u.x-=x*(2*E+M);u.y-=C*(2*E+M);x*=E+M;C*=E+M;return function(){d.ellipse(ma.x-x-E,ma.y-C-E,2*E,2*E);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var z=this.line[p];null!=z&&(z=new mxRectangle(z.x,z.y,this.strokewidth,this.strokewidth),null==
+function(){Ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,z){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=z?z:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function n(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function f(){mxShape.call(this)}function l(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1}function t(){mxActor.call(this)}function q(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function H(){mxActor.call(this)}function N(){mxActor.call(this)}function L(){mxActor.call(this)}function I(){mxActor.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ka(){mxActor.call(this)}function da(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function B(){mxShape.call(this)}function K(){mxShape.call(this)}function T(){mxEllipse.call(this)}
+function P(){mxShape.call(this)}function U(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function la(){mxShape.call(this)}function va(){mxShape.call(this)}function ua(){mxShape.call(this)}function qa(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function ya(){mxCylinder.call(this)}function La(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function za(){mxActor.call(this)}function wa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Ma(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ha(){mxEllipse.call(this)}
+function ja(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ta(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function $a(){mxActor.call(this)}function Pa(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function jb(d,p,z,u,x,C,E,ea,M,sa){E+=M;var ma=u.clone();u.x-=x*(2*E+M);u.y-=C*(2*E+M);x*=E+M;C*=E+M;return function(){d.ellipse(ma.x-x-E,ma.y-C-E,2*E,2*E);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var z=this.line[p];null!=z&&(z=new mxRectangle(z.x,z.y,this.strokewidth,this.strokewidth),null==
d?d=z:d.add(z))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,z,u,x){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,z,u){if(null!=p){var x=null;d.begin();for(var C=0;C<p.length;C++){var E=p[C];null!=E&&(null==x?d.moveTo(E.x+z,E.y+u):null!=x&&d.lineTo(E.x+z,E.y+u));x=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var z=null,
u=0;u<this.line.length&&!p;u++){var x=this.line[u];null!=x&&null!=z&&(p=mxUtils.rectangleIntersectsSegment(d,z,x));z=x}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,p,z,u,x){var C=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,E=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-z));C||this.outline||!(E&&da<x||!E&&da<u)||this.paintForeground(d,p,z,u,x)};e.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.state){var C=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=C;C=E;E=da}d.rotate(-this.getShapeRotation(),
+!1,E=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-z));C||this.outline||!(E&&ea<x||!E&&ea<u)||this.paintForeground(d,p,z,u,x)};e.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.state){var C=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=C;C=E;E=ea}d.rotate(-this.getShapeRotation(),
C,E,p+u/2,z+x/2);s=this.scale;p=this.bounds.x/s;z=this.bounds.y/s;u=this.bounds.width/s;x=this.bounds.height/s;this.paintTableForeground(d,p,z,u,x)}};e.prototype.paintTableForeground=function(d,p,z,u,x){u=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(x=0;x<u.length;x++)b.prototype.paintTableLine(d,u[x],p,z)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(C,x);d.lineTo(0,x-C);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-C,0),d.lineTo(u,C),
-d.lineTo(C,C),d.close(),d.fill()),0!=da&&(d.setFillAlpha(Math.abs(da)),d.setFillColor(0>da?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,x),d.lineTo(0,x-C),d.close(),d.fill()),d.begin(),d.moveTo(C,x),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(u,C),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(C,x);d.lineTo(0,x-C);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-C,0),d.lineTo(u,C),
+d.lineTo(C,C),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,x),d.lineTo(0,x-C),d.close(),d.fill()),d.begin(),d.moveTo(C,x),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(u,C),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
m);var cb=Math.tan(mxUtils.toRadians(30)),ab=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(v,mxConnector);v.prototype.paintEdgeShape=function(d,p){var z=this.createMarker(d,p,!0),u=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=z&&z();null!=u&&u()};mxCellRenderer.registerShape("wire",v);mxUtils.extend(n,mxCylinder);n.prototype.size=6;n.prototype.paintVertexShape=function(d,p,z,u,x){d.setFillColor(this.stroke);var C=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(u-C),z+.5*(x-C),C,C);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};mxCellRenderer.registerShape("waypoint",
n);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/cb);d.translate((u-p)/2,(x-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*ab);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-ab)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(G,mxCylinder);G.prototype.size=20;G.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(u,x/(.5+cb));C?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-ab)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-ab)*p),d.lineTo(.5*p,(1-ab)*p)):(d.translate((u-p)/2,(x-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*ab),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-ab)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,-p);C||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,x-p),d.curveTo(u,x+p/3,0,x+p/3,0,x-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity=
+p,(.5-ab)*p),d.lineTo(.5*p,(1-ab)*p)):(d.translate((u-p)/2,(x-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*ab),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-ab)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,-p);C||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,x-p),d.curveTo(u,x+p/3,0,x+p/3,0,x-p),d.close())};R.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",R);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity=
0;F.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(0,x);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),
-d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.close(),d.fill()),d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(K,F);mxCellRenderer.registerShape("note2",K);K.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
+d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.close(),d.fill()),d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(J,F);mxCellRenderer.registerShape("note2",J);J.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
15;c.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;C=Math.min(u*Math.tan(C),.5*x);d.translate(p,z);d.begin();d.moveTo(.5*u,0);d.lineTo(u,C);d.lineTo(u,x-C);d.lineTo(.5*u,x);d.lineTo(0,x-C);d.lineTo(0,C);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,C);d.lineTo(.5*u,2*C);d.lineTo(u,C);d.moveTo(.5*u,2*C);d.lineTo(.5*u,x);d.stroke()};mxCellRenderer.registerShape("isoCube2",
c);mxUtils.extend(f,mxShape);f.prototype.size=15;f.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*
u,C,0,0,1,0,C),d.stroke())};mxCellRenderer.registerShape("cylinder2",f);mxUtils.extend(l,mxCylinder);l.prototype.size=15;l.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C)):(d.moveTo(0,0),d.arcTo(.5*u,C,0,0,0,.5*u,C),d.arcTo(.5*u,C,
0,0,0,u,0)),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*u,C,0,0,1,0,C),d.stroke()))};mxCellRenderer.registerShape("cylinder3",l);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u/2,.5*x,u,0);d.quadTo(.5*u,x/2,u,x);d.quadTo(u/2,.5*x,0,x);d.quadTo(.5*u,x/2,0,0);d.end()};mxCellRenderer.registerShape("switch",t);mxUtils.extend(q,
mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.isRoundable=function(){return!0};q.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var C=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,
-"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(M*=Math.min(u,x));M=Math.min(M,.5*u,.5*(x-z));p=Math.max(p,M);p=Math.min(u-M,p);E||(M=0);d.begin();"left"==C?(d.moveTo(Math.max(M,0),z),d.lineTo(Math.max(M,0),0),d.lineTo(p,0),d.lineTo(p,z)):(d.moveTo(u-p,z),d.lineTo(u-p,0),d.lineTo(u-Math.max(M,0),0),d.lineTo(u-Math.max(M,0),z));E?(d.moveTo(0,M+z),d.arcTo(M,M,0,0,1,M,z),d.lineTo(u-M,z),d.arcTo(M,M,0,0,1,u,M+z),
+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(M*=Math.min(u,x));M=Math.min(M,.5*u,.5*(x-z));p=Math.max(p,M);p=Math.min(u-M,p);E||(M=0);d.begin();"left"==C?(d.moveTo(Math.max(M,0),z),d.lineTo(Math.max(M,0),0),d.lineTo(p,0),d.lineTo(p,z)):(d.moveTo(u-p,z),d.lineTo(u-p,0),d.lineTo(u-Math.max(M,0),0),d.lineTo(u-Math.max(M,0),z));E?(d.moveTo(0,M+z),d.arcTo(M,M,0,0,1,M,z),d.lineTo(u-M,z),d.arcTo(M,M,0,0,1,u,M+z),
d.lineTo(u,x-M),d.arcTo(M,M,0,0,1,u-M,x),d.lineTo(M,x),d.arcTo(M,M,0,0,1,0,x-M)):(d.moveTo(0,z),d.lineTo(u,z),d.lineTo(u,x),d.lineTo(0,x));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(u-30,z+20),d.lineTo(u-20,z+10),d.lineTo(u-10,z+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(D,mxCylinder);D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);var C=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
@@ -2772,301 +2771,301 @@ mxUtils.getValue(this.style,"size",this.size),z=d.width,u=d.height;if(null==this
x?u*Math.max(0,Math.min(1,x)):db.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};l.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,
"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};D.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
-mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};K.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,p,z,u,x){p=
-"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(Y,mxActor);Y.prototype.size=
-.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
-x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(ha,mxActor);ha.prototype.size=.5;ha.prototype.redrawPath=function(d,p,z,u,x){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,x/2),new mxPoint(0,x/2),new mxPoint(p,x/2),new mxPoint(p,x),new mxPoint(u,x)],this.isRounded,
-z,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ha);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(d,p,z,u,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,x);d.fillAndStroke();d.rect(2*p,0,p,x);d.fillAndStroke();d.rect(4*p,0,p,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);aa.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};aa.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)};aa.prototype.quadTo=function(d,p,z,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=u};aa.prototype.curveTo=function(d,p,z,u,x,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=C};aa.prototype.arcTo=function(d,p,z,u,x,C,E){this.originalArcTo.apply(this.canvas,arguments);
-this.lastX=C;this.lastY=E};aa.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var z=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),x=Math.abs(p-this.lastY),C=Math.sqrt(u*u+x*x);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var E=Math.round(C/10),da=this.defaultVariation;5>E&&(E=5,da/=3);var M=z(d-this.lastX)*u/E;z=z(p-this.lastY)*x/E;u/=C;x/=C;for(C=0;C<E;C++){var sa=(Math.random()-
-.5)*da;this.originalLineTo.call(this.canvas,M*C+this.lastX-sa*x,z*C+this.lastY-sa*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};aa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var lb=mxShape.prototype.beforePaint;
-mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){kb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new aa(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
+mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};J.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,p,z,u,x){p=
+"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("parallelogram",I);mxUtils.extend(Z,mxActor);Z.prototype.size=
+.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
+x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.5;ia.prototype.redrawPath=function(d,p,z,u,x){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,x/2),new mxPoint(0,x/2),new mxPoint(p,x/2),new mxPoint(p,x),new mxPoint(u,x)],this.isRounded,
+z,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ia);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(d,p,z,u,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,x);d.fillAndStroke();d.rect(2*p,0,p,x);d.fillAndStroke();d.rect(4*p,0,p,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,z,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=u};ba.prototype.curveTo=function(d,p,z,u,x,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=C};ba.prototype.arcTo=function(d,p,z,u,x,C,E){this.originalArcTo.apply(this.canvas,arguments);
+this.lastX=C;this.lastY=E};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var z=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),x=Math.abs(p-this.lastY),C=Math.sqrt(u*u+x*x);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var E=Math.round(C/10),ea=this.defaultVariation;5>E&&(E=5,ea/=3);var M=z(d-this.lastX)*u/E;z=z(p-this.lastY)*x/E;u/=C;x/=C;for(C=0;C<E;C++){var sa=(Math.random()-
+.5)*ea;this.originalLineTo.call(this.canvas,M*C+this.lastX-sa*x,z*C+this.lastY-sa*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var lb=mxShape.prototype.beforePaint;
+mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){kb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var pb=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"))&&pb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,z,u,x){if(null==d.handJiggle||
-d.handJiggle.constructor!=aa)fb.apply(this,arguments);else{var C=!0;null!=this.style&&(C="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(C||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)C||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?C=Math.min(u/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+d.handJiggle.constructor!=ba)fb.apply(this,arguments);else{var C=!0;null!=this.style&&(C="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(C||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)C||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?C=Math.min(u/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2)):(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.min(u*C,x*C)),d.moveTo(p+C,z),d.lineTo(p+u-C,z),d.quadTo(p+u,z,p+u,z+C),d.lineTo(p+u,z+x-C),d.quadTo(p+u,z+x,p+u-C,z+x),d.lineTo(p+C,z+x),d.quadTo(p,z+x,p,z+x-C),d.lineTo(p,z+C),d.quadTo(p,z,p+C,z)):(d.moveTo(p,z),d.lineTo(p+u,z),d.lineTo(p+u,z+x),d.lineTo(p,z+x),d.lineTo(p,z)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(na,mxRectangleShape);na.prototype.size=
.1;na.prototype.fixedSize=!1;na.prototype.isHtmlAllowed=function(){return!1};na.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,z=d.height;d=new mxRectangle(d.x,d.y,p,z);var u=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;u=Math.max(u,Math.min(p*x,z*x))}d.x+=Math.round(u);d.width-=Math.round(2*u);return d}return d};na.prototype.paintForeground=function(d,p,z,u,x){var C=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=C?Math.max(0,Math.min(u,E)):u*Math.max(0,Math.min(1,E));this.isRounded&&(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,
-Math.min(u*C,x*C)));E=Math.round(E);d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.moveTo(p+u-E,z);d.lineTo(p+u-E,z+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(W,mxRectangleShape);W.prototype.paintBackground=function(d,p,z,u,x){d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};W.prototype.paintForeground=function(d,p,z,u,x){};mxCellRenderer.registerShape("transparent",
-W);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(d,p,z,u,x){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));var C=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),da=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-z),new mxPoint(Math.min(u,C+da),x-z),new mxPoint(E,x),new mxPoint(Math.max(0,C),x-z),new mxPoint(0,x-z)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",
-ba);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.fixedSize=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,
-0),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(0,x),new mxPoint(p,x/2)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(ca,mxHexagon);ca.prototype.size=.25;ca.prototype.fixedSize=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*x),new mxPoint(u-p,x),new mxPoint(p,x),new mxPoint(0,.5*x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("hexagon",ca);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,p,z,u,x){var C=Math.min(u/5,x/5)+1;d.begin();d.moveTo(p+u/2,z+C);d.lineTo(p+
-u/2,z+x-C);d.moveTo(p+C,z+x/2);d.lineTo(p+u-C,z+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",la);var ob=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=
-function(d,p,z,u,x){ob.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var C=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&(d.setShadow(!1),ob.apply(this,[d,p,z,u,x]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
-return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};Q.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var C=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);C=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+C]];if(null!=E){var da=this.style["symbol"+C+"Align"],
-M=this.style["symbol"+C+"VerticalAlign"],sa=this.style["symbol"+C+"Width"],ma=this.style["symbol"+C+"Height"],Wa=this.style["symbol"+C+"Spacing"]||0,gb=this.style["symbol"+C+"VSpacing"]||Wa,bb=this.style["symbol"+C+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(u+this.strokewidth,x+this.strokewidth),Wa+=bb,gb+=bb);bb=p;var Fa=z;bb=da==mxConstants.ALIGN_CENTER?bb+(u-sa)/2:da==mxConstants.ALIGN_RIGHT?bb+(u-sa-Wa):bb+Wa;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-ma)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-ma-gb):
-Fa+gb;d.save();da=new E;da.style=this.style;E.prototype.paintVertexShape.call(da,d,bb,Fa,sa,ma);d.restore()}C++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Q);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,p,z,u,x,C){C?(d.moveTo(0,0),d.lineTo(u/2,x/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(B,mxShape);B.prototype.paintBackground=
-function(d,p,z,u,x){d.translate(p,z);d.ellipse(u/4,0,u/2,x/4);d.fillAndStroke();d.begin();d.moveTo(u/2,x/4);d.lineTo(u/2,2*x/3);d.moveTo(u/2,x/3);d.lineTo(0,x/3);d.moveTo(u/2,x/3);d.lineTo(u,x/3);d.moveTo(u/2,2*x/3);d.lineTo(0,x);d.moveTo(u/2,2*x/3);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();
-d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(u/6,x/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,z+x);d.lineTo(p+7*u/8,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=
-function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(u,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,x/8,u,7*x/8);d.fillAndStroke()};T.prototype.paintForeground=
-function(d,p,z,u,x){d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(X,mxRectangleShape);X.prototype.size=40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};X.prototype.paintBackground=function(d,p,z,u,x){var C=Math.max(0,Math.min(x,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,z,u,C):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,p,z,u,C),d.restore()));C<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,z+C),d.lineTo(p+u/2,z+x),d.end(),d.stroke())};X.prototype.paintForeground=
-function(d,p,z,u,x){var C=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,z,u,Math.min(x,C))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(Z,mxShape);Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&
-0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};Z.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(d,p,z,u,x){var C=this.corner,E=Math.min(u,Math.max(C,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),
-da=Math.min(x,Math.max(1.5*C,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(p,z,u,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,z,u,x),d.setGradient(this.fill,this.gradient,p,z,u,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,
-z);d.lineTo(p+E,z);d.lineTo(p+E,z+Math.max(0,da-1.5*C));d.lineTo(p+Math.max(0,E-C),z+da);d.lineTo(p,z+da);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+E,z);d.lineTo(p+u,z);d.lineTo(p+u,z+x);d.lineTo(p,z+x);d.lineTo(p,z+da);d.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(d,p,z,u){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
-function(d,p,z,u){u=X.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;z.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,z.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,z,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,z,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return z.x<d.getCenterX()&&(u=-1*(u+1)),new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,z.y)));z.y<d.getCenterY()&&(u=-1*(u+1));return new mxPoint(Math.min(d.x+
-d.width,Math.max(d.x,z.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,z,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ba.prototype.size))*p.view.scale))),p.style),p,z,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,
-p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?J.prototype.fixedSize:J.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,da=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M,da+x),new mxPoint(E+
-M,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da)]):(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M,da),new mxPoint(E+M-x,da+sa),new mxPoint(E,da+sa),new mxPoint(E+x,da)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(da,d,z)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,z,u){var x="0"!=
-mxUtils.getValue(p.style,"fixedSize","0"),C=x?Y.prototype.fixedSize:Y.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,da=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M-x,da),new mxPoint(E+M,da+sa),new mxPoint(E,da+sa),new mxPoint(E+
-x,da)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M,da),new mxPoint(E+M-x,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,da)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da+x),new mxPoint(E+M,da),new mxPoint(E+M,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+
-M,da+x),new mxPoint(E+M,da+sa-x),new mxPoint(E,da+sa),new mxPoint(E,da)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(da,d,z)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ja.prototype.fixedSize:ja.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=
-d.x,da=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M-x,da),new mxPoint(E+M,d),new mxPoint(E+M-x,da+sa),new mxPoint(E,da+sa),new mxPoint(E+x,d),new mxPoint(E,da)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,
-C)),da=[new mxPoint(E+x,da),new mxPoint(E+M,da),new mxPoint(E+M-x,d),new mxPoint(E+M,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,d),new mxPoint(E+x,da)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da+x),new mxPoint(ma,da),new mxPoint(E+M,da+x),new mxPoint(E+M,da+sa),new mxPoint(ma,da+sa-x),new mxPoint(E,da+sa),new mxPoint(E,da+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(ma,da+
-x),new mxPoint(E+M,da),new mxPoint(E+M,da+sa-x),new mxPoint(ma,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(da,ma,z)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ca.prototype.fixedSize:ca.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=
-d.x,da=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(ma,da),new mxPoint(E+M,da+x),new mxPoint(E+M,da+sa-x),new mxPoint(ma,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da+x),new mxPoint(ma,da)]):(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,
-Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M-x,da),new mxPoint(E+M,d),new mxPoint(E+M-x,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,d),new mxPoint(E+x,da)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(da,ma,z)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-d.translate(p,z);d.ellipse((u-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(u/2,C);d.lineTo(u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ka);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.inset=2;va.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.begin();d.moveTo(u/2,C+E);d.lineTo(u/2,x);d.end();d.stroke();
-d.begin();d.moveTo((u-C)/2-E,C/2);d.quadTo((u-C)/2-E,C+E,u/2,C+E);d.quadTo((u+C)/2+E,C+E,(u+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",va);mxUtils.extend(ua,mxShape);ua.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ua);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;d.translate(p,z);d.ellipse(0,C,u-2*C,x-2*C);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));z=E/2;E=z+E/2;var da=Math.min(p,x-p),M=Math.min(da+2*p,x-p);C?(d.moveTo(z,da),d.lineTo(E,da),d.lineTo(E,da+p),d.lineTo(z,da+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,da+p),d.lineTo(0,da+p),d.lineTo(0,da),d.lineTo(z,da),d.close());d.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=
-32;ya.prototype.jettyHeight=12;ya.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var da=.3*x-p/2,M=.7*x-p/2;C?(d.moveTo(z,da),d.lineTo(E,da),d.lineTo(E,da+p),d.lineTo(z,da+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,
-M),d.lineTo(z,da+p),d.lineTo(0,da+p),d.lineTo(0,da),d.lineTo(z,da),d.close());d.end()};mxCellRenderer.registerShape("component",ya);mxUtils.extend(La,mxRectangleShape);La.prototype.paintForeground=function(d,p,z,u,x){var C=u/2,E=x/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+C,z),new mxPoint(p+u,z+E),new mxPoint(p+C,z+x),new mxPoint(p,z+E)],this.isRounded,da,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",La);mxUtils.extend(za,mxDoubleEllipse);za.prototype.outerStroke=!0;za.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.min(4,Math.min(u/5,x/5));0<u&&0<x&&(d.ellipse(p+C,z+C,u-2*C,x-2*C),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,z,u,x),d.stroke())};mxCellRenderer.registerShape("endState",za);mxUtils.extend(Ea,za);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(pa,mxArrowConnector);
-pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",pa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Aa,mxActor);Aa.prototype.size=30;Aa.prototype.isRoundable=function(){return!0};Aa.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("manualInput",Aa);mxUtils.extend(wa,mxRectangleShape);wa.prototype.dx=20;wa.prototype.dy=20;wa.prototype.isHtmlAllowed=function(){return!1};wa.prototype.paintForeground=function(d,p,z,u,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var C=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;C=Math.max(C,Math.min(u*E,x*E))}E=Math.max(C,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));C=Math.max(C,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,z+C);d.lineTo(p+u,z+C);d.end();d.stroke();d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",wa);
-mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.isRoundable=function(){return!0};Xa.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,
-0),new mxPoint(u,z),new mxPoint(p,z),new mxPoint(p,x),new mxPoint(0,x)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(u,0);d.lineTo(u,x);d.end();d.moveTo(0,x/2);d.lineTo(u,x/2);d.end()};mxCellRenderer.registerShape("crossbar",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=
-function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint((u+p)/2,z),new mxPoint((u+p)/2,x),new mxPoint((u-p)/2,x),new mxPoint((u-p)/2,z),new mxPoint(0,
-z)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("tee",Ra);mxUtils.extend(Sa,mxActor);Sa.prototype.arrowWidth=.3;Sa.prototype.arrowSize=.2;Sa.prototype.isRoundable=function(){return!0};Sa.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(0,C)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Sa);mxUtils.extend(Ha,mxActor);Ha.prototype.isRoundable=function(){return!0};Ha.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(p,0),new mxPoint(p,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(p,C),new mxPoint(p,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",Ha);mxUtils.extend(Ma,mxActor);Ma.prototype.size=
-.1;Ma.prototype.fixedSize=20;Ma.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,x/2,u,x);d.lineTo(p,x);d.quadTo(p-2*p,x/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ma);mxUtils.extend(y,mxActor);y.prototype.redrawPath=
-function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.quadTo(u/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,.8*p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-p),new mxPoint(u/2,x),new mxPoint(0,x-p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/2,z+x);d.lineTo(p+u,z+x);d.end();d.stroke()};
-mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,z);d.lineTo(p+u/2,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ia);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,z+.145*x);d.lineTo(p+.855*u,z+.855*x);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,z+.145*x);d.lineTo(p+.145*u,z+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(d,p,z,u,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",
-ta);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,z,u,x){d.begin();d.moveTo(p,z);d.lineTo(p+u,z);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,z+x);d.lineTo(p+u,z+x);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,p,z,u,x){var C=d.state.strokeWidth/2,E=10+2*C,da=z+x-E/2;d.begin();d.moveTo(p,z);d.lineTo(p,z+x);d.moveTo(p+C,da);d.lineTo(p+
-C+E,da-E/2);d.moveTo(p+C,da);d.lineTo(p+C+E,da+E/2);d.moveTo(p+C,da);d.lineTo(p+u-C,da);d.moveTo(p+u,z);d.lineTo(p+u,z+x);d.moveTo(p+u-C,da);d.lineTo(p+u-E-C,da-E/2);d.moveTo(p+u-C,da);d.lineTo(p+u-E-C,da+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(d,p,z,u,x){this.outline||d.setStrokeColor(null);if(null!=this.style){var C=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;
-"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||da||sa||ma||M?(d.rect(p,z,u,x),d.fill(),d.pointerEvents=C,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,z),this.outline||da?d.lineTo(p+u,z):d.moveTo(p+
-u,z),this.outline||sa?d.lineTo(p+u,z+x):d.moveTo(p+u,z+x),this.outline||ma?d.lineTo(p,z+x):d.moveTo(p,z+x),(this.outline||M)&&d.lineTo(p,z),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,z),d.lineTo(p+
-u/2,z+x)):(d.moveTo(p,z+x/2),d.lineTo(p+u,z+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ia);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,u);var C=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));p=(x-C)/2;z=p+C;var E=(u-C)/2;C=E+C;d.moveTo(0,p);d.lineTo(E,p);d.lineTo(E,0);d.lineTo(C,0);d.lineTo(C,p);d.lineTo(u,p);d.lineTo(u,z);d.lineTo(C,z);d.lineTo(C,x);d.lineTo(E,x);d.lineTo(E,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend($a,mxActor);$a.prototype.size=.25;$a.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);z=Math.min(u-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,x/2);d.lineTo(z,
-0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(z,x);d.close();d.end()};mxCellRenderer.registerShape("display",$a);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",
-type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",
-dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",
-dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",
-type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
-dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);this.strictDrawShape(d,0,0,u,x)};Pa.prototype.strictDrawShape=function(d,p,z,u,x,C){var E=C&&C.rectStyle?C.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=C&&C.absoluteCornerSize?C.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),M=C&&C.size?C.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=C&&C.rectOutline?
-C.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=C&&C.indent?C.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=C&&C.dashed?C.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=C&&C.dashPattern?C.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=C&&C.relIndent?C.relIndent:Math.max(0,Math.min(50,ma)),Fa=C&&C.top?C.top:mxUtils.getValue(this.style,"top",!0),Ka=C&&C.right?C.right:mxUtils.getValue(this.style,"right",
-!0),Ja=C&&C.bottom?C.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=C&&C.left?C.left:mxUtils.getValue(this.style,"left",!0),Oa=C&&C.topLeftStyle?C.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=C&&C.topRightStyle?C.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=C&&C.bottomRightStyle?C.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=C&&C.bottomLeftStyle?C.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle",
-"default"),Fb=C&&C.fillColor?C.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");C&&C.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=C&&C.strokeWidth?C.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=C&&C.fillColor2?C.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=C&&C.gradientColor2?C.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=C&&C.gradientDirection2?C.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2",
-"south"),Ib=C&&C.opacity?C.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));C=Pa.prototype;d.setDashed(Wa);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*u,M);da||(M=Jb*Math.min(u,x)/100);M=Math.min(M,.5*Math.min(u,x));da||(ma=Math.min(bb*Math.min(u,x)/100));ma=Math.min(ma,.5*Math.min(u,x)-M);(Fa||Ka||Ja||Ga)&&"frame"!=sa&&(d.begin(),Fa?C.moveNW(d,p,z,u,x,E,Oa,M,Ga):d.moveTo(0,0),Fa&&C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,
-Ta,M,Ka),Ka&&C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),Ja&&C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),Ga&&C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Wa=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Wa=0),d.setGradient(Db,Eb,0,0,u,x,Hb,da,Wa),d.begin(),Fa?C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga):d.moveTo(ma,0),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),Ga&&Ja&&C.paintSWInner(d,p,z,u,x,
-E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),Ja&&Ka&&C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),Ka&&Fa&&C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),Fa&&Ga&&C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),d.fill(),"none"==Fb&&(d.begin(),C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga),d.stroke()));Fa||Ka||Ja||!Ga?Fa||Ka||!Ja||Ga?!Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,
-x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
-p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa||!Ka||Ja||Ga?!Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),
-d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,
-p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,
-M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,
-p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,
-p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa||Ka||Ja||Ga?Fa&&!Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,
-p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,
-p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):
-Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):
-(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&!Ga?"frame"!=
-sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,
-Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,
-p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,
-E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,
-p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,
-p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&Ga&&("frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,
-z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close()),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,
-p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),
-d.fillAndStroke())):"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,
-p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,
-M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,
-ma,Ja,Ga),d.close(),d.fillAndStroke());d.begin();C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga);d.stroke()};Pa.prototype.moveNW=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,0):d.moveTo(0,da)};Pa.prototype.moveNE=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,0):d.moveTo(u-da,0)};Pa.prototype.moveSE=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,x):d.moveTo(u,x-da)};Pa.prototype.moveSW=
-function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,x):d.moveTo(da,x)};Pa.prototype.paintNW=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,da,0)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(da,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,z,u,x,C,E,da,M){"square"==E||
-"default"==E&&"square"==C||!M?d.lineTo(u,0):d.lineTo(u-da,0)};Pa.prototype.paintNE=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,u,da)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u,da);else d.lineTo(u,0)};Pa.prototype.paintRight=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,
-x):d.lineTo(u,x-da)};Pa.prototype.paintLeft=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,0):d.lineTo(0,da)};Pa.prototype.paintSE=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,u-da,x)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-da,x);else d.lineTo(u,x)};Pa.prototype.paintBottom=
-function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,x):d.lineTo(da,x)};Pa.prototype.paintSW=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,0,x-da)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(0,x-da);else d.lineTo(0,x)};Pa.prototype.paintNWInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==
-E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,M,.5*M+da);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,M,M+da);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(M,.5*M+da);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+da,M+da),d.lineTo(M,M+da)};Pa.prototype.paintTopInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,M):sa&&!ma?d.lineTo(M,0):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==
-C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(da+.5*M,M):d.lineTo(da+M,M):d.lineTo(0,M):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,u-da-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,u-da-M,M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-da-.5*M,M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-da-M,da+M),d.lineTo(u-da-M,M)};Pa.prototype.paintRightInner=
-function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u-M,0):sa&&!ma?d.lineTo(u,M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,da+.5*M):d.lineTo(u-M,da+M):d.lineTo(u-M,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,x):sa&&!ma?d.lineTo(0,x-M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==
-C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-da-.5*M):d.lineTo(M,x-da-M):d.lineTo(M,x):d.lineTo(0,x)};Pa.prototype.paintSEInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,u-M,x-da-.5*M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,u-M,x-da-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-M,x-da-.5*M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-da-M,x-da-M),d.lineTo(u-M,x-da-M)};Pa.prototype.paintBottomInner=
-function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u,x-M):sa&&!ma?d.lineTo(u-M,x):"square"==E||"default"==E&&"square"==C||!sa?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-da-.5*M,x-M):d.lineTo(u-da-M,x-M):d.lineTo(u,x)};Pa.prototype.paintSWInner=function(d,p,z,u,x,C,E,da,M,sa){if(!sa)d.lineTo(M,x);else if("square"==E||"default"==E&&"square"==C)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*
-M,0,0,0,da+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,da+M,x-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(da+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+da,x-da-M),d.lineTo(M+da,x-M)};Pa.prototype.moveSWInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==
-C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,x-da-M):d.moveTo(0,x-M)};Pa.prototype.lineSWInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,x-da-M):d.lineTo(0,x-M)};Pa.prototype.moveSEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==
-C?d.moveTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,x-da-M):d.moveTo(u-M,x)};Pa.prototype.lineSEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==
-C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,x-da-M):d.lineTo(u-M,x)};Pa.prototype.moveNEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.moveTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,da+M):d.moveTo(u,M)};Pa.prototype.lineNEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==
-C||sa?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,da+M):d.lineTo(u,M)};Pa.prototype.moveNWInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.moveTo(M,0):sa&&!ma?d.moveTo(0,M):"square"==E||"default"==E&&"square"==C?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,da+.5*M):("invRound"==
-E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,da+M):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,0):sa&&!ma?d.lineTo(0,M):"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,da+M):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,
-p,z,u,x,C,E,da,M,sa,ma,Wa,gb,bb,Fa){if("fold"==C||"fold"==E||"fold"==da||"fold"==M||"fold"==sa)("fold"==E||"default"==E&&"fold"==C)&&Wa&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==da||"default"==da&&"fold"==C)&&Wa&&gb&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==M||"default"==M&&"fold"==C)&&bb&&gb&&(d.moveTo(u-ma,x),d.lineTo(u-ma,x-ma),d.lineTo(u,x-ma)),("fold"==sa||"default"==sa&&"fold"==C)&&bb&&Fa&&(d.moveTo(0,x-ma),d.lineTo(ma,x-ma),d.lineTo(ma,x))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,
-Pa);Pa.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(d,p,z){for(var u=[],x=0;x<p.length;x++)u.push(mxUtils.clone(p[x]));x=d.state.dashed;var C=d.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[d,u,z]);3<=d.state.strokeWidth&&(u=mxUtils.getValue(this.style,"fillColor",null),null!=u&&(d.setStrokeColor(u),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,C),Na.prototype.origPaintEdgeShape.apply(this,
-[d,p,z])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),z=d.apply(this,arguments);"umlFrame"==p.style.shape&&z.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return z}}();mxMarker.addMarker("dash",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();
-d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.x+ma/2,bb=u.y+Wa/2;u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb-ma/2-Wa/2,bb-Wa/2+ma/2);d.lineTo(gb-ma/2+Wa/2,bb-Wa/2-ma/2);d.lineTo(gb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);d.lineTo(gb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,z,u,x,C,E,da,M,
-sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.moveTo(u.x-ma/2+Wa/2,u.y-Wa/2-ma/2);d.lineTo(u.x-Wa/2-3*ma/2,u.y-3*Wa/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",jb);mxMarker.addMarker("circlePlus",function(d,p,z,u,x,C,E,da,M,sa){var ma=u.clone(),Wa=jb.apply(this,arguments),gb=x*(E+2*M),bb=C*(E+2*M);return function(){Wa.apply(this,arguments);d.begin();d.moveTo(ma.x-x*M,ma.y-C*M);d.lineTo(ma.x-2*gb+
-x*M,ma.y-2*bb+C*M);d.moveTo(ma.x-gb-bb+C*M,ma.y-bb+gb-x*M);d.lineTo(ma.x+bb-gb-C*M,ma.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.clone();u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb.x-Wa,gb.y+ma);d.quadTo(u.x-Wa,u.y+ma,u.x,u.y);d.quadTo(u.x+Wa,u.y-ma,gb.x+Wa,gb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,z,u,x,C,E,da,M,sa){p=x*M*1.118;z=C*M*1.118;x*=E+M;C*=E+M;var ma=u.clone();ma.x-=p;ma.y-=
-z;u.x+=-x-p;u.y+=-C-z;return function(){d.begin();d.moveTo(ma.x,ma.y);da?d.lineTo(ma.x-x-C/2,ma.y-C+x/2):d.lineTo(ma.x+C/2-x,ma.y-C-x/2);d.lineTo(ma.x-x,ma.y-C);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,z,u,x,C,E,da,M,sa,ma){C*=da+sa;E*=da+sa;var Wa=x.clone();return function(){p.begin();p.moveTo(Wa.x,Wa.y);M?p.lineTo(Wa.x-C-E/d,Wa.y-E+C/d):p.lineTo(Wa.x+E/d-C,Wa.y-E-C/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var tb=
-function(d,p,z){return eb(d,["width"],p,function(u,x,C,E,da){da=d.shape.getEdgeWidth()*d.view.scale+z;return new mxPoint(E.x+x*u/4+C*da/2,E.y+C*u/4-x*da/2)},function(u,x,C,E,da,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));d.style.width=Math.round(2*u)/d.view.scale-z})},eb=function(d,p,z,u,x){return ib(d,p,function(C){var E=d.absolutePoints;if(null!=E&&0<E.length){var da=E.length-1;C=d.view.translate;var M=d.view.scale,sa=z?E[0]:E[da];E=z?E[1]:E[da-1];da=E.x-sa.x;var ma=E.y-sa.y,
-Wa=Math.sqrt(da*da+ma*ma);sa=u.call(this,Wa,da/Wa,ma/Wa,sa,E);return new mxPoint(sa.x/M-C.x,sa.y/M-C.y)}return null},function(C,E,da){var M=d.absolutePoints,sa=M.length-1;C=d.view.translate;var ma=d.view.scale,Wa=z?M[0]:M[sa];M=z?M[1]:M[sa-1];sa=M.x-Wa.x;var gb=M.y-Wa.y,bb=Math.sqrt(sa*sa+gb*gb);E.x=(E.x+C.x)*ma;E.y=(E.y+C.y)*ma;x.call(this,bb,sa/bb,gb/bb,Wa,M,E,da)})},nb=function(d,p){return function(z){return[eb(z,["startWidth"],!0,function(u,x,C,E,da){da=mxUtils.getNumber(z.style,"startWidth",
-d)*z.view.scale+p;return new mxPoint(E.x+x*u/4+C*da/2,E.y+C*u/4-x*da/2)},function(u,x,C,E,da,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));z.style.startWidth=Math.round(2*u)/z.view.scale-p})]}},mb=function(d){return function(p){return[ib(p,["arrowWidth","arrowSize"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Sa.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Sa.prototype.arrowSize)));return new mxPoint(z.x+
-(1-x)*z.width,z.y+(1-u)*z.height/2)},function(z,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(z.y+z.height/2-u.y)/z.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(z.x+z.width-u.x)/z.width))})]}},qb=function(d){return function(p){return[ib(p,["size"],function(z){var u=Math.max(0,Math.min(.5*z.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(z.x,z.y+u)},function(z,u){this.state.style.size=Math.max(0,u.y-z.y)},!0)]}},ub=function(d,p,z){return function(u){var x=
-[ib(u,["size"],function(C){var E=Math.max(0,Math.min(C.width,Math.min(C.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(C.x+E,C.y+E)},function(C,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(C.width,E.x-C.x),Math.min(C.height,E.y-C.y)))/d)},!1)];z&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},zb=function(d,p,z,u,x){z=null!=z?z:.5;return function(C){var E=[ib(C,["size"],function(da){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,sa*(M?1:da.width))),da.getCenterY())},function(da,M,sa){da=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?M.x-da.x:Math.max(0,Math.min(z,(M.x-da.x)/da.width));this.state.style.size=da},!1,u)];p&&mxUtils.getValue(C.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(vb(C));return E}},Cb=function(d,p,z){d=null!=d?d:.5;return function(u){var x=[ib(u,["size"],
-function(C){var E=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?z:p)));return new mxPoint(C.x+Math.min(.75*C.width*d,da*(E?.75:.75*C.width)),C.y+C.height/4)},function(C,E){C=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-C.x:Math.max(0,Math.min(d,(E.x-C.x)/C.width*.75));this.state.style.size=C},!1,!0)];mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},xb=
-function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p}},vb=function(d,p){return ib(d,[mxConstants.STYLE_ARCSIZE],function(z){var u=null!=p?p:z.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(z.x+z.width-Math.min(z.width/2,x),z.y+u)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(z.x+z.width-Math.min(Math.max(z.width/2,z.height/2),Math.min(z.width,z.height)*x),z.y+u)},function(z,u,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(z.width,2*(z.x+z.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(z.width-u.x+z.x)/Math.min(z.width,z.height))))})},ib=function(d,p,z,u,
-x,C,E){var da=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);E&&E(sa)};da.getPosition=z;da.setPosition=u;da.ignoreGrid=null!=x?x:!0;if(C){var M=da.positionChanged;da.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return da},hb={link:function(d){return[tb(d,!0,10),tb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,z=[];
-mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,da){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,
-E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<
-p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,da){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,da,
-M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||
-(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,da){u=(d.shape.getEdgeWidth()-
-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*
-u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,da){u=
-(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;
-d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-
-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return z},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(vb(d,z/2))}p.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(u){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,x))):new mxPoint(u.x+Math.max(0,Math.min(u.width,x)),u.getCenterY())},function(u,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(u.height,x.y-u.y))):Math.round(Math.max(0,Math.min(u.width,x.x-u.x)))},!1,null,function(u){var x=d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){u=
-x.getSwimlaneDirection(d.style);var C=x.model.getParent(d.cell);C=x.model.getChildCells(C,!0);for(var E=[],da=0;da<C.length;da++)C[da]!=d.cell&&x.isSwimlane(C[da])&&x.getSwimlaneDirection(x.getCurrentCellStyle(C[da]))==u&&E.push(C[da]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],E)}}));return p},label:xb(),ext:xb(),rectangle:xb(),triangle:xb(),rhombus:xb(),umlLifeline:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(p){var z=Math.max(Z.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),u=Math.max(1.5*Z.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(p.x+z,p.y+u)},function(p,
-z){this.state.style.width=Math.round(Math.max(Z.prototype.corner,Math.min(p.width,z.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(p.height,z.y-p.y)))},!1)]},process:function(d){var p=[ib(d,["size"],function(z){var u="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size));return u?new mxPoint(z.x+x,z.y+z.height/4):new mxPoint(z.x+z.width*x,z.y+z.height/4)},function(z,u){z="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*z.width,u.x-z.x)):Math.max(0,Math.min(.5,(u.x-z.x)/z.width));this.state.style.size=z},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},cross:function(d){return[ib(d,["size"],function(p){var z=Math.min(p.width,p.height);z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*z/2;return new mxPoint(p.getCenterX()-z,p.getCenterY()-z)},function(p,z){var u=Math.min(p.width,p.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-z.y)/u*2,Math.max(0,p.getCenterX()-z.x)/u*2)))})]},note:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},note2:function(d){return[ib(d,["size"],function(p){var z=
-Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},manualInput:function(d){var p=[ib(d,["size"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)));return new mxPoint(z.x+z.width/4,z.y+3*u/4)},function(z,
-u){this.state.style.size=Math.round(Math.max(0,Math.min(z.height,4*(u.y-z.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},dataStorage:function(d){return[ib(d,["size"],function(p){var z="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",z?Ma.prototype.fixedSize:Ma.prototype.size));return new mxPoint(p.x+p.width-u*(z?1:p.width),p.getCenterY())},function(p,z){p="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-z.x)):Math.max(0,Math.min(1,(p.x+p.width-z.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[ib(d,["size","position"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(z.x+x*z.width,z.y+z.height-
-u)},function(z,u){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(z.height,z.y+z.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["position2"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(z.x+u*z.width,z.y+z.height)},function(z,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(u.x-z.x)/z.width)))/100},!1),ib(d,["base"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position))),C=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(z.x+Math.min(z.width,x*z.width+C),z.y+z.height-u)},function(z,u){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(z.width,u.x-z.x-x*z.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},internalStorage:function(d){var p=[ib(d,["dx","dy"],function(z){var u=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,"dx",wa.prototype.dx))),x=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"dy",wa.prototype.dy)));return new mxPoint(z.x+u,z.y+x)},function(z,u){this.state.style.dx=Math.round(Math.max(0,
-Math.min(z.width,u.x-z.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(z.height,u.y-z.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ba.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(p.x+z/2,p.y+
-2*u)},function(p,z){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Xa.prototype.dy)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,
-Math.min(p.width,z.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(p.x+(p.width+z)/2,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,z.x-p.x-p.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},singleArrow:mb(1),doubleArrow:mb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(z=p.width-z);return new mxPoint(p.x+z,p.y+u)},function(p,z){var u=Math.max(0,Math.min(p.width,z.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},document:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},tape:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z*p.height/2)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(z.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[ib(d,
-["isoAngle"],function(p){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(z),.5*p.height))},function(p,z){this.state.style.isoAngle=Math.max(0,50*(z.y-p.y)/p.height)},!0)]},cylinder2:qb(f.prototype.size),cylinder3:qb(l.prototype.size),offPageConnector:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));
-return new mxPoint(p.getCenterX(),p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(z){var u=Math.max(0,Math.min(z.width/2,z.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(z.x+u,z.y+u)},function(z,u){this.state.style.size=Math.round(100*Math.max(0,Math.min(z.height/2,z.width/2,u.x-z.x)))/100})];d=Graph.createHandle(d,
-["indent"],function(z){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(z.x+.75*z.width,z.y+u*z.height/200)},function(z,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-z.y)/z.height)))/100});p.push(d);return p},step:zb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:zb(ca.prototype.size,!0,.5,!0,ca.prototype.fixedSize),curlyBracket:zb(ha.prototype.size,!1),display:zb($a.prototype.size,!1),cube:ub(1,
-m.prototype.size,!1),card:ub(.5,H.prototype.size,!0),loopLimit:ub(.5,R.prototype.size,!0),trapezoid:Cb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Cb(1,J.prototype.size,J.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&
-null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=hb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=hb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);
-d=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),wb=new mxPoint(1,0),yb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(yb),Math.sin(yb));var rb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,p,z,u,x){var C=d.view;u=null!=u&&0<u.length?u[0]:null;var E=d.absolutePoints,da=E[0];E=E[E.length-1];null!=u&&(u=C.transformControlPoint(d,u));
-null==da&&null!=p&&(da=new mxPoint(p.getCenterX(),p.getCenterY()));null==E&&null!=z&&(E=new mxPoint(z.getCenterX(),z.getCenterY()));var M=sb.x,sa=sb.y,ma=wb.x,Wa=wb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=da){d=function(Fa,Ka,Ja){Fa-=bb.x;var Ga=Ka-bb.y;Ka=(Wa*Fa-ma*Ga)/(M*Wa-sa*ma);Fa=(sa*Fa-M*Ga)/(sa*ma-M*Wa);gb?(Ja&&(bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka),x.push(bb)),bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa)):(Ja&&(bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa),x.push(bb)),
-bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka));x.push(bb)};var bb=da;null==u&&(u=new mxPoint(da.x+(E.x-da.x)/2,da.y+(E.y-da.y)/2));d(u.x,u.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Bb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var z=new mxElbowEdgeHandler(d);z.snapToTerminals=!1;return z}return Bb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.tan(mxUtils.toRadians(30)),x=(.5-u)/2;u=Math.min(p,z/(.5+u));p=(p-u)/2;z=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+u*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+(1-x)*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,z+.75*u));return d};c.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*z);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ba.prototype.getConstraints=function(d,p,z){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=p*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-u)));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));return d};l.prototype.getConstraints=function(d,p,z){d=[];p=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};q.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return d};wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;
-oa.prototype.constraints=mxEllipse.prototype.constraints;Ia.prototype.constraints=mxEllipse.prototype.constraints;Aa.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;$a.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(p,z/2),x=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Ba.prototype.getConstraints=function(d,p,z){p=parseFloat(mxUtils.getValue(d,
-"jettyWidth",Ba.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ba.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(z-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(z-.5*d,3.5*d))];z>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));z>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,p));z>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};R.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];B.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)];ya.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)];t.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)];N.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)];ja.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)];ka.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)];J.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Ra.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Xa.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return d};Qa.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)];Sa.prototype.getConstraints=
-function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));return d};Ha.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Za.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.min(z,p),x=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(z-x)/2;var C=u+x,E=(p-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,u));return d};X.prototype.constraints=null;y.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)];O.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(F){n.escape();F=n.deleteCells(n.getDeletableCells(n.getSelectionCells()),F);null!=F&&n.setSelectionCells(F)}function e(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),K=0;K<F.length;K++)n.cellLabelChanged(F[K],"")}finally{n.getModel().endUpdate()}}}function g(F,K,c,f,l){l.getModel().beginUpdate();try{var t=l.getCellGeometry(F);null!=t&&c&&f&&(c/=f,t=t.clone(),1<c?t.height=t.width/c:t.width=t.height*c,l.getModel().setGeometry(F,
-t));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[F]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{l.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,n=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&n.isEnabled()};this.addAction("new...",function(){n.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});var G=new Action("smartFit",function(){n.popupMenuHandler.hideMenu();var F=n.view.scale,
-K=n.container.scrollLeft,c=n.container.scrollTop,f=n.view.translate.x,l=n.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-n.view.scale)&&5>Math.abs(K-n.container.scrollLeft)&&5>Math.abs(c-n.container.scrollTop)&&f==n.view.translate.x&&l==n.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter");G.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",G);this.addAction("keyPressEnter",function(){n.isSelectionEmpty()?
-m.actions.get("smartFit").funct():n.isEnabled()&&n.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(F,K){try{var c=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));m.showDialog((new OpenDialog(this)).container,
+Math.min(u*C,x*C)));E=Math.round(E);d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.moveTo(p+u-E,z);d.lineTo(p+u-E,z+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(d,p,z,u,x){d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};X.prototype.paintForeground=function(d,p,z,u,x){};mxCellRenderer.registerShape("transparent",
+X);mxUtils.extend(ca,mxHexagon);ca.prototype.size=30;ca.prototype.position=.5;ca.prototype.position2=.5;ca.prototype.base=20;ca.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,z,u,x){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));var C=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-z),new mxPoint(Math.min(u,C+ea),x-z),new mxPoint(E,x),new mxPoint(Math.max(0,C),x-z),new mxPoint(0,x-z)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",
+ca);mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.fixedSize=20;ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,
+0),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(0,x),new mxPoint(p,x/2)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("step",ka);mxUtils.extend(da,mxHexagon);da.prototype.size=.25;da.prototype.fixedSize=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*x),new mxPoint(u-p,x),new mxPoint(p,x),new mxPoint(0,.5*x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("hexagon",da);mxUtils.extend(W,mxRectangleShape);W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(d,p,z,u,x){var C=Math.min(u/5,x/5)+1;d.begin();d.moveTo(p+u/2,z+C);d.lineTo(p+u/2,
+z+x-C);d.moveTo(p+C,z+x/2);d.lineTo(p+u-C,z+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",W);var ob=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=
+function(d,p,z,u,x){ob.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var C=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&(d.setShadow(!1),ob.apply(this,[d,p,z,u,x]))}};mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
+return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};S.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var C=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);C=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+C]];if(null!=E){var ea=this.style["symbol"+C+"Align"],
+M=this.style["symbol"+C+"VerticalAlign"],sa=this.style["symbol"+C+"Width"],ma=this.style["symbol"+C+"Height"],Wa=this.style["symbol"+C+"Spacing"]||0,gb=this.style["symbol"+C+"VSpacing"]||Wa,bb=this.style["symbol"+C+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(u+this.strokewidth,x+this.strokewidth),Wa+=bb,gb+=bb);bb=p;var Fa=z;bb=ea==mxConstants.ALIGN_CENTER?bb+(u-sa)/2:ea==mxConstants.ALIGN_RIGHT?bb+(u-sa-Wa):bb+Wa;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-ma)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-ma-gb):
+Fa+gb;d.save();ea=new E;ea.style=this.style;E.prototype.paintVertexShape.call(ea,d,bb,Fa,sa,ma);d.restore()}C++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",S);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,p,z,u,x,C){C?(d.moveTo(0,0),d.lineTo(u/2,x/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(B,mxShape);B.prototype.paintBackground=
+function(d,p,z,u,x){d.translate(p,z);d.ellipse(u/4,0,u/2,x/4);d.fillAndStroke();d.begin();d.moveTo(u/2,x/4);d.lineTo(u/2,2*x/3);d.moveTo(u/2,x/3);d.lineTo(0,x/3);d.moveTo(u/2,x/3);d.lineTo(u,x/3);d.moveTo(u/2,2*x/3);d.lineTo(0,x);d.moveTo(u/2,2*x/3);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};K.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();
+d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(u/6,x/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,z+x);d.lineTo(p+7*u/8,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=
+function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(u,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,x/8,u,7*x/8);d.fillAndStroke()};U.prototype.paintForeground=
+function(d,p,z,u,x){d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};Y.prototype.paintBackground=function(d,p,z,u,x){var C=Math.max(0,Math.min(x,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,z,u,C):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=Y&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,p,z,u,C),d.restore()));C<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,z+C),d.lineTo(p+u/2,z+x),d.end(),d.stroke())};Y.prototype.paintForeground=
+function(d,p,z,u,x){var C=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,z,u,Math.min(x,C))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&
+0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,p,z,u,x){var C=this.corner,E=Math.min(u,Math.max(C,parseFloat(mxUtils.getValue(this.style,"width",
+this.width)))),ea=Math.min(x,Math.max(1.5*C,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(p,z,u,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,z,u,x),d.setGradient(this.fill,this.gradient,p,z,u,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;
+d.begin();d.moveTo(p,z);d.lineTo(p+E,z);d.lineTo(p+E,z+Math.max(0,ea-1.5*C));d.lineTo(p+Math.max(0,E-C),z+ea);d.lineTo(p,z+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+E,z);d.lineTo(p+u,z);d.lineTo(p+u,z+x);d.lineTo(p,z+x);d.lineTo(p,z+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,p,z,u){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);
+mxPerimeter.LifelinePerimeter=function(d,p,z,u){u=Y.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;z.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,z.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,z,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
+mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,z,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return z.x<d.getCenterX()&&(u=-1*(u+1)),new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,z.y)));z.y<d.getCenterY()&&
+(u=-1*(u+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,z.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,z,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ca.prototype.size))*p.view.scale))),p.style),p,z,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);
+mxPerimeter.ParallelogramPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?I.prototype.fixedSize:I.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=
+[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]):(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=
+function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,ea+sa),
+new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,
+C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ka.prototype.fixedSize:ka.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
+"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,d),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,
+Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,d),new mxPoint(E+M,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(ma,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),
+ea=[new mxPoint(E,ea),new mxPoint(ma,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?da.prototype.fixedSize:da.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
+"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x),new mxPoint(ma,ea)]):
+(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,
+"size",this.size));d.translate(p,z);d.ellipse((u-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(u/2,C);d.lineTo(u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.inset=2;va.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.begin();d.moveTo(u/2,C+E);d.lineTo(u/
+2,x);d.end();d.stroke();d.begin();d.moveTo((u-C)/2-E,C/2);d.quadTo((u-C)/2-E,C+E,u/2,C+E);d.quadTo((u+C)/2+E,C+E,(u+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",va);mxUtils.extend(ua,mxShape);ua.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ua);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,
+p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.ellipse(0,C,u-2*C,x-2*C);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));
+p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=Math.min(p,x-p),M=Math.min(ea+2*p,x-p);C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("module",
+Ba);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=32;ya.prototype.jettyHeight=12;ya.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=.3*x-p/2,M=.7*x-p/2;C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,
+x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("component",ya);mxUtils.extend(La,mxRectangleShape);La.prototype.paintForeground=function(d,p,z,u,x){var C=u/2,E=x/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+C,z),new mxPoint(p+u,z+E),new mxPoint(p+C,z+x),new mxPoint(p,z+E)],this.isRounded,
+ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",La);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.min(4,Math.min(u/5,x/5));0<u&&0<x&&(d.ellipse(p+C,z+C,u-2*C,x-2*C),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,z,u,x),d.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=
+!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(pa,mxArrowConnector);pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",pa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(za,mxActor);za.prototype.size=30;za.prototype.isRoundable=function(){return!0};
+za.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("manualInput",za);mxUtils.extend(wa,mxRectangleShape);wa.prototype.dx=20;wa.prototype.dy=20;wa.prototype.isHtmlAllowed=function(){return!1};wa.prototype.paintForeground=
+function(d,p,z,u,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var C=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;C=Math.max(C,Math.min(u*E,x*E))}E=Math.max(C,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));C=Math.max(C,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,z+C);d.lineTo(p+u,z+C);d.end();d.stroke();d.begin();d.moveTo(p+E,z);d.lineTo(p+
+E,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",wa);mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.isRoundable=function(){return!0};Xa.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint(p,z),new mxPoint(p,x),new mxPoint(0,x)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(u,0);d.lineTo(u,x);d.end();d.moveTo(0,x/2);d.lineTo(u,x/2);d.end()};mxCellRenderer.registerShape("crossbar",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=
+20;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint((u+p)/2,z),new mxPoint((u+
+p)/2,x),new mxPoint((u-p)/2,x),new mxPoint((u-p)/2,z),new mxPoint(0,z)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("tee",Ra);mxUtils.extend(Sa,mxActor);Sa.prototype.arrowWidth=.3;Sa.prototype.arrowSize=.2;Sa.prototype.isRoundable=function(){return!0};Sa.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));
+z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(0,C)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Sa);mxUtils.extend(Ha,mxActor);Ha.prototype.isRoundable=function(){return!0};Ha.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",Sa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(p,0),new mxPoint(p,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(p,C),new mxPoint(p,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",
+Ha);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.1;Ma.prototype.fixedSize=20;Ma.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,x/2,u,x);d.lineTo(p,x);d.quadTo(p-2*p,x/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ma);
+mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.quadTo(u/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,
+p,z,u,x){p=Math.min(u/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,.8*p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,
+p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-p),new mxPoint(u/2,x),new mxPoint(0,x-p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+d.begin();d.moveTo(p+u/2,z+x);d.lineTo(p+u,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ha);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,z);d.lineTo(p+u/2,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=
+function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,z+.145*x);d.lineTo(p+.855*u,z+.855*x);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,z+.145*x);d.lineTo(p+.145*u,z+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(d,p,z,u,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+
+u,z+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",ta);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,z,u,x){d.begin();d.moveTo(p,z);d.lineTo(p+u,z);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,z+x);d.lineTo(p+u,z+x);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,p,z,u,x){var C=d.state.strokeWidth/2,E=10+2*C,ea=z+
+x-E/2;d.begin();d.moveTo(p,z);d.lineTo(p,z+x);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea-E/2);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea+E/2);d.moveTo(p+C,ea);d.lineTo(p+u-C,ea);d.moveTo(p+u,z);d.lineTo(p+u,z+x);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea-E/2);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(d,p,z,u,x){this.outline||d.setStrokeColor(null);if(null!=
+this.style){var C=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||ea||sa||ma||M?(d.rect(p,z,u,x),d.fill(),d.pointerEvents=C,d.setStrokeColor(this.stroke),d.setLineCap("square"),
+d.begin(),d.moveTo(p,z),this.outline||ea?d.lineTo(p+u,z):d.moveTo(p+u,z),this.outline||sa?d.lineTo(p+u,z+x):d.moveTo(p+u,z+x),this.outline||ma?d.lineTo(p,z+x):d.moveTo(p,z+x),(this.outline||M)&&d.lineTo(p,z),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==
+mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,z),d.lineTo(p+u/2,z+x)):(d.moveTo(p,z+x/2),d.lineTo(p+u,z+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ia);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,p,
+z,u,x){p=Math.min(x,u);var C=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-C)/2;z=p+C;var E=(u-C)/2;C=E+C;d.moveTo(0,p);d.lineTo(E,p);d.lineTo(E,0);d.lineTo(C,0);d.lineTo(C,p);d.lineTo(u,p);d.lineTo(u,z);d.lineTo(C,z);d.lineTo(C,x);d.lineTo(E,x);d.lineTo(E,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend($a,mxActor);$a.prototype.size=.25;$a.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);z=Math.min(u-
+p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,x/2);d.lineTo(z,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(z,x);d.close();d.end()};mxCellRenderer.registerShape("display",$a);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
+{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",
+defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",
+dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},
+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);this.strictDrawShape(d,0,0,u,x)};Pa.prototype.strictDrawShape=function(d,p,z,u,x,C){var E=C&&C.rectStyle?C.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=C&&C.absoluteCornerSize?C.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",
+this.absoluteCornerSize),M=C&&C.size?C.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=C&&C.rectOutline?C.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=C&&C.indent?C.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=C&&C.dashed?C.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=C&&C.dashPattern?C.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=C&&C.relIndent?C.relIndent:
+Math.max(0,Math.min(50,ma)),Fa=C&&C.top?C.top:mxUtils.getValue(this.style,"top",!0),Ka=C&&C.right?C.right:mxUtils.getValue(this.style,"right",!0),Ja=C&&C.bottom?C.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=C&&C.left?C.left:mxUtils.getValue(this.style,"left",!0),Oa=C&&C.topLeftStyle?C.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=C&&C.topRightStyle?C.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=C&&C.bottomRightStyle?C.bottomRightStyle:mxUtils.getValue(this.style,
+"bottomRightStyle","default"),Va=C&&C.bottomLeftStyle?C.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=C&&C.fillColor?C.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");C&&C.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=C&&C.strokeWidth?C.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=C&&C.fillColor2?C.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=C&&C.gradientColor2?C.gradientColor2:mxUtils.getValue(this.style,
+"gradientColor2","none"),Hb=C&&C.gradientDirection2?C.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=C&&C.opacity?C.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));C=Pa.prototype;d.setDashed(Wa);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*u,M);ea||(M=Jb*Math.min(u,x)/100);M=Math.min(M,.5*Math.min(u,x));ea||(ma=Math.min(bb*Math.min(u,x)/100));ma=Math.min(ma,.5*Math.min(u,x)-M);(Fa||Ka||Ja||Ga)&&"frame"!=
+sa&&(d.begin(),Fa?C.moveNW(d,p,z,u,x,E,Oa,M,Ga):d.moveTo(0,0),Fa&&C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),Ka&&C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),Ja&&C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),Ga&&C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Wa=ea=Ib,"none"==Db&&(ea=0),"none"==Eb&&(Wa=0),d.setGradient(Db,Eb,0,0,u,x,Hb,ea,Wa),d.begin(),Fa?C.moveNWInner(d,
+p,z,u,x,E,Oa,M,ma,Fa,Ga):d.moveTo(ma,0),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),Ga&&Ja&&C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),Ja&&Ka&&C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),Ka&&Fa&&C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),Fa&&Ga&&C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),d.fill(),"none"==Fb&&(d.begin(),C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga),d.stroke()));Fa||Ka||
+Ja||!Ga?Fa||Ka||!Ja||Ga?!Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,
+p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa||!Ka||Ja||Ga?!Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,
+p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):
+!Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),
+C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
+p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa||Ka||Ja||Ga?Fa&&!Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,
+u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,
+u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
+p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,
+p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,
+Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,
+Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,
+p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,
+p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&Ga&&("frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,
+M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close()),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,
+p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,
+p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke())):"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):
+"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,
+p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,
+Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke());d.begin();C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga);d.stroke()};Pa.prototype.moveNW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,0):d.moveTo(u-ea,0)};Pa.prototype.moveSE=function(d,
+p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,x):d.moveTo(u,x-ea)};Pa.prototype.moveSW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,x):d.moveTo(ea,x)};Pa.prototype.paintNW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&
+"fold"==C)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,0):d.lineTo(u-ea,0)};Pa.prototype.paintNE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u,ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u,ea);else d.lineTo(u,
+0)};Pa.prototype.paintRight=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,x):d.lineTo(u,x-ea)};Pa.prototype.paintLeft=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u-ea,x)}else("snip"==E||"default"==
+E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-ea,x);else d.lineTo(u,x)};Pa.prototype.paintBottom=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,x):d.lineTo(ea,x)};Pa.prototype.paintSW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,0,x-ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.lineTo(0,x-ea);else d.lineTo(0,x)};Pa.prototype.paintNWInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,M,.5*M+ea);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,M,M+ea);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(M,.5*M+ea);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,M+ea),d.lineTo(M,M+ea)};Pa.prototype.paintTopInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,
+M):sa&&!ma?d.lineTo(M,0):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(ea+.5*M,M):d.lineTo(ea+M,M):d.lineTo(0,M):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-ea-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-ea-M,M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-
+ea-.5*M,M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,ea+M),d.lineTo(u-ea-M,M)};Pa.prototype.paintRightInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u-M,0):sa&&!ma?d.lineTo(u,M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):d.lineTo(u-M,ea+M):d.lineTo(u-M,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,
+x):sa&&!ma?d.lineTo(0,x-M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):d.lineTo(M,x-ea-M):d.lineTo(M,x):d.lineTo(0,x)};Pa.prototype.paintSEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-M,x-ea-.5*M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-M,x-ea-M);else if("snip"==E||"default"==E&&"snip"==
+C)d.lineTo(u-M,x-ea-.5*M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,x-ea-M),d.lineTo(u-M,x-ea-M)};Pa.prototype.paintBottomInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u,x-M):sa&&!ma?d.lineTo(u-M,x):"square"==E||"default"==E&&"square"==C||!sa?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-ea-.5*M,x-M):d.lineTo(u-ea-M,x-M):d.lineTo(u,x)};Pa.prototype.paintSWInner=function(d,p,z,u,x,C,E,ea,M,sa){if(!sa)d.lineTo(M,
+x);else if("square"==E||"default"==E&&"square"==C)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,ea+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,ea+M,x-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(ea+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,x-ea-M),d.lineTo(M+ea,x-M)};Pa.prototype.moveSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(M,
+x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,x-ea-M):d.moveTo(0,x-M)};Pa.prototype.lineSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.lineTo(M,x-ea-M):d.lineTo(0,x-M)};Pa.prototype.moveSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,x-ea-M):d.moveTo(u-M,x)};Pa.prototype.lineSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,
+x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,x-ea-M):d.lineTo(u-M,x)};Pa.prototype.moveNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.moveTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.moveTo(u-M,ea+M):d.moveTo(u,M)};Pa.prototype.lineNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,ea+M):d.lineTo(u,M)};Pa.prototype.moveNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.moveTo(M,0):sa&&!ma?d.moveTo(0,M):"square"==
+E||"default"==E&&"square"==C?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,ea+M):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,0):sa&&!ma?d.lineTo(0,M):"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,
+ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,ea+M):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,z,u,x,C,E,ea,M,sa,ma,Wa,gb,bb,Fa){if("fold"==C||"fold"==E||"fold"==ea||"fold"==M||"fold"==sa)("fold"==E||"default"==E&&"fold"==C)&&Wa&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==C)&&Wa&&gb&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==M||"default"==M&&"fold"==C)&&bb&&gb&&(d.moveTo(u-
+ma,x),d.lineTo(u-ma,x-ma),d.lineTo(u,x-ma)),("fold"==sa||"default"==sa&&"fold"==C)&&bb&&Fa&&(d.moveTo(0,x-ma),d.lineTo(ma,x-ma),d.lineTo(ma,x))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(d,p,z){for(var u=[],x=0;x<p.length;x++)u.push(mxUtils.clone(p[x]));x=d.state.dashed;var C=d.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,
+[d,u,z]);3<=d.state.strokeWidth&&(u=mxUtils.getValue(this.style,"fillColor",null),null!=u&&(d.setStrokeColor(u),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,C),Na.prototype.origPaintEdgeShape.apply(this,[d,p,z])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),z=d.apply(this,arguments);"umlFrame"==
+p.style.shape&&z.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return z}}();mxMarker.addMarker("dash",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.x+ma/2,bb=u.y+Wa/2;u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb-ma/2-
+Wa/2,bb-Wa/2+ma/2);d.lineTo(gb-ma/2+Wa/2,bb-Wa/2-ma/2);d.lineTo(gb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);d.lineTo(gb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.moveTo(u.x-ma/2+Wa/2,u.y-Wa/2-ma/2);d.lineTo(u.x-Wa/2-3*ma/2,u.y-3*Wa/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",jb);
+mxMarker.addMarker("circlePlus",function(d,p,z,u,x,C,E,ea,M,sa){var ma=u.clone(),Wa=jb.apply(this,arguments),gb=x*(E+2*M),bb=C*(E+2*M);return function(){Wa.apply(this,arguments);d.begin();d.moveTo(ma.x-x*M,ma.y-C*M);d.lineTo(ma.x-2*gb+x*M,ma.y-2*bb+C*M);d.moveTo(ma.x-gb-bb+C*M,ma.y-bb+gb-x*M);d.lineTo(ma.x+bb-gb-C*M,ma.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.clone();u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb.x-
+Wa,gb.y+ma);d.quadTo(u.x-Wa,u.y+ma,u.x,u.y);d.quadTo(u.x+Wa,u.y-ma,gb.x+Wa,gb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,z,u,x,C,E,ea,M,sa){p=x*M*1.118;z=C*M*1.118;x*=E+M;C*=E+M;var ma=u.clone();ma.x-=p;ma.y-=z;u.x+=-x-p;u.y+=-C-z;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-x-C/2,ma.y-C+x/2):d.lineTo(ma.x+C/2-x,ma.y-C-x/2);d.lineTo(ma.x-x,ma.y-C);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,
+z,u,x,C,E,ea,M,sa,ma){C*=ea+sa;E*=ea+sa;var Wa=x.clone();return function(){p.begin();p.moveTo(Wa.x,Wa.y);M?p.lineTo(Wa.x-C-E/d,Wa.y-E+C/d):p.lineTo(Wa.x+E/d-C,Wa.y-E-C/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var tb=function(d,p,z){return eb(d,["width"],p,function(u,x,C,E,ea){ea=d.shape.getEdgeWidth()*d.view.scale+z;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));d.style.width=Math.round(2*
+u)/d.view.scale-z})},eb=function(d,p,z,u,x){return ib(d,p,function(C){var E=d.absolutePoints;if(null!=E&&0<E.length){var ea=E.length-1;C=d.view.translate;var M=d.view.scale,sa=z?E[0]:E[ea];E=z?E[1]:E[ea-1];ea=E.x-sa.x;var ma=E.y-sa.y,Wa=Math.sqrt(ea*ea+ma*ma);sa=u.call(this,Wa,ea/Wa,ma/Wa,sa,E);return new mxPoint(sa.x/M-C.x,sa.y/M-C.y)}return null},function(C,E,ea){var M=d.absolutePoints,sa=M.length-1;C=d.view.translate;var ma=d.view.scale,Wa=z?M[0]:M[sa];M=z?M[1]:M[sa-1];sa=M.x-Wa.x;var gb=M.y-Wa.y,
+bb=Math.sqrt(sa*sa+gb*gb);E.x=(E.x+C.x)*ma;E.y=(E.y+C.y)*ma;x.call(this,bb,sa/bb,gb/bb,Wa,M,E,ea)})},nb=function(d,p){return function(z){return[eb(z,["startWidth"],!0,function(u,x,C,E,ea){ea=mxUtils.getNumber(z.style,"startWidth",d)*z.view.scale+p;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));z.style.startWidth=Math.round(2*u)/z.view.scale-p})]}},mb=function(d){return function(p){return[ib(p,["arrowWidth",
+"arrowSize"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Sa.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Sa.prototype.arrowSize)));return new mxPoint(z.x+(1-x)*z.width,z.y+(1-u)*z.height/2)},function(z,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(z.y+z.height/2-u.y)/z.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(z.x+z.width-u.x)/z.width))})]}},qb=function(d){return function(p){return[ib(p,
+["size"],function(z){var u=Math.max(0,Math.min(.5*z.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(z.x,z.y+u)},function(z,u){this.state.style.size=Math.max(0,u.y-z.y)},!0)]}},ub=function(d,p,z){return function(u){var x=[ib(u,["size"],function(C){var E=Math.max(0,Math.min(C.width,Math.min(C.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(C.x+E,C.y+E)},function(C,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(C.width,
+E.x-C.x),Math.min(C.height,E.y-C.y)))/d)},!1)];z&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},zb=function(d,p,z,u,x){z=null!=z?z:.5;return function(C){var E=[ib(C,["size"],function(ea){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,sa*(M?1:ea.width))),ea.getCenterY())},function(ea,M,sa){ea=null!=x&&"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?M.x-ea.x:Math.max(0,Math.min(z,(M.x-ea.x)/ea.width));this.state.style.size=ea},!1,u)];p&&mxUtils.getValue(C.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(vb(C));return E}},Cb=function(d,p,z){d=null!=d?d:.5;return function(u){var x=[ib(u,["size"],function(C){var E=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?z:p)));return new mxPoint(C.x+Math.min(.75*C.width*d,ea*(E?.75:.75*C.width)),C.y+C.height/
+4)},function(C,E){C=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-C.x:Math.max(0,Math.min(d,(E.x-C.x)/C.width*.75));this.state.style.size=C},!1,!0)];mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},xb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p}},vb=function(d,p){return ib(d,[mxConstants.STYLE_ARCSIZE],function(z){var u=null!=p?p:z.height/8;if("1"==mxUtils.getValue(d.style,
+mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(z.x+z.width-Math.min(z.width/2,x),z.y+u)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(z.x+z.width-Math.min(Math.max(z.width/2,z.height/2),Math.min(z.width,z.height)*x),z.y+u)},function(z,u,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?
+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(z.width,2*(z.x+z.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(z.width-u.x+z.x)/Math.min(z.width,z.height))))})},ib=function(d,p,z,u,x,C,E){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);E&&E(sa)};ea.getPosition=z;ea.setPosition=u;ea.ignoreGrid=null!=x?x:!0;if(C){var M=ea.positionChanged;
+ea.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},hb={link:function(d){return[tb(d,!0,10),tb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,z=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||
+mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;
+ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/
+d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=
+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,
+x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
+p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,ea,M,
+sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||
+(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return z},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(vb(d,
+z/2))}p.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(u){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,x))):new mxPoint(u.x+Math.max(0,Math.min(u.width,x)),u.getCenterY())},function(u,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
+Math.min(u.height,x.y-u.y))):Math.round(Math.max(0,Math.min(u.width,x.x-u.x)))},!1,null,function(u){var x=d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){u=x.getSwimlaneDirection(d.style);var C=x.model.getParent(d.cell);C=x.model.getChildCells(C,!0);for(var E=[],ea=0;ea<C.length;ea++)C[ea]!=d.cell&&x.isSwimlane(C[ea])&&x.getSwimlaneDirection(x.getCurrentCellStyle(C[ea]))==u&&E.push(C[ea]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,
+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return p},label:xb(),ext:xb(),rectangle:xb(),triangle:xb(),rhombus:xb(),umlLifeline:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(p){var z=Math.max(aa.prototype.corner,
+Math.min(p.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),u=Math.max(1.5*aa.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(p.width,z.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(p.height,z.y-p.y)))},!1)]},process:function(d){var p=[ib(d,["size"],function(z){var u=
+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size));return u?new mxPoint(z.x+x,z.y+z.height/4):new mxPoint(z.x+z.width*x,z.y+z.height/4)},function(z,u){z="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*z.width,u.x-z.x)):Math.max(0,Math.min(.5,(u.x-z.x)/z.width));this.state.style.size=z},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},cross:function(d){return[ib(d,
+["size"],function(p){var z=Math.min(p.width,p.height);z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*z/2;return new mxPoint(p.getCenterX()-z,p.getCenterY()-z)},function(p,z){var u=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-z.y)/u*2,Math.max(0,p.getCenterX()-z.x)/u*2)))})]},note:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",F.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},note2:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,
+p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},manualInput:function(d){var p=[ib(d,["size"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",za.prototype.size)));return new mxPoint(z.x+z.width/4,z.y+3*u/4)},function(z,u){this.state.style.size=Math.round(Math.max(0,Math.min(z.height,4*(u.y-z.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},dataStorage:function(d){return[ib(d,["size"],function(p){var z="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",z?Ma.prototype.fixedSize:Ma.prototype.size));return new mxPoint(p.x+p.width-u*(z?1:p.width),p.getCenterY())},function(p,z){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-z.x)):Math.max(0,Math.min(1,(p.x+p.width-z.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[ib(d,["size","position"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,
+"size",ca.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));mxUtils.getValue(this.state.style,"base",ca.prototype.base);return new mxPoint(z.x+x*z.width,z.y+z.height-u)},function(z,u){mxUtils.getValue(this.state.style,"base",ca.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(z.height,z.y+z.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["position2"],function(z){var u=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ca.prototype.position2)));return new mxPoint(z.x+u*z.width,z.y+z.height)},function(z,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["base"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position))),C=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
+"base",ca.prototype.base)));return new mxPoint(z.x+Math.min(z.width,x*z.width+C),z.y+z.height-u)},function(z,u){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(z.width,u.x-z.x-x*z.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},internalStorage:function(d){var p=[ib(d,["dx","dy"],function(z){var u=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
+"dx",wa.prototype.dx))),x=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"dy",wa.prototype.dy)));return new mxPoint(z.x+u,z.y+x)},function(z,u){this.state.style.dx=Math.round(Math.max(0,Math.min(z.width,u.x-z.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(z.height,u.y-z.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
+"jettyWidth",Ba.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(p.x+z/2,p.y+2*u)},function(p,z){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),
+u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Xa.prototype.dy)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));
+return new mxPoint(p.x+(p.width+z)/2,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,z.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},singleArrow:mb(1),doubleArrow:mb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
+"tabWidth",q.prototype.tabWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(z=p.width-z);return new mxPoint(p.x+z,p.y+u)},function(p,z){var u=Math.max(0,Math.min(p.width,z.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=
+Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},document:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},tape:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));
+return new mxPoint(p.getCenterX(),p.y+z*p.height/2)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(z.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[ib(d,["isoAngle"],function(p){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(z),.5*p.height))},function(p,z){this.state.style.isoAngle=Math.max(0,50*(z.y-p.y)/p.height)},!0)]},cylinder2:qb(f.prototype.size),cylinder3:qb(l.prototype.size),
+offPageConnector:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(z){var u=Math.max(0,Math.min(z.width/2,z.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));
+return new mxPoint(z.x+u,z.y+u)},function(z,u){this.state.style.size=Math.round(100*Math.max(0,Math.min(z.height/2,z.width/2,u.x-z.x)))/100})];d=Graph.createHandle(d,["indent"],function(z){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(z.x+.75*z.width,z.y+u*z.height/200)},function(z,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-z.y)/z.height)))/100});p.push(d);return p},step:zb(ka.prototype.size,!0,null,
+!0,ka.prototype.fixedSize),hexagon:zb(da.prototype.size,!0,.5,!0,da.prototype.fixedSize),curlyBracket:zb(ia.prototype.size,!1),display:zb($a.prototype.size,!1),cube:ub(1,m.prototype.size,!1),card:ub(.5,H.prototype.size,!0),loopLimit:ub(.5,Q.prototype.size,!0),trapezoid:Cb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Cb(1,I.prototype.size,I.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
+function(){var d=Ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=hb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=hb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=
+function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),wb=new mxPoint(1,0),yb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(yb),Math.sin(yb));var rb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,
+p,z,u,x){var C=d.view;u=null!=u&&0<u.length?u[0]:null;var E=d.absolutePoints,ea=E[0];E=E[E.length-1];null!=u&&(u=C.transformControlPoint(d,u));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==E&&null!=z&&(E=new mxPoint(z.getCenterX(),z.getCenterY()));var M=sb.x,sa=sb.y,ma=wb.x,Wa=wb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ea){d=function(Fa,Ka,Ja){Fa-=bb.x;var Ga=Ka-bb.y;Ka=(Wa*Fa-ma*Ga)/(M*Wa-sa*ma);Fa=(sa*Fa-M*Ga)/(sa*ma-M*Wa);gb?
+(Ja&&(bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka),x.push(bb)),bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa)):(Ja&&(bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa),x.push(bb)),bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka));x.push(bb)};var bb=ea;null==u&&(u=new mxPoint(ea.x+(E.x-ea.x)/2,ea.y+(E.y-ea.y)/2));d(u.x,u.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Bb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var z=
+new mxElbowEdgeHandler(d);z.snapToTerminals=!1;return z}return Bb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=function(d,p,z){d=[];var u=Math.tan(mxUtils.toRadians(30)),x=(.5-u)/2;u=Math.min(p,z/(.5+u));p=(p-u)/2;z=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+u*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p+u,z+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+(1-x)*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.75*u));return d};c.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*z);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ca.prototype.getConstraints=function(d,p,z){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-u)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
+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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=
+function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(z-u)));return d};l.prototype.getConstraints=function(d,p,z){d=[];p=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,
+0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};q.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,
+1),!1));return d};wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ia.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;
+$a.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(p,z/2),x=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Ba.prototype.getConstraints=function(d,p,z){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ba.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ba.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(z-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(z-.5*d,3.5*d))];z>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));z>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));z>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];B.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)];ya.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)];t.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)];N.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)];ka.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)];la.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)];I.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Ra.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Xa.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Qa.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)];Sa.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,z-u));return d};Ha.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Za.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(z,p),x=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(z-x)/2;var C=u+x,E=(p-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,E,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z));d.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,C));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p+x),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,u));return d};Y.prototype.constraints=
+null;y.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)];O.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
+Actions.prototype.init=function(){function b(F){n.escape();F=n.deleteCells(n.getDeletableCells(n.getSelectionCells()),F);null!=F&&n.setSelectionCells(F)}function e(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),J=0;J<F.length;J++)n.cellLabelChanged(F[J],"")}finally{n.getModel().endUpdate()}}}function g(F,J,c,f,l){l.getModel().beginUpdate();try{var t=l.getCellGeometry(F);null!=t&&c&&f&&(c/=f,t=t.clone(),1<c?t.height=t.width/c:t.width=t.height*c,l.getModel().setGeometry(F,
+t));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,J,[F]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{l.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,n=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&n.isEnabled()};this.addAction("new...",function(){n.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});var G=new Action("smartFit",function(){n.popupMenuHandler.hideMenu();var F=n.view.scale,
+J=n.container.scrollLeft,c=n.container.scrollTop,f=n.view.translate.x,l=n.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-n.view.scale)&&5>Math.abs(J-n.container.scrollLeft)&&5>Math.abs(c-n.container.scrollTop)&&f==n.view.translate.x&&l==n.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter");G.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",G);this.addAction("keyPressEnter",function(){n.isSelectionEmpty()?
+m.actions.get("smartFit").funct():n.isEnabled()&&n.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(F,J){try{var c=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));m.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=A;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(m);m.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",
function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(n,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 F=null;
-try{F=m.copyXml(),null!=F&&n.removeCells(F,!1)}catch(K){}try{null==F&&mxClipboard.cut(n)}catch(K){m.handleError(K)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(n)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(K){if(null!=K){n.getModel().beginUpdate();
-try{m.pasteXml(K,!0)}finally{n.getModel().endUpdate()}}else mxClipboard.paste(n)}),F=!0)}catch(K){}F||mxClipboard.paste(n)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function K(f){if(null!=f){for(var l=!0,t=0;t<f.length&&l;t++)l=l&&n.model.isEdge(f[t]);var q=n.view.translate;t=n.view.scale;var D=q.x,H=q.y;q=null;if(1==f.length&&l){var N=n.getCellGeometry(f[0]);null!=N&&(q=N.getTerminalPoint(!0))}q=null!=q?q:n.getBoundingBoxFromGeometry(f,l);null!=q&&(l=Math.round(n.snap(n.popupMenuHandler.triggerX/
-t-D)),t=Math.round(n.snap(n.popupMenuHandler.triggerY/t-H)),n.cellsMoved(f,l-q.x,t-q.y))}}function c(){n.getModel().beginUpdate();try{K(mxClipboard.paste(n))}finally{n.getModel().endUpdate()}}if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){n.getModel().beginUpdate();try{K(m.pasteXml(f,!0))}finally{n.getModel().endUpdate()}}else c()}),F=!0)}catch(f){}F||c()}});this.addAction("swap",function(){var F=
-n.getSelectionCells();2==F.length&&n.swapShapes(F[0],F[1])});this.addAction("copySize",function(){var F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.getModel().isVertex(F)&&(F=n.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedSize){n.getModel().beginUpdate();try{for(var F=n.getResizableCells(n.getSelectionCells()),K=0;K<F.length;K++)if(n.getModel().isVertex(F[K])){var c=
-n.getCellGeometry(F[K]);null!=c&&(c=c.clone(),c.width=m.copiedSize.width,c.height=m.copiedSize.height,n.getModel().setGeometry(F[K],c))}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=n.getSelectionCell()||n.getModel().getRoot();n.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F)try{n.isHtmlLabel(F)?
-m.writeHtmlToClipboard(n.getLabel(F),mxUtils.bind(this,function(K){m.handleError(K)})):m.writeTextToClipboard(n.getLabel(F),mxUtils.bind(this,function(K){m.handleError(K)}))}catch(K){m.handleError(K)}});this.addAction("pasteData",function(F,K){function c(t,q){var D=f.getValue(t);q=t.cloneValue(q);q.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||q.setAttribute("placeholders",D.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||q.setAttribute("label",n.convertValueToString(t));
-f.setValue(t,q)}F=null!=K?K:F;var f=n.getModel();if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedValue){f.beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());if(0==l.length)c(f.getRoot(),m.copiedValue);else for(K=0;K<l.length;K++)c(l[K],m.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,K){F=null!=K?K:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,
+try{F=m.copyXml(),null!=F&&n.removeCells(F,!1)}catch(J){}try{null==F&&mxClipboard.cut(n)}catch(J){m.handleError(J)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(n)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(J){if(null!=J){n.getModel().beginUpdate();
+try{m.pasteXml(J,!0)}finally{n.getModel().endUpdate()}}else mxClipboard.paste(n)}),F=!0)}catch(J){}F||mxClipboard.paste(n)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function J(f){if(null!=f){for(var l=!0,t=0;t<f.length&&l;t++)l=l&&n.model.isEdge(f[t]);var q=n.view.translate;t=n.view.scale;var D=q.x,H=q.y;q=null;if(1==f.length&&l){var N=n.getCellGeometry(f[0]);null!=N&&(q=N.getTerminalPoint(!0))}q=null!=q?q:n.getBoundingBoxFromGeometry(f,l);null!=q&&(l=Math.round(n.snap(n.popupMenuHandler.triggerX/
+t-D)),t=Math.round(n.snap(n.popupMenuHandler.triggerY/t-H)),n.cellsMoved(f,l-q.x,t-q.y))}}function c(){n.getModel().beginUpdate();try{J(mxClipboard.paste(n))}finally{n.getModel().endUpdate()}}if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){n.getModel().beginUpdate();try{J(m.pasteXml(f,!0))}finally{n.getModel().endUpdate()}}else c()}),F=!0)}catch(f){}F||c()}});this.addAction("swap",function(){var F=
+n.getSelectionCells();2==F.length&&n.swapShapes(F[0],F[1])});this.addAction("copySize",function(){var F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.getModel().isVertex(F)&&(F=n.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedSize){n.getModel().beginUpdate();try{for(var F=n.getResizableCells(n.getSelectionCells()),J=0;J<F.length;J++)if(n.getModel().isVertex(F[J])){var c=
+n.getCellGeometry(F[J]);null!=c&&(c=c.clone(),c.width=m.copiedSize.width,c.height=m.copiedSize.height,n.getModel().setGeometry(F[J],c))}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=n.getSelectionCell()||n.getModel().getRoot();n.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F)try{n.isHtmlLabel(F)?
+m.writeHtmlToClipboard(n.getLabel(F),mxUtils.bind(this,function(J){m.handleError(J)})):m.writeTextToClipboard(n.getLabel(F),mxUtils.bind(this,function(J){m.handleError(J)}))}catch(J){m.handleError(J)}});this.addAction("pasteData",function(F,J){function c(t,q){var D=f.getValue(t);q=t.cloneValue(q);q.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||q.setAttribute("placeholders",D.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||q.setAttribute("label",n.convertValueToString(t));
+f.setValue(t,q)}F=null!=J?J:F;var f=n.getModel();if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedValue){f.beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());if(0==l.length)c(f.getRoot(),m.copiedValue);else for(J=0;J<l.length;J++)c(l[J],m.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,J){F=null!=J?J:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,
null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{n.setSelectionCells(n.duplicateCells()),n.scrollCellToVisible(n.getSelectionCell())}catch(F){m.handleError(F)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",function(){var F=m.getSelectionState();if(null!=F.mergeCell){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",F.rowspan,[F.mergeCell]),
-n.setCellStyles("colspan",F.colspan,[F.mergeCell])}finally{n.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var F=m.getSelectionState();if(0<F.cells.length){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",null,F.cells),n.setCellStyles("colspan",null,F.cells)}finally{n.getModel().endUpdate()}}}));G=new Action("turn",function(F,K){F=null!=K?K:F;n.turnShapes(n.getResizableCells(n.getSelectionCells()),null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?
+n.setCellStyles("colspan",F.colspan,[F.mergeCell])}finally{n.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var F=m.getSelectionState();if(0<F.cells.length){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",null,F.cells),n.setCellStyles("colspan",null,F.cells)}finally{n.getModel().endUpdate()}}}));G=new Action("turn",function(F,J){F=null!=J?J:F;n.turnShapes(n.getResizableCells(n.getSelectionCells()),null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?
null:Editor.ctrlKey+"+R");G.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",G);this.put("selectConnections",new Action("selectEdges",function(F){F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.addSelectionCells(n.getEdges(F))}));this.addAction("selectVertices",function(){n.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){n.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",
-function(){n.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){n.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),K=n.getCurrentCellStyle(n.getSelectionCell()),c=1==mxUtils.getValue(K,mxConstants.STYLE_EDITABLE,1)?0:1;n.setCellStyles(mxConstants.STYLE_MOVABLE,c,F);n.setCellStyles(mxConstants.STYLE_RESIZABLE,c,F);n.setCellStyles(mxConstants.STYLE_ROTATABLE,
+function(){n.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){n.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),J=n.getCurrentCellStyle(n.getSelectionCell()),c=1==mxUtils.getValue(J,mxConstants.STYLE_EDITABLE,1)?0:1;n.setCellStyles(mxConstants.STYLE_MOVABLE,c,F);n.setCellStyles(mxConstants.STYLE_RESIZABLE,c,F);n.setCellStyles(mxConstants.STYLE_ROTATABLE,
c,F);n.setCellStyles(mxConstants.STYLE_DELETABLE,c,F);n.setCellStyles(mxConstants.STYLE_EDITABLE,c,F);n.setCellStyles("locked",1==c?0:1,F);n.setCellStyles("connectable",c,F)}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){n.model.isVertex(n.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){n.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){n.exitGroup()},
null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){n.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){n.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){n.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){n.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){n.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",
function(F){n.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(F){n.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(n.isEnabled()){var F=mxUtils.sortCells(n.getSelectionCells(),!0);1!=F.length||n.isTable(F[0])||n.isTableRow(F[0])?(F=n.getCellsForGroup(F),1<F.length&&n.setSelectionCell(n.groupCells(null,0,F))):n.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",
-function(){if(n.isEnabled()){var F=n.getEditableCells(n.getSelectionCells());n.model.beginUpdate();try{var K=n.ungroupCells();if(null!=F)for(var c=0;c<F.length;c++)n.model.contains(F[c])&&(0==n.model.getChildCount(F[c])&&n.model.isVertex(F[c])&&n.setCellStyles("container","0",[F[c]]),K.push(F[c]))}finally{n.model.endUpdate()}0<K.length&&n.setSelectionCells(K)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(n.isEnabled()){var F=n.getSelectionCells();if(null!=F){for(var K=
-[],c=0;c<F.length;c++)n.isTableRow(F[c])||n.isTableCell(F[c])||K.push(F[c]);n.removeCellsFromParent(K);0<K.length&&n.scrollCellToVisible(K[0])}}});this.addAction("edit",function(){n.isEnabled()&&n.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=n.getSelectionCell()||n.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var K=
-"";if(mxUtils.isNode(F.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=F.value.getAttribute("tooltip"));null!=c&&(K=c)}K=new TextareaDialog(m,mxResources.get("editTooltip")+":",K,function(f){n.setTooltipForCell(F,f)});m.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=n.getLinkForCell(n.getSelectionCell());
-null!=F&&n.openLink(F)});this.addAction("editLink...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var K=n.getLinkForCell(F,!0)||"";m.showLinkDialog(K,mxResources.get("ok"),function(c,f,l){n.getModel().beginUpdate();try{n.setLinkForCell(F,0<c.length?c:null),n.setAttributeForCell(F,"linkTarget",l)}finally{n.getModel().endUpdate()}},!0,n.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action("image...",function(){n.isEnabled()&&
-!n.isCellLocked(n.getDefaultParent())&&(n.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,K,c){F=mxUtils.trim(F);if(0<F.length){var f=null,l=n.getLinkTitle(F);null!=K&&0<K.length&&(f=K[0].iconUrl,l=K[0].name||K[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),
-30<l.length&&(l=l.substring(0,30)+"..."));K=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));K.vertex=!0;f=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry([K],!0));K.geometry.x=f.x;K.geometry.y=f.y;n.setAttributeForCell(K,"linkTarget",c);n.setLinkForCell(K,F);n.cellSizeUpdated(K,!0);n.getModel().beginUpdate();try{K=n.addCell(K),n.fireEvent(new mxEventObject("cellsInserted",
-"cells",[K]))}finally{n.getModel().endUpdate()}n.setSelectionCell(K);n.scrollCellToVisible(n.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(n.isEnabled())if(n.cellEditor.isContentEditing()){var F=n.getSelectedElement(),K=n.getParentByName(F,"A",n.cellEditor.textarea),c="";if(null==K&&null!=F&&null!=F.getElementsByTagName)for(var f=F.getElementsByTagName("a"),l=0;l<f.length&&null==K;l++)f[l].textContent==F.textContent&&(K=f[l]);null!=
-K&&"A"==K.nodeName&&(c=K.getAttribute("href")||"",n.selectNode(K));var t=n.cellEditor.saveSelection();m.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(q){n.cellEditor.restoreSelection(t);null!=q&&n.insertLink(q)}))}else n.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=n.getSelectionCells();if(null!=F){n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=F[K];n.getModel().isVertex(c)&&
-(0<n.getModel().getChildCount(c)?n.updateGroupBounds([c],0,!0):n.updateCellSize(c))}}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){n.snapCellsToGrid(n.getSelectionCells(),n.gridSize)});this.addAction("formattedText",function(){n.stopEditing();var F=n.getCommonStyle(n.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";n.getModel().beginUpdate();try{for(var K=n.getEditableCells(n.getSelectionCells()),c=0;c<K.length;c++)if(state=
-n.getView().getState(K[c]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==F)n.removeTextStyleForCell(state.cell),n.setCellStyles("html",F,[K[c]]);else if("0"==f&&"1"==F){var l=mxUtils.htmlEntities(n.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));n.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));n.setCellStyles("html",F,[K[c]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=
-F?F:"0"],"cells",K))}finally{n.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=n.getView().getState(n.getSelectionCell()),K="wrap";n.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(K=null);n.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var F="0",K=n.getView().getState(n.getSelectionCell());null!=K&&(F=K.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),function(c){null!=c&&0<
+function(){if(n.isEnabled()){var F=n.getEditableCells(n.getSelectionCells());n.model.beginUpdate();try{var J=n.ungroupCells();if(null!=F)for(var c=0;c<F.length;c++)n.model.contains(F[c])&&(0==n.model.getChildCount(F[c])&&n.model.isVertex(F[c])&&n.setCellStyles("container","0",[F[c]]),J.push(F[c]))}finally{n.model.endUpdate()}0<J.length&&n.setSelectionCells(J)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(n.isEnabled()){var F=n.getSelectionCells();if(null!=F){for(var J=
+[],c=0;c<F.length;c++)n.isTableRow(F[c])||n.isTableCell(F[c])||J.push(F[c]);n.removeCellsFromParent(J);0<J.length&&n.scrollCellToVisible(J[0])}}});this.addAction("edit",function(){n.isEnabled()&&n.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=n.getSelectionCell()||n.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var J=
+"";if(mxUtils.isNode(F.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=F.value.getAttribute("tooltip"));null!=c&&(J=c)}J=new TextareaDialog(m,mxResources.get("editTooltip")+":",J,function(f){n.setTooltipForCell(F,f)});m.showDialog(J.container,320,200,!0,!0);J.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=n.getLinkForCell(n.getSelectionCell());
+null!=F&&n.openLink(F)});this.addAction("editLink...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var J=n.getLinkForCell(F,!0)||"";m.showLinkDialog(J,mxResources.get("ok"),function(c,f,l){n.getModel().beginUpdate();try{n.setLinkForCell(F,0<c.length?c:null),n.setAttributeForCell(F,"linkTarget",l)}finally{n.getModel().endUpdate()}},!0,n.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action("image...",function(){n.isEnabled()&&
+!n.isCellLocked(n.getDefaultParent())&&(n.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,J,c){F=mxUtils.trim(F);if(0<F.length){var f=null,l=n.getLinkTitle(F);null!=J&&0<J.length&&(f=J[0].iconUrl,l=J[0].name||J[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),
+30<l.length&&(l=l.substring(0,30)+"..."));J=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));J.vertex=!0;f=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry([J],!0));J.geometry.x=f.x;J.geometry.y=f.y;n.setAttributeForCell(J,"linkTarget",c);n.setLinkForCell(J,F);n.cellSizeUpdated(J,!0);n.getModel().beginUpdate();try{J=n.addCell(J),n.fireEvent(new mxEventObject("cellsInserted",
+"cells",[J]))}finally{n.getModel().endUpdate()}n.setSelectionCell(J);n.scrollCellToVisible(n.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(n.isEnabled())if(n.cellEditor.isContentEditing()){var F=n.getSelectedElement(),J=n.getParentByName(F,"A",n.cellEditor.textarea),c="";if(null==J&&null!=F&&null!=F.getElementsByTagName)for(var f=F.getElementsByTagName("a"),l=0;l<f.length&&null==J;l++)f[l].textContent==F.textContent&&(J=f[l]);null!=
+J&&"A"==J.nodeName&&(c=J.getAttribute("href")||"",n.selectNode(J));var t=n.cellEditor.saveSelection();m.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(q){n.cellEditor.restoreSelection(t);null!=q&&n.insertLink(q)}))}else n.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=n.getSelectionCells();if(null!=F){n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=F[J];n.getModel().isVertex(c)&&
+(0<n.getModel().getChildCount(c)?n.updateGroupBounds([c],0,!0):n.updateCellSize(c))}}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){n.snapCellsToGrid(n.getSelectionCells(),n.gridSize)});this.addAction("formattedText",function(){n.stopEditing();var F=n.getCommonStyle(n.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";n.getModel().beginUpdate();try{for(var J=n.getEditableCells(n.getSelectionCells()),c=0;c<J.length;c++)if(state=
+n.getView().getState(J[c]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==F)n.removeTextStyleForCell(state.cell),n.setCellStyles("html",F,[J[c]]);else if("0"==f&&"1"==F){var l=mxUtils.htmlEntities(n.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));n.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));n.setCellStyles("html",F,[J[c]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=
+F?F:"0"],"cells",J))}finally{n.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=n.getView().getState(n.getSelectionCell()),J="wrap";n.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(J=null);n.setCellStyles(mxConstants.STYLE_WHITE_SPACE,J)});this.addAction("rotation",function(){var F="0",J=n.getView().getState(n.getSelectionCell());null!=J&&(F=J.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),function(c){null!=c&&0<
c.length&&n.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(F.container,375,80,!0,!0);F.init()});this.addAction("resetView",function(){n.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){n.isFastZoomEnabled()?n.lazyZoom(!0,!0,m.buttonZoomDelay):n.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(F){n.isFastZoomEnabled()?n.lazyZoom(!1,
!0,m.buttonZoomDelay):n.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){n.pageVisible&&n.isSelectionEmpty()?n.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(2):this.get("pageView").funct()}),null,null,
-Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(K){K=parseInt(K);!isNaN(K)&&0<K&&n.zoomTo(K/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}),null,
-null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(K){K=parseInt(K);!isNaN(K)&&0<K&&(K=new ChangePageSetup(m,null,null,null,K/100),K.ignoreColor=!0,K.ignoreImage=!0,n.model.execute(K))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));G=null;G=this.addAction("grid",function(){n.setGridEnabled(!n.isGridEnabled());
+Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(J){J=parseInt(J);!isNaN(J)&&0<J&&n.zoomTo(J/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}),null,
+null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(J){J=parseInt(J);!isNaN(J)&&0<J&&(J=new ChangePageSetup(m,null,null,null,J/100),J.ignoreColor=!0,J.ignoreImage=!0,n.model.execute(J))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));G=null;G=this.addAction("grid",function(){n.setGridEnabled(!n.isGridEnabled());
n.defaultGridEnabled=n.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.isGridEnabled()});G.setEnabled(!1);G=this.addAction("guides",function(){n.graphHandler.guidesEnabled=!n.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.graphHandler.guidesEnabled});G.setEnabled(!1);G=this.addAction("animations",
function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.enableAnimations});G=this.addAction("tooltips",function(){n.tooltipHandler.setEnabled(!n.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.tooltipHandler.isEnabled()});G=this.addAction("collapseExpand",function(){var F=
new ChangePageSetup(m);F.ignoreColor=!0;F.ignoreImage=!0;F.foldingEnabled=!n.foldingEnabled;n.model.execute(F)});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.foldingEnabled});G.isEnabled=A;G=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!n.pageVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return n.pageVisible});G=this.addAction("connectionArrows",function(){n.connectionArrowsEnabled=!n.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},
null,null,"Alt+Shift+A");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionArrowsEnabled});G=this.addAction("connectionPoints",function(){n.setConnectable(!n.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isEnabled()});G=this.addAction("copyConnect",function(){n.connectionHandler.setCreateTarget(!n.connectionHandler.isCreateTarget());
m.fireEvent(new mxEventObject("copyConnectChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isCreateTarget()});G.isEnabled=A;G=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});G.setToggleAction(!0);G.setSelectedCallback(function(){return m.editor.autosave});G.isEnabled=A;G.visible=!1;this.addAction("help",function(){var F="";mxResources.isLanguageSupported(mxClient.language)&&(F="_"+mxClient.language);n.openLink(RESOURCES_PATH+
-"/help"+F+".html")});var S=!1;G=new Action("about",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)});G.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",G);G=mxUtils.bind(this,function(F,K,c,f){return this.addAction(F,function(){if(null!=c&&n.cellEditor.isContentEditing())c();else{n.stopEditing(!1);n.getModel().beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());n.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
-K,l);(K&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?n.updateLabelElements(l,function(q){q.style.fontWeight=null;"B"==q.nodeName&&n.replaceElement(q)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?n.updateLabelElements(l,function(q){q.style.fontStyle=null;"I"==q.nodeName&&n.replaceElement(q)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.updateLabelElements(l,function(q){q.style.textDecoration=null;"U"==q.nodeName&&n.replaceElement(q)});for(var t=0;t<l.length;t++)0==n.model.getChildCount(l[t])&&
+"/help"+F+".html")});var R=!1;G=new Action("about",function(){R||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){R=!1}),R=!0)});G.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",G);G=mxUtils.bind(this,function(F,J,c,f){return this.addAction(F,function(){if(null!=c&&n.cellEditor.isContentEditing())c();else{n.stopEditing(!1);n.getModel().beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());n.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+J,l);(J&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?n.updateLabelElements(l,function(q){q.style.fontWeight=null;"B"==q.nodeName&&n.replaceElement(q)}):(J&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?n.updateLabelElements(l,function(q){q.style.fontStyle=null;"I"==q.nodeName&&n.replaceElement(q)}):(J&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.updateLabelElements(l,function(q){q.style.textDecoration=null;"U"==q.nodeName&&n.replaceElement(q)});for(var t=0;t<l.length;t++)0==n.model.getChildCount(l[t])&&
n.autoSizeCell(l[t],!1)}finally{n.getModel().endUpdate()}}},null,null,f)});G("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");G("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");G("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",
"default",n.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",n.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
-"backcolor",null,"default",n.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("removeFormat",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&!n.isEditing()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),K=0;K<F.length;K++)n.removeTextStyleForCell(F[K],!0)}finally{n.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+"backcolor",null,"default",n.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("removeFormat",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&!n.isEditing()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),J=0;J<F.length;J++)n.removeTextStyleForCell(F[J],!0)}finally{n.getModel().endUpdate()}}});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(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,null),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dashed",function(){n.getModel().beginUpdate();
try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dotted",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.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",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("sharp",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});
-this.addAction("rounded",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!n.isSelectionEmpty()&&n.isEnabled()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),K=n.getCurrentCellStyle(F[0]),
-c="1"==mxUtils.getValue(K,mxConstants.STYLE_ROUNDED,"0")?"0":"1";n.setCellStyles(mxConstants.STYLE_ROUNDED,c);n.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}});this.addAction("curved",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=n.view.getState(n.getSelectionCell()),K="1";null!=F&&null!=n.getFoldingImage(F)&&(K="0");n.setCellStyles("collapsible",K);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[K],"cells",n.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var F=n.getEditableCells(n.getSelectionCells());if(null!=F&&0<F.length){var K=n.getModel();K=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",K.getStyle(F[0])||"",function(c){null!=c&&n.setCellStyle(mxUtils.trim(c),F)},null,null,400,220);this.editorUi.showDialog(K.container,420,300,!0,!0);K.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){n.isEnabled()&&!n.isSelectionEmpty()&&m.setDefaultStyle(n.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){n.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=n.getSelectionCell();if(null!=F&&n.getModel().isEdge(F)){var K=v.graph.selectionCellsHandler.getHandler(F);if(K instanceof mxEdgeHandler){var c=n.view.translate,f=n.view.scale,l=c.x;c=c.y;F=n.getModel().getParent(F);for(var t=n.getCellGeometry(F);n.getModel().isVertex(F)&&null!=t;)l+=t.x,c+=t.y,F=
-n.getModel().getParent(F),t=n.getCellGeometry(F);l=Math.round(n.snap(n.popupMenuHandler.triggerX/f-l));f=Math.round(n.snap(n.popupMenuHandler.triggerY/f-c));K.addPointAt(K.state,l,f)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=
-F[K];n.getModel().isEdge(c)&&(n.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),n.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{n.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=F[K];if(n.getModel().isEdge(c)){var f=n.getCellGeometry(c);
+this.addAction("rounded",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!n.isSelectionEmpty()&&n.isEnabled()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),J=n.getCurrentCellStyle(F[0]),
+c="1"==mxUtils.getValue(J,mxConstants.STYLE_ROUNDED,"0")?"0":"1";n.setCellStyles(mxConstants.STYLE_ROUNDED,c);n.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}});this.addAction("curved",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=n.view.getState(n.getSelectionCell()),J="1";null!=F&&null!=n.getFoldingImage(F)&&(J="0");n.setCellStyles("collapsible",J);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[J],"cells",n.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var F=n.getEditableCells(n.getSelectionCells());if(null!=F&&0<F.length){var J=n.getModel();J=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",J.getStyle(F[0])||"",function(c){null!=c&&n.setCellStyle(mxUtils.trim(c),F)},null,null,400,220);this.editorUi.showDialog(J.container,420,300,!0,!0);J.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){n.isEnabled()&&!n.isSelectionEmpty()&&m.setDefaultStyle(n.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){n.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=n.getSelectionCell();if(null!=F&&n.getModel().isEdge(F)){var J=v.graph.selectionCellsHandler.getHandler(F);if(J instanceof mxEdgeHandler){var c=n.view.translate,f=n.view.scale,l=c.x;c=c.y;F=n.getModel().getParent(F);for(var t=n.getCellGeometry(F);n.getModel().isVertex(F)&&null!=t;)l+=t.x,c+=t.y,F=
+n.getModel().getParent(F),t=n.getCellGeometry(F);l=Math.round(n.snap(n.popupMenuHandler.triggerX/f-l));f=Math.round(n.snap(n.popupMenuHandler.triggerY/f-c));J.addPointAt(J.state,l,f)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=
+F[J];n.getModel().isEdge(c)&&(n.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),n.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{n.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=F[J];if(n.getModel().isEdge(c)){var f=n.getCellGeometry(c);
null!=f&&(f=f.clone(),f.points=null,f.x=0,f.y=0,f.offset=null,n.getModel().setGeometry(c,f))}}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+R");G=this.addAction("subscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");G=this.addAction("superscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");G=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,F-1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");G=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=n.getView().getState(n.getSelectionCell()),c="",f=null;null!=K&&(c=K.style[mxConstants.STYLE_IMAGE]||c,f=K.style[mxConstants.STYLE_CLIP_PATH]||f);var l=n.cellEditor.saveSelection();
-m.showImageDialog(F,c,function(t,q,D,H,N,L){if(n.cellEditor.isContentEditing())n.cellEditor.restoreSelection(l),n.insertImage(t,q,D);else{var J=n.getSelectionCells();if(null!=t&&(0<t.length||0<J.length)){var Y=null;n.getModel().beginUpdate();try{if(0==J.length){J=[n.insertVertex(n.getDefaultParent(),null,"",0,0,q,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ha=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=ha.x;J[0].geometry.y=
-ha.y;null!=H&&g(J[0],H,N,L,n);Y=J;n.fireEvent(new mxEventObject("cellsInserted","cells",Y))}n.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,J);var ea=n.getCurrentCellStyle(J[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==t.length&&n.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&n.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=q&&null!=D)for(t=0;t<J.length;t++){var aa=J[t];if("0"!=n.getCurrentCellStyle(aa).expand){var na=
-n.getModel().getGeometry(aa);null!=na&&(na=na.clone(),na.width=q,na.height=D,n.getModel().setGeometry(aa,na))}null!=H&&g(aa,H,N,L,n)}}finally{n.getModel().endUpdate()}null!=Y&&(n.setSelectionCells(Y),n.scrollCellToVisible(Y[0]))}}},n.cellEditor.isContentEditing(),!n.cellEditor.isContentEditing(),!0,f)}}).isEnabled=A;this.addAction("crop...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F){var K=n.getCurrentCellStyle(F),c=K[mxConstants.STYLE_IMAGE],
-f=K[mxConstants.STYLE_SHAPE];c&&"image"==f&&(K=new CropImageDialog(m,c,K[mxConstants.STYLE_CLIP_PATH],function(l,t,q){g(F,l,t,q,n)}),m.showDialog(K.container,300,390,!0,!0))}}).isEnabled=A;G=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",
+mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",J=n.getView().getState(n.getSelectionCell()),c="",f=null;null!=J&&(c=J.style[mxConstants.STYLE_IMAGE]||c,f=J.style[mxConstants.STYLE_CLIP_PATH]||f);var l=n.cellEditor.saveSelection();
+m.showImageDialog(F,c,function(t,q,D,H,N,L){if(n.cellEditor.isContentEditing())n.cellEditor.restoreSelection(l),n.insertImage(t,q,D);else{var I=n.getSelectionCells();if(null!=t&&(0<t.length||0<I.length)){var Z=null;n.getModel().beginUpdate();try{if(0==I.length){I=[n.insertVertex(n.getDefaultParent(),null,"",0,0,q,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ia=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(I,!0));I[0].geometry.x=ia.x;I[0].geometry.y=
+ia.y;null!=H&&g(I[0],H,N,L,n);Z=I;n.fireEvent(new mxEventObject("cellsInserted","cells",Z))}n.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,I);var fa=n.getCurrentCellStyle(I[0]);"image"!=fa[mxConstants.STYLE_SHAPE]&&"label"!=fa[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_SHAPE,"image",I):0==t.length&&n.setCellStyles(mxConstants.STYLE_SHAPE,null,I);null==H&&n.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,I);if(null!=q&&null!=D)for(t=0;t<I.length;t++){var ba=I[t];if("0"!=n.getCurrentCellStyle(ba).expand){var na=
+n.getModel().getGeometry(ba);null!=na&&(na=na.clone(),na.width=q,na.height=D,n.getModel().setGeometry(ba,na))}null!=H&&g(ba,H,N,L,n)}}finally{n.getModel().endUpdate()}null!=Z&&(n.setSelectionCells(Z),n.scrollCellToVisible(Z[0]))}}},n.cellEditor.isContentEditing(),!n.cellEditor.isContentEditing(),!0,f)}}).isEnabled=A;this.addAction("crop...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F){var J=n.getCurrentCellStyle(F),c=J[mxConstants.STYLE_IMAGE],
+f=J[mxConstants.STYLE_SHAPE];c&&"image"==f&&(J=new CropImageDialog(m,c,J[mxConstants.STYLE_CLIP_PATH],function(l,t,q){g(F,l,t,q,n)}),m.showDialog(J.container,300,390,!0,!0))}}).isEnabled=A;G=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");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));G=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,
null,Editor.ctrlKey+"+Shift+P");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));G=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");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F&&null!=F.geometry){var K=
-new ConnectionPointsDialog(m,F);m.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){var n=b;"..."==n.substring(n.length-3)&&(n=n.substring(0,n.length-3));return this.put(n,new Action(b,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F&&null!=F.geometry){var J=
+new ConnectionPointsDialog(m,F);m.showDialog(J.container,350,450,!0,!1,function(){J.destroy()});J.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){var n=b;"..."==n.substring(n.length-3)&&(n=n.substring(0,n.length-3));return this.put(n,new Action(b,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,g,m,v){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=v;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};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;DrawioFile.RESTRICT_EXPORT=!1;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;
@@ -3076,25 +3075,25 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e
function(A){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,A))}),v,n):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),v,n)}};
DrawioFile.prototype.updateFile=function(b,e,g,m,v){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,
m,v):this.reloadFile(b,e))}catch(A){null!=e&&e(A)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,n)],S=this.ignorePatches(G);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,
-this.isRealtime()?this.ownPages:this.ui.pages):null,K=this.ui.patchPages(this.ui.clonePages(A),G[0]),c=this.ui.getHashValueForPages(K,{}),f=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",n,"patched",K,"patches",G,"changes",F,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(g,G,null,null,"mergeFile",
+DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,n)],R=this.ignorePatches(G);if(R)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,
+this.isRealtime()?this.ownPages:this.ui.pages):null,J=this.ui.patchPages(this.ui.clonePages(A),G[0]),c=this.ui.getHashValueForPages(J,{}),f=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",n,"patched",J,"patches",G,"changes",F,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(g,G,null,null,"mergeFile",
c,f,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var l=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?F:null,null,v);null==l||mxUtils.isEmptyObject(l)||G.push(l)}this.patch(G,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(D);try{var t=this.getCurrentUser(),q=null!=t?
t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),q,D)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(D){null!=g&&g(D)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var v=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,v,!0);g.appendChild(v)}return mxUtils.getPrettyXml(g)};
DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,g,m,v,n,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),F=null!=S?S.id:"unknown",K=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(e).length,f=null;if(null!=e&&1E3>c){b=[];for(g=0;g<e.length;g++)b.push(this.ui.anonymizePatch(e[g]));f=JSON.stringify(b);f=null!=f&&1E3>
-f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var t=null!=f?"report":"error",q=this.ui.getHashValueForPages(l.getShadowPages()),D="unknown",H="unknown",N="unknown";try{var L=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(D=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(N=L.getAttribute("type")))}catch(J){}EditorUi.logError("Checksum "+
-t+" in "+v,null,this.getMode()+"."+K,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=q?"-latest_"+q:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+D)+("-latestAgent_"+H)+("-latestType_"+N));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+K,action:v,label:"user_"+
-F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(J){}}),function(){})}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),K=F.lastIndexOf(".");A="xml";0<K&&(A=F.substring(K));var c=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()+" ("+A+")\nUser="+G+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,g,m,v,n,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var R=this.getCurrentUser(),F=null!=R?R.id:"unknown",J=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(e).length,f=null;if(null!=e&&1E3>c){b=[];for(g=0;g<e.length;g++)b.push(this.ui.anonymizePatch(e[g]));f=JSON.stringify(b);f=null!=f&&1E3>
+f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var t=null!=f?"report":"error",q=this.ui.getHashValueForPages(l.getShadowPages()),D="unknown",H="unknown",N="unknown";try{var L=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(D=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(N=L.getAttribute("type")))}catch(I){}EditorUi.logError("Checksum "+
+t+" in "+v,null,this.getMode()+"."+J,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=q?"-latest_"+q:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+D)+("-latestAgent_"+H)+("-latestType_"+N));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+J,action:v,label:"user_"+
+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),J=F.lastIndexOf(".");A="xml";0<J&&(A=F.substring(J));var c=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()+" ("+A+")\nUser="+G+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!=e?"\n\n"+e:
"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+v+"\n\nData:\n"+n,m)}catch(f){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,v=m.getSelectionCells(),n=m.getViewState(),A=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(G){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[n],"latestFile",G);null!=G?(this.ui.replaceFileData(G.getData(),
-[g]),this.ui.restoreViewState(A,n,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(A,n,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};
+[g]),this.ui.restoreViewState(A,n,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var R=this.ui.getCurrentFile();null!=R&&(R.stats=this.stats,R.patch([g]),R.fileChanged());this.ui.restoreViewState(A,n,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};
-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,n=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,K=G.mathEnabled,c=G.cellRenderer.redraw;G.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};G.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,n=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var R=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,J=G.mathEnabled,c=G.cellRenderer.redraw;G.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};G.model.beginUpdate();
try{if(g){for(var f=this.ui.pages.slice(),l=this.ui.currentPage,t=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),q=0;q<t.length;q++){var D=mxUtils.indexOf(this.ui.pages,t[q]);0>D?this.ui.insertPage(t[q],Math.min(q,this.ui.pages.length)):this.ui.movePage(D,q)}for(q=0;q<f.length;q++)0>mxUtils.indexOf(t,f[q])&&this.ui.removePage(f[q]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=c;this.changeListenerEnabled=S;g||(v.history=n,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)K!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=c;this.changeListenerEnabled=R;g||(v.history=n,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)J!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?
G.view.revalidate():G.view.validate(),G.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};
DrawioFile.prototype.save=function(b,e,g,m,v,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",v,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(A){if(null!=g)g(A);else throw A;}};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};
@@ -3145,7 +3144,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
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);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,g,m,v,n,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(n,e,g,m,v,A)}catch(F){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),S=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,F)}catch(K){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};
+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),R=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),R,F)}catch(J){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};
DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var A=this.isAutosaveRevision();
A&&(this.lastAutosaveRevision=(new Date).getTime());this.save(A,mxUtils.bind(this,function(G){this.autosaveCompleted();null!=g&&g(G)}),mxUtils.bind(this,function(G){null!=m&&m(G)}))}else this.isModified()||this.ui.clearStatus(),null!=g&&g(null)}catch(G){null!=m&&m(G)}}),v);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -3154,10 +3153,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
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,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,v,n,A){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=n;this.editable=A};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,v){this.saveAs(this.title,e,g,m,v)};LocalFile.prototype.saveAs=function(b,e,g,m,v){this.saveFile(b,!1,e,g,null,m,v)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,g,m,v,n,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),K=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var f=mxUtils.bind(this,function(t){this.savingFile=!1;null!=m&&m({error:t})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(t){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);A||this.desc.lastModified==q.lastModified?t.write(G?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){t.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(D){try{var H=this.desc;this.savingFile=!1;this.desc=D;this.fileSaved(S,H,F,f);this.removeDraft()}catch(N){f(N)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;f(q)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,G?"image/png":"text/xml",G);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){K(c)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):K(S)};
+LocalFile.prototype.saveFile=function(b,e,g,m,v,n,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var R=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),J=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var f=mxUtils.bind(this,function(t){this.savingFile=!1;null!=m&&m({error:t})});this.saveDraft(R);this.fileHandle.createWritable().then(mxUtils.bind(this,function(t){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);A||this.desc.lastModified==q.lastModified?t.write(G?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){t.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(D){try{var H=this.desc;this.savingFile=!1;this.desc=D;this.fileSaved(R,H,F,f);this.removeDraft()}catch(N){f(N)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;f(q)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,G?"image/png":"text/xml",G);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){J(c)}),m,this.ui.getCurrentFile()!=this?R:null,e.scale,e.border)):J(R)};
LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -3231,207 +3230,208 @@ B){k=B.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.lengt
{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(k,B){return B.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,B){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&B.isSwimlane(k)},
-isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&(B.isSwimlane(k)||0<B.model.getChildCount(k))},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,B){var I=1==k.vertices.length&&0==k.edges.length?
-k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=I&&(B.isContainer(I)&&"0"!=k.style.collapsible||!B.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length&&!B.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
+isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&(B.isSwimlane(k)||0<B.model.getChildCount(k))},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,B){var K=1==k.vertices.length&&0==k.edges.length?
+k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=K&&(B.isContainer(K)&&"0"!=k.style.collapsible||!B.isContainer(K)&&"1"==k.style.collapsible)},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length&&!B.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,B){B=B.editorUi.editor.graph.model;return 0<k.vertices.length?B.isVertex(B.getParent(k.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(k,B){k=0<k.vertices.length?B.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,B){return 0<k.vertices.length&&B.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,B){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||B.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,B){var K=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||B.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(k,B){return 0<k.vertices.length&&B.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(k){var B=rough.canvas({getContext:function(){return k}});B.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=I.stroke&&this._drawToContext(k,T,I);break;case "fillPath":this._drawToContext(k,T,I);break;case "fillSketch":this.fillSketch(k,T,I)}}};B.fillSketch=function(I,U,P){var T=k.state.strokeColor,X=k.state.strokeWidth,Z=k.state.strokeAlpha,ka=k.state.dashed,va=P.fillWeight;
-0>va&&(va=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(va);k.setDashed(!1);this._drawToContext(I,U,P);k.setDashed(ka);k.setStrokeWidth(X);k.setStrokeColor(T);k.setStrokeAlpha(Z)};B._drawToContext=function(I,U,P){I.begin();for(var T=0;T<U.ops.length;T++){var X=U.ops[T],Z=X.data;switch(X.op){case "move":I.moveTo(Z[0],Z[1]);break;case "bcurveTo":I.curveTo(Z[0],Z[1],Z[2],Z[3],Z[4],Z[5]);break;case "lineTo":I.lineTo(Z[0],Z[1])}}I.end();"fillPath"===
-U.type&&P.filled?I.fill():I.stroke()};return B};(function(){function k(T,X,Z){this.canvas=T;this.rc=X;this.shape=Z;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,X){var Z=1;if(null!=this.shape.state){var ka=this.shape.state.cell.id;if(null!=ka)for(var va=0;va<ka.length;va++)Z=(Z<<5)-Z+ka.charCodeAt(va)<<0}Z={strokeWidth:this.canvas.state.strokeWidth,seed:Z,preserveVertices:!0};ka=this.rc.getDefaultOptions();Z.stroke=T?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;T=null;(Z.filled=X)?(Z.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Z.fill="";Z.bowing=mxUtils.getValue(this.shape.style,"bowing",ka.bowing);Z.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ka.hachureAngle);Z.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ka.curveFitting);Z.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ka.roughness);Z.simplification=mxUtils.getValue(this.shape.style,"simplification",ka.simplification);Z.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ka.disableMultiStroke);Z.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ka.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);Z.hachureGap="auto"==X?-1:X;Z.dashGap=mxUtils.getValue(this.shape.style,"dashGap",X);Z.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",X);Z.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);Z.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=null!=Z.fill&&(null!=T||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(Z.fill)))?
-"solid":ka.fillStyle);Z.fillStyle=X;return Z};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-k.prototype.lineTo=function(T,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,X),this.lastX=T,this.lastY=X)};k.prototype.moveTo=function(T,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,X),this.lastX=T,this.lastY=X,this.firstX=T,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,X,Z,ka){this.passThrough?
-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,X,Z,ka),this.lastX=Z,this.lastY=ka)};k.prototype.curveTo=function(T,X,Z,ka,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,X,Z,ka,va,ua),this.lastX=va,this.lastY=ua)};k.prototype.arcTo=function(T,X,Z,ka,va,ua,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY,T,X,Z,ka,va,ua,qa);if(null!=Ba)for(var ya=
-0;ya<Ba.length;ya+=6)this.curveTo(Ba[ya],Ba[ya+1],Ba[ya+2],Ba[ya+3],Ba[ya+4],Ba[ya+5]);this.lastX=ua;this.lastY=qa}};k.prototype.rect=function(T,X,Z,ka){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,X,Z,ka,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,X,Z,ka){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+Z/2,X+ka/2,Z,ka,this.getStyle(!0,
-!0)))};k.prototype.roundrect=function(T,X,Z,ka,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+va,X),this.lineTo(T+Z-va,X),this.quadTo(T+Z,X,T+Z,X+ua),this.lineTo(T+Z,X+ka-ua),this.quadTo(T+Z,X+ka,T+Z-va,X+ka),this.lineTo(T+va,X+ka),this.quadTo(T,X+ka,T,X+ka-ua),this.lineTo(T,X+ua),this.quadTo(T,X,T+va,X))};k.prototype.drawPath=function(T){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(Z){}this.passThrough=
-!1}else if(null!=this.nextShape){for(var X in T)this.nextShape.options[X]=T[X];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):
-this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
-this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(T){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,X,Z,ka,va){null!=T.handJiggle&&T.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=function(T){var X=T.addTolerance,Z=!0;null!=this.style&&(Z="1"==mxUtils.getValue(this.style,
-mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ka=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var Ba=T.setFillColor;T.setFillColor=function(){};Z||null==ka||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,arguments);T.handJiggle.passThrough=!1;T.setFillColor=Ba;T.setStrokeColor=qa;this.configurePointerEvents=
-ua;this.stroke=va;this.fill=ka;T.restore();Z&&null!=ka&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,X,Z,ka,va,ua){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};
-Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,B,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=
-mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};
-null==k||B||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||B&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,B,I){Editor.validateDiagramNode(k);var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(B=Graph.decompress(U,null,B),null!=B&&0<B.length&&(P=mxUtils.parseXml(B).documentElement)):
-(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,B,!1)),B=mxUtils.createXmlDocument(),B.appendChild(B.importNode(P,!0)),P=B.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var B=mxUtils.getNodeValue(k),I=null;0<B.length?I=Graph.decompress(B):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&
-0==mxUtils.getChildNodes(k).length){var B=new mxCodec,I=new mxGraphModel;k.appendChild(B.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var B=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,
-P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){I=U.substring(P+14,U.indexOf(">",P));if(null!=I){B=I;I=[];for(U=0;U<B.length;U+=2)P=B.substr(U,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,16)));B=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==B&&"%PDF-1.4"==k.substring(0,8)){I="";P=U=0;for(var T=[],X=null;P<k.length;){var Z=
-k.charCodeAt(P);P+=1;10!=Z&&(I+=String.fromCharCode(Z));Z=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ka=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ka>P){B=k.substring(P,ka);break}}10==Z&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],T[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==B&&null!=T&&(B=Editor.extractGraphModelFromXref(T));null!=B&&(B=decodeURIComponent(B.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return B};Editor.extractGraphModelFromXref=
-function(k){var B=k.trailer,I=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=k[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(k=k[B[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,B){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=B||mxResources.get("invalidChars"),B=k[0].getElementsByTagName("div"),0<B.length&&(I=mxUtils.getTextContent(B[0])));
-return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,B){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=B))};Editor.mermaidToDrawio=function(k,B,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,B,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);
-null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=
-k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);
-null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+
-", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
-k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(k.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(B,I)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=
-k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
-k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(B=parseFloat(k.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&
-(B=parseInt(k.defaultGridSize),!isNaN(B)&&0<B?mxGraph.prototype.gridSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(B=parseInt(k.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(B=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,I),mxGraph.prototype.pageFormat=
-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&
-(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(B=parseInt(k.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(B=parseInt(k.autosaveDelay),
-!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
-k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);
-null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var B=document.getElementsByTagName("script")[0];
-if(null!=B&&null!=B.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));B.parentNode.insertBefore(I,B);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+",
-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var B=[],I=0;I<k;I++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.updateStatusInterval=
-1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",
-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var B=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[k],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==k.nodeName){B=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));B=k.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(B=k.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<B.length;I++)this.graph.addExtFont(B[I].name,B[I].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,B){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var B=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=
-unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var I=mxUtils.parseXml(B).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,B,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,B){if("undefined"===
-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(Z){MathJax.typesetClear([X]),null!=Z.retry?(U=X,Z.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ka){console.log("Error in MathJax.typesetPromise: "+
-ka.toString());I()})})["catch"](function(ka){console.log("Error in MathJax.retry: "+ka.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Z.toString())}};window.MathJax=null!=B?B:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};
-Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(Z,ka){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};B=
-document.getElementsByTagName("script");if(null!=B&&0<B.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);B[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var B="",I=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===B&&(I[U]+=T),P=!P):","===T&&P?T=I[++U]="":I[U]+=T,B=T;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||
-/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var B=EditorUi.isVisioFilename(k);B=/\.png$/i.test(k)||/\.pdf$/i.test(k)||B;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(B?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=
-new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var B=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,
-k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=B.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,B,I,U,P){try{var T=!0,X=window.setTimeout(mxUtils.bind(this,function(){T=!1;B(k)}),this.timeout),Z=mxUtils.bind(this,function(){null!=
-U?this.convertImageToDataUri(k,B,I,U,!0):B(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(va){window.clearTimeout(X);T&&(200>va.getStatus()||299<va.getStatus()?Z():B(Editor.createSvgDataUri(va.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);T&&Z()}));else{var ka=new Image;this.crossOriginImages&&(ka.crossOrigin="anonymous");ka.onload=function(){window.clearTimeout(X);if(T)try{U=null!=U&&P?U:1;var va=document.createElement("canvas"),ua=va.getContext("2d");
-ua.scale(U,U);va.height=ka.height*U;va.width=ka.width*U;ua.drawImage(ka,0,0);B(va.toDataURL())}catch(qa){B(k)}};ka.onerror=function(){window.clearTimeout(X);T&&(null!=I?I():B(k))};ka.src=k}}catch(va){null!=I?I():B(k)}};Editor.prototype.convertImages=function(k,B,I,U){function P(){0<T.length?T.shift()():B(k)}null==U&&(U=this.createImageUrlConverter());var T=[],X=I||{};I=mxUtils.bind(this,function(Z,ka){Z=k.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(ua){T.push(mxUtils.bind(this,
-function(){try{if(null!=ua){var qa=U.convert(ua.getAttribute(ka));if(null!=qa&&"data:"!=qa.substring(0,5)){var Ba=X[qa];null==Ba?this.convertImageToDataUri(qa,function(ya){null!=ya&&(X[qa]=ya,ua.setAttribute(ka,ya));P()},null,Editor.svgRasterScale):(ua.setAttribute(ka,Ba),P())}else null!=qa&&ua.setAttribute(ka,qa),P()}}catch(ya){P()}}))})(Z[va])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var B="",I=0,U=k.length,P,T,X;I<U;){P=k.charCodeAt(I++)&255;if(I==U){B+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);B+="==";break}T=k.charCodeAt(I++);if(I==U){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);B+="=";break}X=k.charCodeAt(I++);
-B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(X&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return B};Editor.prototype.loadUrl=function(k,B,I,U,P,T,X,Z){try{var ka=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||
-/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var va=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(ua){200<=ua.getStatus()&&299>=ua.getStatus()?null!=B&&(ua=ua.getText(),ka&&(T=null!=T?T:"data:image/png;base64,",ua=T+Editor.base64Encode(ua)),B(ua)):null!=I&&(0==ua.getStatus()?I({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?I({message:mxResources.get("fileNotFound"),code:ua.getStatus()},ua):I({message:this.getErrorMessage(ua)},ua))}),function(ua){null!=I&&I({message:mxResources.get("error")+
-" "+ua.getStatus()})},ka,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:va})},Z)});va()}catch(ua){null!=I&&I(ua)}};Editor.prototype.getErrorMessage=function(k){var B=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);null!=U&&null!=U.error&&null!=U.error.message&&(B=U.error.message+" ("+B+")")}catch(P){}return B};Editor.prototype.absoluteCssFonts=function(k){var B=null;if(null!=k){var I=k.split("url(");if(0<I.length){B=[I[0]];k=window.location.pathname;
-var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<I.length;T++)if(U=I[T].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[T].substring(0,U));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);B.push('url("'+X+'"'+I[T].substring(U))}else B.push(I[T])}else B=[k]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=
-function(k,B,I){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));I(k,B)};Editor.prototype.embedCssFonts=function(k,B){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ka=[I[0]],va=1;va<I.length;va++){var ua=I[va].indexOf(")");ka.push('url("');ka.push(this.cachedFonts[Editor.trimCssUrl(I[va].substring(0,ua))]);ka.push('"'+I[va].substring(ua))}B(ka.join(""))}});if(0<I.length){for(k=
-1;k<I.length;k++){var T=I[k].indexOf(")"),X=null,Z=I[k].indexOf("format(",T);0<Z&&(X=Editor.trimCssUrl(I[k].substring(Z+7,I[k].indexOf(")",Z))));mxUtils.bind(this,function(ka){if(null==this.cachedFonts[ka]){this.cachedFonts[ka]=ka;U++;var va="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ka))va="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ka))va="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ka))va="application/font-woff";else if("woff2"==
-X||/(\.woff2)($|\?)/i.test(ka))va="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ka))va="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ka))va="application/font-sfnt";this.mapFontUrl(va,ka,mxUtils.bind(this,function(ua,qa){this.loadUrl(qa,mxUtils.bind(this,function(Ba){this.cachedFonts[ka]=Ba;U--;P()}),mxUtils.bind(this,function(Ba){U--;P()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,T)),X)}P()}else B(k)};Editor.prototype.loadFonts=
-function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(k[B]=Graph.fontMapping[B]);return k};Editor.prototype.embedExtFonts=function(k){var B=this.graph.getCustomFonts();if(0<B.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());
-for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),T=0;T<B.length;T++)mxUtils.bind(this,function(X,Z){Graph.isCssFontUrl(Z)?null==this.cachedGoogleFonts[Z]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(Z),mxUtils.bind(this,function(ka){this.cachedGoogleFonts[Z]=ka;I.push(ka+"\n");U--;P()}),mxUtils.bind(this,function(ka){U--;I.push("@import url("+Z+");\n");P()}))):I.push(this.cachedGoogleFonts[Z]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+Z+'")}\n')})(B[T].name,
-B[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var B=document.getElementsByTagName("style"),I=0;I<B.length;I++){var U=mxUtils.getTextContent(B[I]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(B[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var I=mxUtils.getSvgDefs(k),U=B.split("\n");B=[];for(var P=[],T=0;T<U.length;T++)"@import"==
-U[T].substring(0,7)?B.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<B.length&&(mxUtils.setTextContent(k,B.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,
-B,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/B))};Editor.prototype.exportToCanvas=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa,Ba,ya,La,za,Ea,pa){try{T=null!=T?T:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;Ba=null!=Ba?Ba:0;var Ca=ka?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ka&&(Ca="dark"==za&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,Ba,ya,null,X,null,null,null,va,null,za,Ea,pa),mxUtils.bind(this,
-function(Aa){try{var wa=new Image;wa.onload=mxUtils.bind(this,function(){try{var Qa=function(){mxClient.IS_SF?window.setTimeout(function(){Ma.drawImage(wa,0,0);k(Ra,Aa)},0):(Ma.drawImage(wa,0,0),k(Ra,Aa))},Ra=document.createElement("canvas"),Sa=parseInt(Aa.getAttribute("width")),Ha=parseInt(Aa.getAttribute("height"));Z=null!=Z?Z:1;null!=B&&(Z=T?Math.min(1,Math.min(3*B/(4*Ha),B/Sa)):B/Sa);Z=this.getMaxCanvasScale(Sa,Ha,Z);Sa=Math.ceil(Z*Sa);Ha=Math.ceil(Z*Ha);Ra.setAttribute("width",Sa);Ra.setAttribute("height",
-Ha);var Ma=Ra.getContext("2d");if(null!=Ca){var y=mxUtils.getLightDarkColor(Ca);Ma.beginPath();Ma.rect(0,0,Sa,Ha);Ma.fillStyle="dark"==za&&"none"!=qa.getAdaptiveColors()?y.dark:y.light;Ma.fill()}1!=Z&&Ma.scale(Z,Z);if(La){var O=qa.view,R=O.scale;O.scale=1;var V=btoa(unescape(encodeURIComponent(O.createSvgGrid(O.gridColor))));O.scale=R;V="data:image/svg+xml;base64,"+V;var fa=qa.gridSize*O.gridSteps*Z,ia=qa.getGraphBounds(),oa=O.translate.x*R,ta=O.translate.y*R,ra=oa+(ia.x-oa)/R-Ba,xa=ta+(ia.y-ta)/
-R-Ba,Da=new Image;Da.onload=function(){try{for(var Ia=-Math.round(fa-mxUtils.mod((oa-ra)*Z,fa)),Ya=-Math.round(fa-mxUtils.mod((ta-xa)*Z,fa));Ia<Sa;Ia+=fa)for(var Za=Ya;Za<Ha;Za+=fa)Ma.drawImage(Da,Ia/Z,Za/Z);Qa()}catch($a){null!=P&&P($a)}};Da.onerror=function(Ia){null!=P&&P(Ia)};Da.src=V}else Qa()}catch(Ia){null!=P&&P(Ia)}});wa.onerror=function(Qa){null!=P&&P(Qa)};va&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
-this.addFontCss(Aa,this.resolvedFontCss),wa.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Qa){null!=P&&P(Qa)}});this.embedExtFonts(mxUtils.bind(this,function(Qa){try{null!=Qa&&this.addFontCss(Aa,Qa),this.loadFonts(Xa)}catch(Ra){null!=P&&P(Ra)}}))}catch(Qa){null!=P&&P(Qa)}}),I,ua)}catch(Aa){null!=P&&P(Aa)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var n=v,A=0;8>A;A++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[v]=n;Editor.updateCRC=function(k,B,I,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^
-B.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var B=-1,I=0;I<k.length;I++)B=B>>>8^Editor.crcTable[(B^k.charCodeAt(I))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(k,B,I,U,P){function T(ua,qa){var Ba=ka;ka+=qa;return ua.substring(Ba,ka)}function X(ua){ua=T(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function Z(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}k=k.substring(k.indexOf(",")+
-1);k=window.atob?atob(k):Base64.decode(k,!0);var ka=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ka);do{var va=X(k);if("IDAT"==T(k,4)){P=k.substring(0,ka-8);"pHYs"==B&&"dpi"==I?(I=Math.round(U/.0254),I=Z(I)+Z(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,B,0,4);U=Editor.updateCRC(U,I,0,I.length);P+=Z(I.length)+
-B+I+Z(U^4294967295);P+=k.substring(ka-8,k.length);break}P+=k.substring(ka-8,ka-4+va);T(k,va);T(k,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,B){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,B){var I=null;null!=k.editor.graph.getModel().getParent(B)?I=B.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
-var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var B=this.editorUi,I=B.editor.graph;
-if(I.isEnabled()){var U=B.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(T){B.editor.setAutosave(T);B.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(T){this.listener=function(){T(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==
-typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(T){B.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=function(){T(I.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});k.appendChild(P);(!B.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&P.appendChild(B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
-mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",
-dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=
-[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,
-"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
-min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];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:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{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:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{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;var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
-f.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var B=this.editorUi.getSelectionState();1==B.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=B.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(k,B,I,U){function P(Ma,y,O,R,V){if(null!=O.valueChanged)O.valueChanged(y,V);else{Ba.getModel().beginUpdate();try{V=[];var fa=[];if(null!=O.index){for(var ia=[],oa=O.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Ma;)ia.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;O.index<ia.length?null!=R?ia.splice(R,1):ia[O.index]=y:ia.push(y);null!=O.size&&ia.length>O.size&&(ia=ia.slice(0,O.size));y=ia.join(",");null!=O.countProperty&&(Ba.setCellStyles(O.countProperty,ia.length,Ba.getSelectionCells()),
-V.push(O.countProperty),fa.push(ia.length))}Ba.setCellStyles(Ma,y,Ba.getSelectionCells());V.push(Ma);fa.push(y);if(null!=O.dependentProps)for(Ma=0;Ma<O.dependentProps.length;Ma++){var ta=O.dependentPropsDefVal[Ma],ra=O.dependentPropsVals[Ma];if(ra.length>y)ra=ra.slice(0,y);else for(var xa=ra.length;xa<y;xa++)ra.push(ta);ra=ra.join(",");Ba.setCellStyles(O.dependentProps[Ma],ra,Ba.getSelectionCells());V.push(O.dependentProps[Ma]);fa.push(ra)}if("function"==typeof O.onChange)O.onChange(Ba,y);qa.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",V,"values",fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}}function T(Ma,y,O){var R=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Ma,!0);y.style.position="absolute";y.style.left=V.x-R.x+"px";y.style.top=V.y-R.y+"px";y.style.width=Ma.offsetWidth+"px";y.style.height=Ma.offsetHeight-(O?4:0)+"px";y.style.zIndex=5}function X(Ma,y,O){function R(fa){if(null==fa||fa==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==fa)V.style.background=
-"";else{var ia=mxUtils.getLightDarkColor(fa);mxUtils.isLightDarkColor(fa)&&ia.light!=ia.dark?V.style.background="linear-gradient(to right bottom, "+ia.cssText+" 50%, "+mxUtils.invertLightDarkColor(ia).cssText+" 50.3%)":V.style.background=fa}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";R(y);btn=mxUtils.button("",mxUtils.bind(qa,function(fa){this.editorUi.pickColor(y,function(ia){P(Ma,ia,O);
-R(ia)});mxEvent.consume(fa)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function Z(Ma,y,O,R,V,fa,ia){null!=y&&(y=y.split(","),ya.push({name:Ma,values:y,type:O,defVal:R,countProperty:V,parentRow:fa,isDeletable:!0,flipBkg:ia}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var ta=fa,ra=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==Ma)ta=ta.nextSibling,
-ra++;else break;var xa={type:O,parentRow:fa,index:ra,isDeletable:!0,defVal:R,countProperty:V};ra=ua(Ma,"",xa,0==ra%2,ia);P(Ma,R,xa);ta.parentNode.insertBefore(ra,ta.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ka(Ma,y,O,R,V,fa,ia){if(0<V){var oa=Array(V);y=null!=y?y.split(","):[];for(var ta=0;ta<V;ta++)oa[ta]=null!=y[ta]?y[ta]:null!=R?R:"";ya.push({name:Ma,values:oa,type:O,defVal:R,parentRow:fa,flipBkg:ia,size:V})}return document.createElement("div")}
-function va(Ma,y,O){var R=document.createElement("input");R.type="checkbox";R.checked="1"==y;mxEvent.addListener(R,"change",function(){P(Ma,R.checked?"1":"0",O)});return R}function ua(Ma,y,O,R,V){var fa=O.dispName,ia=O.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(R?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ma);oa.setAttribute("data-pValue",y);R=!1;null!=O.index&&(oa.setAttribute("data-index",O.index),fa=(null!=fa?fa:"")+"["+O.index+"]",R=!0);var ta=
-document.createElement("td");ta.className="gePropRowCell";fa=mxResources.get(fa,null,fa);mxUtils.write(ta,fa);ta.setAttribute("title",fa);R&&(ta.style.textAlign="right");oa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";ta.setAttribute("title",null!=y?y:mxResources.get("none"));if("color"==ia)ta.appendChild(X(Ma,y,O));else if("bool"==ia||"boolean"==ia)ta.appendChild(va(Ma,y,O));else if("enum"==ia){var ra=O.enumList;for(V=0;V<ra.length;V++)if(fa=ra[V],fa.val==y){mxUtils.write(ta,
-mxResources.get(fa.dispName,null,fa.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){var xa=document.createElement("select"),Da=null;T(ta,xa);for(var Ia=0;Ia<ra.length;Ia++){var Ya=ra[Ia],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,null,Ya.dispName));xa.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}xa.value=null==y&&null!=Da?"null":y;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var $a=
-mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Da||"null"==$a.value)$a=null;P(Ma,$a,O)});xa.focus();mxEvent.addListener(xa,"blur",function(){k.removeChild(xa)})}))}else"dynamicArr"==ia?ta.appendChild(Z(Ma,y,O.subType,O.subDefVal,O.countProperty,oa,V)):"staticArr"==ia?ta.appendChild(ka(Ma,y,O.subType,O.subDefVal,O.size,oa,V)):"readOnly"==ia?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=y,V.style.borderWidth="0px","id"==Ma?(V.style.width="190px",V.style.position=
-"relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",y),oa.firstChild.appendChild(V)):(V.style.width="96px",ta.appendChild(V))):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(y)),mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){function xa(){var Ia=Da.value;Ia=0==Ia.length&&"string"!=ia&&"numbers"!=ia?0:Ia;O.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?
-(Ia="auto",ia="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=O.min&&Ia<O.min?Ia=O.min:null!=O.max&&Ia>O.max&&(Ia=O.max);var Ya=null;try{Ya="numbers"==ia?Ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ia?parseInt(Ia):Ia)+"")}catch(Za){}P(Ma,Ya,O,null,Da)}var Da=document.createElement("input");T(ta,Da,!0);Da.value=decodeURIComponent(y);Da.className="gePropEditor";"int"!=ia&&"float"!=ia||O.allowAuto||(Da.type="number",Da.step="int"==ia?"1":"any",null!=O.min&&(Da.min=parseFloat(O.min)),
-null!=O.max&&(Da.max=parseFloat(O.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ia){13==Ia.keyCode&&xa()});Da.focus();mxEvent.addListener(Da,"blur",function(){xa()})})));O.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(xa){P(Ma,"",O,O.index);mxEvent.consume(xa)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",ta.appendChild(V));oa.appendChild(ta);return oa}var qa=this,Ba=this.editorUi.editor.graph,ya=[],La=document.createElement("table");
-La.className="geProperties geFullWidthElement";var za=document.createElement("tr");za.className="gePropHeader";var Ea=document.createElement("th");Ea.className="gePropHeaderCell";Ea.style.paddingLeft="16px";Ea.style.backgroundRepeat="no-repeat";Ea.style.backgroundPosition="-2px 50%";Ea.style.backgroundSize="20px";mxUtils.write(Ea,mxResources.get("property"));za.style.cursor="pointer";var pa=function(){var Ma=La.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ea.style.backgroundImage=
-"url('"+Editor.arrowRightImage+"')";var y="none";for(var O=k.childNodes.length-1;0<=O;O--)try{var R=k.childNodes[O],V=R.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(R)}catch(fa){}}else Ea.style.backgroundImage="url('"+Editor.arrowDownImage+"')",y="";for(O=0;O<Ma.length;O++)Ma[O].style.display=y};mxEvent.addListener(za,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;pa()});za.appendChild(Ea);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";
-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));za.appendChild(Ca);La.appendChild(za);var Aa=Ca=!1;za=null;1==I.vertices.length&&0==I.edges.length?za=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(za=I.edges[0].id);null==za||U||La.appendChild(ua("id",mxUtils.htmlEntities(za),{dispName:"id",type:"readOnly"},!0,!1));for(var wa in B)if(U=B[wa],!U.primary&&("function"!=typeof U.isVisible||U.isVisible(I,this))){var Xa=null!=U.getValue?U.getValue():null!=I.style[wa]?mxUtils.htmlEntities(I.style[wa]+
-""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Aa=!Aa;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||B[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Qa=U.dependentProps,Ra=[],Sa=[];for(za=0;za<Qa.length;za++){var Ha=I.style[Qa[za]];Sa.push(B[Qa[za]].subDefVal);Ra.push(null!=Ha?Ha.split(","):[])}U.dependentPropsDefVal=Sa;U.dependentPropsVals=Ra}La.appendChild(ua(wa,Xa,U,Ca,Aa));Ca=!Ca}}for(za=0;za<ya.length;za++)for(U=ya[za],
-B=U.parentRow,I=0;I<U.values.length;I++)wa=ua(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),B.parentNode.insertBefore(wa,B.nextSibling),B=wa;k.appendChild(La);pa();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var B=this.editorUi,I=B.editor.graph,U=document.createElement("div");U.style.padding="6px 20px 0 24px";k.appendChild(U);var P=
-document.createElement("div");P.className="geSwitcher";P.style.padding="4px 18px 6px 0px";for(var T=[],X=0;X<this.defaultColorSchemes.length;X++){var Z=document.createElement("div");Z.className="geSwitcherDot";mxUtils.bind(this,function(Ba){mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ka(Ba)}))})(X);T.push(Z);P.appendChild(Z)}var ka=mxUtils.bind(this,function(Ba){null!=T[Ba]&&(null!=this.format.currentScheme&&null!=T[this.format.currentScheme]&&(T[this.format.currentScheme].style.background=
-"transparent"),this.format.currentScheme=Ba,va(this.defaultColorSchemes[this.format.currentScheme]),T[this.format.currentScheme].style.background="#84d7ff")}),va=mxUtils.bind(this,function(Ba){var ya=mxUtils.clone(I.defaultVertexStyle);ya[mxConstants.STYLE_STROKECOLOR]=null!=ya[mxConstants.STYLE_STROKECOLOR]?ya[mxConstants.STYLE_STROKECOLOR]:"default";ya[mxConstants.STYLE_FILLCOLOR]=null!=ya[mxConstants.STYLE_FILLCOLOR]?ya[mxConstants.STYLE_FILLCOLOR]:"default";ya[mxConstants.STYLE_FONTCOLOR]=null!=
-ya[mxConstants.STYLE_FONTCOLOR]?ya[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ya);var La=mxUtils.bind(this,function(Ea){var pa=mxUtils.button("",mxUtils.bind(this,function(wa){I.getModel().beginUpdate();try{for(var Xa=B.getSelectionState().cells,Qa=0;Qa<Xa.length;Qa++){var Ra=I.getModel().getStyle(Xa[Qa]);null!=Ea?(mxEvent.isShiftDown(wa)||(Ra=""==Ea.fill||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,
-Ea.fill),Ra=""==Ea.gradient||null==Ea.gradient?mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,Ea.gradient),mxEvent.isControlDown(wa)||mxClient.IS_MAC&&mxEvent.isMetaDown(wa)||!I.getModel().isVertex(Xa[Qa])||(Ra=""==Ea.font||null==Ea.font?mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,Ea.font))),mxEvent.isAltDown(wa)||(Ra=""==Ea.stroke||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,
-null):mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,Ea.stroke))):(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(Xa[Qa])&&(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(Xa[Qa],Ra)}}finally{I.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!=Ea){var Ca="1px solid";null!=Ea.border&&(Ca=Ea.border);if(null!=Ea.gradient)pa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ea.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ea.gradient).cssText+" 100%)";else if(Ea.fill==mxConstants.NONE)pa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ea.fill||""==Ea.fill)pa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,
-"#ffffff")).cssText;else{var Aa=mxUtils.getLightDarkColor(Ea.fill);pa.style.backgroundImage="linear-gradient(to right bottom, "+Aa.cssText+" 50%, "+Aa.light+" 50.3%)"}null==Ea.stroke||Ea.stroke==mxConstants.NONE?pa.style.border=Ca+" transparent":""==Ea.stroke?pa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Aa=mxUtils.getLightDarkColor(Ea.stroke),pa.style.border=Ca+" "+Aa.cssText,pa.style.borderRightColor=Aa.light,pa.style.borderBottomColor=
-pa.style.borderRightColor);null!=Ea.title&&pa.setAttribute("title",Ea.title)}else Ca=mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Aa=mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000"),pa.style.backgroundColor=Ca,pa.style.border="1px solid "+Aa;pa.style.borderRadius="0";U.appendChild(pa);null!=Ea&&null!=Ea.gradient&&(Ca=pa.cloneNode(!1),Ca.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.fill).light+") 0px, light-dark(transparent, "+
-mxUtils.getLightDarkColor(Ea.gradient).light+") 100%)",Ca.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ca.style.backgroundColor="transparent",U.appendChild(Ca),Ca.style.marginLeft="-42px",mxEvent.addListener(Ca,"click",function(){pa.click()}))});U.innerText="";if(null!=Ba)for(var za=0;za<Ba.length;za++)0<za&&0==mxUtils.mod(za,4)&&mxUtils.br(U),La(Ba[za])});null==this.format.currentScheme?ka(Math.min(T.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):ka(this.format.currentScheme);
-X=10>=this.defaultColorSchemes.length?43:23;var ua=document.createElement("div");ua.className="geButton";ua.style.cssText="position:absolute;left:0px;bottom:"+X+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){ka(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+X+"px;width:20px;background-image:url("+
-Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(ua),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){ka(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));va(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
-STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+
-":wght@400;500");return k};Graph.createFontElement=function(k,B){var I=Graph.fontMapping[B];null==I&&Graph.isCssFontUrl(B)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(B))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+B+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,B){};Graph.addFont=
-function(k,B,I){if(null!=k&&0<k.length&&null!=B&&0<B.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=B&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=B,"http:"==B.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(B)),P={name:k,url:B,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,B=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=
-I):I()),null!=B&&B.appendChild(P.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,B){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(B=k.url);return B};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var B=0;B<k.length;B++){var I=k[B].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[B].nodeName?k[B].getAttribute("face"):k[B].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=
-k){var B=mxUtils.getValue(k,"fontSource",null);if(null!=B){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(B))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";
-Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var t=Graph.prototype.init;Graph.prototype.init=function(){function k(P){B=P}t.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",
-function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
-X.marginLeft=T.marginLeft||0;X.marginRight=T.marginRight||0;X.marginTop=T.marginTop||0;X.marginBottom=T.marginBottom||0;X.allowGaps=T.allowGaps||0;X.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,B){return Graph.processFontStyle(q.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;
-mxSvgCanvas2D.prototype.updateTextNodes=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa){D.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,B,I,U){function P(){for(var za=Z.getSelectionCells(),Ea=[],pa=0;pa<za.length;pa++)Z.isCellVisible(za[pa])&&Ea.push(za[pa]);Z.setSelectionCells(Ea)}function T(za){Z.setHiddenTags(za?
-[]:ka.slice());P();Z.refresh()}function X(za,Ea){ua.innerText="";if(0<za.length){var pa=document.createElement("table");pa.setAttribute("cellpadding","2");pa.style.boxSizing="border-box";pa.style.tableLayout="fixed";pa.style.width="100%";var Ca=document.createElement("tbody");if(null!=za&&0<za.length)for(var Aa=0;Aa<za.length;Aa++)(function(wa){function Xa(){var y=Z.getCellsForTags([wa],null,null,!0);Z.isEnabled()?Z.setSelectionCells(y):Z.highlightCells(y,null,null,70)}var Qa=0>mxUtils.indexOf(Z.hiddenTags,
-wa),Ra=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",Qa?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",mxResources.get(Qa?"hideIt":"show",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";Sa.appendChild(Ha);
-mxEvent.addListener(Ha,"click",function(y){mxEvent.isShiftDown(y)?T(0<=mxUtils.indexOf(Z.hiddenTags,wa)):(Z.toggleHiddenTag(wa),P(),Z.refresh());mxEvent.consume(y)});Ra.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.selectImage);Ha.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";
-Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){T(!0);Xa();mxEvent.consume(y)});Sa.appendChild(Ha);Ra.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";
-mxUtils.setOpacity(a,Qa?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(y){if(mxEvent.isShiftDown(y))T(!0),Xa();else if(Qa&&0<Z.hiddenTags.length)T(!0);else{var O=ka.slice(),R=mxUtils.indexOf(O,wa);O.splice(R,1);Z.setHiddenTags(O);P();Z.refresh()}mxEvent.consume(y)});Ra.appendChild(Sa);if(Z.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ea){Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");
-Ha.setAttribute("src",Editor.trashImage);Ha.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){var O=mxUtils.indexOf(ka,wa);0<=O&&ka.splice(O,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[wa]);Z.refresh();mxEvent.consume(y)});Sa.appendChild(Ha)}else{var Ma=
-document.createElement("input");Ma.setAttribute("type","checkbox");Ma.style.margin="0px";Ma.defaultChecked=null!=Ea&&0<=mxUtils.indexOf(Ea,wa);Ma.checked=Ma.defaultChecked;Ma.style.background="transparent";Ma.setAttribute("title",mxResources.get(Ma.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(Ma,"change",function(y){Ma.checked?Z.addTagsForCells(Z.getSelectionCells(),[wa]):Z.removeTagsForCells(Z.getSelectionCells(),[wa]);mxEvent.consume(y)});Sa.appendChild(Ma)}Ra.appendChild(Sa)}Ca.appendChild(Ra)})(za[Aa]);
-pa.appendChild(Ca);ua.appendChild(pa)}}var Z=this,ka=Z.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var ua=document.createElement("div");ua.style.position="absolute";ua.style.boxSizing="border-box";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.padding="3px";ua.style.left="0px";ua.style.right="0px";ua.style.top="0px";ua.style.bottom="0px";va.appendChild(ua);Z.addListener(mxEvent.ROOT,
-function(){ka=Z.hiddenTags.slice()});var qa=mxUtils.bind(this,function(za,Ea){if(k()){za=Z.getAllTags();for(Ea=0;Ea<za.length;Ea++)0>mxUtils.indexOf(ka,za[Ea])&&ka.push(za[Ea]);ka.sort();Z.isSelectionEmpty()?X(ka):X(ka,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,qa);Z.model.addListener(mxEvent.CHANGE,qa);Z.addListener(mxEvent.REFRESH,qa);var Ba=document.createElement("div");Ba.className="geToolbarContainer geDialogToolbar";Ba.style.position="absolute";
-Ba.style.display="flex";Ba.style.bottom="0px";Ba.style.left="0px";Ba.style.right="0px";Ba.style.height="32px";Ba.style.overflow="hidden";Ba.style.padding="3px 4px 4px 4px";Ba.style.borderWidth="1px 0px 0px 0px";Ba.style.borderStyle="solid";Ba.style.whiteSpace="nowrap";if(Z.isEnabled()){ua.style.bottom="32px";var ya=document.createElement("a");ya.className="geButton";var La=ya.cloneNode(!1);La.style.backgroundImage="url("+Editor.visibleImage+")";La.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(La,
-"click",function(za){Z.setHiddenTags([]);mxEvent.isShiftDown(za)||(ka=Z.hiddenTags.slice());P();Z.refresh();mxEvent.consume(za)});Ba.appendChild(La);null!=I&&(ya=ya.cloneNode(!1),ya.style.backgroundImage="url("+Editor.plusImage+")",ya.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ya,"click",function(za){I(ka,function(Ea){ka=Ea;qa()});mxEvent.consume(za)}),Ba.appendChild(ya));va.appendChild(Ba)}null!=U&&Ba.appendChild(U);return{div:va,refresh:qa}};Graph.prototype.getCustomFonts=
-function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var B in Graph.customFontElements){var I=Graph.customFontElements[B];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,B){Graph.addFont(k,B);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==I&&(P=!0,U[T].setAttribute("face",k),null!=B?U[T].setAttribute("data-font-src",B):U[T].removeAttribute("data-font-src"));
-P||document.execCommand("fontname",!1,k)};var N=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return N.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var B in k)this.globalVars[B]=k[B]}catch(I){null!=
-window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var B=L.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[k]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var J=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa,Ba,ya,La,za){var Ea=J.apply(this,arguments);if(null!=qa){var pa=Ea.getAttribute("style");null==pa&&(pa="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ea.setAttribute("style",pa+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(ua&&0<Ca.length){var Aa=Ea.ownerDocument;pa=null!=Aa.createElementNS?
-Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?pa.setAttributeNS("type","text/css"):pa.setAttribute("type","text/css");for(var wa="",Xa="",Qa=0;Qa<Ca.length;Qa++){var Ra=Ca[Qa].name,Sa=Ca[Qa].url;Graph.isCssFontUrl(Sa)?wa+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Xa+='@font-face {\nfont-family: "'+Ra+'";\nsrc: url("'+Sa+'");\n}\n'}pa.appendChild(Aa.createTextNode(wa+Xa));Ea.getElementsByTagName("defs")[0].appendChild(pa)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ea);this.mathEnabled&&(document.body.appendChild(Ea),Editor.MathJaxRender(Ea),Ea.parentNode.removeChild(Ea),pa=Ea.ownerDocument.getElementById("MJX-SVG-styles"),null!=pa&&Ea.getElementsByTagName("defs")[0].appendChild(pa.cloneNode(!0)));return Ea};var Y=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Y.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ha=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ha.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,
-"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var B="1"==mxUtils.getValue(k.style,"enumerate",0);B&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):B||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);B=k.secondLabel;if(null!=B){var I=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));B.bounds.equals(k)&&B.value==U&&B.scale==I||(B.bounds=k,B.value=U,B.scale=I,B.redraw())}};var aa=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
-aa.apply(this,arguments)};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(k,B){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&
-this.executeCustomActions(k.actions,null,B))};Graph.prototype.executeCustomActions=function(k,B,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,
-function(){U&&(U=!1,this.model.endUpdate())}),ka=mxUtils.bind(this,function(){0<P&&P--;0==P&&va()}),va=mxUtils.bind(this,function(){if(T<k.length){var ua=this.stoppingCustomActions,qa=k[T++],Ba=[];if(null!=qa.open)if(Z(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ka()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=qa.wait?parseInt(qa.wait):1E3),Z());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ka,ua?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ka,ua?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,
-!0),!0)));null!=qa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var ya=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ya),1);this.setCellsVisible(ya,!0)}null!=qa.hide&&(X(),ya=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ya),0),this.setCellsVisible(ya,!1));null!=qa.toggleStyle&&null!=
-qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));ya=[];null!=qa.select&&this.isEnabled()&&(ya=this.getCellsForAction(qa.select),this.setSelectionCells(ya));null!=qa.highlight&&(ya=this.getCellsForAction(qa.highlight),this.highlightCells(ya,qa.highlight.color,
-qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(ya=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<ya.length&&this.scrollCellToVisible(ya[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var La=qa.tags.toggle;0==La.length&&(La=this.getAllTags());for(ya=0;ya<La.length;ya++)this.toggleHiddenTag(La[ya])}La=null;null!=qa.tags.hidden&&(null==La&&(La=[]),La=La.concat(qa.tags.hidden));
-if(null!=qa.tags.visible){null==La&&(La=[]);var za=this.getAllTags();for(ya=0;ya<za.length;ya++)0>mxUtils.indexOf(qa.tags.visible,za[ya])&&0>mxUtils.indexOf(La,za[ya])&&La.push(za[ya])}null!=La&&this.setHiddenTags(La);this.refresh()}0<Ba.length&&(P++,this.executeAnimations(Ba,ka,ua?1:qa.steps,ua?0:qa.delay));0==P?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=B&&B()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,B){var I=this.getLinkForCell(B);null!=
-I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(k,I));if(this.isHtmlLabel(B)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(B));for(var P=U.getElementsByTagName("a"),T=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),T=!0);T&&this.labelChanged(B,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,B){if("data:action/json,"==
-B.substring(0,17))try{var I=JSON.parse(B.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),B="data:action/json,"+JSON.stringify(I))}catch(U){}return B};Graph.prototype.updateCustomLinkActions=function(k,B){for(var I=0;I<B.length;I++){var U=B[I],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,B,I){if(null!=B&&null!=B[I]){for(var U=[],P=0;P<B[I].length;P++)if("*"==
-B[I][P])U.push(B[I][P]);else{var T=k[B[I][P]];null!=T?""!=T&&U.push(T):U.push(B[I][P])}B[I]=U}};Graph.prototype.getCellsForAction=function(k,B){B=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,B));if(null!=k.excludeCells){for(var I=[],U=0;U<B.length;U++)0>k.excludeCells.indexOf(B[U].id)&&I.push(B[U]);B=I}return B};Graph.prototype.getCellsById=function(k){var B=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(T){return T!=
-U},U))}else{var P=this.model.getCell(k[I]);null!=P&&B.push(P)}return B};var W=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return W.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var B=mxUtils.indexOf(this.hiddenTags,k);0>B?this.hiddenTags.push(k):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var B=0;B<k.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,k[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,B,I,U){var P=[];if(null!=k){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var T=0,X={},Z=0;Z<k.length;Z++)0<k[Z].length&&(X[k[Z]]=!0,T++);for(Z=0;Z<B.length;Z++)if(I&&this.model.getParent(B[Z])==
-this.model.root||this.model.isVertex(B[Z])||this.model.isEdge(B[Z])){var ka=this.getTagsForCell(B[Z]),va=!1;if(0<ka.length&&(ka=ka.split(" "),ka.length>=k.length)){for(var ua=va=0;ua<ka.length&&va<T;ua++)null!=X[ka[ua]]&&va++;va=va==T}va&&(1!=U||this.isCellVisible(B[Z]))&&P.push(B[Z])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var B=null,I=[],U=0;U<k.length;U++){var P=
-this.getTagsForCell(k[U]);I=[];if(0<P.length){P=P.split(" ");for(var T={},X=0;X<P.length;X++)if(null==B||null!=B[P[X]])T[P[X]]=!0,I.push(P[X]);B=T}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var B=[],I={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==I[P[T]]&&(I[P[T]]=!0,B.push(P[T]))}}return B};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
-function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),P=U.split(" "),T=!1,X=0;X<B.length;X++){var Z=mxUtils.trim(B[X]);""!=Z&&0>mxUtils.indexOf(P,Z)&&(U=0<U.length?U+" "+Z:Z,T=!0)}T&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);
-if(0<U.length){for(var P=U.split(" "),T=!1,X=0;X<B.length;X++){var Z=mxUtils.indexOf(P,B[X]);0<=Z&&(P.splice(Z,1),T=!0)}T&&this.setAttributeForCell(k[I],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var B=0;B<k.length;B++)this.model.setVisible(k[B],!this.model.isVisible(k[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,B){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],
-B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,B,I,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],B,I,U)};Graph.prototype.highlightCell=function(k,B,I,U,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,B,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&
-(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},1200)},I));return T};Graph.prototype.addSvgShadow=function(k,B,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");
-X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");
-X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");
-X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");T.appendChild(X);X=k.getElementsByTagName("defs");0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(T);I||(B=null!=B?B:k.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
-6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),B=k.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,k.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),B=0;do var I=this.model.getChildAt(this.model.root,B);while(B++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+
+Editor.createRoughCanvas=function(k){var B=rough.canvas({getContext:function(){return k}});B.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=K.stroke&&this._drawToContext(k,U,K);break;case "fillPath":this._drawToContext(k,U,K);break;case "fillSketch":this.fillSketch(k,U,K)}}};B.fillSketch=function(K,T,P){var U=k.state.strokeColor,Y=k.state.strokeWidth,aa=k.state.strokeAlpha,la=k.state.dashed,va=P.fillWeight;
+0>va&&(va=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(va);k.setDashed(!1);this._drawToContext(K,T,P);k.setDashed(la);k.setStrokeWidth(Y);k.setStrokeColor(U);k.setStrokeAlpha(aa)};B._drawToContext=function(K,T,P){K.begin();for(var U=0;U<T.ops.length;U++){var Y=T.ops[U],aa=Y.data;switch(Y.op){case "move":K.moveTo(aa[0],aa[1]);break;case "bcurveTo":K.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":K.lineTo(aa[0],aa[1])}}K.end();
+"fillPath"===T.type&&P.filled?K.fill():K.stroke()};return B};(function(){function k(U,Y,aa){this.canvas=U;this.rc=Y;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,Y){var aa=1;if(null!=this.shape.state){var la=this.shape.state.cell.id;if(null!=la)for(var va=0;va<la.length;va++)aa=(aa<<5)-aa+la.charCodeAt(va)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};la=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=Y)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",la.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",la.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",la.curveFitting);
+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",la.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",la.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",la.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",la.disableMultiStrokeFill);Y=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==Y?-1:Y;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Y);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Y);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Y);Y=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==Y?-1:Y;Y=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Y&&(Y="auto");"auto"==Y&&(Y=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Y.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Y.push(mxUtils.hex2rgb(Editor.darkColor)),Y=
+null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(Y,mxUtils.hex2rgb(aa.fill)))?"solid":la.fillStyle);aa.fillStyle=Y;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],
+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,Y){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,Y),this.lastX=U,this.lastY=Y)};k.prototype.moveTo=function(U,Y){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,Y),this.lastX=U,this.lastY=Y,this.firstX=U,this.firstY=Y)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,Y,aa,la){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,Y,aa,la),this.lastX=aa,this.lastY=la)};k.prototype.curveTo=function(U,Y,aa,la,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,Y,aa,la,va,ua),this.lastX=va,this.lastY=ua)};k.prototype.arcTo=function(U,Y,aa,la,va,ua,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
+else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY,U,Y,aa,la,va,ua,qa);if(null!=Ba)for(var ya=0;ya<Ba.length;ya+=6)this.curveTo(Ba[ya],Ba[ya+1],Ba[ya+2],Ba[ya+3],Ba[ya+4],Ba[ya+5]);this.lastX=ua;this.lastY=qa}};k.prototype.rect=function(U,Y,aa,la){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,Y,aa,la,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,Y,aa,la){this.passThrough?this.originalEllipse.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,Y+la/2,aa,la,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,Y,aa,la,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+va,Y),this.lineTo(U+aa-va,Y),this.quadTo(U+aa,Y,U+aa,Y+ua),this.lineTo(U+aa,Y+la-ua),this.quadTo(U+aa,Y+la,U+aa-va,Y+la),this.lineTo(U+va,Y+la),this.quadTo(U,Y+la,U,Y+la-ua),this.lineTo(U,Y+ua),this.quadTo(U,Y,U+va,Y))};k.prototype.drawPath=function(U){if(0<
+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Y in U)this.nextShape.options[Y]=U[Y];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var B=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,Y,aa,la,va){null!=U.handJiggle&&U.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=
+function(U){var Y=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var la=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var Ba=U.setFillColor;U.setFillColor=function(){};aa||null==la||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,
+arguments);U.handJiggle.passThrough=!1;U.setFillColor=Ba;U.setStrokeColor=qa;this.configurePointerEvents=ua;this.stroke=va;this.fill=la;U.restore();aa&&null!=la&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=Y};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,Y,aa,la,va,ua){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,B,K){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);
+break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,K),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&
+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||B||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,K)));null==k||"mxGraphModel"==k.nodeName||B&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,B,K){Editor.validateDiagramNode(k);
+var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(B=Graph.decompress(T,null,B),null!=B&&0<B.length&&(P=mxUtils.parseXml(B).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],K&&(P=Editor.parseDiagramNode(P,B,!1)),B=mxUtils.createXmlDocument(),B.appendChild(B.importNode(P,!0)),P=B.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var B=mxUtils.getNodeValue(k),K=null;0<B.length?K=Graph.decompress(B):(k=k.getElementsByTagName("mxGraphModel"),
+null!=k&&0<k.length&&(K=mxUtils.getXml(k[0])));return K};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var B=new mxCodec,K=new mxGraphModel;k.appendChild(B.encode(K))}return k};Editor.extractGraphModelFromPdf=function(k){var B=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var K=k.indexOf("EmbeddedFile");if(-1<K){var T=k.indexOf("stream",
+K)+9;if(0<k.substring(K,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(K=k.indexOf("/ObjStm");0<K;){T=k.indexOf("stream",K)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){K=T.substring(P+14,T.indexOf(">",P));if(null!=K){B=K;K=[];for(T=0;T<B.length;T+=2)P=B.substr(T,2),"00"!=P&&K.push(String.fromCharCode(parseInt(P,
+16)));B=K.join("")}break}K=k.indexOf("/ObjStm",K+1)}}if(null==B&&"%PDF-1.4"==k.substring(0,8)){K="";P=T=0;for(var U=[],Y=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(K+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var la=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(la>P){B=k.substring(P,la);break}}10==aa&&("endobj"==K?Y=null:"obj"==K.substring(K.length-3,K.length)||"xref"==K||"trailer"==K?(Y=[],U[K.split(" ")[0]]=Y):null!=Y&&Y.push(K),K="")}}null==B&&null!=
+U&&(B=Editor.extractGraphModelFromXref(U));null!=B&&(B=decodeURIComponent(B.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return B};Editor.extractGraphModelFromXref=function(k){var B=k.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=k[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(k=k[B[1]],null!=k&&(k=k.join("\n"),K=k.substring(1,k.length-1))))));return K};Editor.extractParserError=function(k,B){var K=null;k=
+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(K=B||mxResources.get("invalidChars"),B=k[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(k,B){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=B))};Editor.mermaidToDrawio=function(k,B,K){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,B,K)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
+k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);
+null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&
+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=
+k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&
+(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(k.css));var K=document.getElementsByTagName("script")[0];K.parentNode.insertBefore(B,K)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=
+k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=
+k.zoomFactor&&(B=parseFloat(k.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(B=parseInt(k.defaultGridSize),!isNaN(B)&&0<B?mxGraph.prototype.gridSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(B=parseInt(k.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=k.pageFormat&&(B=parseInt(k.pageFormat.width),K=parseInt(k.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(K)&&0<K?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,K),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(B=parseInt(k.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
+null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(B=parseInt(k.autosaveDelay),!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
+(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(k));B.parentNode.insertBefore(K,B);k=k.split("url(");for(K=1;K<k.length;K++){var T=k[K].indexOf(")");T=Editor.trimCssUrl(k[K].substring(0,T));var P=document.createElement("link");
+P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
+20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var B=[],K=0;K<k;K++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;
+Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var B=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==k.nodeName){B=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(K=null!=this.graph.themes?
+this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
+B=k.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(B=k.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<B.length;K++)this.graph.addExtFont(B[K].name,
+B[K].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,B){k=null!=k?k:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",
+this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?K.setAttribute("adaptiveColors",this.graph.adaptiveColors):K.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+
+"^"+P.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(k){try{var B=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=
+function(k,B,K){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
+function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var K=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=
+function(Y){try{null==T?(MathJax.typesetClear([Y]),MathJax.typeset([Y]),K()):T!=Y&&Editor.mathJaxQueue.push(Y)}catch(aa){MathJax.typesetClear([Y]),null!=aa.retry?(T=Y,aa.retry.then(function(){MathJax.typesetPromise([Y]).then(K)["catch"](function(la){console.log("Error in MathJax.typesetPromise: "+la.toString());K()})})["catch"](function(la){console.log("Error in MathJax.retry: "+la.toString());K()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=
+B?B:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var Y=0;Y<Editor.mathJaxQueue.length;Y++)Editor.doMathJaxRender(Editor.mathJaxQueue[Y])}}};Editor.MathJaxRender=function(Y){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Y):Editor.mathJaxQueue.push(Y)};Editor.onMathJaxDone=function(){};
+var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var Y=mxUtils.bind(this,function(aa,la){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Y);this.graph.addListener(mxEvent.REFRESH,Y)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var U=document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);B[0].parentNode.appendChild(U)}}};
+Editor.prototype.csvToArray=function(k){if(0<k.length){var B="",K=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===B&&(K[T]+=U),P=!P):","===U&&P?U=K[++T]="":K[T]+=U,B=U;return K}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var B=EditorUi.isVisioFilename(k);B=/\.png$/i.test(k)||/\.pdf$/i.test(k)||B;var K=
+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+K+(B?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var B=k.convert,K=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=B.apply(this,arguments)):T=PROXY_URL+
+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,B,K,T,P){try{var U=!0,Y=window.setTimeout(mxUtils.bind(this,function(){U=!1;B(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,B,K,T,!0):B(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(va){window.clearTimeout(Y);U&&(200>va.getStatus()||
+299<va.getStatus()?aa():B(Editor.createSvgDataUri(va.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Y);U&&aa()}));else{var la=new Image;this.crossOriginImages&&(la.crossOrigin="anonymous");la.onload=function(){window.clearTimeout(Y);if(U)try{T=null!=T&&P?T:1;var va=document.createElement("canvas"),ua=va.getContext("2d");ua.scale(T,T);va.height=la.height*T;va.width=la.width*T;ua.drawImage(la,0,0);B(va.toDataURL())}catch(qa){B(k)}};la.onerror=function(){window.clearTimeout(Y);U&&(null!=
+K?K():B(k))};la.src=k}}catch(va){null!=K?K():B(k)}};Editor.prototype.convertImages=function(k,B,K,T){function P(){0<U.length?U.shift()():B(k)}null==T&&(T=this.createImageUrlConverter());var U=[],Y=K||{};K=mxUtils.bind(this,function(aa,la){aa=k.getElementsByTagName(aa);for(var va=0;va<aa.length;va++)mxUtils.bind(this,function(ua){U.push(mxUtils.bind(this,function(){try{if(null!=ua){var qa=T.convert(ua.getAttribute(la));if(null!=qa&&"data:"!=qa.substring(0,5)){var Ba=Y[qa];null==Ba?this.convertImageToDataUri(qa,
+function(ya){null!=ya&&(Y[qa]=ya,ua.setAttribute(la,ya));P()},null,Editor.svgRasterScale):(ua.setAttribute(la,Ba),P())}else null!=qa&&ua.setAttribute(la,qa),P()}}catch(ya){P()}}))})(aa[va])});K("image","xlink:href");K("img","src");P()};Editor.base64Encode=function(k){for(var B="",K=0,T=k.length,P,U,Y;K<T;){P=k.charCodeAt(K++)&255;if(K==T){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4);B+="==";break}U=k.charCodeAt(K++);if(K==T){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);B+="=";break}Y=k.charCodeAt(K++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(Y&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Y&63)}return B};Editor.prototype.loadUrl=function(k,B,K,T,P,U,Y,aa){try{var la=!Y&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var va=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(ua){200<=ua.getStatus()&&
+299>=ua.getStatus()?null!=B&&(ua=ua.getText(),la&&(U=null!=U?U:"data:image/png;base64,",ua=U+Editor.base64Encode(ua)),B(ua)):null!=K&&(0==ua.getStatus()?K({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?K({message:mxResources.get("fileNotFound"),code:ua.getStatus()},ua):K({message:this.getErrorMessage(ua)},ua))}),function(ua){null!=K&&K({message:mxResources.get("error")+" "+ua.getStatus()})},la,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:va})},aa)});va()}catch(ua){null!=
+K&&K(ua)}};Editor.prototype.getErrorMessage=function(k){var B=mxResources.get("error")+" "+k.getStatus();try{var K=k.getText(),T=JSON.parse(K);null!=T&&null!=T.error&&null!=T.error.message&&(B=T.error.message+" ("+B+")")}catch(P){}return B};Editor.prototype.absoluteCssFonts=function(k){var B=null;if(null!=k){var K=k.split("url(");if(0<K.length){B=[K[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=
+T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<K.length;U++)if(T=K[U].indexOf(")"),0<T){var Y=Editor.trimCssUrl(K[U].substring(0,T));this.graph.isRelativeUrl(Y)&&(Y=null!=P?P+Y:window.location.protocol+"//"+window.location.hostname+("/"==Y.charAt(0)?"":k)+Y);B.push('url("'+Y+'"'+K[U].substring(T))}else B.push(K[U])}else B=[k]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(k,B,K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));
+K(k,B)};Editor.prototype.embedCssFonts=function(k,B){var K=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var la=[K[0]],va=1;va<K.length;va++){var ua=K[va].indexOf(")");la.push('url("');la.push(this.cachedFonts[Editor.trimCssUrl(K[va].substring(0,ua))]);la.push('"'+K[va].substring(ua))}B(la.join(""))}});if(0<K.length){for(k=1;k<K.length;k++){var U=K[k].indexOf(")"),Y=null,aa=K[k].indexOf("format(",U);0<aa&&(Y=Editor.trimCssUrl(K[k].substring(aa+
+7,K[k].indexOf(")",aa))));mxUtils.bind(this,function(la){if(null==this.cachedFonts[la]){this.cachedFonts[la]=la;T++;var va="application/x-font-ttf";if("svg"==Y||/(\.svg)($|\?)/i.test(la))va="image/svg+xml";else if("otf"==Y||"embedded-opentype"==Y||/(\.otf)($|\?)/i.test(la))va="application/x-font-opentype";else if("woff"==Y||/(\.woff)($|\?)/i.test(la))va="application/font-woff";else if("woff2"==Y||/(\.woff2)($|\?)/i.test(la))va="application/font-woff2";else if("eot"==Y||/(\.eot)($|\?)/i.test(la))va=
+"application/vnd.ms-fontobject";else if("sfnt"==Y||/(\.sfnt)($|\?)/i.test(la))va="application/font-sfnt";this.mapFontUrl(va,la,mxUtils.bind(this,function(ua,qa){this.loadUrl(qa,mxUtils.bind(this,function(Ba){this.cachedFonts[la]=Ba;T--;P()}),mxUtils.bind(this,function(Ba){T--;P()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[k].substring(0,U)),Y)}P()}else B(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(k[B]=Graph.fontMapping[B]);return k};Editor.prototype.embedExtFonts=function(k){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),k)}),
+U=0;U<B.length;U++)mxUtils.bind(this,function(Y,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(la){this.cachedGoogleFonts[aa]=la;K.push(la+"\n");T--;P()}),mxUtils.bind(this,function(la){T--;K.push("@import url("+aa+");\n");P()}))):K.push(this.cachedGoogleFonts[aa]+"\n"):K.push('@font-face {font-family: "'+Y+'";src: url("'+aa+'")}\n')})(B[U].name,B[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=
+k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var B=document.getElementsByTagName("style"),K=0;K<B.length;K++){var T=mxUtils.getTextContent(B[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(B[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=mxUtils.getSvgDefs(k),T=B.split("\n");B=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?B.push(T[U]):P.push(T[U]);k=k.ownerDocument;
+k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<B.length&&(mxUtils.setTextContent(k,B.join("\n")),K.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),K.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,B,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/
+k,T/B))};Editor.prototype.exportToCanvas=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa,Ba,ya,La,Aa,Ea,pa){try{U=null!=U?U:!0;Y=null!=Y?Y:!0;qa=null!=qa?qa:this.graph;Ba=null!=Ba?Ba:0;var Ca=la?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==la&&(Ca="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,Ba,ya,null,Y,null,null,null,va,null,Aa,Ea,pa),mxUtils.bind(this,function(za){try{var wa=new Image;wa.onload=mxUtils.bind(this,function(){try{var Qa=
+function(){mxClient.IS_SF?window.setTimeout(function(){Ma.drawImage(wa,0,0);k(Ra,za)},0):(Ma.drawImage(wa,0,0),k(Ra,za))},Ra=document.createElement("canvas"),Sa=parseInt(za.getAttribute("width")),Ha=parseInt(za.getAttribute("height"));aa=null!=aa?aa:1;null!=B&&(aa=U?Math.min(1,Math.min(3*B/(4*Ha),B/Sa)):B/Sa);aa=this.getMaxCanvasScale(Sa,Ha,aa);Sa=Math.ceil(aa*Sa);Ha=Math.ceil(aa*Ha);Ra.setAttribute("width",Sa);Ra.setAttribute("height",Ha);var Ma=Ra.getContext("2d");if(null!=Ca){var y=mxUtils.getLightDarkColor(Ca);
+Ma.beginPath();Ma.rect(0,0,Sa,Ha);Ma.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?y.dark:y.light;Ma.fill()}1!=aa&&Ma.scale(aa,aa);if(La){var O=qa.view,Q=O.scale;O.scale=1;var V=btoa(unescape(encodeURIComponent(O.createSvgGrid(O.gridColor))));O.scale=Q;V="data:image/svg+xml;base64,"+V;var ha=qa.gridSize*O.gridSteps*aa,ja=qa.getGraphBounds(),oa=O.translate.x*Q,ta=O.translate.y*Q,ra=oa+(ja.x-oa)/Q-Ba,xa=ta+(ja.y-ta)/Q-Ba,Da=new Image;Da.onload=function(){try{for(var Ia=-Math.round(ha-mxUtils.mod((oa-
+ra)*aa,ha)),Ya=-Math.round(ha-mxUtils.mod((ta-xa)*aa,ha));Ia<Sa;Ia+=ha)for(var Za=Ya;Za<Ha;Za+=ha)Ma.drawImage(Da,Ia/aa,Za/aa);Qa()}catch($a){null!=P&&P($a)}};Da.onerror=function(Ia){null!=P&&P(Ia)};Da.src=V}else Qa()}catch(Ia){null!=P&&P(Ia)}});wa.onerror=function(Qa){null!=P&&P(Qa)};va&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(za,this.resolvedFontCss),wa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Qa){null!=
+P&&P(Qa)}});this.embedExtFonts(mxUtils.bind(this,function(Qa){try{null!=Qa&&this.addFontCss(za,Qa),this.loadFonts(Xa)}catch(Ra){null!=P&&P(Ra)}}))}catch(Qa){null!=P&&P(Qa)}}),K,ua)}catch(za){null!=P&&P(za)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var n=v,A=0;8>A;A++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[v]=n;Editor.updateCRC=function(k,B,K,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^B.charCodeAt(K+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var B=-1,K=0;K<k.length;K++)B=
+B>>>8^Editor.crcTable[(B^k.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(k,B,K,T,P){function U(ua,qa){var Ba=la;la+=qa;return ua.substring(Ba,la)}function Y(ua){ua=U(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function aa(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var la=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+
+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,la);do{var va=Y(k);if("IDAT"==U(k,4)){P=k.substring(0,la-8);"pHYs"==B&&"dpi"==K?(K=Math.round(T/.0254),K=aa(K)+aa(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,B,0,4);T=Editor.updateCRC(T,K,0,K.length);P+=aa(K.length)+B+K+aa(T^4294967295);P+=k.substring(la-8,k.length);break}P+=k.substring(la-8,la-4+va);
+U(k,va);U(k,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,B){G.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()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,B){var K=null;null!=k.editor.graph.getModel().getParent(B)?K=B.getId():null!=k.currentPage&&(K=k.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var J=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?J.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var B=this.editorUi,K=B.editor.graph;if(K.isEnabled()){var T=B.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
+function(){return B.editor.autosave},function(U){B.editor.setAutosave(U);B.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(U){this.listener=function(){U(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(U){B.actions.get("mathematicalTypesetting").funct()},
+{install:function(U){this.listener=function(){U(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});k.appendChild(P);(!B.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&P.appendChild(B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
+[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
+type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,
+"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];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:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{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:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{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;var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var B=
+this.editorUi.getSelectionState();1==B.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=B.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,B,K,T){function P(Ma,y,O,Q,V){if(null!=O.valueChanged)O.valueChanged(y,V);else{Ba.getModel().beginUpdate();try{V=[];var ha=[];if(null!=O.index){for(var ja=[],oa=O.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==
+Ma;)ja.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;O.index<ja.length?null!=Q?ja.splice(Q,1):ja[O.index]=y:ja.push(y);null!=O.size&&ja.length>O.size&&(ja=ja.slice(0,O.size));y=ja.join(",");null!=O.countProperty&&(Ba.setCellStyles(O.countProperty,ja.length,Ba.getSelectionCells()),V.push(O.countProperty),ha.push(ja.length))}Ba.setCellStyles(Ma,y,Ba.getSelectionCells());V.push(Ma);ha.push(y);if(null!=O.dependentProps)for(Ma=0;Ma<O.dependentProps.length;Ma++){var ta=O.dependentPropsDefVal[Ma],
+ra=O.dependentPropsVals[Ma];if(ra.length>y)ra=ra.slice(0,y);else for(var xa=ra.length;xa<y;xa++)ra.push(ta);ra=ra.join(",");Ba.setCellStyles(O.dependentProps[Ma],ra,Ba.getSelectionCells());V.push(O.dependentProps[Ma]);ha.push(ra)}if("function"==typeof O.onChange)O.onChange(Ba,y);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ha,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}}function U(Ma,y,O){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Ma,!0);
+y.style.position="absolute";y.style.left=V.x-Q.x+"px";y.style.top=V.y-Q.y+"px";y.style.width=Ma.offsetWidth+"px";y.style.height=Ma.offsetHeight-(O?4:0)+"px";y.style.zIndex=5}function Y(Ma,y,O){function Q(ha){if(null==ha||ha==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ha)V.style.background="";else{var ja=mxUtils.getLightDarkColor(ha);mxUtils.isLightDarkColor(ha)&&ja.light!=ja.dark?V.style.background="linear-gradient(to right bottom, "+ja.cssText+
+" 50%, "+mxUtils.invertLightDarkColor(ja).cssText+" 50.3%)":V.style.background=ha}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(y);btn=mxUtils.button("",mxUtils.bind(qa,function(ha){this.editorUi.pickColor(y,function(ja){P(Ma,ja,O);Q(ja)});mxEvent.consume(ha)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);
+return btn}function aa(Ma,y,O,Q,V,ha,ja){null!=y&&(y=y.split(","),ya.push({name:Ma,values:y,type:O,defVal:Q,countProperty:V,parentRow:ha,isDeletable:!0,flipBkg:ja}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var ta=ha,ra=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==Ma)ta=ta.nextSibling,ra++;else break;var xa={type:O,parentRow:ha,index:ra,isDeletable:!0,defVal:Q,countProperty:V};ra=ua(Ma,"",xa,0==ra%2,ja);P(Ma,Q,xa);ta.parentNode.insertBefore(ra,ta.nextSibling);
+mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function la(Ma,y,O,Q,V,ha,ja){if(0<V){var oa=Array(V);y=null!=y?y.split(","):[];for(var ta=0;ta<V;ta++)oa[ta]=null!=y[ta]?y[ta]:null!=Q?Q:"";ya.push({name:Ma,values:oa,type:O,defVal:Q,parentRow:ha,flipBkg:ja,size:V})}return document.createElement("div")}function va(Ma,y,O){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==y;mxEvent.addListener(Q,"change",function(){P(Ma,
+Q.checked?"1":"0",O)});return Q}function ua(Ma,y,O,Q,V){var ha=O.dispName,ja=O.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ma);oa.setAttribute("data-pValue",y);Q=!1;null!=O.index&&(oa.setAttribute("data-index",O.index),ha=(null!=ha?ha:"")+"["+O.index+"]",Q=!0);var ta=document.createElement("td");ta.className="gePropRowCell";ha=mxResources.get(ha,null,ha);mxUtils.write(ta,ha);ta.setAttribute("title",ha);
+Q&&(ta.style.textAlign="right");oa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";ta.setAttribute("title",null!=y?y:mxResources.get("none"));if("color"==ja)ta.appendChild(Y(Ma,y,O));else if("bool"==ja||"boolean"==ja)ta.appendChild(va(Ma,y,O));else if("enum"==ja){var ra=O.enumList;for(V=0;V<ra.length;V++)if(ha=ra[V],ha.val==y){mxUtils.write(ta,mxResources.get(ha.dispName,null,ha.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){var xa=document.createElement("select"),
+Da=null;U(ta,xa);for(var Ia=0;Ia<ra.length;Ia++){var Ya=ra[Ia],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,null,Ya.dispName));xa.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}xa.value=null==y&&null!=Da?"null":y;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var $a=mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Da||"null"==$a.value)$a=null;P(Ma,$a,O)});xa.focus();mxEvent.addListener(xa,"blur",
+function(){k.removeChild(xa)})}))}else"dynamicArr"==ja?ta.appendChild(aa(Ma,y,O.subType,O.subDefVal,O.countProperty,oa,V)):"staticArr"==ja?ta.appendChild(la(Ma,y,O.subType,O.subDefVal,O.size,oa,V)):"readOnly"==ja?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=y,V.style.borderWidth="0px","id"==Ma?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan",
+"2"),V.setAttribute("title",y),oa.firstChild.appendChild(V)):(V.style.width="96px",ta.appendChild(V))):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(y)),mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){function xa(){var Ia=Da.value;Ia=0==Ia.length&&"string"!=ja&&"numbers"!=ja?0:Ia;O.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?(Ia="auto",ja="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=O.min&&Ia<O.min?Ia=O.min:null!=O.max&&Ia>O.max&&(Ia=O.max);var Ya=null;try{Ya=
+"numbers"==ja?Ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ja?parseInt(Ia):Ia)+"")}catch(Za){}P(Ma,Ya,O,null,Da)}var Da=document.createElement("input");U(ta,Da,!0);Da.value=decodeURIComponent(y);Da.className="gePropEditor";"int"!=ja&&"float"!=ja||O.allowAuto||(Da.type="number",Da.step="int"==ja?"1":"any",null!=O.min&&(Da.min=parseFloat(O.min)),null!=O.max&&(Da.max=parseFloat(O.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ia){13==Ia.keyCode&&xa()});Da.focus();
+mxEvent.addListener(Da,"blur",function(){xa()})})));O.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(xa){P(Ma,"",O,O.index);mxEvent.consume(xa)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",ta.appendChild(V));oa.appendChild(ta);return oa}var qa=this,Ba=this.editorUi.editor.graph,ya=[],La=document.createElement("table");La.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ea=document.createElement("th");
+Ea.className="gePropHeaderCell";Ea.style.paddingLeft="16px";Ea.style.backgroundRepeat="no-repeat";Ea.style.backgroundPosition="-2px 50%";Ea.style.backgroundSize="20px";mxUtils.write(Ea,mxResources.get("property"));Aa.style.cursor="pointer";var pa=function(){var Ma=La.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ea.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var y="none";for(var O=k.childNodes.length-1;0<=O;O--)try{var Q=k.childNodes[O],V=Q.nodeName.toUpperCase();
+"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ha){}}else Ea.style.backgroundImage="url('"+Editor.arrowDownImage+"')",y="";for(O=0;O<Ma.length;O++)Ma[O].style.display=y};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;pa()});Aa.appendChild(Ea);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Aa.appendChild(Ca);La.appendChild(Aa);var za=Ca=!1;Aa=null;
+1==K.vertices.length&&0==K.edges.length?Aa=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(Aa=K.edges[0].id);null==Aa||T||La.appendChild(ua("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var wa in B)if(T=B[wa],!T.primary&&("function"!=typeof T.isVisible||T.isVisible(K,this))){var Xa=null!=T.getValue?T.getValue():null!=K.style[wa]?mxUtils.htmlEntities(K.style[wa]+""):null!=T.getDefaultValue?T.getDefaultValue(K,this):T.defVal;if("separator"==T.type)za=!za;else{if("staticArr"==
+T.type)T.size=parseInt(K.style[T.sizeProperty]||B[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Qa=T.dependentProps,Ra=[],Sa=[];for(Aa=0;Aa<Qa.length;Aa++){var Ha=K.style[Qa[Aa]];Sa.push(B[Qa[Aa]].subDefVal);Ra.push(null!=Ha?Ha.split(","):[])}T.dependentPropsDefVal=Sa;T.dependentPropsVals=Ra}La.appendChild(ua(wa,Xa,T,Ca,za));Ca=!Ca}}for(Aa=0;Aa<ya.length;Aa++)for(T=ya[Aa],B=T.parentRow,K=0;K<T.values.length;K++)wa=ua(T.name,T.values[K],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,
+index:K,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==K%2,T.flipBkg),B.parentNode.insertBefore(wa,B.nextSibling),B=wa;k.appendChild(La);pa();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var B=this.editorUi,K=B.editor.graph,T=document.createElement("div");T.style.padding="6px 20px 0 24px";k.appendChild(T);var P=document.createElement("div");P.className="geSwitcher";P.style.padding="4px 18px 6px 0px";for(var U=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=
+document.createElement("div");aa.className="geSwitcherDot";mxUtils.bind(this,function(Ba){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){la(Ba)}))})(Y);U.push(aa);P.appendChild(aa)}var la=mxUtils.bind(this,function(Ba){null!=U[Ba]&&(null!=this.format.currentScheme&&null!=U[this.format.currentScheme]&&(U[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,va(this.defaultColorSchemes[this.format.currentScheme]),U[this.format.currentScheme].style.background=
+"#84d7ff")}),va=mxUtils.bind(this,function(Ba){var ya=mxUtils.clone(K.defaultVertexStyle);ya[mxConstants.STYLE_STROKECOLOR]=null!=ya[mxConstants.STYLE_STROKECOLOR]?ya[mxConstants.STYLE_STROKECOLOR]:"default";ya[mxConstants.STYLE_FILLCOLOR]=null!=ya[mxConstants.STYLE_FILLCOLOR]?ya[mxConstants.STYLE_FILLCOLOR]:"default";ya[mxConstants.STYLE_FONTCOLOR]=null!=ya[mxConstants.STYLE_FONTCOLOR]?ya[mxConstants.STYLE_FONTCOLOR]:"default";K.replaceDefaultColors(new mxCell,ya);var La=mxUtils.bind(this,function(Ea){var pa=
+mxUtils.button("",mxUtils.bind(this,function(wa){K.getModel().beginUpdate();try{for(var Xa=B.getSelectionState().cells,Qa=0;Qa<Xa.length;Qa++){var Ra=K.getModel().getStyle(Xa[Qa]);null!=Ea?(mxEvent.isShiftDown(wa)||(Ra=""==Ea.fill||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,Ea.fill),Ra=""==Ea.gradient||null==Ea.gradient?mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,
+Ea.gradient),mxEvent.isControlDown(wa)||mxClient.IS_MAC&&mxEvent.isMetaDown(wa)||!K.getModel().isVertex(Xa[Qa])||(Ra=""==Ea.font||null==Ea.font?mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,Ea.font))),mxEvent.isAltDown(wa)||(Ra=""==Ea.stroke||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,Ea.stroke))):(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null),Ra=mxUtils.setStyle(Ra,
+mxConstants.STYLE_STROKECOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null),K.getModel().isVertex(Xa[Qa])&&(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null)));K.getModel().setStyle(Xa[Qa],Ra)}}finally{K.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!=Ea){var Ca="1px solid";null!=Ea.border&&(Ca=Ea.border);if(null!=Ea.gradient)pa.style.backgroundImage=
+"linear-gradient("+mxUtils.getLightDarkColor(Ea.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ea.gradient).cssText+" 100%)";else if(Ea.fill==mxConstants.NONE)pa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ea.fill||""==Ea.fill)pa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var za=mxUtils.getLightDarkColor(Ea.fill);pa.style.backgroundImage="linear-gradient(to right bottom, "+za.cssText+" 50%, "+
+za.light+" 50.3%)"}null==Ea.stroke||Ea.stroke==mxConstants.NONE?pa.style.border=Ca+" transparent":""==Ea.stroke?pa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(za=mxUtils.getLightDarkColor(Ea.stroke),pa.style.border=Ca+" "+za.cssText,pa.style.borderRightColor=za.light,pa.style.borderBottomColor=pa.style.borderRightColor);null!=Ea.title&&pa.setAttribute("title",Ea.title)}else Ca=mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,
+"#ffffff"),za=mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000"),pa.style.backgroundColor=Ca,pa.style.border="1px solid "+za;pa.style.borderRadius="0";T.appendChild(pa);null!=Ea&&null!=Ea.gradient&&(Ca=pa.cloneNode(!1),Ca.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.gradient).light+") 100%)",Ca.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ca.style.backgroundColor=
+"transparent",T.appendChild(Ca),Ca.style.marginLeft="-42px",mxEvent.addListener(Ca,"click",function(){pa.click()}))});T.innerText="";if(null!=Ba)for(var Aa=0;Aa<Ba.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(T),La(Ba[Aa])});null==this.format.currentScheme?la(Math.min(U.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):la(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?43:23;var ua=document.createElement("div");ua.className="geButton";ua.style.cssText="position:absolute;left:0px;bottom:"+
+Y+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){la(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+Y+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(ua),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,
+function(){la(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));va(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,
+Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(k=document.createElement("link"),
+k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(B))):(null==K&&(K='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+B+'");\n}'),k=document.createElement("style"),mxUtils.write(k,K));return k};Graph.addRecentCustomFont=function(k,B){};Graph.addFont=function(k,B,K){if(null!=k&&0<k.length&&null!=B&&0<B.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];
+null!=P&&P.url!=B&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=B,"http:"==B.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(B)),P={name:k,url:B,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,B=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=B&&B.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();return k};Graph.getFontUrl=function(k,B){k=Graph.customFontElements[k.toLowerCase()];
+null!=k&&(B=k.url);return B};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var B=0;B<k.length;B++){var K=k[B].getAttribute("data-font-src");if(null!=K){var T="FONT"==k[B].nodeName?k[B].getAttribute("face"):k[B].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(k){if(null!=k){var B=mxUtils.getValue(k,"fontSource",null);if(null!=B){var K=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=K)try{Graph.addFont(K,decodeURIComponent(B))}catch(T){}}}return k};
+Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var t=Graph.prototype.init;
+Graph.prototype.init=function(){function k(P){B=P}t.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};
+var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var Y=new mxStackLayout(this.graph,!1);Y.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Y.marginLeft=U.marginLeft||0;Y.marginRight=U.marginRight||0;Y.marginTop=U.marginTop||0;Y.marginBottom=U.marginBottom||0;Y.allowGaps=U.allowGaps||0;Y.horizontal="1"==mxUtils.getValue(U,"horizontalRack",
+"0");Y.resizeParent=!1;Y.fill=!0;return Y}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,B){return Graph.processFontStyle(q.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa){D.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,B,K,T){function P(){for(var Aa=aa.getSelectionCells(),Ea=[],pa=0;pa<Aa.length;pa++)aa.isCellVisible(Aa[pa])&&Ea.push(Aa[pa]);aa.setSelectionCells(Ea)}function U(Aa){aa.setHiddenTags(Aa?[]:la.slice());P();aa.refresh()}function Y(Aa,Ea){ua.innerText="";if(0<Aa.length){var pa=document.createElement("table");pa.setAttribute("cellpadding","2");pa.style.boxSizing="border-box";
+pa.style.tableLayout="fixed";pa.style.width="100%";var Ca=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var za=0;za<Aa.length;za++)(function(wa){function Xa(){var y=aa.getCellsForTags([wa],null,null,!0);aa.isEnabled()?aa.setSelectionCells(y):aa.highlightCells(y,null,null,70)}var Qa=0>mxUtils.indexOf(aa.hiddenTags,wa),Ra=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",
+Qa?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",mxResources.get(Qa?"hideIt":"show",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";Sa.appendChild(Ha);mxEvent.addListener(Ha,"click",function(y){mxEvent.isShiftDown(y)?U(0<=mxUtils.indexOf(aa.hiddenTags,wa)):(aa.toggleHiddenTag(wa),P(),aa.refresh());mxEvent.consume(y)});Ra.appendChild(Sa);
+Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.selectImage);Ha.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){U(!0);Xa();mxEvent.consume(y)});Sa.appendChild(Ha);Ra.appendChild(Sa);
+Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Qa?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(y){if(mxEvent.isShiftDown(y))U(!0),Xa();else if(Qa&&0<aa.hiddenTags.length)U(!0);else{var O=la.slice(),
+Q=mxUtils.indexOf(O,wa);O.splice(Q,1);aa.setHiddenTags(O);P();aa.refresh()}mxEvent.consume(y)});Ra.appendChild(Sa);if(aa.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ea){Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.trashImage);Ha.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";
+Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){var O=mxUtils.indexOf(la,wa);0<=O&&la.splice(O,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[wa]);aa.refresh();mxEvent.consume(y)});Sa.appendChild(Ha)}else{var Ma=document.createElement("input");Ma.setAttribute("type","checkbox");Ma.style.margin="0px";Ma.defaultChecked=null!=Ea&&0<=mxUtils.indexOf(Ea,
+wa);Ma.checked=Ma.defaultChecked;Ma.style.background="transparent";Ma.setAttribute("title",mxResources.get(Ma.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(Ma,"change",function(y){Ma.checked?aa.addTagsForCells(aa.getSelectionCells(),[wa]):aa.removeTagsForCells(aa.getSelectionCells(),[wa]);mxEvent.consume(y)});Sa.appendChild(Ma)}Ra.appendChild(Sa)}Ca.appendChild(Ra)})(Aa[za]);pa.appendChild(Ca);ua.appendChild(pa)}}var aa=this,la=aa.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect=
+"none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var ua=document.createElement("div");ua.style.position="absolute";ua.style.boxSizing="border-box";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.padding="3px";ua.style.left="0px";ua.style.right="0px";ua.style.top="0px";ua.style.bottom="0px";va.appendChild(ua);aa.addListener(mxEvent.ROOT,function(){la=aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ea){if(k()){Aa=aa.getAllTags();for(Ea=0;Ea<
+Aa.length;Ea++)0>mxUtils.indexOf(la,Aa[Ea])&&la.push(Aa[Ea]);la.sort();aa.isSelectionEmpty()?Y(la):Y(la,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var Ba=document.createElement("div");Ba.className="geToolbarContainer geDialogToolbar";Ba.style.position="absolute";Ba.style.display="flex";Ba.style.bottom="0px";Ba.style.left="0px";Ba.style.right="0px";Ba.style.height="32px";
+Ba.style.overflow="hidden";Ba.style.padding="3px 4px 4px 4px";Ba.style.borderWidth="1px 0px 0px 0px";Ba.style.borderStyle="solid";Ba.style.whiteSpace="nowrap";if(aa.isEnabled()){ua.style.bottom="32px";var ya=document.createElement("a");ya.className="geButton";var La=ya.cloneNode(!1);La.style.backgroundImage="url("+Editor.visibleImage+")";La.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(La,"click",function(Aa){aa.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(la=aa.hiddenTags.slice());
+P();aa.refresh();mxEvent.consume(Aa)});Ba.appendChild(La);null!=K&&(ya=ya.cloneNode(!1),ya.style.backgroundImage="url("+Editor.plusImage+")",ya.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ya,"click",function(Aa){K(la,function(Ea){la=Ea;qa()});mxEvent.consume(Aa)}),Ba.appendChild(ya));va.appendChild(Ba)}null!=T&&Ba.appendChild(T);return{div:va,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var B in Graph.customFontElements){var K=
+Graph.customFontElements[B];k.push({name:K.name,url:K.url})}return k};Graph.prototype.setFont=function(k,B){Graph.addFont(k,B);var K=Editor.guid();document.execCommand("fontname",!1,K);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==K&&(P=!0,T[U].setAttribute("face",k),null!=B?T[U].setAttribute("data-font-src",B):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var N=Graph.prototype.isFastZoomEnabled;
+Graph.prototype.isFastZoomEnabled=function(){return N.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var B in k)this.globalVars[B]=k[B]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=
+function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var B=L.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[k]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};
+var I=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa,Ba,ya,La,Aa){var Ea=I.apply(this,arguments);if(null!=qa){var pa=Ea.getAttribute("style");null==pa&&(pa="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ea.setAttribute("style",pa+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(ua&&0<Ca.length){var za=Ea.ownerDocument;pa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):
+za.createElement("style");null!=za.setAttributeNS?pa.setAttributeNS("type","text/css"):pa.setAttribute("type","text/css");for(var wa="",Xa="",Qa=0;Qa<Ca.length;Qa++){var Ra=Ca[Qa].name,Sa=Ca[Qa].url;Graph.isCssFontUrl(Sa)?wa+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Xa+='@font-face {\nfont-family: "'+Ra+'";\nsrc: url("'+Sa+'");\n}\n'}pa.appendChild(za.createTextNode(wa+Xa));Ea.getElementsByTagName("defs")[0].appendChild(pa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=
+this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ea);this.mathEnabled&&(document.body.appendChild(Ea),Editor.MathJaxRender(Ea),Ea.parentNode.removeChild(Ea),pa=Ea.ownerDocument.getElementById("MJX-SVG-styles"),null!=pa&&Ea.getElementsByTagName("defs")[0].appendChild(pa.cloneNode(!0)));return Ea};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=
+function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ia=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ia.apply(this,arguments);this.enumerationState=0};var fa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return fa.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",
+""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var B="1"==mxUtils.getValue(k.style,"enumerate",0);B&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,
+k.secondLabel)):B||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);B=k.secondLabel;if(null!=B){var K=k.view.scale,T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*K,k.y+4*K,0,0):mxRectangle.fromPoint(k.view.getPoint(k));B.bounds.equals(k)&&B.value==T&&B.scale==K||(B.bounds=k,B.value=T,B.scale=K,B.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};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(k,B){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,B))};Graph.prototype.executeCustomActions=
+function(k,B,K){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,P=0,U=0,Y=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),la=mxUtils.bind(this,function(){0<
+P&&P--;0==P&&va()}),va=mxUtils.bind(this,function(){if(U<k.length){var ua=this.stoppingCustomActions,qa=k[U++],Ba=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,K))return}else this.openLink(qa.open);null==qa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;la()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());
+null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,la,ua?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,la,ua?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));
+null!=qa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(Y(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){Y();var ya=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ya),1);this.setCellsVisible(ya,!0)}null!=qa.hide&&(Y(),ya=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ya),0),this.setCellsVisible(ya,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&
+(Y(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(Y(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));ya=[];null!=qa.select&&this.isEnabled()&&(ya=this.getCellsForAction(qa.select),this.setSelectionCells(ya));null!=qa.highlight&&(ya=this.getCellsForAction(qa.highlight),this.highlightCells(ya,qa.highlight.color,qa.highlight.duration,
+qa.highlight.opacity));null!=qa.scroll&&(ya=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<ya.length&&this.scrollCellToVisible(ya[0]);null!=K&&null!=qa.explore&&Graph.exploreFromCell(this,K,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var La=qa.tags.toggle;0==La.length&&(La=this.getAllTags());for(ya=0;ya<La.length;ya++)this.toggleHiddenTag(La[ya])}La=null;null!=qa.tags.hidden&&(null==La&&(La=[]),La=La.concat(qa.tags.hidden));if(null!=
+qa.tags.visible){null==La&&(La=[]);var Aa=this.getAllTags();for(ya=0;ya<Aa.length;ya++)0>mxUtils.indexOf(qa.tags.visible,Aa[ya])&&0>mxUtils.indexOf(La,Aa[ya])&&La.push(Aa[ya])}null!=La&&this.setHiddenTags(La);this.refresh()}0<Ba.length&&(P++,this.executeAnimations(Ba,la,ua?1:qa.steps,ua?0:qa.delay));0==P?va():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=B&&B()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,B){var K=this.getLinkForCell(B);null!=K&&
+"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(k,K));if(this.isHtmlLabel(B)){var T=document.createElement("div");T.innerHTML=Graph.sanitizeHtml(this.getLabel(B));for(var P=T.getElementsByTagName("a"),U=!1,Y=0;Y<P.length;Y++)K=P[Y].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(P[Y].setAttribute("href",this.updateCustomLink(k,K)),U=!0);U&&this.labelChanged(B,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,B){if("data:action/json,"==
+B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(k,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(T){}return B};Graph.prototype.updateCustomLinkActions=function(k,B){for(var K=0;K<B.length;K++){var T=B[K],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,B,K){if(null!=B&&null!=B[K]){for(var T=[],P=0;P<B[K].length;P++)if("*"==
+B[K][P])T.push(B[K][P]);else{var U=k[B[K][P]];null!=U?""!=U&&T.push(U):T.push(B[K][P])}B[K]=T}};Graph.prototype.getCellsForAction=function(k,B){B=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,B));if(null!=k.excludeCells){for(var K=[],T=0;T<B.length;T++)0>k.excludeCells.indexOf(B[T].id)&&K.push(B[T]);B=K}return B};Graph.prototype.getCellsById=function(k){var B=[];if(null!=k)for(var K=0;K<k.length;K++)if("*"==k[K]){var T=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(U){return U!=
+T},T))}else{var P=this.model.getCell(k[K]);null!=P&&B.push(P)}return B};var X=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return X.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var B=mxUtils.indexOf(this.hiddenTags,k);0>B?this.hiddenTags.push(k):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var B=0;B<k.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,k[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,B,K,T){var P=[];if(null!=k){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var U=0,Y={},aa=0;aa<k.length;aa++)0<k[aa].length&&(Y[k[aa]]=!0,U++);for(aa=0;aa<B.length;aa++)if(K&&this.model.getParent(B[aa])==
+this.model.root||this.model.isVertex(B[aa])||this.model.isEdge(B[aa])){var la=this.getTagsForCell(B[aa]),va=!1;if(0<la.length&&(la=la.split(" "),la.length>=k.length)){for(var ua=va=0;ua<la.length&&va<U;ua++)null!=Y[la[ua]]&&va++;va=va==U}va&&(1!=T||this.isCellVisible(B[aa]))&&P.push(B[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var B=null,K=[],T=0;T<k.length;T++){var P=
+this.getTagsForCell(k[T]);K=[];if(0<P.length){P=P.split(" ");for(var U={},Y=0;Y<P.length;Y++)if(null==B||null!=B[P[Y]])U[P[Y]]=!0,K.push(P[Y]);B=U}else return[]}return K};Graph.prototype.getTagsForCells=function(k){for(var B=[],K={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==K[P[U]]&&(K[P[U]]=!0,B.push(P[U]))}}return B};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
+function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<k.length;K++){for(var T=this.getTagsForCell(k[K]),P=T.split(" "),U=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.trim(B[Y]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[K],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<k.length;K++){var T=this.getTagsForCell(k[K]);
+if(0<T.length){for(var P=T.split(" "),U=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.indexOf(P,B[Y]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var B=0;B<k.length;B++)this.model.setVisible(k[B],!this.model.isVisible(k[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,B){this.model.beginUpdate();try{for(var K=0;K<k.length;K++)this.model.setVisible(k[K],
+B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,B,K,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],B,K,T)};Graph.prototype.highlightCell=function(k,B,K,T,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,B,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&
+(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},1200)},K));return U};Graph.prototype.addSvgShadow=function(k,B,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");
+Y.setAttribute("in","SourceAlpha");Y.setAttribute("stdDeviation",this.svgShadowBlur);Y.setAttribute("result","blur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");Y.setAttribute("in","blur");Y.setAttribute("dx",this.svgShadowSize);Y.setAttribute("dy",this.svgShadowSize);Y.setAttribute("result","offsetBlur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");
+Y.setAttribute("flood-color",this.svgShadowColor);Y.setAttribute("flood-opacity",this.svgShadowOpacity);Y.setAttribute("result","offsetColor");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");Y.setAttribute("in","offsetColor");Y.setAttribute("in2","offsetBlur");Y.setAttribute("operator","in");Y.setAttribute("result","offsetBlur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");
+Y.setAttribute("in","SourceGraphic");Y.setAttribute("in2","offsetBlur");U.appendChild(Y);Y=k.getElementsByTagName("defs");0==Y.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=Y[0];P.appendChild(U);K||(B=null!=B?B:k.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),B=k.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,k.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),B=0;do var K=this.model.getChildAt(this.model.root,B);while(B++<k&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};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",STENCIL_PATH+"/kubernetes2.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+
@@ -3444,33 +3444,33 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var B=null;null!=k&&0<k.length&&("ER"==k.substring(0,
-2)?B="mxgraph.er":"sysML"==k.substring(0,5)&&(B="mxgraph.sysml"));return B};var ba=mxMarker.createMarker;mxMarker.createMarker=function(k,B,I,U,P,T,X,Z,ka,va){if(null!=I&&null==mxMarker.markers[I]){var ua=this.getPackageForType(I);null!=ua&&mxStencilRegistry.getStencil(ua)}return ba.apply(this,arguments)};var ja=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,B,I,U,P,T){"1"==mxUtils.getValue(B.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,
-this.stroke));return ja.apply(this,arguments)};PrintDialog.prototype.create=function(k,B,I,U){function P(){La.value=Math.max(1,Math.min(ua,Math.max(parseInt(La.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(ua,Math.min(parseInt(La.value),parseInt(ya.value))))}function T(Da){k.lastPrintPagesRadioChecked=Ba.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=Aa.checked;Ba.checked&&ya.value<La.value?(k.lastPrintPagesFromInput=
-ya.value,k.lastPrintPagesToInput=La.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);fa.value=Math.max(1,Math.min(1600,parseInt(fa.value)))+"%";k.lastPrintZoom=fa.value;k.lastPrintBorder=V.value;k.lastPrintGrid=ia.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=ta.checked;k.lastPrintSheetsAcross=O.value;k.lastPrintSheetsDown=R.value;var Ia={};Ia.border=parseInt(V.value);Ia.scale=parseInt(fa.value)/100;Ia.grid=ia.checked;Ia.transparent=oa.checked;Ia.includeCopy=ta.checked;
-Ia.sheetsAcross=parseInt(O.value);Ia.sheetsDown=parseInt(R.value);Ia.pagesFrom=parseInt(ya.value);Ia.pagesTo=parseInt(La.value);Ia.allPages=qa.checked;Ia.selection=Ea.checked;Ia.pageView=pa.checked;Ia.crop=Ca.checked;Ia.fit=Aa.checked;return null!=I?I(!Da,Ia):k.print(!Da,Ia)}var X=k.editor.graph,Z=document.createElement("div"),ka=document.createElement("h3");ka.style.width="100%";ka.style.textAlign="center";ka.style.marginTop="0px";mxUtils.write(ka,B||mxResources.get("print"));Z.appendChild(ka);var va=
-1,ua=1;ka=document.createElement("div");ka.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");ka.appendChild(qa);B=document.createElement("span");mxUtils.write(B,mxResources.get("allPages"));mxEvent.addListener(B,"click",function(){qa.checked=!0});ka.appendChild(B);mxUtils.br(ka);var Ba=qa.cloneNode(!0);ka.appendChild(Ba);B=document.createElement("span");
-mxUtils.write(B,mxResources.get("pages")+":");ka.appendChild(B);mxEvent.addListener(B,"click",function(){Ba.checked=!0});var ya=document.createElement("input");ya.style.margin="0 4px";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="40px";ka.appendChild(ya);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));ka.appendChild(B);var La=ya.cloneNode(!0);ka.appendChild(La);mxEvent.addListener(ya,"focus",function(){Ba.checked=!0});
-mxEvent.addListener(La,"focus",function(){Ba.checked=!0});mxEvent.addListener(ya,"change",P);mxEvent.addListener(La,"change",P);if(null!=k.pages&&(ua=k.pages.length,null!=k.currentPage))for(var za=0;za<ua;za++)if(k.currentPage==k.pages[za]){va=za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ya.value=Math.min(ua,Math.max(1,k.lastPrintPagesFromInput)),La.value=Math.min(ua,Math.max(1,k.lastPrintPagesToInput))):(ya.value=va,La.value=va);ya.setAttribute("max",ua);La.setAttribute("max",
-ua);za=mxUtils.button(mxResources.get("currentPage"),function(Da){ya.value=va;La.value=va;Ba.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";ka.appendChild(za);1<ua&&Z.appendChild(ka);ka=document.createElement("div");ka.style.borderBottom="1px solid lightGray";ka.style.paddingBottom="12px";ka.style.marginBottom="12px";ka.style.whiteSpace=
-"nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==ua?"checkbox":"radio");Ea.style.marginRight="8px";X.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");X.isEnabled()&&(ka.appendChild(Ea),B=document.createElement("span"),mxUtils.write(B,mxResources.get("selectionOnly")),ka.appendChild(B));(X.isEnabled()||1<ua)&&Z.appendChild(ka);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Ba.checked=!0:!X.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?
-Ea.checked=!0:qa.checked=!0;X.isSelectionEmpty()||mxEvent.addListener(B,"click",function(){Ea.checked=!Ea.checked});X=document.createElement("div");X.style.whiteSpace="nowrap";var pa=document.createElement("input");pa.style.marginBottom="8px";pa.style.marginRight="8px";pa.setAttribute("type","radio");pa.setAttribute("name","printSize");X.appendChild(pa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageView"));X.appendChild(B);mxEvent.addListener(X,"click",function(){pa.checked=
-!0});Z.appendChild(X);X=document.createElement("div");X.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");X.appendChild(Ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("crop"));X.appendChild(B);mxEvent.addListener(X,"click",function(){Ca.checked=!0});Z.appendChild(X);X=document.createElement("div");X.style.whiteSpace="nowrap";var Aa=document.createElement("input");
-Aa.style.marginBottom="8px";Aa.style.marginRight="8px";Aa.setAttribute("type","radio");Aa.setAttribute("name","printSize");B=document.createElement("div");B.style.display="inline-block";B.style.verticalAlign="top";B.style.paddingTop="2px";B.appendChild(Aa);X.appendChild(B);ka=document.createElement("table");ka.style.display="inline-block";ka.style.borderSpacing="0";za=document.createElement("tbody");var wa=document.createElement("tr"),Xa=wa.cloneNode(!0),Qa=document.createElement("td"),Ra=Qa.cloneNode(!0),
-Sa=Qa.cloneNode(!0),Ha=Qa.cloneNode(!0),Ma=Qa.cloneNode(!0),y=Qa.cloneNode(!0);Qa.style.textAlign="right";Ha.style.textAlign="right";mxUtils.write(Qa,mxResources.get("fitTo"));mxEvent.addListener(X,"click",function(Da){mxEvent.getSource(Da)!=Aa&&(Aa.checked=!Aa.checked)});var O=document.createElement("input");O.style.margin="0 2px";O.style.boxSizing="border-box";O.setAttribute("value",k.lastPrintSheetsAcross||"1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";Ra.appendChild(O);
-B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Sa.appendChild(B);mxUtils.write(Ha,mxResources.get("fitToBy"));var R=O.cloneNode(!0);R.setAttribute("value",k.lastPrintSheetsDown||"1");Ma.appendChild(R);mxEvent.addListener(O,"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(R,"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?Aa.checked=!0:pa.checked=!0;B=document.createElement("span");
-mxUtils.write(B,mxResources.get("fitToSheetsDown"));y.appendChild(B);wa.appendChild(Qa);wa.appendChild(Ra);wa.appendChild(Sa);Xa.appendChild(Ha);Xa.appendChild(Ma);Xa.appendChild(y);za.appendChild(wa);za.appendChild(Xa);ka.appendChild(za);X.appendChild(ka);Z.appendChild(X);X=document.createElement("div");X.style.borderTop="1px solid lightGray";X.style.whiteSpace="nowrap";X.style.paddingTop="12px";X.style.marginTop="12px";X.style.paddingLeft="8px";mxUtils.write(X,mxResources.get("borderWidth")+":");
-var V=document.createElement("input");V.setAttribute("type","number");V.setAttribute("min","0");V.style.width="40px";V.style.marginLeft="4px";V.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;X.appendChild(V);B=document.createElement("span");B.style.marginLeft="8px";mxUtils.write(B,mxResources.get("zoom")+":");X.appendChild(B);var fa=document.createElement("input");fa.style.width="60px";fa.style.marginLeft="4px";fa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";
-X.appendChild(fa);mxUtils.br(X);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;X.appendChild(ia);B=document.createElement("span");B.style.marginLeft="4px";B.style.marginRight="8px";mxUtils.write(B,mxResources.get("grid"));X.appendChild(B);mxEvent.addListener(B,"click",function(Da){ia.checked=!0;mxEvent.consume(Da)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop=
-"10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(X.appendChild(oa),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("transparentBackground")),X.appendChild(B),mxEvent.addListener(B,"click",function(Da){oa.checked=!0;mxEvent.consume(Da)}));var ta=document.createElement("input");ta.setAttribute("type","checkbox");ta.style.marginTop="10px";ta.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==
-I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(X),X.appendChild(ta),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram")),X.appendChild(B),mxEvent.addListener(B,"click",function(Da){ta.checked=!0;mxEvent.consume(Da)}));Z.appendChild(X);B=document.createElement("div");B.style.marginTop="40px";B.style.textAlign="right";B.style.whiteSpace="nowrap";k.isOffline()||null!=I||B.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
-X=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});X.className="geBtn";k.editor.cancelFirst&&B.appendChild(X);PrintDialog.previewEnabled&&null==I&&(ka=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),T(!1)}catch(Da){k.handleError(Da)}}),ka.className="geBtn",B.appendChild(ka));U=null!=U?U:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";U=mxUtils.button(mxResources.get(U),function(){try{k.hideDialog(),T(!0)}catch(Da){k.handleError(Da)}});U.className=
-"geBtn gePrimaryBtn";B.appendChild(U);k.editor.cancelFirst||B.appendChild(X);Z.appendChild(B);if(k.editor.isChromelessView()){var ra=function(){Editor.isDarkMode()?(Z.classList.add("geDarkMode"),Z.style.colorScheme="dark"):(Z.classList.remove("geDarkMode"),Z.style.colorScheme="light")};k.addListener("darkModeChanged",ra);ra();var xa=function(Da,Ia){Da=Ia.getProperty("dialog");Z.parentNode==Da.container&&(k.editor.removeListener(xa),k.removeListener(ra))};k.editor.addListener("hideDialog",xa)}this.container=
-Z};var ca=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&
-(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ca.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,
-this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Q=new Image;Q.onload=function(){try{la.getContext("2d").drawImage(Q,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&
-6<k.length}catch(B){}};Q.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();
+2)?B="mxgraph.er":"sysML"==k.substring(0,5)&&(B="mxgraph.sysml"));return B};var ca=mxMarker.createMarker;mxMarker.createMarker=function(k,B,K,T,P,U,Y,aa,la,va){if(null!=K&&null==mxMarker.markers[K]){var ua=this.getPackageForType(K);null!=ua&&mxStencilRegistry.getStencil(ua)}return ca.apply(this,arguments)};var ka=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,B,K,T,P,U){"1"==mxUtils.getValue(B.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke));return ka.apply(this,arguments)};PrintDialog.prototype.create=function(k,B,K,T){function P(){La.value=Math.max(1,Math.min(ua,Math.max(parseInt(La.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(ua,Math.min(parseInt(La.value),parseInt(ya.value))))}function U(Da){k.lastPrintPagesRadioChecked=Ba.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=za.checked;Ba.checked&&ya.value<La.value?(k.lastPrintPagesFromInput=
+ya.value,k.lastPrintPagesToInput=La.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);ha.value=Math.max(1,Math.min(1600,parseInt(ha.value)))+"%";k.lastPrintZoom=ha.value;k.lastPrintBorder=V.value;k.lastPrintGrid=ja.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=ta.checked;k.lastPrintSheetsAcross=O.value;k.lastPrintSheetsDown=Q.value;var Ia={};Ia.border=parseInt(V.value);Ia.scale=parseInt(ha.value)/100;Ia.grid=ja.checked;Ia.transparent=oa.checked;Ia.includeCopy=ta.checked;
+Ia.sheetsAcross=parseInt(O.value);Ia.sheetsDown=parseInt(Q.value);Ia.pagesFrom=parseInt(ya.value);Ia.pagesTo=parseInt(La.value);Ia.allPages=qa.checked;Ia.selection=Ea.checked;Ia.pageView=pa.checked;Ia.crop=Ca.checked;Ia.fit=za.checked;return null!=K?K(!Da,Ia):k.print(!Da,Ia)}var Y=k.editor.graph,aa=document.createElement("div"),la=document.createElement("h3");la.style.width="100%";la.style.textAlign="center";la.style.marginTop="0px";mxUtils.write(la,B||mxResources.get("print"));aa.appendChild(la);
+var va=1,ua=1;la=document.createElement("div");la.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");la.appendChild(qa);B=document.createElement("span");mxUtils.write(B,mxResources.get("allPages"));mxEvent.addListener(B,"click",function(){qa.checked=!0});la.appendChild(B);mxUtils.br(la);var Ba=qa.cloneNode(!0);la.appendChild(Ba);B=document.createElement("span");
+mxUtils.write(B,mxResources.get("pages")+":");la.appendChild(B);mxEvent.addListener(B,"click",function(){Ba.checked=!0});var ya=document.createElement("input");ya.style.margin="0 4px";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="40px";la.appendChild(ya);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));la.appendChild(B);var La=ya.cloneNode(!0);la.appendChild(La);mxEvent.addListener(ya,"focus",function(){Ba.checked=!0});
+mxEvent.addListener(La,"focus",function(){Ba.checked=!0});mxEvent.addListener(ya,"change",P);mxEvent.addListener(La,"change",P);if(null!=k.pages&&(ua=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<ua;Aa++)if(k.currentPage==k.pages[Aa]){va=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ya.value=Math.min(ua,Math.max(1,k.lastPrintPagesFromInput)),La.value=Math.min(ua,Math.max(1,k.lastPrintPagesToInput))):(ya.value=va,La.value=va);ya.setAttribute("max",ua);La.setAttribute("max",
+ua);Aa=mxUtils.button(mxResources.get("currentPage"),function(Da){ya.value=va;La.value=va;Ba.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";la.appendChild(Aa);1<ua&&aa.appendChild(la);la=document.createElement("div");la.style.borderBottom="1px solid lightGray";la.style.paddingBottom="12px";la.style.marginBottom="12px";la.style.whiteSpace=
+"nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==ua?"checkbox":"radio");Ea.style.marginRight="8px";Y.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");Y.isEnabled()&&(la.appendChild(Ea),B=document.createElement("span"),mxUtils.write(B,mxResources.get("selectionOnly")),la.appendChild(B));(Y.isEnabled()||1<ua)&&aa.appendChild(la);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Ba.checked=!0:!Y.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?
+Ea.checked=!0:qa.checked=!0;Y.isSelectionEmpty()||mxEvent.addListener(B,"click",function(){Ea.checked=!Ea.checked});Y=document.createElement("div");Y.style.whiteSpace="nowrap";var pa=document.createElement("input");pa.style.marginBottom="8px";pa.style.marginRight="8px";pa.setAttribute("type","radio");pa.setAttribute("name","printSize");Y.appendChild(pa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageView"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){pa.checked=
+!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");Y.appendChild(Ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("crop"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){Ca.checked=!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var za=document.createElement("input");
+za.style.marginBottom="8px";za.style.marginRight="8px";za.setAttribute("type","radio");za.setAttribute("name","printSize");B=document.createElement("div");B.style.display="inline-block";B.style.verticalAlign="top";B.style.paddingTop="2px";B.appendChild(za);Y.appendChild(B);la=document.createElement("table");la.style.display="inline-block";la.style.borderSpacing="0";Aa=document.createElement("tbody");var wa=document.createElement("tr"),Xa=wa.cloneNode(!0),Qa=document.createElement("td"),Ra=Qa.cloneNode(!0),
+Sa=Qa.cloneNode(!0),Ha=Qa.cloneNode(!0),Ma=Qa.cloneNode(!0),y=Qa.cloneNode(!0);Qa.style.textAlign="right";Ha.style.textAlign="right";mxUtils.write(Qa,mxResources.get("fitTo"));mxEvent.addListener(Y,"click",function(Da){mxEvent.getSource(Da)!=za&&(za.checked=!za.checked)});var O=document.createElement("input");O.style.margin="0 2px";O.style.boxSizing="border-box";O.setAttribute("value",k.lastPrintSheetsAcross||"1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";Ra.appendChild(O);
+B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Sa.appendChild(B);mxUtils.write(Ha,mxResources.get("fitToBy"));var Q=O.cloneNode(!0);Q.setAttribute("value",k.lastPrintSheetsDown||"1");Ma.appendChild(Q);mxEvent.addListener(O,"click",function(Da){za.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(Q,"click",function(Da){za.checked=!0;mxEvent.consume(Da)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?za.checked=!0:pa.checked=!0;B=document.createElement("span");
+mxUtils.write(B,mxResources.get("fitToSheetsDown"));y.appendChild(B);wa.appendChild(Qa);wa.appendChild(Ra);wa.appendChild(Sa);Xa.appendChild(Ha);Xa.appendChild(Ma);Xa.appendChild(y);Aa.appendChild(wa);Aa.appendChild(Xa);la.appendChild(Aa);Y.appendChild(la);aa.appendChild(Y);Y=document.createElement("div");Y.style.borderTop="1px solid lightGray";Y.style.whiteSpace="nowrap";Y.style.paddingTop="12px";Y.style.marginTop="12px";Y.style.paddingLeft="8px";mxUtils.write(Y,mxResources.get("borderWidth")+":");
+var V=document.createElement("input");V.setAttribute("type","number");V.setAttribute("min","0");V.style.width="40px";V.style.marginLeft="4px";V.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Y.appendChild(V);B=document.createElement("span");B.style.marginLeft="8px";mxUtils.write(B,mxResources.get("zoom")+":");Y.appendChild(B);var ha=document.createElement("input");ha.style.width="60px";ha.style.marginLeft="4px";ha.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";
+Y.appendChild(ha);mxUtils.br(Y);var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="12px";ja.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;Y.appendChild(ja);B=document.createElement("span");B.style.marginLeft="4px";B.style.marginRight="8px";mxUtils.write(B,mxResources.get("grid"));Y.appendChild(B);mxEvent.addListener(B,"click",function(Da){ja.checked=!0;mxEvent.consume(Da)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop=
+"10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=K&&(Y.appendChild(oa),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("transparentBackground")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Da){oa.checked=!0;mxEvent.consume(Da)}));var ta=document.createElement("input");ta.setAttribute("type","checkbox");ta.style.marginTop="10px";ta.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==
+K||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(Y),Y.appendChild(ta),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Da){ta.checked=!0;mxEvent.consume(Da)}));aa.appendChild(Y);B=document.createElement("div");B.style.marginTop="40px";B.style.textAlign="right";B.style.whiteSpace="nowrap";k.isOffline()||null!=K||B.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
+Y=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});Y.className="geBtn";k.editor.cancelFirst&&B.appendChild(Y);PrintDialog.previewEnabled&&null==K&&(la=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),U(!1)}catch(Da){k.handleError(Da)}}),la.className="geBtn",B.appendChild(la));T=null!=T?T:null!=K?"export":PrintDialog.previewEnabled?"print":"ok";T=mxUtils.button(mxResources.get(T),function(){try{k.hideDialog(),U(!0)}catch(Da){k.handleError(Da)}});T.className=
+"geBtn gePrimaryBtn";B.appendChild(T);k.editor.cancelFirst||B.appendChild(Y);aa.appendChild(B);if(k.editor.isChromelessView()){var ra=function(){Editor.isDarkMode()?(aa.classList.add("geDarkMode"),aa.style.colorScheme="dark"):(aa.classList.remove("geDarkMode"),aa.style.colorScheme="light")};k.addListener("darkModeChanged",ra);ra();var xa=function(Da,Ia){Da=Ia.getProperty("dialog");aa.parentNode==Da.container&&(k.editor.removeListener(xa),k.removeListener(ra))};k.editor.addListener("hideDialog",xa)}this.container=
+aa};var da=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&
+(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else da.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,
+this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var W=document.createElement("canvas"),S=new Image;S.onload=function(){try{W.getContext("2d").drawImage(S,0,0);var k=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<
+k.length}catch(B){}};S.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.5";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -3480,7 +3480,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=
"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(q){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),
-q=document.createElement("style"),D=0;D<f.length;D++){q.textContent=f[D].textContent;t.body.appendChild(q);for(var H="",N=0;N<q.sheet.cssRules.length;N++){var L=q.sheet.cssRules[N];if(null!=L.selectorText){for(var J=L.selectorText.split(","),Y=0;Y<J.length;Y++)J[Y]="#"+l+" "+J[Y];L.selectorText=J.join(",")}H+=L.cssText+"\n"}f[D].textContent=H}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+q=document.createElement("style"),D=0;D<f.length;D++){q.textContent=f[D].textContent;t.body.appendChild(q);for(var H="",N=0;N<q.sheet.cssRules.length;N++){var L=q.sheet.cssRules[N];if(null!=L.selectorText){for(var I=L.selectorText.split(","),Z=0;Z<I.length;Z++)I[Z]="#"+l+" "+I[Z];L.selectorText=I.join(",")}H+=L.cssText+"\n"}f[D].textContent=H}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),
@@ -3490,11 +3490,11 @@ EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};Editor
function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=
c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};
EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var q=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
-hwaccel:!1,zIndex:2E9}),D=this.timeout,H=q.spin,N=null,L=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()}),Y=this;q.spin=function(ea,aa,na,W){W=null!=W?W:D;var ba=!1;if(!this.active){var ja=Date.now();null!=na&&(N=window.setTimeout(function(){q.stop();N=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},W));t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ea==document.body&&"1"==urlParams.embedInline&&
-(ea=Y.diagramContainer,c=ea.scrollLeft+ea.clientWidth/2,f=ea.scrollTop+ea.clientHeight/2);H.call(this,ea);"1"==urlParams.embedInline&&null!=q.el&&(q.el.style.marginTop=ea.scrollTop+"px",q.el.style.marginLeft=ea.scrollLeft+"px");this.active=!0;null!=aa&&(ba=document.createElement("div"),ba.className="geSpinnerStatus",ba.style.position="absolute",ba.style.whiteSpace="nowrap",ba.style.background="#4B4243",ba.style.color="white",ba.style.fontFamily=Editor.defaultHtmlFont,ba.style.fontSize="9pt",ba.style.padding=
-"6px",ba.style.paddingLeft="10px",ba.style.paddingRight="10px",ba.style.zIndex=2E9,ba.style.left=Math.max(0,c)+"px",ba.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ba.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ba.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ba.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-1)&&(aa+="..."),ba.innerText=aa,ea.appendChild(ba),q.status=ba);
-this.pause=mxUtils.bind(this,function(){var ca=J;this.active&&(W=Math.max(0,W-(Date.now()-ja)),ca=mxUtils.bind(this,function(la){this.spin(ea,aa,na,W);if(null!=la)try{la(),L=mxUtils.bind(this,function(){this.spin(ea,aa,na,W);try{la()}catch(Q){null!=na&&na(Q)}})}catch(Q){null!=na&&na(Q)}}));this.stop();return ca});ba=!0}return ba};var ha=q.stop;q.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status),
-q.status=null)};q.pause=function(){return J};return q};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&
+hwaccel:!1,zIndex:2E9}),D=this.timeout,H=q.spin,N=null,L=null,I=mxUtils.bind(this,function(fa){null!=fa&&fa()}),Z=this;q.spin=function(fa,ba,na,X){X=null!=X?X:D;var ca=!1;if(!this.active){var ka=Date.now();null!=na&&(N=window.setTimeout(function(){q.stop();N=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},X));t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);fa==document.body&&"1"==urlParams.embedInline&&
+(fa=Z.diagramContainer,c=fa.scrollLeft+fa.clientWidth/2,f=fa.scrollTop+fa.clientHeight/2);H.call(this,fa);"1"==urlParams.embedInline&&null!=q.el&&(q.el.style.marginTop=fa.scrollTop+"px",q.el.style.marginLeft=fa.scrollLeft+"px");this.active=!0;null!=ba&&(ca=document.createElement("div"),ca.className="geSpinnerStatus",ca.style.position="absolute",ca.style.whiteSpace="nowrap",ca.style.background="#4B4243",ca.style.color="white",ca.style.fontFamily=Editor.defaultHtmlFont,ca.style.fontSize="9pt",ca.style.padding=
+"6px",ca.style.paddingLeft="10px",ca.style.paddingRight="10px",ca.style.zIndex=2E9,ca.style.left=Math.max(0,c)+"px",ca.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ca.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ca.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ca.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),ca.innerText=ba,fa.appendChild(ca),q.status=ca);
+this.pause=mxUtils.bind(this,function(){var da=I;this.active&&(X=Math.max(0,X-(Date.now()-ka)),da=mxUtils.bind(this,function(W){this.spin(fa,ba,na,X);if(null!=W)try{W(),L=mxUtils.bind(this,function(){this.spin(fa,ba,na,X);try{W()}catch(S){null!=na&&na(S)}})}catch(S){null!=na&&na(S)}}));this.stop();return da});ca=!0}return ca};var ia=q.stop;q.stop=function(){ia.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status),
+q.status=null)};q.pause=function(){return I};return q};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&
224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||
60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,q=this;f.getFunction=function(D){if(t.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var H=q.getSelectedPageIndex();if(mxEvent.isShiftDown(D)){if(37==D.keyCode)return function(){0<
H&&q.movePage(H,H-1)};if(38==D.keyCode)return function(){0<H&&q.movePage(H,0)};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,H+1)};if(40==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,q.pages.length-1)}}else if(mxEvent.isControlDown(D)||mxClient.IS_MAC&&mxEvent.isMetaDown(D)){if(37==D.keyCode)return function(){0<H&&q.selectNextPage(!1)};if(38==D.keyCode)return function(){0<H&&q.selectPage(q.pages[0])};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.selectNextPage(!0)};
@@ -3502,13 +3502,13 @@ if(40==D.keyCode)return function(){H<q.pages.length-1&&q.selectPage(q.pages[q.pa
c.lastIndexOf("&lt;/mxfile&gt;");t>l&&(f=c.substring(l,t+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(c),D=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=D?mxUtils.getXml(D):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+
c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if(1<q.length||1==q.length&&
q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var D=q.length-1;0<=D;D--){var H=this.updatePageRoot(new DiagramPage(q[D]));null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[D+1]));l.model.execute(new ChangePage(this,H,0==D?H:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(D=0;D<t.length;D++)l.model.execute(new ChangePage(this,t[D],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){f=
-null!=f?f:this.editor.graph;q=null!=q?q:!1;L=null!=L?L:!0;Y=null!=Y?Y:!Editor.defaultCompressed;var aa=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else aa=na=t;if(null==c)return"";var W=c;if("mxfile"!=W.nodeName.toLowerCase()){if(Y){var ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());ba.appendChild(c)}else{ba=Graph.zapGremlins(mxUtils.getXml(c));W=Graph.compress(ba);
-if(Graph.decompress(W)!=ba)return ba;ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());mxUtils.setTextContent(ba,W)}W=c.ownerDocument.createElement("mxfile");W.appendChild(ba)}J?(W=W.cloneNode(!0),W.removeAttribute("modified"),W.removeAttribute("host"),W.removeAttribute("agent"),W.removeAttribute("etag"),W.removeAttribute("userAgent"),W.removeAttribute("version"),W.removeAttribute("editor"),W.removeAttribute("type")):
-(W.removeAttribute("userAgent"),W.removeAttribute("modified"),W.removeAttribute("version"),W.removeAttribute("editor"),W.removeAttribute("pages"),W.removeAttribute("type"),W.removeAttribute("etag"),mxClient.IS_CHROMEAPP?W.setAttribute("host","Chrome"):EditorUi.isElectronApp?W.setAttribute("host","Electron"):W.setAttribute("host",window.location.hostname),W.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),W.setAttribute("version",EditorUi.VERSION),1<W.getElementsByTagName("diagram").length&&
-null!=this.pages&&W.setAttribute("pages",this.pages.length));null!=ha&&(W=W.cloneNode(!0),W.setAttribute("scale",ha));null!=ea&&(W=W.cloneNode(!0),W.setAttribute("border",ea));c=Y?mxUtils.getPrettyXml(W):mxUtils.getXml(W);if(!D&&!q&&(H||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(W),f,null!=l?l.getTitle():null,na,aa);else if(D||!q&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(W),
-c=this.getEmbeddedSvg(c,f,t,null,N,L,aa,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var q=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var J=L.getElementsByTagName("mxGraphModel"),Y=0<J.length?J[0]:null;J=L;null==Y&&l?(Y=mxUtils.getNodeValue(L),0<Y.length&&(Y=Graph.decompress(Y),null!=Y&&0<Y.length&&(J=L.cloneNode(!1),
-J.appendChild(mxUtils.parseXml(Y).documentElement)))):null==Y||l?J=L.cloneNode(!0):(J=L.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(Y)));q.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(q),q=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var D=this.pages[f],H=D.node;if(D!=this.currentPage)if(D.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(D.root));
+[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(D=0;D<t.length;D++)l.model.execute(new ChangePage(this,t[D],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){f=
+null!=f?f:this.editor.graph;q=null!=q?q:!1;L=null!=L?L:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var ba=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else ba=na=t;if(null==c)return"";var X=c;if("mxfile"!=X.nodeName.toLowerCase()){if(Z){var ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());ca.appendChild(c)}else{ca=Graph.zapGremlins(mxUtils.getXml(c));X=Graph.compress(ca);
+if(Graph.decompress(X)!=ca)return ca;ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());mxUtils.setTextContent(ca,X)}X=c.ownerDocument.createElement("mxfile");X.appendChild(ca)}I?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):
+(X.removeAttribute("userAgent"),X.removeAttribute("modified"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),X.removeAttribute("etag"),mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),1<X.getElementsByTagName("diagram").length&&
+null!=this.pages&&X.setAttribute("pages",this.pages.length));null!=ia&&(X=X.cloneNode(!0),X.setAttribute("scale",ia));null!=fa&&(X=X.cloneNode(!0),X.setAttribute("border",fa));c=Z?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!D&&!q&&(H||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(X),f,null!=l?l.getTitle():null,na,ba);else if(D||!q&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(X),
+c=this.getEmbeddedSvg(c,f,t,null,N,L,ba,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var q=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var I=L.getElementsByTagName("mxGraphModel"),Z=0<I.length?I[0]:null;I=L;null==Z&&l?(Z=mxUtils.getNodeValue(L),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(I=L.cloneNode(!1),
+I.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||l?I=L.cloneNode(!0):(I=L.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(Z)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(q),q=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var D=this.pages[f],H=D.node;if(D!=this.currentPage)if(D.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(D.root));
this.editor.graph.saveViewState(D.viewState,N,null,t);EditorUi.removeChildNodes(H);H.appendChild(N);delete D.needsUpdate}else t&&(this.updatePageRoot(D),null!=D.viewState.backgroundImage&&(null!=D.viewState.backgroundImage.originalSrc?D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.originalSrc,D):Graph.isPageLink(D.viewState.backgroundImage.src)&&(D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.src,D))),null!=D.viewState.backgroundImage&&
null!=D.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(D.root)),this.editor.graph.saveViewState(D.viewState,N,null,t),H=H.cloneNode(!1),H.appendChild(N)));c(H)}return q};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var q=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?l.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=
q?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=
@@ -3516,9 +3516,9 @@ mxUtils.getXml(l)}catch(D){c[EditorUi.DIFF_INSERT][f].data=D.message}if(null!=c[
delete H[N];mxUtils.isEmptyObject(H)&&delete q.cells[D]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,
f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+
"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){q=null!=q?q:!0;D=null!=D?D:!1;J=null!=J?J:!Editor.defaultCompressed;
-var aa=this.editor.graph;if((f||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var na=aa.getGlobalVariable;aa=this.createTemporaryGraph(aa.getStylesheet());aa.setBackgroundImage=this.editor.graph.setBackgroundImage;aa.background=this.editor.graph.background;var W=null!=this.pages?this.pages[0]:null;null==W||this.currentPage==W?aa.setBackgroundImage(this.editor.graph.backgroundImage):null!=W.viewState&&null!=W.viewState&&aa.setBackgroundImage(W.viewState.backgroundImage);
-aa.getGlobalVariable=function(ba){return"page"==ba&&null!=W?W.getName():"pagenumber"==ba?1:na.apply(this,arguments)};document.body.appendChild(aa.container);null!=W&&aa.model.setRoot(W.root)}H=null!=H?H:this.getXmlFileData(q,D,J,Y);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,aa,L,window.location.href,c,f,l,t,q,N,J,ha,ea);aa!=this.editor.graph&&aa.container.parentNode.removeChild(aa.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,q,D){D=null!=D?D:!0;var H=null,N=EditorUi.drawHost+
+(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){q=null!=q?q:!0;D=null!=D?D:!1;I=null!=I?I:!Editor.defaultCompressed;
+var ba=this.editor.graph;if((f||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var na=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var X=null!=this.pages?this.pages[0]:null;null==X||this.currentPage==X?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=X.viewState&&null!=X.viewState&&ba.setBackgroundImage(X.viewState.backgroundImage);
+ba.getGlobalVariable=function(ca){return"page"==ca&&null!=X?X.getName():"pagenumber"==ca?1:na.apply(this,arguments)};document.body.appendChild(ba.container);null!=X&&ba.model.setRoot(X.root)}H=null!=H?H:this.getXmlFileData(q,D,I,Z);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,ba,L,window.location.href,c,f,l,t,q,N,I,ia,fa);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,q,D){D=null!=D?D:!0;var H=null,N=EditorUi.drawHost+
"/js/embed-static.min.js";if(null!=f){H=D?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var L=f.view.scale;D=Math.floor(H.x/L-f.view.translate.x);L=Math.floor(H.y/L-f.view.translate.y);H=f.background;null==q&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",D);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),
c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=q&&(q=q.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+
(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+
@@ -3527,431 +3527,432 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Edit
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),q=null;this.fileNode=f;this.pages=[];for(var D=0;D<c.length;D++){null==c[D].getAttribute("id")&&c[D].setAttribute("id",D);f=new DiagramPage(c[D]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[D+1]));this.pages.push(f);
if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=t.pageId&&f.getId()==t.pageId)q=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=q?q:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(D=0;D<H.length;D++)f[H[D]]=!0;var N=this.editor.graph.getModel(),L=N.getChildren(N.root);for(D=0;D<L.length;D++){var J=L[D];N.setVisible(J,f[J.id]||!1)}}catch(Y){}};EditorUi.prototype.getBaseFilename=
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(D=0;D<H.length;D++)f[H[D]]=!0;var N=this.editor.graph.getModel(),L=N.getChildren(N.root);for(D=0;D<L.length;D++){var I=L[D];N.setVisible(I,f[I.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=
function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename(!q),ja=ba+("xml"==c||"pdf"==c&&Y?".drawio":"")+"."+c;if("xml"==c){var ca=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,q,null,null,null,f);this.saveData(ja,c,ca,"text/xml")}else if("html"==c)ca=this.getHtml2(this.getFileData(!0),this.editor.graph,ba),this.saveData(ja,c,ca,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?ja=ba+".png":"jpeg"==c&&(ja=ba+".jpg"),this.saveRequest(ja,c,mxUtils.bind(this,function(I,U){try{return this.createDownloadRequest(I,c,t,U,H,q,N,L,J,Y,ha,void 0,void 0,!D,ea,aa,na,W)}catch(P){this.handleError(P)}}));else{var la=null,Q=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(ja,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});if("svg"==c){var k=this.editor.graph.background;
-if(H||k==mxConstants.NONE)k=null;var B=this.editor.graph.getSvg(k,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();Q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else ja=ba+".svg",la=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();Q(I)}),t)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,q,D,H,N,
-L,J,Y,ha,ea,aa,na,W,ba,ja){c=this.downloadRequestBuilder(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W,ba,ja);f="";for(var ca in c)l=c[ca],null!=l&&(f+=ca+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W,ba,ja){var ca=this.editor.graph,la=ca.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==D?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var Q=null,k=null,B=null;if(!EditorUi.isElectronApp&&
-(la.width*la.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=Y?(Q=Y.from,k=Y.to):0==D&&(B="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(D=0;D<this.pages.length;D++)if(this.pages[D]==this.currentPage){Q=D;break}D=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=D&&D!=mxConstants.NONE||(D="#ffffff"):D=mxConstants.NONE;q={globalVars:ca.getExportVariables()};
-L&&(q.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ca.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return{format:f,from:Q,to:k,allPages:B,bg:null!=D?D:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(q),scale:H,border:N,pageMargin:na,w:ha&&isFinite(ha)?ha:null,h:ea&&isFinite(ea)?ea:null,crop:null!=aa&&aa?"1":"0",fit:null!=W&&W?"1":"0",sheetsAcross:ba,
-sheetsDown:ja}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
+function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename(!q),ka=ca+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var da=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,q,null,null,null,f);this.saveData(ka,c,da,"text/xml")}else if("html"==c)da=this.getHtml2(this.getFileData(!0),this.editor.graph,ca),this.saveData(ka,c,da,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?ka=ca+".png":"jpeg"==c&&(ka=ca+".jpg"),this.saveRequest(ka,c,mxUtils.bind(this,function(K,T){try{return this.createDownloadRequest(K,c,t,T,H,q,N,L,I,Z,ia,void 0,void 0,!D,fa,ba,na,X)}catch(P){this.handleError(P)}}));else{var W=null,S=mxUtils.bind(this,function(K){K.length<=MAX_REQUEST_SIZE?this.saveData(ka,"svg",K,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==c){var k=this.editor.graph.background;
+if(H||k==mxConstants.NONE)k=null;var B=this.editor.graph.getSvg(k,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(K){this.spinner.stop();S(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(K))})))}else ka=ca+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(K){this.spinner.stop();S(K)}),t)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,q,D,H,N,
+L,I,Z,ia,fa,ba,na,X,ca,ka){c=this.downloadRequestBuilder(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X,ca,ka);f="";for(var da in c)l=c[da],null!=l&&(f+=da+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X,ca,ka){var da=this.editor.graph,W=da.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==D?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var S=null,k=null,B=null;if(!EditorUi.isElectronApp&&
+(W.width*W.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=Z?(S=Z.from,k=Z.to):0==D&&(B="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(D=0;D<this.pages.length;D++)if(this.pages[D]==this.currentPage){S=D;break}D=da.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=D&&D!=mxConstants.NONE||(D="#ffffff"):D=mxConstants.NONE;q={globalVars:da.getExportVariables()};L&&
+(q.grid={size:da.gridSize,steps:da.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:da.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return{format:f,from:S,to:k,allPages:B,bg:null!=D?D:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(q),scale:H,border:N,pageMargin:na,w:ia&&isFinite(ia)?ia:null,h:fa&&isFinite(fa)?fa:null,crop:null!=ba&&ba?"1":"0",fit:null!=X&&X?"1":"0",sheetsAcross:ca,
+sheetsDown:ka}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?
-window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,q=mxUtils.bind(this,function(H){var N=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<N.length&&(N+="\n"),N+=H);H=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return t};this.fileLoaded(H);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,J=null,Y=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ea===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),ha()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),
-ha=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(Y,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ha();Y()}));ha();Y()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var D=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(D,mxUtils.bind(this,function(H){q(H)}),mxUtils.bind(this,function(H){null!=l&&l(H)}))}else q("")};EditorUi.prototype.updateDiagram=function(c){function f(la){var Q=new mxCellOverlay(la.image||q.warningImage,la.tooltip,la.align,
-la.valign,la.offset);Q.addListener(mxEvent.CLICK,function(k,B){t.alert(la.tooltip)});return Q}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var q=this.editor.graph,D=q.getModel();D.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=D.getCell(c.getAttribute("id"));if(null!=N){try{var L=c.getAttribute("value");if(null!=L){var J=mxUtils.parseXml(L).documentElement;if(null!=J)if("1"==
-J.getAttribute("replace-value"))D.setValue(N,J);else for(var Y=J.attributes,ha=0;ha<Y.length;ha++)q.setAttributeForCell(N,Y[ha].nodeName,0<Y[ha].nodeValue.length?Y[ha].nodeValue:null)}}catch(la){null!=window.console&&console.log("Error in value for "+N.id+": "+la)}try{var ea=c.getAttribute("style");null!=ea&&q.model.setStyle(N,ea)}catch(la){null!=window.console&&console.log("Error in style for "+N.id+": "+la)}try{var aa=c.getAttribute("icon");if(null!=aa){var na=0<aa.length?JSON.parse(aa):null;null!=
-na&&na.append||q.removeCellOverlays(N);null!=na&&q.addCellOverlay(N,f(na))}}catch(la){null!=window.console&&console.log("Error in icon for "+N.id+": "+la)}try{var W=c.getAttribute("geometry");if(null!=W){W=JSON.parse(W);var ba=q.getCellGeometry(N);if(null!=ba){ba=ba.clone();for(key in W){var ja=parseFloat(W[key]);"dx"==key?ba.x+=ja:"dy"==key?ba.y+=ja:"dw"==key?ba.width+=ja:"dh"==key?ba.height+=ja:ba[key]=parseFloat(W[key])}q.model.setGeometry(N,ba)}}}catch(la){null!=window.console&&console.log("Error in icon for "+
-N.id+": "+la)}}}else if("model"==c.nodeName){for(var ca=c.firstChild;null!=ca&&ca.nodeType!=mxConstants.NODETYPE_ELEMENT;)ca=ca.nextSibling;null!=ca&&(new mxCodec(c.firstChild)).decode(ca,D)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(q.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,q=mxUtils.bind(this,function(H){var N=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<N.length&&(N+="\n"),N+=H);H=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return t};this.fileLoaded(H);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(fa){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,I=null,Z=mxUtils.bind(this,function(){var fa=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){fa===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),ia()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),
+ia=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(Z,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ia();Z()}));ia();Z()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var D=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(D,mxUtils.bind(this,function(H){q(H)}),mxUtils.bind(this,function(H){null!=l&&l(H)}))}else q("")};EditorUi.prototype.updateDiagram=function(c){function f(W){var S=new mxCellOverlay(W.image||q.warningImage,W.tooltip,W.align,W.valign,
+W.offset);S.addListener(mxEvent.CLICK,function(k,B){t.alert(W.tooltip)});return S}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var q=this.editor.graph,D=q.getModel();D.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=D.getCell(c.getAttribute("id"));if(null!=N){try{var L=c.getAttribute("value");if(null!=L){var I=mxUtils.parseXml(L).documentElement;if(null!=I)if("1"==I.getAttribute("replace-value"))D.setValue(N,
+I);else for(var Z=I.attributes,ia=0;ia<Z.length;ia++)q.setAttributeForCell(N,Z[ia].nodeName,0<Z[ia].nodeValue.length?Z[ia].nodeValue:null)}}catch(W){null!=window.console&&console.log("Error in value for "+N.id+": "+W)}try{var fa=c.getAttribute("style");null!=fa&&q.model.setStyle(N,fa)}catch(W){null!=window.console&&console.log("Error in style for "+N.id+": "+W)}try{var ba=c.getAttribute("icon");if(null!=ba){var na=0<ba.length?JSON.parse(ba):null;null!=na&&na.append||q.removeCellOverlays(N);null!=
+na&&q.addCellOverlay(N,f(na))}}catch(W){null!=window.console&&console.log("Error in icon for "+N.id+": "+W)}try{var X=c.getAttribute("geometry");if(null!=X){X=JSON.parse(X);var ca=q.getCellGeometry(N);if(null!=ca){ca=ca.clone();for(key in X){var ka=parseFloat(X[key]);"dx"==key?ca.x+=ka:"dy"==key?ca.y+=ka:"dw"==key?ca.width+=ka:"dh"==key?ca.height+=ka:ca[key]=parseFloat(X[key])}q.model.setGeometry(N,ca)}}}catch(W){null!=window.console&&console.log("Error in icon for "+N.id+": "+W)}}}else if("model"==
+c.nodeName){for(var da=c.firstChild;null!=da&&da.nodeType!=mxConstants.NODETYPE_ELEMENT;)da=da.nextSibling;null!=da&&(new mxCodec(c.firstChild)).decode(da,D)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(q.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
1);c=c.nextSibling}}finally{D.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var q=new Date;l=q.getFullYear();t=q.getMonth()+1;var D=q.getDate(),H=q.getHours(),N=q.getMinutes();q=q.getSeconds();l=f+(" "+(l+"-"+t+"-"+D+"-"+H+"-"+N+"-"+q))}return l=mxResources.get("copyOf",
[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var D=mxUtils.bind(this,function(){this.setGraphEnabled(!1);
-this.setCurrentFile(null);null!=t&&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.fname.innerText="");this.clearStatus();this.updateUi();f||this.showSplash()});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",
-this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
-"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||
-"min"==H)H+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(L){}c=
-mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||D():D()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,
-!0))}else D();return q};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var D=0;D<c.length;D++){this.updatePageRoot(c[D]);var H=c[D].node.cloneNode(!1);H.removeAttribute("name");t.root=c[D].root;var N=q.encode(t);this.editor.graph.saveViewState(c[D].viewState,N,!0);N.removeAttribute("pageWidth");N.removeAttribute("pageHeight");H.appendChild(N);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,
-f.nodeCount+=H.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(H,function(L,J,Y,ha){return!ha||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?ha&&"mxCell"==L.nodeName&&"previous"==J?null:Y:Math.round(Y)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,
-f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var q=0;q<c.attributes.length;q++){var D=c.attributes[q].name,H=null!=f?f(c,D,c.attributes[q].value,!0):c.attributes[q].value;null!=H&&(t^=this.hashValue(D,f,l)+this.hashValue(H,f,l))}}if(null!=c.childNodes)for(q=0;q<c.childNodes.length;q++)t=(t<<5)-t+this.hashValue(c.childNodes[q],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(q=0;q<c.length;q++)f=(f<<5)-f+c.charCodeAt(q)<<
-0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,q,D,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
-c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],
-null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};
-};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var q=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var D=0;D<this.openLibraries.length;D++)if(this.openLibraries[D].file.getHash()==
-c.getHash()){mxUtils.remove(this.openLibraries[D],this.openLibraries);break}q={file:c,images:f,title:l,expand:t};this.openLibraries.push(q)}else this.scratchpad=c;D=this.sidebar.palettes[c.getHash()];D=null!=D?D[D.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var H=null,N=mxUtils.bind(this,function(ja,ca){0==ja.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),ca.appendChild(H)):this.addLibraryEntries(ja,
-ca)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(ja){N(f,ja)}));null!=q&&(q.div=L);this.repositionLibrary(D,"L.scratchpad"!=c.getHash());t=L.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");
-J.style.backgroundColor="inherit";t.style.position="relative";var Y=document.createElement("img");Y.className="geLibraryButton";Y.setAttribute("src",Editor.crossImage);Y.setAttribute("title",mxResources.get("close"));var ha=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(Y),mxEvent.addListener(Y,"click",mxUtils.bind(this,function(ja){if(!mxEvent.isConsumed(ja)){var ca=mxUtils.bind(this,function(){null!=q&&mxUtils.remove(q,this.openLibraries);this.closeLibrary(c)});null!=ha?this.confirm(mxResources.get("allChangesLost"),
-null,ca,mxResources.get("cancel"),mxResources.get("discardChanges")):ca();mxEvent.consume(ja)}}));if(c.isEditable()){var ea=this.editor.graph,aa=null;l=mxUtils.bind(this,function(ja){this.showLibraryDialog(c.getTitle(),L,f,c,c.getMode());mxEvent.consume(ja)});var na=mxUtils.bind(this,function(ja){c.setModified(!0);c.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=Y.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",J.insertBefore(aa,J.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa)})):null==ha&&(ha=Y.cloneNode(!1),ha.setAttribute("src",Editor.saveImage),ha.setAttribute("title",mxResources.get("save")),J.insertBefore(ha,J.firstChild),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ca){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==
-LocalLibrary,!0,function(){null==ha||c.isModified()||(ha.parentNode.removeChild(ha),ha=null)});mxEvent.consume(ca)})))}),W=mxUtils.bind(this,function(ja,ca,la,Q){ja=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(ja)));for(var k=0;k<ja.length;k++){var B=ea.getCellGeometry(ja[k]);null!=B&&B.translate(-ca.x,-ca.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ja,ca.width,ca.height,Q||"",!0,null,!1));ja=mxUtils.getXml(this.editor.graph.encodeCells(ja));Editor.defaultCompressed&&(ja=
-Graph.compress(ja));ca={xml:ja,w:ca.width,h:ca.height};null!=Q&&(ca.title=Q);f.push(ca);na(la);null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)}),ba=mxUtils.bind(this,function(ja){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(ja),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ca=ea.getSelectionCells(),la=ea.view.getBounds(ca);if(null!=la&&0<la.width&&
-0<la.height){var Q=ea.view.scale;la.x/=Q;la.y/=Q;la.width/=Q;la.height/=Q;la.x-=ea.view.translate.x;la.y-=ea.view.translate.y;W(ca,la)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ja)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ja){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),
-L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(ja))}),mxUtils.bind(this,function(ja){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ba(ja),mxEvent.consume(ja))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ja){ea.isMouseDown&&
-null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ja){L.style.backgroundColor="light-dark(#fefefe, #000000)";ja.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,
-function(ja){L.style.cursor="";L.style.backgroundColor="";0<ja.dataTransfer.files.length&&this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ca,la,Q,k,B,I,U,P,T){if(null!=ca&&"image/"==la.substring(0,6))ca="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ca),ca=[new mxCell("",new mxGeometry(0,0,B,I),ca)],ca[0].vertex=!0,W(ca,new mxRectangle(0,0,B,I),ja,mxEvent.isAltDown(ja)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g,
-" ")),null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null);else{var X=!1,Z=mxUtils.bind(this,function(ka,va){null!=ka&&"application/pdf"==va&&(va=Editor.extractGraphModelFromPdf(ka),null!=va&&0<va.length&&(ka=va));if(null!=ka)if(ka=mxUtils.parseXml(ka),"mxlibrary"==ka.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(ka.documentElement));N(ua,L);f=f.concat(ua);na(ja);this.spinner.stop();X=!0}catch(La){}else if("mxfile"==ka.documentElement.nodeName)try{var qa=
-ka.documentElement.getElementsByTagName("diagram");for(ua=0;ua<qa.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(qa[ua])),ya=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=ya&&W(Ba,new mxRectangle(0,0,ya.width,ya.height),ja)}X=!0}catch(La){null!=window.console&&console.log("error in drop handler:",La)}X||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)});null!=
-T&&null!=U&&EditorUi.isVisioFilename(U)?this.importVisio(T,function(ka){Z(ka,"text/xml")},null,U):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ca,U)&&null!=T?this.isExternalDataComms()?this.parseFile(T,mxUtils.bind(this,function(ka){4==ka.readyState&&(this.spinner.stop(),200<=ka.status&&299>=ka.status?Z(ka.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ka.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Z(ca,la)}}));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ja){L.style.cursor="";L.style.backgroundColor="";ja.stopPropagation();ja.preventDefault()}));Y=Y.cloneNode(!1);Y.setAttribute("src",Editor.editImage);Y.setAttribute("title",mxResources.get("edit"));J.insertBefore(Y,J.firstChild);mxEvent.addListener(Y,"click",l);l=Y.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",
-mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ba);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ba);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=
-c[l],q=t.data;if(null!=q){q="data:"==q.substring(0,5)?this.convertDataUri(q):q;var D="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(D+="aspect=fixed;");D=D+"image="+q+";";null!=t.style&&(D+=t.style);f.appendChild(this.sidebar.createVertexTemplate(D,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var H=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==H.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";
-f.appendChild(this.sidebar.createVertexTemplateFromCells(H,t.w,t.h,N,!0,null,!0))}}catch(L){N=null!=L.message?mxResources.get("error")+": "+L.message:String(L),D=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(D)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
-(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,q,D,H){c=new ImageDialog(this,c,f,l,t,q,D,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,q,D){var H=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(N){if(null!=
-N)try{if(null!=D&&D(N),N==H)this.hideDialog();else{if(0<N.length){var L=JSON.parse(N);localStorage.setItem(f,JSON.stringify(L))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(J){this.handleError(J)}}),null,mxResources.get("close"),null,null,null,!0,null,null,q,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(q,D,H,N){D||(q=
-new ChangePageSetup(this,t?H:null,q),q.ignoreColor=!t,null!=N&&t&&(q.shadowVisible=N),this.editor.graph.model.execute(q))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,q){c=new LibraryDialog(this,c,f,l,t,q);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;
-EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,q,D,H){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&
-null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=L||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var J=mxResources.get("ok"),Y=null;f=null!=f?f:mxResources.get("error");if(null!=L){null!=L.retry&&(J=mxResources.get("cancel"),Y=function(){N();L.retry()});if(404==L.code||404==L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,
-!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ha=null!=q?null:null!=D?D:window.location.hash;if(null!=ha&&("#G"==ha.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ha.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&
-0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ha="#U"==ha.substring(0,2)?ha.substring(45,ha.lastIndexOf("%26ex")):ha.substring(2);this.showError(f,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ha);null!=t&&t()}),Y,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ba.innerText="";for(var ja=0;ja<aa.length;ja++){var ca=document.createElement("option");
-mxUtils.write(ca,aa[ja].displayName);ca.value=ja;ba.appendChild(ca);ca=document.createElement("option");ca.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ca,"<"+aa[ja].email+">");ca.setAttribute("disabled","disabled");ba.appendChild(ca)}ca=document.createElement("option");mxUtils.write(ca,mxResources.get("addAccount"));ca.value=aa.length;ba.appendChild(ca)}var aa=this.drive.getUsersList(),na=document.createElement("div"),W=document.createElement("div");W.style.marginBottom="6px";mxUtils.write(W,mxResources.get("changeUser")+
-": ");na.appendChild(W);var ba=document.createElement("select");ba.style.width="100%";ea();mxEvent.addListener(ba,"change",mxUtils.bind(this,function(){var ja=ba.value,ca=aa.length!=ja;ca&&this.drive.setUser(aa[ja]);this.drive.authorize(ca,mxUtils.bind(this,function(){ca||(aa=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(la){this.handleError(la)}),!0)}));na.appendChild(ba);na=new CustomDialog(this,na,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,
-300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),
-!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}q=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),q=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,q=L.alternateAction.funct);
-this.showError(f,H,J,l,Y,null,null,c,q,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,q,D){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=f&&f()},function(){H();
-null!=l&&l()},t,q,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,D);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,q,D,H,N,L){D=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var J=q?500:1E3,Y=document.createElement("div");Y.className="geBtn gePrimaryBtn geBanner"+(q?" geSmallBanner":"");Y.style.zIndex=mxPopupMenu.prototype.zIndex;
-mxUtils.setPrefixedStyle(Y.style,"transform",H);mxUtils.setPrefixedStyle(Y.style,"transition","all "+J+"ms ease");null!=L&&mxUtils.setPrefixedStyle(Y.style,"transform-origin",L);if(!q){var ha=document.createElement("img");ha.setAttribute("src",IMAGE_PATH+"/logo.png");ha.setAttribute("border","0");ha.setAttribute("align","absmiddle");ha.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";Y.appendChild(ha);ha=document.createElement("img");ha.setAttribute("src",
-Dialog.prototype.closeImage);ha.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ha.setAttribute("border","0");ha.style.cssText=(q?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";Y.appendChild(ha)}mxUtils.write(Y,f);document.body.appendChild(Y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
-var ea=document.createElement("input");ea.setAttribute("type","checkbox");ea.setAttribute("id","geDoNotShowAgainCheckbox");ea.style.marginRight="6px";if(!t){f.appendChild(ea);var aa=document.createElement("label");aa.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(aa,mxResources.get("doNotShowAgain"));f.appendChild(aa);Y.style.paddingBottom=q?"16px":"30px";Y.appendChild(f)}var na=mxUtils.bind(this,function(){null!=Y.parentNode&&(Y.parentNode.removeChild(Y),this.bannerShowing=!1,ea.checked||
-t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ha&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ba){mxEvent.consume(ba);na()}));var W=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Y.style,"transform",H);window.setTimeout(mxUtils.bind(this,function(){na()}),J)});mxEvent.addListener(Y,"click",mxUtils.bind(this,function(ba){var ja=mxEvent.getSource(ba);ja!=ea&&ja!=aa?(null!=l&&l(),na(),
-mxEvent.consume(ba)):W()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Y.style,"transform",N)}),J/2);window.setTimeout(W,q?4E3:3E4);D=!0}return D};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+
-l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,q){var D="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+D;c=this.createImageDataUri(c,f,l,q);this.saveData(t,D,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=
-urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,
-q,D){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=D?D:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var H=document.createElement("a");D=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);D=65==(N?parseInt(N[2],10):!1)?!1:D}if(D||this.isOffline()){H.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));D?H.download=f:H.setAttribute("target",
-"_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,f,l,t,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,q,D){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=l?"&mime="+l:"")+(null!=q?"&format="+q:"")+(null!=D?"&base64="+D:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=
-function(c,f,l,t,q,D,H,N){D=null!=D?D:!1;H=null!=H?H:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);var L=mxUtils.bind(this,function(Y,ha,ea,aa){try{if("_blank"==ha)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var na=new EmbedDialog(this,c);this.showDialog(na.container,450,240,!0,!0);na.init()}else{var W=window.open("about:blank");null==W?mxUtils.popup(c,!0):(W.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),W.document.close())}else if(ha==
-App.MODE_DEVICE||"download"==ha)this.doSaveLocalFile(c,Y,l,t,null,N);else if(null!=Y&&0<Y.length){var ba=mxUtils.bind(this,function(ja){try{this.exportFile(c,Y,l,t,ha,ja)}catch(ca){this.handleError(ca)}});null!=aa?ba(aa):this.pickFolder(ha,ba)}}catch(ja){this.handleError(ja)}});q=[];D||q.push(App.MODE_BROWSER);H||q.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(Y,ha,ea){L(Y.value,ha,Y,ea);this.hideDialog(null,null,J.container)}),q,c,l,t);this.showDialog(J.container,420,110,
-!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var q="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var D=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=D&&(q="background: "+D+";")}q='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+q+'">';"image/svg+xml"!=f||
-mxClient.IS_SVG?"image/svg+xml"!=f||l?(D=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(q+'<img style="max-width:100%;" src="data:'+f+";base64,"+D+'"/></body></html>')):t.document.write(q+c+"</body></html>"):t.document.write(q+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||
-/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),
-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,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 q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=
-q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();f.style.display=0<t.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 l=c(mxUtils.bind(this,function(t){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var D=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=D.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";D=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=D.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",q);this.editor.exportToCanvas(mxUtils.bind(this,function(N){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";
-N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",L);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,q){this.isLocalFileSave()?this.saveLocalFile(l,c,t,q,f):this.saveRequest(c,f,mxUtils.bind(this,function(D,H){return this.createEchoRequest(l,D,t,q,f,H)}),l,q,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,q,D,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,
-function(J,Y,ha,ea){if("_blank"==Y||null!=J&&0<J.length){var aa=l("_blank"==Y?null:J,Y==App.MODE_DEVICE||"download"==Y||null==Y||"_blank"==Y?"0":"1");null!=aa&&(Y==App.MODE_DEVICE||"download"==Y||"_blank"==Y?aa.simulate(document,"_blank"):(ha=mxUtils.bind(this,function(na){D=null!=D?D:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,D,!0,Y,na)}catch(W){this.handleError(W)}else this.spinner.spin(document.body,mxResources.get("saving"))&&aa.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=aa.getStatus()&&299>=aa.getStatus())try{this.exportFile(aa.getText(),J,D,!0,Y,na)}catch(W){this.handleError(W)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(W){this.spinner.stop();this.handleError(W)}))}),null!=ea?ha(ea):this.pickFolder(Y,ha)))}});q=[App.MODE_BROWSER];H||q.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(J,Y,ha){N(J.value,Y,J,ha);this.hideDialog(null,null,L.container)}),q,null,"application/pdf");this.showDialog(L.container,
-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,q,D){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,t,q,D,
-H,N,L,J,Y,ha,ea,aa){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(P){Editor.addRetryToError(P,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa)}));this.handleError(P)})))try{var na=this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var W=f?null:this.editor.graph.background;W==mxConstants.NONE&&(W=null);null==W&&0==f&&(W=this.editor.graph.shapeBackgroundColor);var ba=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var ja=mxUtils.lightDarkColorSupported,ca=mxUtils.preferDarkColor;if("light"==Y||"dark"==Y)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Y;var la=this.editor.graph.createSvgImageExport(q),Q=this.editor.graph.getSvg(W,c,H,N,null,l,null,la,"blank"==J?"_blank":"self"==J?"_top":null,null,!ea,Y,ha);mxUtils.lightDarkColorSupported=ja;mxUtils.preferDarkColor=ca;this.editor.graph.addForeignObjectWarning=ba;t&&this.editor.graph.addSvgShadow(Q);
-var k=this.getBaseFilename()+(q?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});var B=mxUtils.bind(this,function(P){this.spinner.stop();q&&P.setAttribute("content",this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,H));aa(Graph.xmlDeclaration+
-"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(Q);var I=mxUtils.bind(this,function(P){Editor.replaceSvgDataUris&&D&&EditorUi.embedSvgImages(P);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(P,Y,B):B(P)}),U=mxUtils.bind(this,function(P){D&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,I,this.thumbImageCache)):I(P)});ea?this.embedFonts(Q,
-U):(this.editor.addFontCss(Q),U(Q))}catch(P){this.handleError(P)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ha,ea,aa,na,W){var ba=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ba.setAttribute("x",ea);ba.setAttribute("y",aa+.5);ba.setAttribute("width",na.width);ba.setAttribute("height",na.height);null==ba.setAttributeNS?ba.setAttribute("xlink:href",W):ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",W);ha.replaceChild(ba,ha.lastChild);N()}function q(){if(H<
-Y.length)Y[H++](q)}var D="";f=c.getElementsByTagName("style");for(var H=0;H<f.length;H++)D+=f[H].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),L={},J={},Y=[];for(H=0;H<f.length;H++)mxUtils.bind(this,function(ha){var ea=ha.getElementsByTagName("div");if(0<ea.length)try{var aa=ea[0].cloneNode(!0),na=parseInt(aa.style.marginLeft),W=parseInt(aa.style.paddingTop),ba=aa.getElementsByTagName("div")[1],ja=ea=!1,ca=aa.style.alignItems,
-la=aa.style.justifyContent;if(null!=aa.style.writingMode){var Q=aa.style.writingMode;ja="vertical-"==Q.substring(0,9);ea="-rl"==Q.substring(Q.length-3)}var k=!ja&&"1px"==aa.style.width||ja&&"1px"==aa.style.height;if(!ja&&"1px"==aa.style.height||ja&&"1px"==aa.style.width)aa.style.alignItems=ja&&ea?"unsafe flex-end":"unsafe flex-start";k&&(aa.style.justifyContent="unsafe flex-start");aa.style.paddingTop="";aa.style.marginLeft="";var B=aa.outerHTML,I=L[B];null==I&&(aa.style.position="absolute",aa.style.visibility=
-"hidden",document.body.appendChild(aa),Q=1,Q="1px"==aa.style.width?ba.offsetWidth:parseInt(aa.style.width),k=1,k="1px"==aa.style.height?ba.offsetHeight:parseInt(aa.style.height),document.body.removeChild(aa),I=new mxRectangle(na,W,Q,k),L[B]=I);"1px"==aa.style.height&&("unsafe center"==ca?W-=I.height/2:"unsafe flex-end"==ca&&(W-=I.height));if("1px"==aa.style.width)if(!ja&&"unsafe center"==la||ja&&"unsafe center"==ca)na-=I.width/2;else if(!ja&&"unsafe flex-end"==la||ja&&(!ea&&"unsafe flex-end"==ca||
-ea&&"unsafe flex-start"==ca))na-=I.width;I=new mxRectangle(na,W,I.width,I.height+parseInt(ba.style.fontSize)/4);Y.push(mxUtils.bind(this,function(U){var P=J[B];null==P?Graph.htmlToPng(B,I.width,I.height,mxUtils.bind(this,function(T){t(ha,na,W,I,T);J[B]=T;U()}),D):(t(ha,na,W,I,P),U())}))}catch(U){N()}else N()})(f[H]);0==counter&&l(c);H=0;q()};EditorUi.prototype.addRadiobox=function(c,f,l,t,q,D,H){return this.addCheckbox(c,l,t,q,D,H,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,q,D,H,N){D=
-null!=D?D:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=N&&L.setAttribute("name",N);l&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);t&&L.setAttribute("disabled","disabled");D&&(c.appendChild(L),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",H),c.appendChild(l),q||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,
-f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),q="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var D=document.createElement("select");D.style.maxWidth="200px";D.style.width="auto";D.style.marginLeft="8px";D.style.marginRight="10px";D.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));D.appendChild(t);
-var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");D.appendChild(H);c.appendChild(D);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){if("custom"==D.value){var N=new FilenameDialog(this,q,mxResources.get("ok"),function(L){null!=L?(q=L,H.setAttribute("title",L)):(D.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){D.value="blank"});this.showDialog(N.container,300,80,!0,!1);
-N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===D.value?"_blank":q:null},getEditInput:function(){return l},getEditSelect:function(){return D}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";
-null!=D&&D!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=D):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var q=document.createElement("option");
-q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));t.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var D="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(D||"none",function(L){D=L;l()});mxEvent.consume(N)}));l();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);
-mxUtils.br(c);return{getColor:function(){return D},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,q,D){D=null!=D?D:[];l&&(D.push("lightbox=1"),"auto"!=c&&D.push("target="+c),null!=f&&f!=mxConstants.NONE&&D.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&D.push("edit="+encodeURIComponent(t)),q&&D.push("layers=1"),this.editor.graph.foldingEnabled&&D.push("nav=1"));return D};EditorUi.prototype.createLink=
-function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){var aa=this.getCurrentFile();L=this.createUrlParameters(c,f,t,q,D,L);c=!0;null!=H?l="#U"+encodeURIComponent(H):N||null==aa||""==aa.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+aa.getHash(),c=!1);c&&null!=aa&&null!=aa.getTitle()&&aa.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(aa.getTitle()));J&&1<l.length&&(L.push("open="+
-l.substring(1)),l="");Y&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ha&&L.push("transparent=1");null!=ea&&L.push("dark="+ea);return(t&&(null!=H||null!=aa&&aa.getMode()!=App.MODE_GITHUB&&aa.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,q,D,H,
-N,L,J,Y,ha,ea){this.getBasenames();var aa={};""!=q&&q!=mxConstants.NONE&&(aa.highlight=q);"auto"!==t&&(aa.target=t);J||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(aa.zoom=l/100);l=[];H&&(l.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),aa.resize=!0);N&&l.push("layers");L&&l.push("tags");null!=ea&&(aa["dark-mode"]=ea);0<l.length&&(J&&l.push("lightbox"),aa.toolbar=
-l.join(" "));null!=Y&&0<Y.length&&(aa.edit=Y);null!=c?aa.url=c:aa.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(D?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ha(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var q=document.createElement("div");q.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("html"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(D);var H=document.createElement("div");H.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");D=N.cloneNode(!0);D.setAttribute("value","copy");H.appendChild(D);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(N);L=
-document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));D.setAttribute("checked","checked");null==
-l&&N.setAttribute("disabled","disabled");q.appendChild(H);H=380;var Y=this.addLinkSection(q),ha=document.createElement("select");ha.style.maxWidth="260px";ha.style.marginLeft="8px";ha.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value",
-"auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ha.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("appearance")+":");q.appendChild(ha);mxUtils.br(q);H+=26;var ea=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");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=
-"100%";q.appendChild(aa);var na=this.addCheckbox(q,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var W=W=this.addCheckbox(q,mxResources.get("allPages"),L,!L),ba=this.addCheckbox(q,mxResources.get("layers"),!0),ja=this.addCheckbox(q,mxResources.get("tags"),!0),ca=this.addCheckbox(q,mxResources.get("lightbox"),!0),la=null;if(EditorUi.enableHtmlEditOption){la=this.addEditButton(q,ca);var Q=la.getEditInput();Q.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?
-Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");Q.checked&&ca.checked?la.getEditSelect().removeAttribute("disabled"):la.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,q,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,aa.value,Y.getTarget(),Y.getColor(),na.checked,W.checked,ba.checked,ja.checked,ca.checked,null!=la?la.getLink():null,null!=ha?ha.value:null)}),null,c,f);this.showDialog(c.container,340,H,!0,!0);D.focus()};EditorUi.prototype.showPublishLinkDialog=
-function(c,f,l,t,q,D,H,N,L,J,Y){var ha=document.createElement("div");ha.style.whiteSpace="nowrap";var ea=document.createElement("h3");mxUtils.write(ea,c||mxResources.get("publish"));ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="2px";ea.style.marginBottom="20px";ha.appendChild(ea);var aa=document.createElement("select");c=30;aa.className="geBtn";aa.style.marginBottom="8px";aa.style.marginLeft="0px";aa.style.width="100%";aa.style.boxSizing="border-box";if(null==N||""==N.getHash())q=
-null!=q?q:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ea=document.createElement("option"),mxUtils.write(ea,mxResources.get("makeCopy")),ea.setAttribute("value","copy"),aa.appendChild(ea);ea=document.createElement("option");mxUtils.write(ea,mxResources.get("authorizationRequired"));ea.setAttribute("value","auth");aa.appendChild(ea);null!=N&&""!=N.getHash()||ea.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");aa.appendChild(N);null!=
-H?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",H),aa.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ha.appendChild(aa);mxUtils.br(ha);aa.focus();var na=null,W=null;if(null!=f||null!=l)c+=30,mxUtils.write(ha,mxResources.get("width")+":"),na=document.createElement("input"),na.setAttribute("type","text"),na.style.marginRight="16px",na.style.width="50px",na.style.marginLeft=
-"6px",na.style.marginRight="16px",na.style.marginBottom="10px",na.value="100%",ha.appendChild(na),mxUtils.write(ha,mxResources.get("height")+":"),W=document.createElement("input"),W.setAttribute("type","text"),W.style.width="50px",W.style.marginLeft="6px",W.style.marginBottom="10px",W.value=l+"px",ha.appendChild(W),mxUtils.br(ha);var ba=this.addLinkSection(ha,t),ja=J?this.addCheckbox(ha,mxResources.get("transparentBackground"),!1):null;null!=ja&&(c+=20);var ca=null;null!=this.pages&&null!=this.currentPage&&
-0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ca=this.addCheckbox(ha,mxResources.get("selectedPage")+": "+f));var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));la.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"1");mxUtils.write(f,mxResources.get("dark"));la.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");la.appendChild(f);Y&&(mxUtils.write(ha,mxResources.get("appearance")+":"),ha.appendChild(la),mxUtils.br(ha),c+=30);var Q=this.addCheckbox(ha,mxResources.get("lightbox"),!0,null,null,!t),k=this.addEditButton(ha,Q),B=k.getEditInput();t&&(B.style.marginLeft=Q.style.marginLeft,Q.style.display=
-"none",c-=20);var I=this.addCheckbox(ha,mxResources.get("layers"),!0);I.style.marginLeft=B.style.marginLeft;I.style.marginTop="8px";var U=this.addCheckbox(ha,mxResources.get("tags"),!0);U.style.marginLeft=B.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(Q,"change",function(){Q.checked?(I.removeAttribute("disabled"),B.removeAttribute("disabled"),U.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),U.setAttribute("disabled",
-"disabled"));B.checked&&Q.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,ha,mxUtils.bind(this,function(){L(ba.getTarget(),ba.getColor(),null==ca?!1:ca.checked,Q.checked,k.getLink(),I.checked,null!=na?na.value:null,null!=W?W.value:null,U.checked,aa.value,null!=ja?ja.checked:!1,la.value)}),null,mxResources.get("create"),q,D);this.showDialog(t.container,340,296+c,!0,!0);null!=na?(na.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?na.select():document.execCommand("selectAll",!1,null)):null==aa.parentNode;ba.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";D.appendChild(H);if(q){mxUtils.write(D,mxResources.get("zoom")+":");var N=document.createElement("input");
-N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";D.appendChild(N);mxUtils.write(D,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";D.appendChild(L);mxUtils.br(D)}var J=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),Y=t?null:this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ha=t?null:this.addCheckbox(D,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ha&&(ha.style.marginBottom="16px");c=new CustomDialog(this,D,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,aa=parseInt(L.value)||0;l(!J.checked,null!=Y?Y.checked:!1,null!=ha?ha.checked:!1,ea,aa)}),
-null,c,f);this.showDialog(c.container,300,(q?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,q,D,H,N,L){H=null!=H?H:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var Y=this.editor.graph,ha="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ea);mxUtils.write(J,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%";J.appendChild(aa);mxUtils.write(J,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type","text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";J.appendChild(na);mxUtils.br(J);var W=this.addCheckbox(J,mxResources.get("selectionOnly"),
-!1,Y.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 ja=document.createElement("select");ja.style.marginTop="16px";ja.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!Y.isSelectionEmpty()||"selectionOnly"!=c[ea]){var ca=document.createElement("option");mxUtils.write(ca,mxResources.get(c[ea]));ca.setAttribute("value",
-c[ea]);ja.appendChild(ca)}L?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(ja),mxUtils.br(J),ha+=26,mxEvent.addListener(ja,"change",function(){"selectionOnly"==ja.value&&(W.checked=!0)})):D&&(J.appendChild(ba),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ha+=30,mxEvent.addListener(W,"change",function(){W.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));Y.isSelectionEmpty()?L&&(W.style.display="none",W.nextSibling.style.display="none",W.nextSibling.nextSibling.style.display=
-"none",ha-=30):(ja.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(W,"change",function(){ja.value=W.checked?"selectionOnly":"diagram"}));var la=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));
-Q.appendChild(D);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));Q.appendChild(L);"svg"==N&&mxUtils.lightDarkColorSupported?(D=document.createElement("option"),D.setAttribute("value","auto"),mxUtils.write(D,mxResources.get("automatic")),D.setAttribute("selected","selected"),Q.appendChild(D)):Editor.isDarkMode()?L.setAttribute("selected","selected"):D.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(Q);
-mxUtils.br(J);ha+=26;var k=this.addCheckbox(J,mxResources.get("shadow"),Y.shadowVisible),B=null;if("png"==N||"jpeg"==N||"webp"==N)B=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ha+=30;var I=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",H,null,null,"jpeg"!=N&&"webp"!=N),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="28px";"png"==N||"svg"==N?(H=function(){I.checked?U.removeAttribute("disabled"):U.setAttribute("disabled",
-"disabled")},Y=document.createElement("option"),Y.setAttribute("value","allPages"),mxUtils.write(Y,mxResources.get("allPages")),U.appendChild(Y),Y=document.createElement("option"),Y.setAttribute("value","currentPage"),mxUtils.write(Y,mxResources.get("currentPage")),U.appendChild(Y),I.style.marginBottom="12px",U.style.marginBottom="16px",J.appendChild(U),mxUtils.br(J),ha+=20,null!=this.lastEmbedInclude&&(U.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",H),H()):I.style.marginBottom="16px";
-var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");f&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(P),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(T),mxUtils.write(J,mxResources.get("embedFonts")),
-mxUtils.br(J),ha+=50);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));X.appendChild(D);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));X.appendChild(H);H=document.createElement("option");H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));X.appendChild(H);
-H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(X),J.appendChild(H),mxUtils.br(J),mxUtils.br(J),ha+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=aa.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=U.value;q(aa.value,la.checked,!W.checked,k.checked,I.checked,
-P.checked&&f,na.value,ba.checked,("png"==N||"svg"==N)&&"currentPage"==U.value,X.value,null!=B?B.checked:null,null!=Q?Q.value:null,ja.value,T.checked)}),null,l,t);this.showDialog(l.container,340,ha,!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(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=
-f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(N)}var L=this.addCheckbox(D,mxResources.get("fit"),!0),J=this.addCheckbox(D,mxResources.get("shadow"),H.shadowVisible&&t,!t),Y=this.addCheckbox(D,l),ha=this.addCheckbox(D,mxResources.get("lightbox"),!0),ea=this.addEditButton(D,ha),aa=ea.getEditInput(),na=1<H.model.getChildCount(H.model.getRoot()),W=this.addCheckbox(D,mxResources.get("layers"),na,!na);
-W.style.marginLeft=aa.style.marginLeft;W.style.marginBottom="12px";W.style.marginTop="8px";mxEvent.addListener(ha,"change",function(){ha.checked?(na&&W.removeAttribute("disabled"),aa.removeAttribute("disabled")):(W.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&ha.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){c(L.checked,J.checked,Y.checked,
-ha.checked,ea.getLink(),W.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,q,D,H,N){function L(aa){var na=" ",W="";t&&(na=" 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!=Y?"&page="+Y:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",W+="cursor:pointer;");c&&(W+="max-width:100%;");var ba="";l&&(ba=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');H('<img src="'+aa+'"'+ba+(""!=W?' style="'+W+'"':"")+na+"/>")}var J=this.editor.graph.getGraphBounds(),Y=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var na=t?this.getFileData(!0):
-null;aa=this.createImageDataUri(aa,na,"png");L(aa)}),null,null,null,mxUtils.bind(this,function(aa){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ha="";l&&(ha="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ha+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=
-ea.getStatus()&&299>=ea.getStatus()?L("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,q,D,H){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),L=N.getElementsByTagName("a");if(null!=L)for(var J=0;J<L.length;J++){var Y=L[J].getAttribute("href");null!=Y&&"#"==Y.charAt(0)&&"_blank"==L[J].getAttribute("target")&&L[J].removeAttribute("target")}t&&
-N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ha=" ",ea="";t&&(ha="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"+(q?"&edit=_blank":"")+(D?"&layers=1":
-"")+"');}})(this);\"",ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(aa){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ea?' style="'+ea+'"':"")+ha+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),q=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+q),ea+="max-width:100%;max-height:"+q+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),H(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
+this.setCurrentFile(null);null!=t&&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.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);
+c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+
+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=
+c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||"min"==H)H+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+H})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&
+null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||D():D()});f?c():(null!=N.fallbackFileData&&(N.alternateAction=
+{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else D();return q};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var D=0;D<c.length;D++){this.updatePageRoot(c[D]);var H=c[D].node.cloneNode(!1);
+H.removeAttribute("name");t.root=c[D].root;var N=q.encode(t);this.editor.graph.saveViewState(c[D].viewState,N,!0);N.removeAttribute("pageWidth");N.removeAttribute("pageHeight");H.appendChild(N);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(H,function(L,I,Z,ia){return!ia||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?ia&&"mxCell"==L.nodeName&&"previous"==I?null:Z:Math.round(Z)},
+f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var q=0;q<c.attributes.length;q++){var D=c.attributes[q].name,H=null!=f?f(c,D,c.attributes[q].value,!0):c.attributes[q].value;null!=H&&(t^=this.hashValue(D,f,l)+this.hashValue(H,
+f,l))}}if(null!=c.childNodes)for(q=0;q<c.childNodes.length;q++)t=(t<<5)-t+this.hashValue(c.childNodes[q],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(q=0;q<c.length;q++)f=(f<<5)-f+c.charCodeAt(q)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,q,D,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};
+EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));
+f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);
+delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());
+if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=
+LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var q=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var D=0;D<this.openLibraries.length;D++)if(this.openLibraries[D].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[D],this.openLibraries);break}q={file:c,images:f,title:l,expand:t};this.openLibraries.push(q)}else this.scratchpad=c;D=this.sidebar.palettes[c.getHash()];D=null!=D?D[D.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());
+var H=null,N=mxUtils.bind(this,function(ka,da){0==ka.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),da.appendChild(H)):this.addLibraryEntries(ka,da)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(ka){N(f,ka)}));null!=
+q&&(q.div=L);this.repositionLibrary(D,"L.scratchpad"!=c.getHash());t=L.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ia=null;if(".scratchpad"!=
+c.title||this.closableScratchpad)I.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var da=mxUtils.bind(this,function(){null!=q&&mxUtils.remove(q,this.openLibraries);this.closeLibrary(c)});null!=ia?this.confirm(mxResources.get("allChangesLost"),null,da,mxResources.get("cancel"),mxResources.get("discardChanges")):da();mxEvent.consume(ka)}}));if(c.isEditable()){var fa=this.editor.graph,ba=null;l=mxUtils.bind(this,function(ka){this.showLibraryDialog(c.getTitle(),
+L,f,c,c.getMode());mxEvent.consume(ka)});var na=mxUtils.bind(this,function(ka){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=Z.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",I.insertBefore(ba,I.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):
+null==ia&&(ia=Z.cloneNode(!1),ia.setAttribute("src",Editor.saveImage),ia.setAttribute("title",mxResources.get("save")),I.insertBefore(ia,I.firstChild),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(da){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ia||c.isModified()||(ia.parentNode.removeChild(ia),ia=null)});mxEvent.consume(da)})))}),X=mxUtils.bind(this,function(ka,da,W,S){ka=fa.cloneCells(mxUtils.sortCells(fa.model.getTopmostCells(ka)));
+for(var k=0;k<ka.length;k++){var B=fa.getCellGeometry(ka[k]);null!=B&&B.translate(-da.x,-da.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ka,da.width,da.height,S||"",!0,null,!1));ka=mxUtils.getXml(this.editor.graph.encodeCells(ka));Editor.defaultCompressed&&(ka=Graph.compress(ka));da={xml:ka,w:da.width,h:da.height};null!=S&&(da.title=S);f.push(da);na(W);null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)}),ca=mxUtils.bind(this,function(ka){if(fa.isSelectionEmpty())fa.getRubberband().isActive()?
+(fa.getRubberband().execute(ka),fa.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var da=fa.getSelectionCells(),W=fa.view.getBounds(da);if(null!=W&&0<W.width&&0<W.height){var S=fa.view.scale;W.x/=S;W.y/=S;W.width/=S;W.height/=S;W.x-=fa.view.translate.x;W.y-=fa.view.translate.y;X(da,W)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ka)});mxEvent.addGestureListeners(L,
+function(){},mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.panningManager&&null!=fa.graphHandler.first&&(fa.graphHandler.suspend(),null!=fa.graphHandler.hint&&(fa.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",fa.panningManager.stop(),fa.autoScroll=!1,mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.panningManager&&null!=fa.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",
+this.sidebar.showTooltips=!0,fa.panningManager.stop(),fa.graphHandler.reset(),fa.isMouseDown=!1,fa.autoScroll=!0,ca(ka),mxEvent.consume(ka))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.graphHandler.first&&(fa.graphHandler.resume(),null!=fa.graphHandler.hint&&(fa.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",fa.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ka){L.style.backgroundColor=
+"light-dark(#fefefe, #000000)";ka.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ka){L.style.cursor="";L.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(da,W,S,k,B,K,T,P,U){if(null!=da&&"image/"==W.substring(0,6))da="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(da),da=[new mxCell("",new mxGeometry(0,0,B,K),da)],da[0].vertex=!0,X(da,new mxRectangle(0,0,B,K),ka,mxEvent.isAltDown(ka)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null);else{var Y=!1,aa=mxUtils.bind(this,function(la,va){null!=la&&"application/pdf"==va&&(va=Editor.extractGraphModelFromPdf(la),null!=va&&0<va.length&&(la=va));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ua=
+JSON.parse(mxUtils.getTextContent(la.documentElement));N(ua,L);f=f.concat(ua);na(ka);this.spinner.stop();Y=!0}catch(La){}else if("mxfile"==la.documentElement.nodeName)try{var qa=la.documentElement.getElementsByTagName("diagram");for(ua=0;ua<qa.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(qa[ua])),ya=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=ya&&X(Ba,new mxRectangle(0,0,ya.width,ya.height),ka)}Y=!0}catch(La){null!=window.console&&console.log("error in drop handler:",
+La)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)});null!=U&&null!=T&&EditorUi.isVisioFilename(T)?this.importVisio(U,function(la){aa(la,"text/xml")},null,T):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(da,T)&&null!=U?this.isExternalDataComms()?this.parseFile(U,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?aa(la.responseText,
+"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):aa(da,W)}}));ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ka){L.style.cursor="";L.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",
+mxResources.get("edit"));I.insertBefore(Z,I.firstChild);mxEvent.addListener(Z,"click",l);l=Z.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ca);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ca);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",I.insertBefore(l,I.firstChild))}t.appendChild(I);
+this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],q=t.data;if(null!=q){q="data:"==q.substring(0,5)?this.convertDataUri(q):q;var D="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(D+="aspect=fixed;");D=D+"image="+q+";";null!=t.style&&(D+=t.style);f.appendChild(this.sidebar.createVertexTemplate(D,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var H=
+this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==H.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(H,t.w,t.h,N,!0,null,!0))}}catch(L){N=null!=L.message?mxResources.get("error")+": "+L.message:String(L),D=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(D)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&
+(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,q,D,H){c=new ImageDialog(this,c,f,l,t,q,D,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,
+f,l,t,q,D){var H=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=D&&D(N),N==H)this.hideDialog();else{if(0<N.length){var L=JSON.parse(N);localStorage.setItem(f,JSON.stringify(L))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),null,mxResources.get("close"),null,null,null,!0,null,null,q,l,t);this.showDialog(c.container,
+660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(q,D,H,N){D||(q=new ChangePageSetup(this,t?H:null,q),q.ignoreColor=!t,null!=N&&t&&(q.shadowVisible=N),this.editor.graph.model.execute(q))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,q){c=new LibraryDialog(this,c,f,l,t,q);this.showDialog(c.container,640,440,!0,!1,
+mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,q,D,H){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
+L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(fa){}if(null!=L||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var I=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=L){null!=
+L.retry&&(I=mxResources.get("cancel"),Z=function(){N();L.retry()});if(404==L.code||404==L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ia=null!=q?null:null!=D?D:window.location.hash;if(null!=ia&&("#G"==ia.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+ia.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ia="#U"==ia.substring(0,2)?ia.substring(45,ia.lastIndexOf("%26ex")):ia.substring(2);this.showError(f,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ia);null!=t&&t()}),Z,
+mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){ca.innerText="";for(var ka=0;ka<ba.length;ka++){var da=document.createElement("option");mxUtils.write(da,ba[ka].displayName);da.value=ka;ca.appendChild(da);da=document.createElement("option");da.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(da,"<"+ba[ka].email+">");da.setAttribute("disabled","disabled");ca.appendChild(da)}da=document.createElement("option");mxUtils.write(da,mxResources.get("addAccount"));da.value=ba.length;ca.appendChild(da)}
+var ba=this.drive.getUsersList(),na=document.createElement("div"),X=document.createElement("div");X.style.marginBottom="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");na.appendChild(X);var ca=document.createElement("select");ca.style.width="100%";fa();mxEvent.addListener(ca,"change",mxUtils.bind(this,function(){var ka=ca.value,da=ba.length!=ka;da&&this.drive.setUser(ba[ka]);this.drive.authorize(da,mxUtils.bind(this,function(){da||(ba=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(W){this.handleError(W)}),
+!0)}));na.appendChild(ca);na=new CustomDialog(this,na,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&
+(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}q=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),q=mxUtils.bind(this,
+function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,q=L.alternateAction.funct);this.showError(f,H,I,l,Z,null,null,c,q,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,q,D){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=f&&f()},function(){H();null!=l&&l()},t,q,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,D);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,q,D,H,N,L){D=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";
+var I=q?500:1E3,Z=document.createElement("div");Z.className="geBtn gePrimaryBtn geBanner"+(q?" geSmallBanner":"");Z.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(Z.style,"transform",H);mxUtils.setPrefixedStyle(Z.style,"transition","all "+I+"ms ease");null!=L&&mxUtils.setPrefixedStyle(Z.style,"transform-origin",L);if(!q){var ia=document.createElement("img");ia.setAttribute("src",IMAGE_PATH+"/logo.png");ia.setAttribute("border","0");ia.setAttribute("align","absmiddle");ia.style.cssText=
+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";Z.appendChild(ia);ia=document.createElement("img");ia.setAttribute("src",Dialog.prototype.closeImage);ia.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ia.setAttribute("border","0");ia.style.cssText=(q?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";Z.appendChild(ia)}mxUtils.write(Z,f);document.body.appendChild(Z);this.bannerShowing=
+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var fa=document.createElement("input");fa.setAttribute("type","checkbox");fa.setAttribute("id","geDoNotShowAgainCheckbox");fa.style.marginRight="6px";if(!t){f.appendChild(fa);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
+Z.style.paddingBottom=q?"16px":"30px";Z.appendChild(f)}var na=mxUtils.bind(this,function(){null!=Z.parentNode&&(Z.parentNode.removeChild(Z),this.bannerShowing=!1,fa.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ia&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ca){mxEvent.consume(ca);na()}));var X=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Z.style,"transform",H);window.setTimeout(mxUtils.bind(this,
+function(){na()}),I)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ca){var ka=mxEvent.getSource(ca);ka!=fa&&ka!=ba?(null!=l&&l(),na(),mxEvent.consume(ca)):X()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Z.style,"transform",N)}),I/2);window.setTimeout(X,q?4E3:3E4);D=!0}return D};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,q){var D="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+D;c=this.createImageDataUri(c,
+f,l,q);this.saveData(t,D,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,q,D){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=D?D:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),
+l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var H=document.createElement("a");D=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);D=65==(N?parseInt(N[2],10):
+!1)?!1:D}if(D||this.isOffline()){H.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));D?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,f,l,t,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,q,D){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+l?"&mime="+l:"")+(null!=q?"&format="+q:"")+(null!=D?"&base64="+D:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,q,D,H,N){D=null!=D?D:!1;H=null!=H?H:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);var L=mxUtils.bind(this,function(Z,ia,fa,ba){try{if("_blank"==ia)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var na=new EmbedDialog(this,c);this.showDialog(na.container,
+450,240,!0,!0);na.init()}else{var X=window.open("about:blank");null==X?mxUtils.popup(c,!0):(X.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),X.document.close())}else if(ia==App.MODE_DEVICE||"download"==ia)this.doSaveLocalFile(c,Z,l,t,null,N);else if(null!=Z&&0<Z.length){var ca=mxUtils.bind(this,function(ka){try{this.exportFile(c,Z,l,t,ia,ka)}catch(da){this.handleError(da)}});null!=ba?ca(ba):this.pickFolder(ia,ca)}}catch(ka){this.handleError(ka)}});q=[];D||q.push(App.MODE_BROWSER);H||
+q.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(Z,ia,fa){L(Z.value,ia,Z,fa);this.hideDialog(null,null,I.container)}),q,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var q="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var D=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+""!=D&&(q="background: "+D+";")}q='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+q+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(D=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(q+'<img style="max-width:100%;" src="data:'+f+";base64,"+D+'"/></body></html>')):t.document.write(q+c+"</body></html>"):t.document.write(q+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),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,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 q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";
+this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();
+f.style.display=0<t.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 l=c(mxUtils.bind(this,function(t){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var D=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
+this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=D.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";D=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=D.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",q);this.editor.exportToCanvas(mxUtils.bind(this,function(N){H.stop();this.exportDialog.style.width=
+"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",L);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+
+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,q){this.isLocalFileSave()?this.saveLocalFile(l,
+c,t,q,f):this.saveRequest(c,f,mxUtils.bind(this,function(D,H){return this.createEchoRequest(l,D,t,q,f,H)}),l,q,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,q,D,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,function(I,Z,ia,fa){if("_blank"==Z||null!=I&&0<I.length){var ba=l("_blank"==Z?null:I,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ba&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ba.simulate(document,"_blank"):(ia=mxUtils.bind(this,
+function(na){D=null!=D?D:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(X){this.spinner.stop();this.handleError(X)}))}),
+null!=fa?ia(fa):this.pickFolder(Z,ia)))}});q=[App.MODE_BROWSER];H||q.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(I,Z,ia){N(I.value,Z,I,ia);this.hideDialog(null,null,L.container)}),q,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,
+f,l,t,q,D){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(P){Editor.addRetryToError(P,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba)}));this.handleError(P)})))try{var na=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var X=f?null:this.editor.graph.background;X==mxConstants.NONE&&(X=null);null==X&&0==f&&(X=this.editor.graph.shapeBackgroundColor);var ca=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ka=mxUtils.lightDarkColorSupported,da=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var W=this.editor.graph.createSvgImageExport(q),
+S=this.editor.graph.getSvg(X,c,H,N,null,l,null,W,"blank"==I?"_blank":"self"==I?"_top":null,null,!fa,Z,ia);mxUtils.lightDarkColorSupported=ka;mxUtils.preferDarkColor=da;this.editor.graph.addForeignObjectWarning=ca;t&&this.editor.graph.addSvgShadow(S);var k=this.getBaseFilename()+(q?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});var B=mxUtils.bind(this,function(P){this.spinner.stop();q&&P.setAttribute("content",this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,H));ba(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var K=mxUtils.bind(this,function(P){Editor.replaceSvgDataUris&&D&&EditorUi.embedSvgImages(P);Editor.foreignObjectImages&&
+fa?this.replaceAlternateContent(P,Z,B):B(P)}),T=mxUtils.bind(this,function(P){D&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,K,this.thumbImageCache)):K(P)});fa?this.embedFonts(S,T):(this.editor.addFontCss(S),T(S))}catch(P){this.handleError(P)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ia,fa,ba,na,X){var ca=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ca.setAttribute("x",
+fa);ca.setAttribute("y",ba+.5);ca.setAttribute("width",na.width);ca.setAttribute("height",na.height);null==ca.setAttributeNS?ca.setAttribute("xlink:href",X):ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",X);ia.replaceChild(ca,ia.lastChild);N()}function q(){if(H<Z.length)Z[H++](q)}var D="";f=c.getElementsByTagName("style");for(var H=0;H<f.length;H++)D+=f[H].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),L={},I={},Z=
+[];for(H=0;H<f.length;H++)mxUtils.bind(this,function(ia){var fa=ia.getElementsByTagName("div");if(0<fa.length)try{var ba=fa[0].cloneNode(!0),na=parseInt(ba.style.marginLeft),X=parseInt(ba.style.paddingTop),ca=ba.getElementsByTagName("div")[1],ka=fa=!1,da=ba.style.alignItems,W=ba.style.justifyContent;if(null!=ba.style.writingMode){var S=ba.style.writingMode;ka="vertical-"==S.substring(0,9);fa="-rl"==S.substring(S.length-3)}var k=!ka&&"1px"==ba.style.width||ka&&"1px"==ba.style.height;if(!ka&&"1px"==
+ba.style.height||ka&&"1px"==ba.style.width)ba.style.alignItems=ka&&fa?"unsafe flex-end":"unsafe flex-start";k&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var B=ba.outerHTML,K=L[B];null==K&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),S=1,S="1px"==ba.style.width?ca.offsetWidth:parseInt(ba.style.width),k=1,k="1px"==ba.style.height?ca.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),K=new mxRectangle(na,
+X,S,k),L[B]=K);"1px"==ba.style.height&&("unsafe center"==da?X-=K.height/2:"unsafe flex-end"==da&&(X-=K.height));if("1px"==ba.style.width)if(!ka&&"unsafe center"==W||ka&&"unsafe center"==da)na-=K.width/2;else if(!ka&&"unsafe flex-end"==W||ka&&(!fa&&"unsafe flex-end"==da||fa&&"unsafe flex-start"==da))na-=K.width;K=new mxRectangle(na,X,K.width,K.height+parseInt(ca.style.fontSize)/4);Z.push(mxUtils.bind(this,function(T){var P=I[B];null==P?Graph.htmlToPng(B,K.width,K.height,mxUtils.bind(this,function(U){t(ia,
+na,X,K,U);I[B]=U;T()}),D):(t(ia,na,X,K,P),T())}))}catch(T){N()}else N()})(f[H]);0==counter&&l(c);H=0;q()};EditorUi.prototype.addRadiobox=function(c,f,l,t,q,D,H){return this.addCheckbox(c,l,t,q,D,H,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=N&&L.setAttribute("name",N);l&&(L.setAttribute("checked",
+"checked"),L.defaultChecked=!0);t&&L.setAttribute("disabled","disabled");D&&(c.appendChild(L),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",H),c.appendChild(l),q||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),q="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var D=document.createElement("select");
+D.style.maxWidth="200px";D.style.width="auto";D.style.marginLeft="8px";D.style.marginRight="10px";D.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));D.appendChild(t);var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");D.appendChild(H);c.appendChild(D);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){if("custom"==D.value){var N=new FilenameDialog(this,
+q,mxResources.get("ok"),function(L){null!=L?(q=L,H.setAttribute("title",L)):(D.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){D.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===D.value?"_blank":q:null},
+getEditInput:function(){return l},getEditSelect:function(){return D}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=D&&D!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=D):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(N)}
+mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));t.appendChild(q);q=document.createElement("option");
+q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));t.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var D="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(D||"none",function(L){D=L;l()});mxEvent.consume(N)}));l();H.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);mxUtils.br(c);return{getColor:function(){return D},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,q,D){D=null!=D?D:[];l&&(D.push("lightbox=1"),"auto"!=c&&D.push("target="+c),
+null!=f&&f!=mxConstants.NONE&&D.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&D.push("edit="+encodeURIComponent(t)),q&&D.push("layers=1"),this.editor.graph.foldingEnabled&&D.push("nav=1"));return D};EditorUi.prototype.createLink=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){var ba=this.getCurrentFile();L=this.createUrlParameters(c,f,t,q,D,L);c=!0;null!=H?l="#U"+encodeURIComponent(H):N||null==ba||""==ba.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,
+null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));I&&1<l.length&&(L.push("open="+l.substring(1)),l="");Z&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ia&&L.push("transparent=1");null!=fa&&L.push("dark="+fa);return(t&&(null!=H||null!=ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?
+EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==t&&(ba.target=t);I||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ba.zoom=l/100);l=[];H&&(l.push("pages"),
+ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ba.resize=!0);N&&l.push("layers");L&&l.push("tags");null!=fa&&(ba["dark-mode"]=fa);0<l.length&&(I&&l.push("lightbox"),ba.toolbar=l.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(D?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+
+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ia(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var q=document.createElement("div");q.style.whiteSpace=
+"nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("html"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(D);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");
+D=N.cloneNode(!0);D.setAttribute("value","copy");H.appendChild(D);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(N);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,
+mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));D.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");q.appendChild(H);H=380;var Z=this.addLinkSection(q),ia=document.createElement("select");ia.style.maxWidth="260px";ia.style.marginLeft="8px";ia.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));
+ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ia.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("appearance")+":");q.appendChild(ia);mxUtils.br(q);H+=26;var fa=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,
+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var na=this.addCheckbox(q,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var X=X=this.addCheckbox(q,mxResources.get("allPages"),L,!L),ca=this.addCheckbox(q,mxResources.get("layers"),!0),ka=this.addCheckbox(q,mxResources.get("tags"),!0),da=this.addCheckbox(q,mxResources.get("lightbox"),
+!0),W=null;if(EditorUi.enableHtmlEditOption){W=this.addEditButton(q,da);var S=W.getEditInput();S.style.marginBottom="16px";H+=50;mxEvent.addListener(da,"change",function(){da.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");S.checked&&da.checked?W.getEditSelect().removeAttribute("disabled"):W.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,q,mxUtils.bind(this,function(){t(N.checked?l:null,fa.checked,ba.value,Z.getTarget(),Z.getColor(),na.checked,
+X.checked,ca.checked,ka.checked,da.checked,null!=W?W.getLink():null,null!=ia?ia.value:null)}),null,c,f);this.showDialog(c.container,340,H,!0,!0);D.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,q,D,H,N,L,I,Z){var ia=document.createElement("div");ia.style.whiteSpace="nowrap";var fa=document.createElement("h3");mxUtils.write(fa,c||mxResources.get("publish"));fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="2px";fa.style.marginBottom="20px";ia.appendChild(fa);
+var ba=document.createElement("select");c=30;ba.className="geBtn";ba.style.marginBottom="8px";ba.style.marginLeft="0px";ba.style.width="100%";ba.style.boxSizing="border-box";if(null==N||""==N.getHash())q=null!=q?q:"https://www.drawio.com/doc/faq/publish-diagram-as-link",fa=document.createElement("option"),mxUtils.write(fa,mxResources.get("makeCopy")),fa.setAttribute("value","copy"),ba.appendChild(fa);fa=document.createElement("option");mxUtils.write(fa,mxResources.get("authorizationRequired"));fa.setAttribute("value",
+"auth");ba.appendChild(fa);null!=N&&""!=N.getHash()||fa.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");ba.appendChild(N);null!=H?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",H),ba.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ia.appendChild(ba);mxUtils.br(ia);ba.focus();var na=null,X=null;if(null!=f||
+null!=l)c+=30,mxUtils.write(ia,mxResources.get("width")+":"),na=document.createElement("input"),na.setAttribute("type","text"),na.style.marginRight="16px",na.style.width="50px",na.style.marginLeft="6px",na.style.marginRight="16px",na.style.marginBottom="10px",na.value="100%",ia.appendChild(na),mxUtils.write(ia,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",ia.appendChild(X),
+mxUtils.br(ia);var ca=this.addLinkSection(ia,t),ka=I?this.addCheckbox(ia,mxResources.get("transparentBackground"),!1):null;null!=ka&&(c+=20);var da=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),da=this.addCheckbox(ia,mxResources.get("selectedPage")+": "+f));var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";W.style.marginTop=
+"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");W.appendChild(f);Z&&(mxUtils.write(ia,mxResources.get("appearance")+":"),ia.appendChild(W),mxUtils.br(ia),
+c+=30);var S=this.addCheckbox(ia,mxResources.get("lightbox"),!0,null,null,!t),k=this.addEditButton(ia,S),B=k.getEditInput();t&&(B.style.marginLeft=S.style.marginLeft,S.style.display="none",c-=20);var K=this.addCheckbox(ia,mxResources.get("layers"),!0);K.style.marginLeft=B.style.marginLeft;K.style.marginTop="8px";var T=this.addCheckbox(ia,mxResources.get("tags"),!0);T.style.marginLeft=B.style.marginLeft;T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?
+(K.removeAttribute("disabled"),B.removeAttribute("disabled"),T.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));B.checked&&S.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,ia,mxUtils.bind(this,function(){L(ca.getTarget(),ca.getColor(),null==da?!1:da.checked,S.checked,k.getLink(),K.checked,null!=na?na.value:null,null!=
+X?X.value:null,T.checked,ba.value,null!=ka?ka.checked:!1,W.value)}),null,mxResources.get("create"),q,D);this.showDialog(t.container,340,296+c,!0,!0);null!=na?(na.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?na.select():document.execCommand("selectAll",!1,null)):null==ba.parentNode;ca.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));
+H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";D.appendChild(H);if(q){mxUtils.write(D,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";D.appendChild(N);mxUtils.write(D,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");
+L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";D.appendChild(L);mxUtils.br(D)}var I=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=t?null:this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ia=t?null:this.addCheckbox(D,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ia&&(ia.style.marginBottom=
+"16px");c=new CustomDialog(this,D,mxUtils.bind(this,function(){var fa=parseInt(N.value)/100||1,ba=parseInt(L.value)||0;l(!I.checked,null!=Z?Z.checked:!1,null!=ia?ia.checked:!1,fa,ba)}),null,c,f);this.showDialog(c.container,300,(q?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,q,D,H,N,L){H=null!=H?H:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var Z=this.editor.graph,ia="jpeg"==N||"webp"==N?220:320,fa=document.createElement("h3");
+mxUtils.write(fa,c);fa.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(fa);mxUtils.write(I,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";I.appendChild(ba);mxUtils.write(I,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type",
+"text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";I.appendChild(na);mxUtils.br(I);var X=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ca=document.createElement("input");ca.style.marginTop="16px";ca.style.marginRight="8px";ca.style.marginLeft="24px";ca.setAttribute("disabled","disabled");ca.setAttribute("type","checkbox");var ka=document.createElement("select");ka.style.marginTop="16px";ka.style.marginLeft=
+"8px";c=["selectionOnly","diagram","page"];for(fa=0;fa<c.length;fa++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[fa]){var da=document.createElement("option");mxUtils.write(da,mxResources.get(c[fa]));da.setAttribute("value",c[fa]);ka.appendChild(da)}L?(mxUtils.write(I,mxResources.get("size")+":"),I.appendChild(ka),mxUtils.br(I),ia+=26,mxEvent.addListener(ka,"change",function(){"selectionOnly"==ka.value&&(X.checked=!0)})):D&&(I.appendChild(ca),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),
+ia+=30,mxEvent.addListener(X,"change",function(){X.checked?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?L&&(X.style.display="none",X.nextSibling.style.display="none",X.nextSibling.nextSibling.style.display="none",ia-=30):(ka.value="diagram",ca.setAttribute("checked","checked"),ca.defaultChecked=!0,mxEvent.addListener(X,"change",function(){ka.value=X.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(I,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=N&&"webp"!=N),S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";S.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));S.appendChild(D);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));S.appendChild(L);"svg"==N&&mxUtils.lightDarkColorSupported?(D=document.createElement("option"),D.setAttribute("value","auto"),
+mxUtils.write(D,mxResources.get("automatic")),D.setAttribute("selected","selected"),S.appendChild(D)):Editor.isDarkMode()?L.setAttribute("selected","selected"):D.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(S);mxUtils.br(I);ia+=26;var k=this.addCheckbox(I,mxResources.get("shadow"),Z.shadowVisible),B=null;if("png"==N||"jpeg"==N||"webp"==N)B=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ia+=30;Z=null!=
+this.pages?this.pages.length:1;var K=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),H,null,null,"jpeg"!=N&&"webp"!=N),T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="28px";"png"==N||"svg"==N?(H=function(){K.checked?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")},D=document.createElement("option"),D.setAttribute("value","allPages"),mxUtils.write(D,mxResources.get("allPages")),T.appendChild(D),D=document.createElement("option"),
+D.setAttribute("value","currentPage"),mxUtils.write(D,mxResources.get("currentPage")),T.appendChild(D),1<Z&&(K.style.marginBottom="12px",T.style.marginBottom="16px",I.appendChild(T),mxUtils.br(I),ia+=20),null!=this.lastEmbedInclude&&(T.value=this.lastEmbedInclude),mxEvent.addListener(K,"change",H),H()):K.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var U=document.createElement("input");U.style.marginBottom=
+"16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");f&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(P),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(U),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),ia+=50);var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";D=document.createElement("option");D.setAttribute("value",
+"auto");mxUtils.write(D,mxResources.get("automatic"));Y.appendChild(D);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));Y.appendChild(H);H=document.createElement("option");H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));Y.appendChild(H);H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+
+":"),I.appendChild(Y),I.appendChild(H),mxUtils.br(I),mxUtils.br(I),ia+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=ba.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=T.value;q(ba.value,W.checked,!X.checked,k.checked,K.checked,P.checked&&f,na.value,ca.checked,("png"==N||"svg"==N)&&"currentPage"==T.value,Y.value,null!=B?B.checked:null,null!=S?S.value:null,ka.value,U.checked)}),null,l,t);this.showDialog(l.container,
+340,ia,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(N)}var L=this.addCheckbox(D,mxResources.get("fit"),
+!0),I=this.addCheckbox(D,mxResources.get("shadow"),H.shadowVisible&&t,!t),Z=this.addCheckbox(D,l),ia=this.addCheckbox(D,mxResources.get("lightbox"),!0),fa=this.addEditButton(D,ia),ba=fa.getEditInput(),na=1<H.model.getChildCount(H.model.getRoot()),X=this.addCheckbox(D,mxResources.get("layers"),na,!na);X.style.marginLeft=ba.style.marginLeft;X.style.marginBottom="12px";X.style.marginTop="8px";mxEvent.addListener(ia,"change",function(){ia.checked?(na&&X.removeAttribute("disabled"),ba.removeAttribute("disabled")):
+(X.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ia.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){c(L.checked,I.checked,Z.checked,ia.checked,fa.getLink(),X.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,q,D,H,N){function L(ba){var na=" ",X="";t&&
+(na=" 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!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",X+="cursor:pointer;");c&&(X+="max-width:100%;");var ca="";l&&
+(ca=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');H('<img src="'+ba+'"'+ca+(""!=X?' style="'+X+'"':"")+na+"/>")}var I=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var na=t?this.getFileData(!0):null;ba=this.createImageDataUri(ba,na,"png");L(ba)}),null,null,null,mxUtils.bind(this,function(ba){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);
+else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ia="";l&&(ia="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var fa=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ia+"&xml="+encodeURIComponent(f));fa.send(mxUtils.bind(this,function(){200<=fa.getStatus()&&299>=fa.getStatus()?L("data:image/png;base64,"+fa.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
+function(c,f,l,t,q,D,H){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),L=N.getElementsByTagName("a");if(null!=L)for(var I=0;I<L.length;I++){var Z=L[I].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==L[I].getAttribute("target")&&L[I].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ia=" ",fa="";t&&(ia="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"+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",fa+="cursor:pointer;");c&&(fa+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(ba){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=fa?' style="'+fa+'"':"")+ia+"/>")}))}else fa="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}}})(this);"),fa+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),q=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+q),fa+="max-width:100%;max-height:"+q+"px;",N.removeAttribute("height")),""!=fa&&N.setAttribute("style",fa),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),H(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==
c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(D){return"page"==D?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==D?1:q.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(D){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,q){try{var D=this.editor.graph,H=null;if(null!=l&&0<l.length)D=this.createTemporaryGraph(D.getStylesheet()),document.body.appendChild(D.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),D),H=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){D=this.createTemporaryGraph(D.getStylesheet());var N=D.getGlobalVariable;D.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&D.setBackgroundImage(L.viewState.backgroundImage);D.getGlobalVariable=function(J){return"page"==J?L.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(D.container);
-D.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Y=J.toDataURL("image/png");Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(H));c(Y.substring(Y.lastIndexOf(",")+1));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container)}catch(ha){null!=f&&f(ha)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,D.shadowVisible,null,D,q,
-null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){N=null!=N?N:!0;Y=null!=Y?Y:0;H=null!=L?L:f.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==f.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);D=f.getSvg(H,J,Y,null,null,D,null,L,null,f.shadowVisible||ha,null,ea,"diagram");(f.shadowVisible||ha)&&f.addSvgShadow(D,null,null,0==Y);null!=c&&D.setAttribute("content",c);null!=l&&D.setAttribute("resource",
-l);var aa=mxUtils.bind(this,function(na){na=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=q&&q(na);return na});f.mathEnabled&&this.editor.addMathCss(D);if(null!=q)this.embedFonts(D,mxUtils.bind(this,function(na){N?this.editor.convertImages(na,mxUtils.bind(this,function(W){aa(W)})):aa(na)}));else return aa(D)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,q,D,H,N,L,J,Y,ha,ea)}));this.handleError(na)}))){var aa=
-this.editor.graph.isSelectionEmpty();l=null!=l?l:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,q?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,D):null,L,null==this.pages||0==this.pages.length,Y)}catch(W){this.handleError(W)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,f,t,null,null,D,H,J,ha,
-ea)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,q,D,H){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();try{var J=
-mxUtils.parseXml(c);c={};var Y=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=Y&&"mxfile"==Y.nodeName&&null!=this.pages){var ha=Y.getElementsByTagName("diagram");if(1==ha.length&&!D){if(Y=Editor.parseDiagramNode(ha[0]),null!=this.currentPage&&(c[ha[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=ha[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ea))}}else if(0<ha.length){D=[];var aa=
-0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ha[0].getAttribute("id")]=this.pages[0].getId(),ea=ha[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),Y=Editor.parseDiagramNode(ha[0]),t=!1,aa=1);for(;aa<ha.length;aa++){var na=ha[aa].getAttribute("id");ha[aa].removeAttribute("id");var W=this.updatePageRoot(new DiagramPage(ha[aa]));c[na]=ha[aa].getAttribute("id");var ba=this.pages.length;null==W.getName()&&W.setName(mxResources.get("pageWithNumber",
-[ba+1]));L.model.execute(new ChangePage(this,W,W,ba,!0));D.push(W)}this.updatePageLinks(c,D)}}if(null!=Y&&"mxGraphModel"===Y.nodeName){N=L.importGraphModel(Y,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),aa=0;aa<N.length;aa++)this.updatePageLinksForCell(c,N[aa]);var ja=L.parseBackgroundImage(Y.getAttribute("backgroundImage"));if(null!=ja&&null!=ja.originalSrc){this.updateBackgroundPageLink(c,ja);var ca=new ChangePageSetup(this,null,ja);ca.ignoreColor=!0;L.model.execute(ca)}}H&&L.pasteCellStyles(L.includeDescendants(N),
-L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(la){if(q)throw la;this.handleError(la)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=
+!0),D),H=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){D=this.createTemporaryGraph(D.getStylesheet());var N=D.getGlobalVariable;D.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&D.setBackgroundImage(L.viewState.backgroundImage);D.getGlobalVariable=function(I){return"page"==I?L.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(D.container);
+D.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=I.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(H));c(Z.substring(Z.lastIndexOf(",")+1));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container)}catch(ia){null!=f&&f(ia)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,D.shadowVisible,null,D,q,
+null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){N=null!=N?N:!0;Z=null!=Z?Z:0;H=null!=L?L:f.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==f.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);D=f.getSvg(H,I,Z,null,null,D,null,L,null,f.shadowVisible||ia,null,fa,"diagram");(f.shadowVisible||ia)&&f.addSvgShadow(D,null,null,0==Z);null!=c&&D.setAttribute("content",c);null!=l&&D.setAttribute("resource",
+l);var ba=mxUtils.bind(this,function(na){na=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=q&&q(na);return na});f.mathEnabled&&this.editor.addMathCss(D);if(null!=q)this.embedFonts(D,mxUtils.bind(this,function(na){N?this.editor.convertImages(na,mxUtils.bind(this,function(X){ba(X)})):ba(na)}));else return ba(D)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,q,D,H,N,L,I,Z,ia,fa)}));this.handleError(na)}))){var ba=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,q?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,D):null,L,null==this.pages||0==this.pages.length,Z)}catch(X){this.handleError(X)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,f,t,null,null,D,H,I,ia,
+fa)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,q,D,H){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();try{var I=
+mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ia=Z.getElementsByTagName("diagram");if(1==ia.length&&!D){if(Z=Editor.parseDiagramNode(ia[0]),null!=this.currentPage&&(c[ia[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var fa=ia[0].getAttribute("name");null!=fa&&""!=fa&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,fa))}}else if(0<ia.length){D=[];var ba=
+0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ia[0].getAttribute("id")]=this.pages[0].getId(),fa=ia[0].getAttribute("name"),null!=fa&&""!=fa&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],fa)),Z=Editor.parseDiagramNode(ia[0]),t=!1,ba=1);for(;ba<ia.length;ba++){var na=ia[ba].getAttribute("id");ia[ba].removeAttribute("id");var X=this.updatePageRoot(new DiagramPage(ia[ba]));c[na]=ia[ba].getAttribute("id");var ca=this.pages.length;null==X.getName()&&X.setName(mxResources.get("pageWithNumber",
+[ca+1]));L.model.execute(new ChangePage(this,X,X,ca,!0));D.push(X)}this.updatePageLinks(c,D)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){N=L.importGraphModel(Z,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),ba=0;ba<N.length;ba++)this.updatePageLinksForCell(c,N[ba]);var ka=L.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ka&&null!=ka.originalSrc){this.updateBackgroundPageLink(c,ka);var da=new ChangePageSetup(this,null,ka);da.ignoreColor=!0;L.model.execute(da)}}H&&L.pasteCellStyles(L.includeDescendants(N),
+L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(W){if(q)throw W;this.handleError(W)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=
l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,q=t.getLinkForCell(f);null!=q&&t.setLinkForCell(f,this.updatePageLink(c,q));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var D=l.getElementsByTagName("a"),H=!1,N=0;N<D.length;N++)q=D[N].getAttribute("href"),null!=q&&(D[N].setAttribute("href",this.updatePageLink(c,q)),H=!0);H&&t.labelChanged(f,l.innerHTML)}for(N=
0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var q=0;q<t.actions.length;q++){var D=t.actions[q];if(null!=D.open&&Graph.isPageLink(D.open)){var H=D.open.substring(D.open.indexOf(",")+1);l=c[H];null!=l?D.open=
-"data:page/id,"+l:null==this.getPageById(H)&&delete D.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,q){var D=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=l?l(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){t=null!=t?t:c.name;var N=mxUtils.bind(this,function(J){H.clear()&&
-D(J)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var Y=t.lastIndexOf(".");if(0<=Y&&Y<t.length)t.substring(Y+1).toUpperCase();else{var ha=t.lastIndexOf("/");0<=ha&&ha<t.length&&(t=t.substring(ha+1))}}catch(aa){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;J.append("file1",c,t);var ea=
-new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=q&&ea.setRequestHeader("x-convert-custom",q);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&H.clear())if(200<=ea.status&&299>=ea.status)try{var aa=ea.response;if("text/xml"==aa.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(W){try{f(W.target.result)}catch(ba){N({message:mxResources.get("errorLoadingFile")})}});
-na.readAsText(aa)}else this.doImportVisio(aa,f,N,t)}catch(W){N(W)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(na=new FileReader,na.onload=function(){try{N({message:JSON.parse(na.result).Message})}catch(W){N(W)}},na.readAsText(ea.response))}catch(W){N({})}});ea.send(J)}else if(H.clear())try{this.doImportVisio(c,f,N,t)}catch(aa){N(aa)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
+"data:page/id,"+l:null==this.getPageById(H)&&delete D.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,q){var D=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=l?l(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){t=null!=t?t:c.name;var N=mxUtils.bind(this,function(I){H.clear()&&
+D(I)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var Z=t.lastIndexOf(".");if(0<=Z&&Z<t.length)t.substring(Z+1).toUpperCase();else{var ia=t.lastIndexOf("/");0<=ia&&ia<t.length&&(t=t.substring(ia+1))}}catch(ba){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",c,t);var fa=
+new XMLHttpRequest;fa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));fa.responseType="blob";this.addRemoteServiceSecurityCheck(fa);null!=q&&fa.setRequestHeader("x-convert-custom",q);fa.onreadystatechange=mxUtils.bind(this,function(){if(4==fa.readyState&&H.clear())if(200<=fa.status&&299>=fa.status)try{var ba=fa.response;if("text/xml"==ba.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(X){try{f(X.target.result)}catch(ca){N({message:mxResources.get("errorLoadingFile")})}});
+na.readAsText(ba)}else this.doImportVisio(ba,f,N,t)}catch(X){N(X)}else try{""==fa.responseType||"text"==fa.responseType?N({message:fa.responseText}):(na=new FileReader,na.onload=function(){try{N({message:JSON.parse(na.result).Message})}catch(X){N(X)}},na.readAsText(fa.response))}catch(X){N({})}});fa.send(I)}else if(H.clear())try{this.doImportVisio(c,f,N,t)}catch(ba){N(ba)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,N))}),D)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=l?l(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(N){q.clear()&&t(N)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){D(N)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(D){l.clear()&&f(D)}),
q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(D){t(D)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,
t))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=l?l(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(N){q.clear()&&t(N)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=
-window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&L.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)L.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&L.push(N.thumb);console.log.apply(console,L)}}catch(Y){}}catch(Y){null!=window.console&&console.error(Y),D(Y)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?
+window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&L.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)L.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&L.push(N.thumb);console.log.apply(console,L)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),D(Z)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?
window.setTimeout(H,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",H,null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),
t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,q,D){var H=new Graph(document.createElement("div"));l=H.insertVertex(null,null,null,0,0,t,q,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");H.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=D&&H.setAttributeForCell(l,"templatePrompt",D);c=(new mxCodec).encode(H.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,q=function(){for(var H=
-document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),N=0;N<H.length;N++)null!=H[N].parentNode&&H[N].parentNode.removeChild(H[N])},D=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var N=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(J){H.clear()&&(q(),l(J))});N.send(mxUtils.bind(this,function(J){if(H.isAlive())if(200<=J.getStatus()&&299>=J.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ha=mxUtils.trim(J.getText());
-this.generateMermaidImage(ha,null,mxUtils.bind(this,function(ea,aa,na){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ha]),q(),f(ha,ea,aa,na))}),L)}),L,mxUtils.bind(this,function(ea){3>t++?H.clear()&&D():L(ea)}))}),L);else{var Y={message:mxResources.get("error")+" "+J.getStatus()};try{Y=JSON.parse(J.getText()),Y=Y.error}catch(ha){}L(Y)}}),L)}),l)});D()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=
+document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),N=0;N<H.length;N++)null!=H[N].parentNode&&H[N].parentNode.removeChild(H[N])},D=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var N=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(I){H.clear()&&(q(),l(I))});N.send(mxUtils.bind(this,function(I){if(H.isAlive())if(200<=I.getStatus()&&299>=I.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ia=mxUtils.trim(I.getText());
+this.generateMermaidImage(ia,null,mxUtils.bind(this,function(fa,ba,na){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ia]),q(),f(ia,fa,ba,na))}),L)}),L,mxUtils.bind(this,function(fa){3>t++?H.clear()&&D():L(fa)}))}),L);else{var Z={message:mxResources.get("error")+" "+I.getStatus()};try{Z=JSON.parse(I.getText()),Z=Z.error}catch(ia){}L(Z)}}),L)}),l)});D()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=
mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");
l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(q){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,q){var D=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),H=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel=
-"strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var J=mxUtils.parseXml(L).getElementsByTagName("svg");
-if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var Y=parseFloat(J[0].getAttribute("width")),ha=parseFloat(J[0].getAttribute("height"));if(isNaN(Y)||isNaN(ha))try{var ea=J[0].getAttribute("viewBox").split(/\s+/);Y=parseFloat(ea[2]);ha=parseFloat(ea[3])}catch(aa){Y=Y||100,ha=ha||100}l(this.convertDataUri(Editor.createSvgDataUri(L)),Y,ha)}else null!=q?q():t({message:mxResources.get("invalidInput")})}catch(aa){t(aa)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+
+"strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var I=mxUtils.parseXml(L).getElementsByTagName("svg");
+if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var Z=parseFloat(I[0].getAttribute("width")),ia=parseFloat(I[0].getAttribute("height"));if(isNaN(Z)||isNaN(ia))try{var fa=I[0].getAttribute("viewBox").split(/\s+/);Z=parseFloat(fa[2]);ia=parseFloat(fa[3])}catch(ba){Z=Z||100,ia=ia||100}l(this.convertDataUri(Editor.createSvgDataUri(L)),Z,ia)}else null!=q?q():t({message:mxResources.get("invalidInput")})}catch(ba){t(ba)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+
(new Date).getTime(),c).then(function(L){N(L.svg)}).catch(function(L){null!=q?q(L):t(L)})}catch(L){t(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(H,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",H,null,null,null,D)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",
-H,null,null,null,D))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function q(N,L,J){c1=N>>2;c2=(N&3)<<4|L>>4;c3=(L&15)<<2|J>>6;c4=J&63;r="";r+=D(c1&63);r+=D(c2&63);r+=D(c3&63);return r+=D(c4&63)}function D(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+
-function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+q(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+q(N.charCodeAt(i),0,0):r+q(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(J){var Y=new Image;Y.onload=function(){try{var ha=
-Y.width,ea=Y.height;if(0==ha&&0==ea){var aa=L.result,na=aa.indexOf(","),W=decodeURIComponent(escape(atob(aa.substring(na+1)))),ba=mxUtils.parseXml(W).getElementsByTagName("svg");0<ba.length&&(ha=parseFloat(ba[0].getAttribute("width")),ea=parseFloat(ba[0].getAttribute("height")))}l(L.result,ha,ea)}catch(ja){t(ja)}};Y.src=L.result};L.onerror=function(J){t(J)}}else t(N)};H.onerror=function(N){t(N)};H.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,q=null;t.getModel().beginUpdate();
-try{q=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(q,!0)}finally{t.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==
-ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=J&&0<J.length)return this.importXml(J,f,l,D,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,
-f,l,D,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var Y=this.importXml(J,f,l,D,!0,N);if(0<Y.length)return Y}catch(ea){}this.loadImage(c,mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(W,ba,ja){L.setSelectionCell(L.insertVertex(null,
-null,"",L.snap(f),L.snap(l),ba,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(W)+";"))}),H,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),na=Math.round(ea.width*aa);ea=Math.round(ea.height*aa);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(f),L.snap(l),na,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var ea=null;L.getModel().beginUpdate();try{ea=L.insertVertex(L.getDefaultParent(),null,c,L.snap(f),L.snap(l),1,1,"text;"+(t?"html=1;":"")),L.updateCellSize(ea),L.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ea)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,D,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,D,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{L=this.editor.graph;q=null;L.getModel().beginUpdate();try{q=L.insertVertex(L.getDefaultParent(),null,"",L.snap(f),L.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[q]));t&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");q.value=c;L.updateCellSize(q);if(0<
-this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ha=L.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ha.width;q.geometry.height=ha.height}Graph.isLink(q.value)&&L.setLinkForCell(q,q.value);q.geometry.width+=L.gridSize;q.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
+H,null,null,null,D))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function q(N,L,I){c1=N>>2;c2=(N&3)<<4|L>>4;c3=(L&15)<<2|I>>6;c4=I&63;r="";r+=D(c1&63);r+=D(c2&63);r+=D(c3&63);return r+=D(c4&63)}function D(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+
+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+q(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+q(N.charCodeAt(i),0,0):r+q(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(I){var Z=new Image;Z.onload=function(){try{var ia=
+Z.width,fa=Z.height;if(0==ia&&0==fa){var ba=L.result,na=ba.indexOf(","),X=decodeURIComponent(escape(atob(ba.substring(na+1)))),ca=mxUtils.parseXml(X).getElementsByTagName("svg");0<ca.length&&(ia=parseFloat(ca[0].getAttribute("width")),fa=parseFloat(ca[0].getAttribute("height")))}l(L.result,ia,fa)}catch(ka){t(ka)}};Z.src=L.result};L.onerror=function(I){t(I)}}else t(N)};H.onerror=function(N){t(N)};H.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,q=null;t.getModel().beginUpdate();
+try{q=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(q,!0)}finally{t.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(fa){4==
+fa.readyState&&200<=fa.status&&299>=fa.status&&this.editor.graph.setSelectionCells(this.insertTextAt(fa.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=I&&0<I.length)return this.importXml(I,f,l,D,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,
+f,l,D,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(I,f,l,D,!0,N);if(0<Z.length)return Z}catch(fa){}this.loadImage(c,mxUtils.bind(this,function(fa){if("data:"==c.substring(0,5))this.resizeImage(fa,c,mxUtils.bind(this,function(X,ca,ka){L.setSelectionCell(L.insertVertex(null,
+null,"",L.snap(f),L.snap(l),ca,ka,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(X)+";"))}),H,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/fa.width,this.maxImageSize/fa.height)),na=Math.round(fa.width*ba);fa=Math.round(fa.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(f),L.snap(l),na,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var fa=null;L.getModel().beginUpdate();try{fa=L.insertVertex(L.getDefaultParent(),null,c,L.snap(f),L.snap(l),1,1,"text;"+(t?"html=1;":"")),L.updateCellSize(fa),L.fireEvent(new mxEventObject("textInserted","cells",[fa]))}finally{L.getModel().endUpdate()}L.setSelectionCell(fa)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,D,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(fa){this.editor.graph.setSelectionCells(this.importXml(fa,f,l,D,null,N))}),mxUtils.bind(this,function(fa){this.handleError(fa)}));else{L=this.editor.graph;q=null;L.getModel().beginUpdate();try{q=L.insertVertex(L.getDefaultParent(),null,"",L.snap(f),L.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[q]));t&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");q.value=c;L.updateCellSize(q);if(0<
+this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ia=L.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ia.width;q.geometry.height=ia.height}Graph.isLink(q.value)&&L.setLinkForCell(q,q.value);q.geometry.width+=L.gridSize;q.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,N){StorageFile.listFiles(this,"F",H,N)});window.openBrowserFile=
mxUtils.bind(this,function(H,N,L){StorageFile.getFileContent(this,H,N,L)});window.deleteBrowserFile=mxUtils.bind(this,function(H,N,L){StorageFile.deleteFile(this,H,N,L)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,
mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(H,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 q=this.dialog,D=q.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=t;D.apply(q,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,f,l){var t=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(D){if(mxUtils.isEmptyObject(D.files))l();else{var H=0,N,L=!1;D.forEach(function(J,Y){J=Y.name.toLowerCase();"diagram/diagram.xml"==J?(L=!0,Y.async("string").then(function(ha){0==ha.indexOf("<mxfile ")?f(ha):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>H&&(H=J,N=Y))});0<H?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,
-c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?f(Y.responseText):l())}),c.name):l()}):L||l()}},function(D){l(D)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,q,D,H,
-N,L,J,Y,ha){J=null!=J?J:!0;var ea=!1,aa=null,na=mxUtils.bind(this,function(W){var ba=null;null!=W&&"<mxlibrary"==W.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,W,H)),this.showSidebar()):ba=this.importXml(W,l,t,J,null,null!=ha?mxEvent.isControlDown(ha):null);null!=N&&N(ba)});"image"==f.substring(0,5)?(L=!1,"image/png"==f.substring(0,9)&&(Y=Y?null:this.extractGraphModelFromPng(c),null!=Y&&0<Y.length&&(aa=this.importXml(Y,l,t,J,null,null!=ha?mxEvent.isControlDown(ha):null),L=!0)),L||(L=this.editor.graph,
-Y=c.indexOf(";"),0<Y&&(c=c.substring(0,Y)+c.substring(c.indexOf(",",Y+1))),J&&L.isGridEnabled()&&(l=L.snap(l),t=L.snap(t)),Y="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Y+="editableCssRules=.*;"),aa=[L.insertVertex(null,null,"",l,t,q,D,Y+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,na)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(ea=!0,this.importVisio(L,na)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?na(W.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==W.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,H):this.parseFile(L,f,H)):0==c.indexOf("PK")&&null!=L?(ea=!0,this.importZipFile(L,na,mxUtils.bind(this,
-function(){aa=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(aa)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(aa=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ha?mxEvent.isControlDown(ha):null));ea||null==N||N(aa);return aa};EditorUi.prototype.importFiles=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var aa=null!=f&&null!=l,na=!0;f=null!=f?f:0;l=null!=l?l:0;var W=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=c)for(var ba=Y||this.resampleThreshold,ja=0;ja<c.length;ja++)if("image/svg"!==c[ja].type.substring(0,9)&&"image/"===c[ja].type.substring(0,6)&&c[ja].size>ba){W=!0;break}var ca=mxUtils.bind(this,function(){var la=this.editor.graph,Q=la.gridSize;q=null!=q?q:mxUtils.bind(this,function(T,X,Z,ka,va,ua,qa,Ba,ya){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,qa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==c.length&&null!=
-ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(aa=!1,ka=Z=0);return this.importFile(T,X,Z,ka,va,ua,qa,Ba,ya,aa,ha,ea)}catch(La){return this.handleError(La),null}});D=null!=D?D:mxUtils.bind(this,function(T){la.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=c.length,B=k,I=[],U=mxUtils.bind(this,function(T,X){I[T]=X;if(0==--B){this.spinner.stop();if(null!=N)N(I);else{var Z=[];la.getModel().beginUpdate();try{for(T=0;T<I.length;T++){var ka=I[T]();
-null!=ka&&(Z=Z.concat(ka))}}finally{la.getModel().endUpdate()}}D(Z)}}),P=0;P<k;P++)mxUtils.bind(this,function(T){var X=c[T];if(null!=X){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(ka){if(null==H||H(X))try{if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var va=Graph.clipSvgDataUri(ka.target.result),ua=va.indexOf(","),qa=decodeURIComponent(escape(atob(va.substring(ua+1)))),Ba=mxUtils.parseXml(qa),ya=Ba.getElementsByTagName("svg");if(0<ya.length){var La=ya[0],za=
-ha?null:La.getAttribute("content");null!=za&&"<"!=za.charAt(0)&&"%"!=za.charAt(0)&&(za=unescape(window.atob?atob(za):Base64.decode(za,!0)));null!=za&&"%"==za.charAt(0)&&(za=decodeURIComponent(za));null==za||"<mxfile "!==za.substring(0,8)&&"<mxGraphModel "!==za.substring(0,14)?U(T,mxUtils.bind(this,function(){try{if(null!=Ba){var Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var Aa=Ca[0],wa=Aa.getAttribute("width"),Xa=Aa.getAttribute("height");wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):
-NaN;Xa=null!=Xa&&"%"!=Xa.charAt(Xa.length-1)?parseFloat(Xa):NaN;var Qa=Aa.getAttribute("viewBox");if(null==Qa||0==Qa.length)Aa.setAttribute("viewBox","0 0 "+wa+" "+Xa);else if(isNaN(wa)||isNaN(Xa)){var Ra=Qa.split(" ");3<Ra.length&&(wa=parseFloat(Ra[2]),Xa=parseFloat(Ra[3]))}va=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(t/Math.max(1,wa)),t/Math.max(1,Xa)),Ha=q(va,X.type,f+T*Q,l+T*Q,Math.max(1,Math.round(wa*Sa)),Math.max(1,Math.round(Xa*Sa)),X.name);if(null!=Ha&&(isNaN(wa)||
-isNaN(Xa))){var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){wa=Math.max(1,Ma.width);Xa=Math.max(1,Ma.height);Ha[0].geometry.width=wa;Ha[0].geometry.height=Xa;Aa.setAttribute("viewBox","0 0 "+wa+" "+Xa);va=Editor.createSvgDataUri(mxUtils.getXml(Aa));var y=va.indexOf(";");0<y&&(va=va.substring(0,y)+va.substring(va.indexOf(",",y+1)));la.setCellStyles("image",va,[Ha[0]])});Ma.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Ha}}}catch(y){}return null})):U(T,mxUtils.bind(this,function(){return q(za,
-"text/xml",f+T*Q,l+T*Q,0,0,X.name)}))}else U(T,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==X.type){var Ea=ha?null:this.extractGraphModelFromPng(ka.target.result);if(null!=Ea&&0<Ea.length){var pa=new Image;pa.src=ka.target.result;U(T,mxUtils.bind(this,function(){return q(Ea,"text/xml",f+T*Q,l+T*Q,pa.width,pa.height,X.name)}));ua=!0}}ua||(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(ka.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,ka.target.result,mxUtils.bind(this,function(Aa,wa,Xa){U(T,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<J){var Qa=na&&this.isResampleImageSize(X.size,Y)?Math.min(1,Math.min(t/wa,t/Xa)):1;return q(Aa,X.type,f+T*Q,l+T*Q,Math.round(wa*Qa),Math.round(Xa*Qa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),na,t,Y,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else va=ka.target.result,q(va,X.type,f+T*Q,l+T*Q,240,160,X.name,function(Ca){U(T,function(){return Ca})},X)}catch(Ca){U(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,X)}else U(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(X.name)?q(null,X.type,f+T*Q,l+T*Q,240,160,X.name,function(ka){U(T,function(){return ka})},
-X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?Z.readAsDataURL(X):Z.readAsText(X)}})(P)});if(W){W=[];for(ja=0;ja<c.length;ja++)W.push(c[ja]);c=W;this.confirmImageResize(function(la){na=la;ca()},L)}else ca()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?
+function(c,f,l){var t=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(D){if(mxUtils.isEmptyObject(D.files))l();else{var H=0,N,L=!1;D.forEach(function(I,Z){I=Z.name.toLowerCase();"diagram/diagram.xml"==I?(L=!0,Z.async("string").then(function(ia){0==ia.indexOf("<mxfile ")?f(ia):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>H&&(H=I,N=Z))});0<H?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,
+c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):l())}),c.name):l()}):L||l()}},function(D){l(D)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,q,D,H,
+N,L,I,Z,ia){I=null!=I?I:!0;var fa=!1,ba=null,na=mxUtils.bind(this,function(X){var ca=null;null!=X&&"<mxlibrary"==X.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,X,H)),this.showSidebar()):ca=this.importXml(X,l,t,I,null,null!=ia?mxEvent.isControlDown(ia):null);null!=N&&N(ca)});"image"==f.substring(0,5)?(L=!1,"image/png"==f.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(ba=this.importXml(Z,l,t,I,null,null!=ia?mxEvent.isControlDown(ia):null),L=!0)),L||(L=this.editor.graph,
+Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),I&&L.isGridEnabled()&&(l=L.snap(l),t=L.snap(t)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Z+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",l,t,q,D,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(fa=!0,this.importGraphML(c,na)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(fa=!0,this.importVisio(L,na)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(fa=!0,f=mxUtils.bind(this,function(X){4==X.readyState&&(200<=X.status&&299>=X.status?na(X.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==X.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,H):this.parseFile(L,f,H)):0==c.indexOf("PK")&&null!=L?(fa=!0,this.importZipFile(L,na,mxUtils.bind(this,
+function(){ba=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(ba)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(ba=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=ia?mxEvent.isControlDown(ia):null));fa||null==N||N(ba);return ba};EditorUi.prototype.importFiles=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var ba=null!=f&&null!=l,na=!0;f=null!=f?f:0;l=null!=l?l:0;var X=!1;if(!mxClient.IS_CHROMEAPP&&
+null!=c)for(var ca=Z||this.resampleThreshold,ka=0;ka<c.length;ka++)if("image/svg"!==c[ka].type.substring(0,9)&&"image/"===c[ka].type.substring(0,6)&&c[ka].size>ca){X=!0;break}var da=mxUtils.bind(this,function(){var W=this.editor.graph,S=W.gridSize;q=null!=q?q:mxUtils.bind(this,function(U,Y,aa,la,va,ua,qa,Ba,ya){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,qa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==c.length&&null!=
+fa&&"drop"==fa.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=aa=0);return this.importFile(U,Y,aa,la,va,ua,qa,Ba,ya,ba,ia,fa)}catch(La){return this.handleError(La),null}});D=null!=D?D:mxUtils.bind(this,function(U){W.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=c.length,B=k,K=[],T=mxUtils.bind(this,function(U,Y){K[U]=Y;if(0==--B){this.spinner.stop();if(null!=N)N(K);else{var aa=[];W.getModel().beginUpdate();try{for(U=0;U<K.length;U++){var la=
+K[U]();null!=la&&(aa=aa.concat(la))}}finally{W.getModel().endUpdate()}}D(aa)}}),P=0;P<k;P++)mxUtils.bind(this,function(U){var Y=c[U];if(null!=Y){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(la){if(null==H||H(Y))try{if("image/"==Y.type.substring(0,6))if("image/svg"==Y.type.substring(0,9)){var va=Graph.clipSvgDataUri(la.target.result),ua=va.indexOf(","),qa=decodeURIComponent(escape(atob(va.substring(ua+1)))),Ba=mxUtils.parseXml(qa),ya=Ba.getElementsByTagName("svg");if(0<ya.length){var La=
+ya[0],Aa=ia?null:La.getAttribute("content");null!=Aa&&"<"!=Aa.charAt(0)&&"%"!=Aa.charAt(0)&&(Aa=unescape(window.atob?atob(Aa):Base64.decode(Aa,!0)));null!=Aa&&"%"==Aa.charAt(0)&&(Aa=decodeURIComponent(Aa));null==Aa||"<mxfile "!==Aa.substring(0,8)&&"<mxGraphModel "!==Aa.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=Ba){var Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var za=Ca[0],wa=za.getAttribute("width"),Xa=za.getAttribute("height");wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?
+parseFloat(wa):NaN;Xa=null!=Xa&&"%"!=Xa.charAt(Xa.length-1)?parseFloat(Xa):NaN;var Qa=za.getAttribute("viewBox");if(null==Qa||0==Qa.length)za.setAttribute("viewBox","0 0 "+wa+" "+Xa);else if(isNaN(wa)||isNaN(Xa)){var Ra=Qa.split(" ");3<Ra.length&&(wa=parseFloat(Ra[2]),Xa=parseFloat(Ra[3]))}va=Editor.createSvgDataUri(mxUtils.getXml(za));var Sa=Math.min(1,Math.min(t/Math.max(1,wa)),t/Math.max(1,Xa)),Ha=q(va,Y.type,f+U*S,l+U*S,Math.max(1,Math.round(wa*Sa)),Math.max(1,Math.round(Xa*Sa)),Y.name);if(null!=
+Ha&&(isNaN(wa)||isNaN(Xa))){var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){wa=Math.max(1,Ma.width);Xa=Math.max(1,Ma.height);Ha[0].geometry.width=wa;Ha[0].geometry.height=Xa;za.setAttribute("viewBox","0 0 "+wa+" "+Xa);va=Editor.createSvgDataUri(mxUtils.getXml(za));var y=va.indexOf(";");0<y&&(va=va.substring(0,y)+va.substring(va.indexOf(",",y+1)));W.setCellStyles("image",va,[Ha[0]])});Ma.src=Editor.createSvgDataUri(mxUtils.getXml(za))}return Ha}}}catch(y){}return null})):T(U,mxUtils.bind(this,
+function(){return q(Aa,"text/xml",f+U*S,l+U*S,0,0,Y.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==Y.type){var Ea=ia?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ea&&0<Ea.length){var pa=new Image;pa.src=la.target.result;T(U,mxUtils.bind(this,function(){return q(Ea,"text/xml",f+U*S,l+U*S,pa.width,pa.height,Y.name)}));ua=!0}}ua||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(za,wa,Xa){T(U,mxUtils.bind(this,function(){if(null!=za&&za.length<I){var Qa=na&&this.isResampleImageSize(Y.size,Z)?Math.min(1,Math.min(t/wa,t/Xa)):1;return q(za,Y.type,f+U*S,l+U*S,Math.round(wa*Qa),Math.round(Xa*Qa),Y.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),na,t,Z,Y.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else va=la.target.result,q(va,Y.type,f+U*S,l+U*S,240,160,Y.name,function(Ca){T(U,function(){return Ca})},Y)}catch(Ca){T(U,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,Y)}else T(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(Y.name)?q(null,Y.type,f+U*S,l+U*S,240,160,Y.name,function(la){T(U,function(){return la})},
+Y):"image"==Y.type.substring(0,5)||"application/pdf"==Y.type?aa.readAsDataURL(Y):aa.readAsText(Y)}})(P)});if(X){X=[];for(ka=0;ka<c.length;ka++)X.push(c[ka]);c=X;this.confirmImageResize(function(W){na=W;da()},L)}else da()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(D,H){if(D||f)mxSettings.setResizeImages(D?H:null),mxSettings.save();l();c(H)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(D){q(D,!0)},function(D){q(D,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',
isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):q(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+
-encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,q,D,H){q=null!=q?q:this.maxImageSize;var N=Math.max(1,c.width),L=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=H?H:f.length,D))try{var Y=Math.max(N/q,L/q);if(1<Y){var ha=Math.round(N/Y),ea=Math.round(L/
-Y),aa=document.createElement("canvas");aa.width=ha;aa.height=ea;aa.getContext("2d").drawImage(c,0,0,ha,ea);var na=aa.toDataURL();if(na.length<f.length){var W=document.createElement("canvas");W.width=ha;W.height=ea;var ba=W.toDataURL();na!==ba&&(f=na,N=ha,L=ea)}}}catch(ja){}t&&J!=f&&q>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,q/1.5,D,H):l(f,N,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=
+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,q,D,H){q=null!=q?q:this.maxImageSize;var N=Math.max(1,c.width),L=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=H?H:f.length,D))try{var Z=Math.max(N/q,L/q);if(1<Z){var ia=Math.round(N/Z),fa=Math.round(L/
+Z),ba=document.createElement("canvas");ba.width=ia;ba.height=fa;ba.getContext("2d").drawImage(c,0,0,ia,fa);var na=ba.toDataURL();if(na.length<f.length){var X=document.createElement("canvas");X.width=ia;X.height=fa;var ca=X.toDataURL();na!==ca&&(f=na,N=ia,L=fa)}}}catch(ka){}t&&I!=f&&q>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,q/1.5,D,H):l(f,N,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=
function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(q){if(null!=l)l(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,
-arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(Q){var k=Q.getEvent();return null==Q.getState()&&!mxEvent.isMouseEvent(k)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(k)&&(null==Q.getState()||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k))});f.cellEditor.editPlantUmlData=function(Q,k,B){var I=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(U){null!=U&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(U,
-I.format,function(P,T,X){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==I.format)f.labelChanged(Q,"<pre>"+P+"</pre>"),f.updateCellSize(Q,!0);else{f.setCellStyles("image",c.convertDataUri(P),[Q]);var Z=f.model.getGeometry(Q);null!=Z&&(Z=Z.clone(),Z.width=T,Z.height=X,f.cellsResized([Q],[Z],!1))}f.setAttributeForCell(Q,"plantUmlData",JSON.stringify({data:U,format:I.format}))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,
-300,!0,!0);k.init()};f.cellEditor.editMermaidData=function(Q,k,B){var I=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,function(U){null!=U&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(U,I.config,function(P,T,X){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[Q]);var Z=f.model.getGeometry(Q);null!=Z&&(Z=Z.clone(),Z.width=Math.max(Z.width,T),Z.height=Math.max(Z.height,X),f.cellsResized([Q],[Z],!1));f.setAttributeForCell(Q,
-"mermaidData",JSON.stringify({data:U,config:I.config},null,2))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(Q,k){try{var B=this.graph.getAttributeForCell(Q,"plantUmlData");if(null!=B)this.editPlantUmlData(Q,k,B);else if(B=this.graph.getAttributeForCell(Q,"mermaidData"),null!=B&&window.isMermaidEnabled)this.editMermaidData(Q,k,B);else{var I=f.getCellStyle(Q);
-"1"==mxUtils.getValue(I,"metaEdit","0")?c.showDataDialog(Q):t.apply(this,arguments)}}catch(U){c.handleError(U)}};f.getLinkTitle=function(Q){return c.getLinkTitle(Q)};f.customLinkClicked=function(Q,k){var B=!1;try{var I=this.getGraphBounds();c.handleCustomLink(Q,k);B=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(k))}catch(U){c.handleError(U)}return B};var q=f.parseBackgroundImage;f.parseBackgroundImage=function(Q){var k=q.apply(this,arguments);
-null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});return k};var D=f.setBackgroundImage;f.setBackgroundImage=function(Q){null!=Q&&null!=Q.originalSrc&&(Q=c.createImageForPageLink(Q.originalSrc,c.currentPage,this));D.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(Q,k){Q=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=Q){var B=Q.indexOf(",");if(0<B)for(Q=Q.substring(B+1),k=k.getProperty("patches"),B=0;B<k.length;B++)if(null!=k[B][EditorUi.DIFF_UPDATE]&&null!=k[B][EditorUi.DIFF_UPDATE][Q]||null!=k[B][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(k[B][EditorUi.DIFF_REMOVE],Q)){f.refreshBackgroundImage();break}}}));var H=f.getBackgroundImageObject;f.getBackgroundImageObject=function(Q,k){var B=H.apply(this,arguments);null!=B&&null!=B.originalSrc&&
-(B=k?c.createImageForPageLink(B.originalSrc,null,null,!0):{src:B.originalSrc});return B};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(Q){Q=null!=Q?Q:"";"1"==
-urlParams.dev&&(Q+=(0<Q.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(Q,k,B){var I=k;k=function(U,P,T){if(null==P){var X=mxEvent.getSource(U);"a"==X.nodeName.toLowerCase()&&(P=X.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(P,T)&&mxEvent.consume(U);null!=I&&I(U,P,T)};L.call(this,Q,k,B)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(Q,k,B){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(Q,["zoomIn","zoomOut","-"],null,B);J.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(Q,["-","addToScratchpad"],null,B);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(Q,["-","exitGroup","home"],null,B)};var Y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=
-function(Q,k,B){if(c.editor.graph.isSelectionEmpty())Y.apply(this,arguments),c.menus.addMenuItems(Q,["copyAsImage"],null,B);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(Q,k,B):this.addPopupMenuArrangeItems(Q,k,B),this.addMenuItems(Q,"- cut copy copyAsImage duplicate -".split(" "),null,B),this.isShowCellEditItems()||this.addPopupDeleteItem(Q,k,B),this.addMenuItems(Q,["lockUnlock","-"],null,B),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(k)&&f.isCellEditable(k)&&
-(this.addSubmenu("editCell",Q,null,mxResources.get("edit")),Q.addSeparator(),f.getModel().isEdge(k))){this.addSubmenu("line",Q);var I=f.getModel().getGeometry(k);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(Q,["clearWaypoints"],null,B)}1==f.getSelectionCount()&&this.addMenuItems(Q,["enterGroup"],null,B);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(Q,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(Q,"unmergeCells")}};this.menus.isShowStyleItems=
-function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ha=f.getExportVariables;f.getExportVariables=
-function(){var Q=ha.apply(this,arguments),k=c.getCurrentFile();null!=k&&(Q.filename=k.getTitle());Q.pagecount=null!=c.pages?c.pages.length:1;Q.page=null!=c.currentPage?c.currentPage.getName():"";Q.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return Q};var ea=f.getGlobalVariable;f.getGlobalVariable=function(Q){var k=c.getCurrentFile();return"filename"==Q&&null!=k?k.getTitle():"page"==Q&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==Q?null!=c.currentPage&&
-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==Q?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var aa=null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var Q=this.getCurrentFile(),k=null!=Q&&null!=Q.getTitle()?Q.getTitle():this.defaultFilename;aa!=k&&Q==na&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());aa=k;na=Q}));var W=f.labelLinkClicked;f.labelLinkClicked=function(Q,k,B){var I=k.getAttribute("href");
-if(null==I||!f.isCustomLink(I)||!mxEvent.isTouchEvent(B)&&mxEvent.isPopupTrigger(B))W.apply(this,arguments);else{if(!f.isEnabled()||null!=Q&&f.isCellLocked(Q.cell))f.customLinkClicked(I),f.getRubberband().reset();mxEvent.consume(B)}};this.editor.getOrCreateFilename=function(){var Q=c.defaultFilename,k=c.getCurrentFile();null!=k&&(Q=null!=k.getTitle()?k.getTitle():Q);return Q};var ba=this.actions.get("print");ba.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ba.visible=ba.isEnabled();if(!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),
-this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(Q,k){null!=k&&f.isEnabled()&&!f.isEditing()&&null!=k.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),
-this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(Q){var k=f.cellEditor.text2,B=null;null!=k&&(mxEvent.addListener(k,"dragleave",function(I){null!=B&&(B.parentNode.removeChild(B),B=null);I.stopPropagation();I.preventDefault()}),mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(I){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(k));
-I.stopPropagation();I.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(I){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(P,T,X,Z,ka,va){f.insertImage(P,ka,va)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var T=0;T<P.length;T++)P[T]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var U=I.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(P){var T=Math.max(1,P.width);P=Math.max(1,P.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,T)),X/Math.max(1,P));f.insertImage(decodeURIComponent(U),T*X,P*X)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){ba=this.editor.graph.view;var ja=mxSettings.getUnit();ba.setUnit(ja);Editor.pageSizeUnit=ja==mxConstants.METERS?mxConstants.MILLIMETERS:ja;ba.addListener("unitChanged",function(Q,k){Q=k.getProperty("unit");mxSettings.setUnit(Q);mxSettings.save();Editor.pageSizeUnit=Q==mxConstants.METERS?mxConstants.MILLIMETERS:Q});this.ruler=!this.canvasSupported||
-9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ba.unit);this.refresh()}if("1"==urlParams.styledev){ba=document.getElementById("geFooter");null!=ba&&(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)})),ba.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(Q,k){0<this.editor.graph.getSelectionCount()?(Q=this.editor.graph.getSelectionCell(),Q=this.editor.graph.getModel().getStyle(Q),this.styleInput.value=Q||"",this.styleInput.style.visibility=
-"visible"):this.styleInput.style.visibility="hidden"})));var ca=this.isSelectionAllowed;this.isSelectionAllowed=function(Q){return mxEvent.getSource(Q)==this.styleInput?!0:ca.apply(this,arguments)}}ba=document.getElementById("geInfo");null!=ba&&ba.parentNode.removeChild(ba);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var la=null;mxEvent.addListener(f.container,"dragleave",function(Q){f.isEnabled()&&(null!=la&&(la.parentNode.removeChild(la),la=null),Q.stopPropagation(),Q.preventDefault())});
-mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(Q){null==la&&(!mxClient.IS_IE||10<document.documentMode)&&(la=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(Q){null!=la&&(la.parentNode.removeChild(la),la=null);if(f.isEnabled()){var k=mxUtils.convertPoint(f.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q)),B=Q.dataTransfer.files,
-I=f.view.translate,U=f.view.scale,P=k.x/U-I.x,T=k.y/U-I.y;if(0<B.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(Q)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(B,!0)):(mxEvent.isAltDown(Q)&&(T=P=null),this.importFiles(B,P,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(Q),null,null,mxEvent.isShiftDown(Q),Q));else{mxEvent.isAltDown(Q)&&(T=P=0);var X=0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")?Q.dataTransfer.getData("text/uri-list"):
-null;k=this.extractGraphModelFromEvent(Q,null!=this.pages);if(null!=k)f.setSelectionCells(this.importXml(k,P,T,!0));else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/html")){var Z=Q.dataTransfer.getData("text/html");k=document.createElement("div");k.innerHTML=Graph.sanitizeHtml(Z);var ka=null;B=k.getElementsByTagName("img");null!=B&&1==B.length?(Z=B[0].getAttribute("src"),null==Z&&(Z=B[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)||(ka=!0)):(B=k.getElementsByTagName("a"),
-null!=B&&1==B.length?Z=B[0].getAttribute("href"):(k=k.getElementsByTagName("pre"),null!=k&&1==k.length&&(Z=mxUtils.getTextContent(k[0]))));var va=!0,ua=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(Z,P,T,!0,ka,null,va,mxEvent.isControlDown(Q)))});ka&&null!=Z&&Z.length>this.resampleThreshold?this.confirmImageResize(function(qa){va=qa;ua()},mxEvent.isControlDown(Q)):ua()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,
-function(qa){var Ba=Math.max(1,qa.width);qa=Math.max(1,qa.height);var ya=this.maxImageSize;ya=Math.min(1,Math.min(ya/Math.max(1,Ba)),ya/Math.max(1,qa));f.setSelectionCell(f.insertVertex(null,null,"",P,T,Ba*ya,qa*ya,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(qa){f.setSelectionCells(this.insertTextAt(X,P,T,!0))})):0<=mxUtils.indexOf(Q.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(Q.dataTransfer.getData("text/plain"),
-P,T,!0))}}Q.stopPropagation();Q.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});
-f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var Q=parseInt(this.div.offsetLeft),k=parseInt(this.div.offsetWidth),B=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),U=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(Q,
-B-k))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,P-U))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ba=Editor.currentTheme,"simple"==ba||"sketch"==ba)this.doSetCurrentTheme(ba,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ba=!1;if(null!=urlParams.dark)ba=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ba="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ba&&"auto"!=mxSettings.settings.darkMode||(ba=mxSettings.settings.darkMode);"auto"==ba&&this.isAutoDarkModeSupported()&&(ba=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===
-typeof ba?"1"==ba:ba);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(Q){this.isAutoDarkMode()&&this.setDarkMode(Q.matches)}))}catch(Q){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&
-(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(Q,k){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&
-c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||
-this.toggleFormatPanel(!0));this.lastWindowWidth=c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));
-document.body.style.cursor="text";var q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var D=null,H=null,N=null,L=null;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();
-mxEvent.consume(J)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);D=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var Y=!1;null!=D&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-D)+"px",Y=!0);null!=
-H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(J)-H)+"px",Y=!0);Y&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==D&&null==H||mxEvent.consume(J);H=D=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";
-this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";
-this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,q=0;q<l.types.length;q++)if("text/"===l.types[q].substring(0,
-5)){t=!0;break}if(!t){var D=l.items;for(index in D){var H=D[index];if("file"===H.kind){if(c.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(L,J,Y,ha,ea,aa){c.insertImage(L,ea,aa)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var J=0;J<L.length;J++)L[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(L){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position=
-"absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(D){var H=mxEvent.getSource(D);
-null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=D.keyCode&&(mxClient.IS_MAC||17!=D.keyCode)&&(!mxClient.IS_MAC||91!=D.keyCode&&93!=D.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",D=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=
-D,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(D){var H=D.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=H&&17!=H&&91!=H&&93!=H||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(H){this.handleError(H)}}));
-mxEvent.addListener(l,"cut",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(D){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=D.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!0,!0)),!mxEvent.isConsumed(D)){var H=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,
-function(){try{f.container.scrollLeft=H,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==l?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=
-function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),
-this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,t=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,t-=this.embedViewport.y):(l+=this.embedViewport.x,t+=this.embedViewport.y));f={x:l,y:t,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=
-this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var t=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-t.x;c.y-=c.boundingRect.y-t.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&
-(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var q=this.getCurrentFile();
-q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=
-0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=
-function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<
-c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
-this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=
-120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=
-function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:
-mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);
-null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geButton";var q=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),q.funct,null,t);t.className=l;t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(q,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.innerText="");return t};EditorUi.prototype.addButton=function(c,f,
-l,t){c=this.createToolbarButton(c,f,l);t=null!=t?t:this.container;t.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var t=document.createElement("a");t.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(t.style.backgroundImage="url("+c+")");null!=f&&t.setAttribute("title",f);null!=l&&mxEvent.addListener(t,"click",function(q){"disabled"!=t.getAttribute("disabled")&&l(q);mxEvent.consume(q)});mxEvent.preventDefault(t);return t};EditorUi.prototype.createMenuItem=
-function(c,f,l){var t=this.actions.get(c),q=null!=t?t.funct:null,D=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),q);null==t||l||(c=function(){t.isEnabled()?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return D};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-
-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);
-this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(q){mxEvent.getSource(q)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
-this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>q||690>D)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;
-EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=q;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),q=c?f:0,D=Editor.transitionDelay;
-mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(0)":"translateX(-100%)");0!=q&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+D+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==q&&t()}),1E3*D)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=
-mxUtils.bind(this,function(H,N){var L=this.menus.get(H);H=this.createMenuElement(N,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",N);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),
-f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=
-f("newLibrary","");l.style.left="0px";l.style.right="50%";var t=document.createElement("span");l.appendChild(t);var q=f("openLibraryFrom","");q.style.borderLeftWidth="1px";q.style.left="50%";q.style.right="0px";var D=document.createElement("span");q.appendChild(D);this.dependsOnLanguage(mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));D.innerHTML="";mxUtils.write(D,mxResources.get("openLibraryFrom"));q.setAttribute("title",
-mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?
-66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=
-c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&
-(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=
-function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=
-window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,
-this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=
-function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};
-EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",
-l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=
-"",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");var q=t.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=q[0];this.diagramContainer.style.left=q[1];var D=parseInt(q[2]);q=parseInt(q[3]);D=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,D):D,t.width-80);q=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,q):q,t.height-80);this.diagramContainer.style.width=
-D+"px";this.diagramContainer.style.height=q+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+
-"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=
-function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,
-c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize=
-"auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=
-Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=
-Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+
-1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||
-"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),
-!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());
-mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,
-l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),
-this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
-0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,q){try{this.spinner.stop();var D=this.createImageDataUri(t,f,"png"),H=parseInt(q.getAttribute("width")),
-N=parseInt(q.getAttribute("height"));this.writeImageToClipboard(D,H,N,mxUtils.bind(this,function(L){this.handleError(L)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText=
-"";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),q=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(q));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=q,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,q){q=null!=q?q:!0;var D=this.editor.graph,H=null;D.lastPasteXml==c?D.pasteCounter++:(D.lastPasteXml=c,D.pasteCounter=0);var N=D.pasteCounter*D.gridSize;if(l||this.isCompatibleString(c))H=this.importXml(c,N,N),D.setSelectionCells(H);else if(f&&1==D.getSelectionCount()){q=D.getStartEditingCell(D.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==D.getCurrentCellStyle(q)[mxConstants.STYLE_SHAPE])D.setCellStyles(mxConstants.STYLE_IMAGE,
-c,[q]);else{D.model.beginUpdate();try{D.labelChanged(q,c),Graph.isLink(c)&&D.setLinkForCell(q,c)}finally{D.model.endUpdate()}}D.setSelectionCell(q)}else H=D.getInsertPoint(),D.isMouseInsertPoint()&&(N=0,D.lastPasteXml==c&&0<D.pasteCounter&&D.pasteCounter--),H=this.insertTextAt(c,H.x+N,H.y+N,q),D.setSelectionCells(H);D.isSelectionEmpty()||(D.scrollCellToVisible(D.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(D.view.getState(D.getSelectionCell())));return H};EditorUi.prototype.pasteCells=
-function(c,f,l,t){if(!mxEvent.isConsumed(c)){var q=f,D=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var H=c.clipboardData.getData("text/plain"),N=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var L=decodeURIComponent(H);this.isCompatibleString(L)&&(N=!0,H=L)}catch(na){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(q=this.parseHtmlData(N),D="text/plain"!=q.getAttribute("data-type")):null!=H&&0<H.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
-N))}H=q.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(na){var W=this.editor.graph;W.lastPasteXml==na?W.pasteCounter++:(W.lastPasteXml=na,W.pasteCounter=0);var ba=W.pasteCounter*W.gridSize;W.setSelectionCells(this.importXml(na,ba,ba));W.scrollCellToVisible(W.getSelectionCell())}),mxUtils.bind(this,function(na){this.handleError(na)})),
-mxEvent.consume(c));else{var J=!1,Y="";Y=D?null!=q.textContent&&"<mxfile"==q.textContent.substring(0,7)&&"</mxfile>"==q.textContent.substring(q.textContent.length-9)||"<mxGraphModel"==q.textContent.substring(0,13)&&"</mxGraphModel>"==q.textContent.substring(q.textContent.length-15)?q.textContent.replace(/\u00a0/g," "):q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var ha=Y.lastIndexOf("%3E");0<=ha&&ha<Y.length-3&&(Y=Y.substring(0,ha+3))}catch(na){}try{H=q.getElementsByTagName("span"),
-(L=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(Y))&&(this.isCompatibleString(L)||0==L.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,Y=L)}catch(na){}try{if(null!=Y&&0<Y.length){if(0==Y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{Y=(new MiroImporter).importMiroJson(JSON.parse(Y)),this.pasteXml(Y,t,J,c)}catch(na){console.log("Miro import error:",na)}});"undefined"===typeof MiroImporter?
-mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(Y,t,J,c,D);try{mxEvent.consume(c)}catch(na){}}else if(!l){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(na){this.handleError(na)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||
-(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,q=this.getPageIndex(this.currentPage),D=null!=q?q+1:1,H=mxUtils.bind(this,function(ba,ja,ca,la){var Q=ba.useCssTransforms,k=ba.currentTranslate,B=ba.currentScale,I=ba.view.translate,U=ba.view.scale;ba.useCssTransforms&&(ba.useCssTransforms=!1,ba.currentTranslate=new mxPoint(0,0),ba.currentScale=1,ba.view.translate=new mxPoint(0,0),ba.view.scale=1);var P=
-ba.getGraphBounds(),T=0,X=0,Z=mxRectangle.fromRectangle(ba.pageFormat),ka=f.fit||f.crop||!ba.pageVisible,va=f.scale;Z.width=Math.ceil(Z.width*ba.pageScale);Z.height=Math.ceil(Z.height*ba.pageScale);var ua=1;if(f.fit){ua=f.sheetsAcross;var qa=f.sheetsDown;isNaN(va)||(Z.width=Math.ceil(Z.width*va),Z.height=Math.ceil(Z.height*va));ua=Math.min(Z.height*qa/(P.height/ba.view.scale),Z.width*ua/(P.width/ba.view.scale))}else ua=isNaN(va)?1:va;ua*=1;!ka&&ba.pageVisible?(va=ba.getPageLayout(),T-=va.x*Z.width,
-X-=va.y*Z.height):ka=!0;f.crop&&(f.selection&&(P=t.getBoundingBox(t.getSelectionCells())),Z.width=(P.width+1)*ua/ba.view.scale,Z.height=(P.height+1)*ua/ba.view.scale);Z.width=Math.ceil(1*Z.width);Z.height=Math.ceil(1*Z.height);la=null!=la?"page/id,"+la:null;if(null==ja){ja=PrintDialog.createPrintPreview(ba,ua,null,0,T,X,ka);ja.title=this.getBaseFilename(!0);ja.pageSelector=!1;ja.mathEnabled=!1;T=f.border;isNaN(T)||(ja.pageMargin=T);f.selection&&(ja.isCellVisible=function(za){return ba.isCellSelected(za)});
-var Ba=ja.writeHead;ja.writeHead=function(za){Ba.apply(this,arguments);mxClient.IS_GC&&(za.writeln('<style type="text/css">'),za.writeln("@media print {"),za.writeln(".MathJax svg { shape-rendering: crispEdges; }"),za.writeln("}"),za.writeln("</style>"));null!=l.fontCss&&(za.writeln('<style type="text/css">'),za.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),za.writeln("</style>"));for(var Ea=ba.getCustomFonts(),pa=0;pa<Ea.length;pa++){var Ca=Ea[pa].name,Aa=Ea[pa].url;Graph.isCssFontUrl(Aa)?za.writeln('<link rel="stylesheet" href="'+
-mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Aa))+'" charset="UTF-8" type="text/css">'):(za.writeln('<style type="text/css">'),za.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ca)+'";\nsrc: url("'+mxUtils.htmlEntities(Aa)+'");\n}'),za.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ya=ja.drawBackgroundImage;ja.drawBackgroundImage=function(za){ya.apply(this,arguments);null!=za.node&&(EditorUi.embedSvgImages(za.node),t.disableSvgLinks(za.node,function(Ea){Ea.setAttribute("href",
-"javascript:void(0)")}))}}var La=ja.addGraphFragment;ja.addGraphFragment=function(za,Ea,pa,Ca,Aa,wa){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Aa.classList.add("geDisableMathJax")};f.grid&&(ja.gridSize=ba.gridSize,ja.gridSteps=ba.view.gridSteps,ja.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ja.open(null,null,ca,!0,la,Z,f.selection?ba.getSelectionCells():null)}else{P=ba.background;if(null==P||""==P||P==mxConstants.NONE)P=
-"#ffffff";ja.backgroundColor=P;ja.autoOrigin=ka;f.grid&&(ja.gridSize=ba.gridSize,ja.gridSteps=ba.view.gridSteps,ja.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ja.appendGraph(ba,ua,T,X,ca,!0,la,Z,f.selection?ba.getSelectionCells():null);ca=ba.getCustomFonts();if(null!=ja.wnd)for(Z=0;Z<ca.length;Z++)T=ca[Z].name,X=ca[Z].url,Graph.isCssFontUrl(X)?ja.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):
-(ja.wnd.document.writeln('<style type="text/css">'),ja.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(T)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),ja.wnd.document.writeln("</style>"))}Q&&(ba.useCssTransforms=Q,ba.currentTranslate=k,ba.currentScale=B,ba.view.translate=I,ba.view.scale=U);return ja}),N=f.pagesFrom,L=f.pagesTo,J=!f.allPages;q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==D&&L==D);if(!J&&null!=this.pages&&
-this.pages.length){J=0;D=this.pages.length-1;f.allPages||(J=parseInt(N)-1,D=parseInt(L)-1);for(var Y=J;Y<=D;Y++){var ha=this.pages[Y];N=ha==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;L=!0;J=!1;var ea=null,aa=null;null==ha.viewState&&null==ha.root&&this.updatePageRoot(ha);null!=ha.viewState&&(L=ha.viewState.pageVisible,J=ha.viewState.mathEnabled,ea=ha.viewState.background,
-aa=ha.viewState.backgroundImage,N.pageFormat=ha.viewState.pageFormat,N.gridSize=ha.viewState.gridSize);null!=aa&&null!=aa.originalSrc&&(aa=this.createImageForPageLink(aa.originalSrc,ha));N.background=ea;N.backgroundImage=null!=aa?new mxImage(aa.src,aa.width,aa.height,aa.x,aa.y):null;N.pageVisible=L;N.mathEnabled=J;var na=N.getGraphBounds;N.getGraphBounds=function(){var ba=na.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,la=this.view.scale;
-ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((ca.x+ja.x)*la,(ca.y+ja.y)*la,ja.width*la,ja.height*la))}return ba};var W=N.getGlobalVariable;N.getGlobalVariable=function(ba){return"page"==ba?ha.getName():"pagenumber"==ba?Y+1:"pagecount"==ba?null!=this.pages?this.pages.length:1:W.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ha);N.model.setRoot(ha.root)}q=H(N,q,Y!=D,ha.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else q=H(t);null==q||
-null==q.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(H=q.wnd.document,c||(q.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),q.closeDocument(),Graph.rewritePageLinks(q.wnd.document,!0),q.mathEnabled||c||PrintDialog.printPreview(q));return q}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=
-f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
-t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(t);if(null==q){var D=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=D&&(10==document.documentMode||11==document.documentMode?q=D.getData("Text"):(q=null,q=0<=mxUtils.indexOf(D.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):
-0<=mxUtils.indexOf(D.types,"text/html")?D.getData("text/html"):null,null!=q&&0<q.length?(D=document.createElement("div"),D.innerHTML=Graph.sanitizeHtml(q),D=D.getElementsByTagName("img"),0<D.length&&(q=D[0].getAttribute("src"))):0<=mxUtils.indexOf(D.types,"text/plain")&&(q=D.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+
-"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;var q=document.documentElement;var D=(t.clientWidth||q.clientWidth)-3;t=Math.max(t.clientHeight||0,q.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,D=c.clientWidth,t=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+
-2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=l+"px";q.style.width=Math.max(0,D-3)+"px";q.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),
-t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,q,D){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var H=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==
-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,L,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,
-f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,t)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(q=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,q,null!=q?l:null,D)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
-0;l<c.length;l++)mxUtils.bind(this,function(t){var q=new FileReader;q.onload=mxUtils.bind(this,function(D){try{this.openFileHandle(D.target.result,t.name,t,f)}catch(H){this.handleError(H)}});q.onerror=mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?q.readAsText(t):q.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,q,D){var H=this.getCurrentFile(),
-N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,t,q,D))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(H){if(null!=H){var N=H.lastIndexOf(".");0<N&&(H=H.substring(N+1,H.length));null==f[H]&&(f[H]=!0)}}var t=this.editor.graph,q=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&
-(l(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=t.model.getChildCount(c);for(var D=0;D<q;D++)this.addBasenamesForCell(t.model.getChildAt(c,D),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
-this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,q){c||(c=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var D=this.editor.graph;D.setGridEnabled(!1);D.pageVisible=!1;var H=D.model.cells,N;for(N in H){var L=H[N];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
-page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(q){c||this.handleError(q)}};
-EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,q=null,D=mxUtils.bind(this,function(L,J){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,D);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var J=
-L.data,Y=null,ha=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.trim()?pa=null:"%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Ca){}return pa});if("json"==urlParams.proto){var ea=
-!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[J])}catch(pa){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));
-return}if("prompt"==J.action){this.spinner.stop();var aa=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(pa){null!=pa?H.postMessage(JSON.stringify({event:"prompt",value:pa,message:J}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(aa.container,300,80,!0,
-!1);aa.init();return}if("draft"==J.action){var na=ha(J.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):
-null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):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){H.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var W=1==J.enableRecent,ba=1==J.enableSearch,ja=1==J.enableCustomTemp;aa=new NewDialog(this,
-!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(pa,Ca,Aa,wa){pa=pa||this.emptyDiagramXml;null!=J.callback?H.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Ca,tempUrl:Aa,libs:wa,builtIn:!0,message:J}),"*"):(c(pa,L,pa!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,W?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):
-null,ba?mxUtils.bind(this,function(pa,Ca){this.remoteInvoke("searchDiagrams",[pa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Ca,Aa){H.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Ca,name:Aa}),"*")}),null,null,ja?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==J.withoutType);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(pa){null!=this.sidebar&&this.sidebar.hideTooltip();
-pa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==J.action){var ca=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:ca,message:J}),"*");return}if("status"==J.action){this.updateStatus(mxUtils.bind(this,function(){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message))}));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==
-J.action){var la=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){if(null!=J.viewport){var Q=this.editor.graph,k=Q.view.translate.x,B=Q.view.translate.y;this.embedViewport=J.viewport;Q.refresh();this.diagramContainer.scrollTop-=(B-Q.view.translate.y)*Q.view.scale;this.diagramContainer.scrollLeft-=(k-Q.view.translate.x)*
-Q.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==J.action){aa=null;try{var I=this.diagramContainer.getAttribute("data-scrollState");null!=I&&(this.diagramContainer.removeAttribute("data-scrollState"),aa=JSON.parse(I))}catch(pa){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=aa&&this.restoreScrollState(aa);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);return}if("export"==J.action){if("png"==
-J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var U=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);Q=this.editor.graph;var P=mxUtils.bind(this,function(pa,Ca){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(U,this.editor.graph,null,!0,function(wa){P(pa,wa)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=J.format;Aa.message=J;Aa.data=pa;Aa.svg=Ca;Aa.xml=U;H.postMessage(JSON.stringify(Aa),"*")}}),T=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==J.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(U)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);P(pa)}),X=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Z=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=X){var pa=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Ca,Aa=0;Aa<this.pages.length;Aa++)if(this.pages[Aa].getId()==X){Ca=this.updatePageRoot(this.pages[Aa]);break}null==Ca&&(Ca=this.currentPage);Q.getGlobalVariable=function(Ra){return"page"==Ra?Ca.getName():"pagenumber"==Ra?1:pa.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Ca.root)}if(null!=J.layerIds){var wa=
-Q.model,Xa=wa.getChildCells(wa.getRoot()),Qa={};for(Aa=0;Aa<J.layerIds.length;Aa++)Qa[J.layerIds[Aa]]=!0;for(Aa=0;Aa<Xa.length;Aa++)wa.setVisible(Xa[Aa],Qa[Xa[Aa].id]||!1)}Aa=null;J.keepTheme&&(Aa=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){T(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){T(null)}),null,null,J.scale,J.transparent,J.shadow,null,Q,J.border,null,J.grid,Aa)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(U),
-l=!1);Z()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=X?"&pageId="+X:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(U))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?P("data:image/png;base64,"+pa.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(Z=mxUtils.bind(this,
-function(){var pa=this.createLoadMessage("export");pa.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();pa.xml=mxUtils.getXml(Ca);pa.data=this.getFileData(null,null,!0,null,null,null,Ca);pa.format=J.format}else if("html"==J.format)Ca=this.editor.getGraphXml(),pa.data=this.getHtml(Ca,this.editor.graph),pa.xml=mxUtils.getXml(Ca),pa.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=J.background?
-J.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);pa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var Aa=mxUtils.bind(this,function(Xa){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=J.asText?Xa:Editor.createSvgDataUri(Xa);H.postMessage(JSON.stringify(pa),"*")}),wa="auto";J.keepTheme&&(wa=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(wa=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,
-null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){wa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())wa="auto";null!=J.theme&&(wa=J.theme);this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,Aa,null,null,J.embedImages,Ca,J.scale,J.border,J.shadow,wa)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-J.shadow,null,wa),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Xa){J.embedImages||null==J.embedImages?this.editor.convertImages(Xa,mxUtils.bind(this,function(Qa){Aa(mxUtils.getXml(Qa))})):Aa(mxUtils.getXml(Xa))}));return}H.postMessage(JSON.stringify(pa),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var ka=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ka.apply(this,arguments);Z()}}l=!0;this.setFileData(J.xml);
-l=!1;this.editor.graph.mathEnabled||Z()}else Z();return}if("load"==J.action){ea=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
-(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var va=Editor.sketchMode;this.doSetSketchMode(J.rough);va!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=
-J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var ua=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var qa=J.maxFitScale,Ba=J.rect.width+2*ua,ya=J.rect.height+
-2*ua;Y=mxUtils.bind(this,function(){var pa=mxUtils.getDocumentSize();Ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ba):Ba,pa.width-80);pa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ya):ya,pa.height-80);this.diagramContainer.style.width=Ba+"px";this.diagramContainer.style.height=pa+"px";var Ca=this.editor.graph;pa=Ca.maxFitScale;Ca.maxFitScale=qa;Ca.fit(2*ua,null,null,null,null,null,ya);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<
-this.minInlineWidth){var Aa=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Aa}Ca.maxFitScale=pa;Ca.container.scrollTop-=ua;Ca.container.scrollLeft-=ua;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var wa=Ca.getGraphBounds();Ca.container.clientWidth>
-wa.width+2*ua&&(Ca.container.scrollLeft=wa.x+(wa.width+ua-Ca.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&this.setEmbedTitle(J.title);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(pa){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var La=this.getCurrentFile();null!=La&&(na=ha(J.xml),null!=na&&""!=na&&La.mergeFile(new LocalFile(this,
-na),function(){H.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(pa){H.postMessage(JSON.stringify({event:"merge",message:J,error:pa}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,L.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(pa){this.handleError(pa)}}var za=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(pa,Ca){l=!0;try{c(pa,Ca,null,ea)}catch(Aa){this.handleError(Aa)}l=!1;null!=urlParams.modified&&this.clearStatus();q=za();t&&null==f&&(f=mxUtils.bind(this,function(Aa,wa){Aa=za();Aa==q||l||(wa=this.createLoadMessage("autosave"),wa.xml=Aa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=Aa}),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)Ca=this.createLoadMessage("load"),Ca.xml=pa,H.postMessage(JSON.stringify(Ca),"*");null!=Y&&Y()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==J.substring(0,34)?(ha="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(pa){Ea(pa,L)},mxUtils.bind(this,function(pa){this.handleError(pa)}),ha)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,
-"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(pa){4==pa.readyState&&(200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)?Ea(pa.responseText,L):this.handleError({message:413==pa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(pa){Ea(pa)}),
-mxUtils.bind(this,function(pa){this.handleError(pa)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ha(J),Ea(J,L)):this.loadDescriptor(J,mxUtils.bind(this,function(pa){Ea(za(),L)}),mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;D="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(D,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;
-this.editor.graph.openLink=function(L,J,Y){N.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:L,target:J,allowOpener:Y}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var q=document.createElement("button");q.className="geEmbedBtn geBtn";q.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(q,c);t&&q.classList.add("gePrimaryBtn");mxEvent.addListener(q,"click",f);return q};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=
-this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);
-this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),
-"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==
-this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(q){this.handleError(q)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var q=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var D=t.value;t.value=JSON.stringify(JSON.parse(D));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=D}catch(H){this.handleError(H)}}));q.setAttribute("title","copy");q.className="geBtn";l.appendChild(q)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(q){this.loadingOrgChart=!1;f.clear()&&this.handleError(q)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],q=[],D=[],H={};if(0<l.length){var N={},L=this.editor.graph,J=null,Y=null,ha=null,ea=null,
-aa=null,na=null,W=null,ba="whiteSpace=wrap;html=1;",ja=null,ca=null,la="",Q="auto",k="auto",B=!1,I=null,U=null,P=40,T=40,X=100,Z=0,ka=mxUtils.bind(this,function(){null!=f?f(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),va=L.getFreeInsertPoint(),ua=va.x,qa=va.y;va=qa;var Ba=null,ya="auto";ca=null;for(var La=[],za=null,Ea=null,pa=0;pa<l.length&&"#"==l[pa].charAt(0);){c=
-l[pa].replace(/\r$/,"");for(pa++;pa<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[pa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Aa=mxUtils.trim(c.substring(1,Ca)),wa=mxUtils.trim(c.substring(Ca+1));"label"==Aa?Ba=Graph.sanitizeHtml(wa):"labelname"==Aa&&0<wa.length&&"-"!=wa?aa=wa:"labels"==Aa&&0<wa.length&&"-"!=wa?W=JSON.parse(wa):"style"==Aa?Y=wa:"parentstyle"==Aa?ba=wa:"unknownStyle"==Aa&&"-"!=wa?na=wa:"stylename"==
-Aa&&0<wa.length&&"-"!=wa?ea=wa:"styles"==Aa&&0<wa.length&&"-"!=wa?ha=JSON.parse(wa):"vars"==Aa&&0<wa.length&&"-"!=wa?J=JSON.parse(wa):"identity"==Aa&&0<wa.length&&"-"!=wa?ja=wa:"parent"==Aa&&0<wa.length&&"-"!=wa?ca=wa:"namespace"==Aa&&0<wa.length&&"-"!=wa?la=wa:"width"==Aa?Q=wa:"height"==Aa?k=wa:"collapsed"==Aa&&"-"!=wa?B="true"==wa:"left"==Aa&&0<wa.length?I=wa:"top"==Aa&&0<wa.length?U=wa:"ignore"==Aa?Ea=wa.split(","):"connect"==Aa?La.push(JSON.parse(wa)):"link"==Aa?za=wa:"padding"==Aa?Z=parseFloat(wa):
-"edgespacing"==Aa?P=parseFloat(wa):"nodespacing"==Aa?T=parseFloat(wa):"levelspacing"==Aa?X=parseFloat(wa):"layout"==Aa&&(ya=wa)}}}if(null==l[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Xa=this.editor.csvToArray(l[pa].replace(/\r$/,""));Ca=c=null;Aa=[];for(wa=0;wa<Xa.length;wa++)ja==Xa[wa]&&(c=wa),ca==Xa[wa]&&(Ca=wa),Aa.push(mxUtils.trim(Xa[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=La)for(var Qa=0;Qa<La.length;Qa++)null==
-N[La[Qa].to]&&(N[La[Qa].to]={});ja=[];for(wa=pa+1;wa<l.length;wa++){var Ra=this.editor.csvToArray(l[wa].replace(/\r$/,""));if(null==Ra){var Sa=40<l[wa].length?l[wa].substring(0,40)+"...":l[wa];throw Error(Sa+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ja.push(Ra)}L.model.beginUpdate();try{for(wa=0;wa<ja.length;wa++){Ra=ja[wa];var Ha=null,Ma=null!=c?la+Ra[c]:null;l=!1;null!=Ma&&(Ha=L.model.getCell(Ma),l=null==Ha||0<=mxUtils.indexOf(t,Ha));var y=new mxCell(Ba,new mxGeometry(ua,
-va,0,0),Y||"whiteSpace=wrap;html=1;");y.collapsed=B;y.vertex=!0;y.id=Ma;null==Ha||l||L.model.setCollapsed(Ha,B);for(var O=0;O<Ra.length;O++)L.setAttributeForCell(y,Aa[O],Ra[O]),null==Ha||l||L.setAttributeForCell(Ha,Aa[O],Ra[O]);if(null!=aa&&null!=W){var R=W[y.getAttribute(aa)];null!=R&&(L.labelChanged(y,R),null==Ha||l||L.cellLabelChanged(Ha,R))}if(null!=ea&&null!=ha){var V=ha[y.getAttribute(ea)];null!=V&&(y.style=V)}L.setAttributeForCell(y,"placeholders","1");y.style=L.replacePlaceholders(y,y.style,
-J);null==Ha||l?L.fireEvent(new mxEventObject("cellsInserted","cells",[y])):(L.model.setStyle(Ha,y.style),0>mxUtils.indexOf(D,Ha)&&D.push(Ha),L.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));l=null!=Ha;Ha=y;if(!l)for(Qa=0;Qa<La.length;Qa++)N[La[Qa].to][Ha.getAttribute(La[Qa].to)]=Ha;null!=za&&"link"!=za&&(L.setLinkForCell(Ha,Ha.getAttribute(za)),L.setAttributeForCell(Ha,za,null));var fa=this.editor.graph.getPreferredSizeForCell(Ha);ca=null!=Ca?L.model.getCell(la+Ra[Ca]):null;if(Ha.vertex){Sa=
-null!=ca?0:ua;pa=null!=ca?0:qa;null!=I&&null!=Ha.getAttribute(I)&&(Ha.geometry.x=Sa+parseFloat(Ha.getAttribute(I)));null!=U&&null!=Ha.getAttribute(U)&&(Ha.geometry.y=pa+parseFloat(Ha.getAttribute(U)));var ia="@"==Q.charAt(0)?Ha.getAttribute(Q.substring(1)):null;Ha.geometry.width=null!=ia&&"auto"!=ia?parseFloat(Ha.getAttribute(Q.substring(1))):"auto"==Q||"auto"==ia?fa.width+Z:parseFloat(Q);var oa="@"==k.charAt(0)?Ha.getAttribute(k.substring(1)):null;Ha.geometry.height=null!=oa&&"auto"!=oa&&"width"!=
-k?parseFloat(oa):"auto"==k||"auto"==oa?fa.height+Z:"width"==k?Ha.geometry.width:parseFloat(k);va+=Ha.geometry.height+T}l?(null==H[Ma]&&(H[Ma]=[]),H[Ma].push(Ha)):(t.push(Ha),null!=ca?(ca.style=L.replacePlaceholders(ca,ba,J),L.addCell(Ha,ca),q.push(ca)):D.push(L.addCell(Ha)))}for(wa=0;wa<q.length;wa++)ia="@"==Q.charAt(0)?q[wa].getAttribute(Q.substring(1)):null,oa="@"==k.charAt(0)?q[wa].getAttribute(k.substring(1)):null,"auto"!=Q&&"auto"!=ia||"auto"!=k&&"auto"!=oa||L.updateGroupBounds([q[wa]],Z,!0);
-var ta=D.slice(),ra=D.slice();for(Qa=0;Qa<La.length;Qa++){var xa=La[Qa];for(wa=0;wa<t.length;wa++){Ha=t[wa];var Da=mxUtils.bind(this,function(kb,pb,fb){var ob=pb.getAttribute(fb.from);if(null!=ob&&""!=ob){ob=ob.split(",");for(var tb=0;tb<ob.length;tb++){var eb=N[fb.to][ob[tb]];if(null==eb&&null!=na){eb=new mxCell(ob[tb],new mxGeometry(ua,qa,0,0),na);eb.style=L.replacePlaceholders(pb,eb.style,J);var nb=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=nb.width+Z;eb.geometry.height=nb.height+
-Z;N[fb.to][ob[tb]]=eb;eb.vertex=!0;eb.id=ob[tb];D.push(L.addCell(eb))}if(null!=eb){nb=fb.label;null!=fb.fromlabel&&(nb=(pb.getAttribute(fb.fromlabel)||"")+(nb||""));null!=fb.sourcelabel&&(nb=L.replacePlaceholders(pb,fb.sourcelabel,J)+(nb||""));null!=fb.tolabel&&(nb=(nb||"")+(eb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(eb,fb.targetlabel,J));var mb="target"==fb.placeholders==!fb.invert?eb:kb;mb=null!=fb.style?L.replacePlaceholders(mb,fb.style,J):L.createCurrentEdgeStyle();
-nb=L.insertEdge(null,null,nb||"",fb.invert?eb:kb,fb.invert?kb:eb,mb);if(null!=fb.labels)for(mb=0;mb<fb.labels.length;mb++){var qb=fb.labels[mb],ub=new mxCell(qb.label||mb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!fb.invert?eb:kb,ub.value,J));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=
-qb.dy?qb.dy:0);nb.insert(ub)}if(null!=fb.data)for(var zb in fb.data)L.setAttributeForCell(nb,zb,fb.data[zb]);ra.push(nb);mxUtils.remove(fb.invert?kb:eb,ta)}}}});Da(Ha,Ha,xa);if(null!=H[Ha.id])for(O=0;O<H[Ha.id].length;O++)Da(Ha,H[Ha.id][O],xa)}}if(null!=Ea)for(wa=0;wa<t.length;wa++)for(Ha=t[wa],O=0;O<Ea.length;O++)L.setAttributeForCell(Ha,mxUtils.trim(Ea[O]),null);if(0<D.length){var Ia=new mxParallelEdgeLayout(L);Ia.spacing=P;Ia.checkOverlap=!0;var Ya=function(){0<Ia.spacing&&Ia.execute(L.getDefaultParent());
-for(var kb=0;kb<D.length;kb++){var pb=L.getCellGeometry(D[kb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==Q&&(pb.width=Math.round(L.snap(pb.width)));"auto"==k&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==ya.charAt(0)){var Za=ka;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(ya)),function(){Ya();Za()});ka=null}else if("circle"==ya){var $a=new mxCircleLayout(L);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var Pa=$a.isVertexIgnored;$a.isVertexIgnored=function(kb){return Pa.apply(this,
-arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){$a.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}else if("horizontaltree"==ya||"verticaltree"==ya||"auto"==ya&&ra.length==2*D.length-1&&1==ta.length){L.view.validate();var Na=new mxCompactTreeLayout(L,"horizontaltree"==ya);Na.levelDistance=T;Na.edgeRouting=!1;Na.resetEdges=!1;Na.sortEdges=!0;this.executeLayout(function(){Na.execute(L.getDefaultParent(),0<ta.length?ta[0]:null)},!0,ka);ka=null}else if("horizontalflow"==ya||"verticalflow"==
-ya||"auto"==ya&&1==ta.length){L.view.validate();var jb=new mxHierarchicalLayout(L,"horizontalflow"==ya?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);jb.intraCellSpacing=T;jb.parallelEdgeSpacing=P;jb.interRankCellSpacing=X;jb.disableEdgeStyle=!1;this.executeLayout(function(){jb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ua,qa)},!0,ka);ka=null}else if("orgchart"==ya){L.view.validate();var cb=new mxOrgChartLayout(L,2,X,T),ab=cb.isVertexIgnored;cb.isVertexIgnored=function(kb){return ab.apply(this,
-arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){cb.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}else if("organic"==ya||"auto"==ya&&ra.length>D.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*T;db.disableEdgeStyle=!1;db.resetEdges=!1;var lb=db.isVertexIgnored;db.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=
-ka&&ka()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var k=S.getEvent();return null==S.getState()&&!mxEvent.isMouseEvent(k)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(k)&&(null==S.getState()||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k))});f.cellEditor.editPlantUmlData=function(S,k,B){var K=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("plantUml")+":",K.data,function(T){null!=T&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(T,
+K.format,function(P,U,Y){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==K.format)f.labelChanged(S,"<pre>"+P+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",c.convertDataUri(P),[S]);var aa=f.model.getGeometry(S);null!=aa&&(aa=aa.clone(),aa.width=U,aa.height=Y,f.cellsResized([S],[aa],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:T,format:K.format}))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,
+420,300,!0,!0);k.init()};f.cellEditor.editMermaidData=function(S,k,B){var K=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("mermaid")+":",K.data,function(T){null!=T&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(T,K.config,function(P,U,Y){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[S]);var aa=f.model.getGeometry(S);null!=aa&&(aa=aa.clone(),aa.width=Math.max(aa.width,U),aa.height=Math.max(aa.height,Y),f.cellsResized([S],[aa],
+!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:T,config:K.config},null,2))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,k){try{var B=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=B)this.editPlantUmlData(S,k,B);else if(B=this.graph.getAttributeForCell(S,"mermaidData"),null!=B&&window.isMermaidEnabled)this.editMermaidData(S,
+k,B);else{var K=f.getCellStyle(S);"1"==mxUtils.getValue(K,"metaEdit","0")?c.showDataDialog(S):t.apply(this,arguments)}}catch(T){c.handleError(T)}};f.getLinkTitle=function(S){return c.getLinkTitle(S)};f.customLinkClicked=function(S,k){var B=!1;try{var K=this.getGraphBounds();c.handleCustomLink(S,k);B=!0;c.chromelessResize&&!K.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(k))}catch(T){c.handleError(T)}return B};var q=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var k=
+q.apply(this,arguments);null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});return k};var D=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!=S.originalSrc&&(S=c.createImageForPageLink(S.originalSrc,c.currentPage,this));D.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(S,k){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var B=S.indexOf(",");if(0<B)for(S=S.substring(B+1),k=k.getProperty("patches"),B=0;B<k.length;B++)if(null!=k[B][EditorUi.DIFF_UPDATE]&&null!=k[B][EditorUi.DIFF_UPDATE][S]||null!=k[B][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(k[B][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var H=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,k){var B=H.apply(this,arguments);
+null!=B&&null!=B.originalSrc&&(B=k?c.createImageForPageLink(B.originalSrc,null,null,!0):{src:B.originalSrc});return B};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=
+function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(S,k,B){var K=k;k=function(T,P,U){if(null==P){var Y=mxEvent.getSource(T);"a"==Y.nodeName.toLowerCase()&&(P=Y.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(T)||!mxEvent.isPopupTrigger(T))&&f.customLinkClicked(P,U)&&mxEvent.consume(T);null!=K&&K(T,P,U)};L.call(this,S,k,B)};n.apply(this,arguments);mxClient.IS_SVG&&
+this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(S,k,B){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(S,["zoomIn","zoomOut","-"],null,B);I.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(S,["-","addToScratchpad"],null,B);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(S,["-","exitGroup","home"],
+null,B)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,k,B){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(S,["copyAsImage"],null,B);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(S,k,B):this.addPopupMenuArrangeItems(S,k,B),this.addMenuItems(S,"- cut copy copyAsImage duplicate -".split(" "),null,B),this.isShowCellEditItems()||this.addPopupDeleteItem(S,k,B),this.addMenuItems(S,["lockUnlock","-"],null,B),!this.isShowStyleItems()){if(1==
+f.getSelectionCount()&&!f.isCellLocked(k)&&f.isCellEditable(k)&&(this.addSubmenu("editCell",S,null,mxResources.get("edit")),S.addSeparator(),f.getModel().isEdge(k))){this.addSubmenu("line",S);var K=f.getModel().getGeometry(k);null!=K&&null!=K.points&&0<K.points.length&&this.addMenuItems(S,["clearWaypoints"],null,B)}1==f.getSelectionCount()&&this.addMenuItems(S,["enterGroup"],null,B);K=c.getSelectionState();null!=K.mergeCell?this.addMenuItem(S,"mergeCells"):(1<K.style.colspan||1<K.style.rowspan)&&
+this.addMenuItem(S,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));
+var ia=f.getExportVariables;f.getExportVariables=function(){var S=ia.apply(this,arguments),k=c.getCurrentFile();null!=k&&(S.filename=k.getTitle());S.pagecount=null!=c.pages?c.pages.length:1;S.page=null!=c.currentPage?c.currentPage.getName():"";S.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return S};var fa=f.getGlobalVariable;f.getGlobalVariable=function(S){var k=c.getCurrentFile();return"filename"==S&&null!=k?k.getTitle():"page"==S&&null!=c.currentPage?
+c.currentPage.getName():"pagenumber"==S?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==S?null!=c.pages?c.pages.length:1:fa.apply(this,arguments)};var ba=null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var S=this.getCurrentFile(),k=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;ba!=k&&S==na&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());ba=k;na=S}));var X=f.labelLinkClicked;
+f.labelLinkClicked=function(S,k,B){var K=k.getAttribute("href");if(null==K||!f.isCustomLink(K)||!mxEvent.isTouchEvent(B)&&mxEvent.isPopupTrigger(B))X.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(K),f.getRubberband().reset();mxEvent.consume(B)}};this.editor.getOrCreateFilename=function(){var S=c.defaultFilename,k=c.getCurrentFile();null!=k&&(S=null!=k.getTitle()?k.getTitle():S);return S};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||
+!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,
+!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(S,k){null!=k&&f.isEnabled()&&!f.isEditing()&&null!=
+k.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var k=f.cellEditor.text2,B=null;null!=k&&(mxEvent.addListener(k,"dragleave",function(K){null!=B&&(B.parentNode.removeChild(B),B=null);K.stopPropagation();K.preventDefault()}),mxEvent.addListener(k,"dragover",mxUtils.bind(this,
+function(K){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(k));K.stopPropagation();K.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(K){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<K.dataTransfer.files.length)this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,function(P,U,Y,aa,la,va){f.insertImage(P,la,va)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var U=0;U<P.length;U++)P[U]()},mxEvent.isControlDown(K));
+else if(0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")){var T=K.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)?this.loadImage(decodeURIComponent(T),mxUtils.bind(this,function(P){var U=Math.max(1,P.width);P=Math.max(1,P.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,U)),Y/Math.max(1,P));f.insertImage(decodeURIComponent(T),U*Y,P*Y)})):document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(K.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"));K.stopPropagation();K.preventDefault()})))}));if(Editor.isSettingsEnabled()){ca=this.editor.graph.view;var ka=mxSettings.getUnit();ca.setUnit(ka);Editor.pageSizeUnit=ka==mxConstants.METERS?mxConstants.MILLIMETERS:ka;ca.addListener("unitChanged",function(S,k){S=k.getProperty("unit");mxSettings.setUnit(S);
+mxSettings.save();Editor.pageSizeUnit=S==mxConstants.METERS?mxConstants.MILLIMETERS:S});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit);this.refresh()}if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",
+this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,k){0<this.editor.graph.getSelectionCount()?
+(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var da=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:da.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var W=null;
+mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=W&&(W.parentNode.removeChild(W),W=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==W&&(!mxClient.IS_IE||10<document.documentMode)&&(W=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(S){null!=W&&(W.parentNode.removeChild(W),
+W=null);if(f.isEnabled()){var k=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),B=S.dataTransfer.files,K=f.view.translate,T=f.view.scale,P=k.x/T-K.x,U=k.y/T-K.y;if(0<B.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(B,!0)):(mxEvent.isAltDown(S)&&(U=P=null),this.importFiles(B,P,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),
+S));else{mxEvent.isAltDown(S)&&(U=P=0);var Y=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;k=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=k)f.setSelectionCells(this.importXml(k,P,U,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var aa=S.dataTransfer.getData("text/html");k=document.createElement("div");k.innerHTML=Graph.sanitizeHtml(aa);var la=null;B=k.getElementsByTagName("img");null!=B&&1==B.length?(aa=B[0].getAttribute("src"),
+null==aa&&(aa=B[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)||(la=!0)):(B=k.getElementsByTagName("a"),null!=B&&1==B.length?aa=B[0].getAttribute("href"):(k=k.getElementsByTagName("pre"),null!=k&&1==k.length&&(aa=mxUtils.getTextContent(k[0]))));var va=!0,ua=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(aa,P,U,!0,la,null,va,mxEvent.isControlDown(S)))});la&&null!=aa&&aa.length>this.resampleThreshold?this.confirmImageResize(function(qa){va=qa;ua()},mxEvent.isControlDown(S)):
+ua()}else null!=Y&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)?this.loadImage(decodeURIComponent(Y),mxUtils.bind(this,function(qa){var Ba=Math.max(1,qa.width);qa=Math.max(1,qa.height);var ya=this.maxImageSize;ya=Math.min(1,Math.min(ya/Math.max(1,Ba)),ya/Math.max(1,qa));f.setSelectionCell(f.insertVertex(null,null,"",P,U,Ba*ya,qa*ya,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+Y+";"))}),mxUtils.bind(this,function(qa){f.setSelectionCells(this.insertTextAt(Y,
+P,U,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),P,U,!0))}}S.stopPropagation();S.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,
+function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var S=parseInt(this.div.offsetLeft),k=parseInt(this.div.offsetWidth),B=c.embedViewport.x+c.embedViewport.width,K=parseInt(this.div.offsetTop),
+T=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(S,B-k))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(K,P-T))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ca=Editor.currentTheme,"simple"==ca||"sketch"==ca)this.doSetCurrentTheme(ca,
+!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ca=!1;if(null!=urlParams.dark)ca=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ca="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ca&&"auto"!=mxSettings.settings.darkMode||(ca=mxSettings.settings.darkMode);
+"auto"==ca&&this.isAutoDarkModeSupported()&&(ca=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ca?"1"==ca:ca);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(S){this.isAutoDarkMode()&&this.setDarkMode(S.matches)}))}catch(S){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&
+null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(S,k){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));
+f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=
+f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==
+this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var D=null,H=null,N=null,L=null;
+mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);D=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,
+null,mxUtils.bind(this,function(I){var Z=!1;null!=D&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-D)+"px",Z=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(I)-H)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==D&&null==H||mxEvent.consume(I);H=D=null});
+document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width=
+"10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=
+f.clipboardData||f.originalEvent.clipboardData,t=!1,q=0;q<l.types.length;q++)if("text/"===l.types[q].substring(0,5)){t=!0;break}if(!t){var D=l.items;for(index in D){var H=D[index];if("file"===H.kind){if(c.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(L,I,Z,ia,fa,ba){c.insertImage(L,fa,ba)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var I=0;I<L.length;I++)L[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],
+N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(L){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily=
+"monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(D){var H=mxEvent.getSource(D);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=D.keyCode&&(mxClient.IS_MAC||17!=D.keyCode)&&(!mxClient.IS_MAC||91!=D.keyCode&&93!=D.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",D=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(l),
+t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=D,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(D){var H=D.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=H&&17!=H&&91!=H&&93!=H||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(l),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(D){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=D.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!0,!0)),!mxEvent.isConsumed(D)){var H=f.container.scrollLeft,
+N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=H,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==l?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};
+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
+this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,t=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,t-=this.embedViewport.y):(l+=this.embedViewport.x,t+=this.embedViewport.y));f={x:l,y:t,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};
+EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var t=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-t.x;c.y-=c.boundingRect.y-t.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
+function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");
+if(!f&&null!=t){t=t.getAttribute("title");var q=this.getCurrentFile();q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?
+(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
+this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=
+function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=
+this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=
+this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||
+null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=
+function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+
+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=
+"");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geButton";var q=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),q.funct,null,t);t.className=l;t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(q,t,l);null!=f&&(t.style.backgroundImage="url("+
+f+")",t.innerText="");return t};EditorUi.prototype.addButton=function(c,f,l,t){c=this.createToolbarButton(c,f,l);t=null!=t?t:this.container;t.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var t=document.createElement("a");t.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(t.style.backgroundImage="url("+c+")");null!=f&&t.setAttribute("title",f);null!=l&&mxEvent.addListener(t,"click",function(q){"disabled"!=t.getAttribute("disabled")&&l(q);mxEvent.consume(q)});
+mxEvent.preventDefault(t);return t};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),q=null!=t?t.funct:null,D=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),q);null==t||l||(c=function(){t.isEnabled()?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return D};EditorUi.prototype.createFormatWindow=function(){if(null==
+this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,
+t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(q){mxEvent.getSource(q)==
+this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>q||690>D)&&this.formatWindow.window.toggleMinimized()}),
+0)):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=q;this.refresh();
+this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),q=c?f:0,D=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(0)":"translateX(-100%)");0!=q&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+D+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==q&&t()}),1E3*D)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var R=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=
+this.formatWindow;return null!=c?c.window.isVisible():R.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(H,N){var L=this.menus.get(H);H=this.createMenuElement(N,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",N);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&
+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,
+mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary","");l.style.left="0px";l.style.right="50%";var t=document.createElement("span");l.appendChild(t);var q=f("openLibraryFrom","");q.style.borderLeftWidth="1px";q.style.left="50%";q.style.right="0px";var D=document.createElement("span");q.appendChild(D);this.dependsOnLanguage(mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,mxResources.get("newLibrary"));
+l.setAttribute("title",mxResources.get("newLibrary"));D.innerHTML="";mxUtils.write(D,mxResources.get("openLibraryFrom"));q.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||
+"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};
+EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",
+!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};
+EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};
+EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=
+this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=
+function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),
+c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=
+c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,
+l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left=
+"0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");var q=t.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=q[0];this.diagramContainer.style.left=q[1];var D=parseInt(q[2]);q=parseInt(q[3]);D=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,
+D):D,t.width-80);q=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,q):q,t.height-80);this.diagramContainer.style.width=D+"px";this.diagramContainer.style.height=q+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-
+4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-
+this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=
+function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-
+4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize=
+"8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&
+null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,
+c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=
+function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};
+EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
+mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=
+mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
+this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
+mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,q){try{this.spinner.stop();var D=this.createImageDataUri(t,f,"png"),H=parseInt(q.getAttribute("width")),N=parseInt(q.getAttribute("height"));this.writeImageToClipboard(D,H,N,mxUtils.bind(this,function(L){this.handleError(L)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==
+mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),q=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(q));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=q,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};
+EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,q){q=null!=q?q:!0;var D=this.editor.graph,H=null;D.lastPasteXml==c?D.pasteCounter++:(D.lastPasteXml=c,D.pasteCounter=0);var N=D.pasteCounter*D.gridSize;if(l||this.isCompatibleString(c))H=
+this.importXml(c,N,N),D.setSelectionCells(H);else if(f&&1==D.getSelectionCount()){q=D.getStartEditingCell(D.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==D.getCurrentCellStyle(q)[mxConstants.STYLE_SHAPE])D.setCellStyles(mxConstants.STYLE_IMAGE,c,[q]);else{D.model.beginUpdate();try{D.labelChanged(q,c),Graph.isLink(c)&&D.setLinkForCell(q,c)}finally{D.model.endUpdate()}}D.setSelectionCell(q)}else H=D.getInsertPoint(),D.isMouseInsertPoint()&&(N=0,D.lastPasteXml==c&&0<D.pasteCounter&&
+D.pasteCounter--),H=this.insertTextAt(c,H.x+N,H.y+N,q),D.setSelectionCells(H);D.isSelectionEmpty()||(D.scrollCellToVisible(D.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(D.view.getState(D.getSelectionCell())));return H};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var q=f,D=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var H=c.clipboardData.getData("text/plain"),N=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var L=
+decodeURIComponent(H);this.isCompatibleString(L)&&(N=!0,H=L)}catch(na){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(q=this.parseHtmlData(N),D="text/plain"!=q.getAttribute("data-type")):null!=H&&0<H.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,N))}H=q.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,
+mxUtils.bind(this,function(na){var X=this.editor.graph;X.lastPasteXml==na?X.pasteCounter++:(X.lastPasteXml=na,X.pasteCounter=0);var ca=X.pasteCounter*X.gridSize;X.setSelectionCells(this.importXml(na,ca,ca));X.scrollCellToVisible(X.getSelectionCell())}),mxUtils.bind(this,function(na){this.handleError(na)})),mxEvent.consume(c));else{var I=!1,Z="";Z=D?null!=q.textContent&&"<mxfile"==q.textContent.substring(0,7)&&"</mxfile>"==q.textContent.substring(q.textContent.length-9)||"<mxGraphModel"==q.textContent.substring(0,
+13)&&"</mxGraphModel>"==q.textContent.substring(q.textContent.length-15)?q.textContent.replace(/\u00a0/g," "):q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var ia=Z.lastIndexOf("%3E");0<=ia&&ia<Z.length-3&&(Z=Z.substring(0,ia+3))}catch(na){}try{H=q.getElementsByTagName("span"),(L=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(Z))&&(this.isCompatibleString(L)||0==L.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&
+(I=!0,Z=L)}catch(na){}try{if(null!=Z&&0<Z.length){if(0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var fa=mxUtils.bind(this,function(){try{Z=(new MiroImporter).importMiroJson(JSON.parse(Z)),this.pasteXml(Z,t,I,c)}catch(na){console.log("Miro import error:",na)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",fa):fa()}else this.pasteXml(Z,t,I,c,D);try{mxEvent.consume(c)}catch(na){}}else if(!l){var ba=this.editor.graph;ba.lastPasteXml=null;ba.pasteCounter=
+0}}catch(na){this.handleError(na)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,q=this.getPageIndex(this.currentPage),D=null!=
+q?q+1:1,H=mxUtils.bind(this,function(ca,ka,da,W){var S=ca.useCssTransforms,k=ca.currentTranslate,B=ca.currentScale,K=ca.view.translate,T=ca.view.scale;ca.useCssTransforms&&(ca.useCssTransforms=!1,ca.currentTranslate=new mxPoint(0,0),ca.currentScale=1,ca.view.translate=new mxPoint(0,0),ca.view.scale=1);var P=ca.getGraphBounds(),U=0,Y=0,aa=mxRectangle.fromRectangle(ca.pageFormat),la=f.fit||f.crop||!ca.pageVisible,va=f.scale;aa.width=Math.ceil(aa.width*ca.pageScale);aa.height=Math.ceil(aa.height*ca.pageScale);
+var ua=1;if(f.fit){ua=f.sheetsAcross;var qa=f.sheetsDown;isNaN(va)||(aa.width=Math.ceil(aa.width*va),aa.height=Math.ceil(aa.height*va));ua=Math.min(aa.height*qa/(P.height/ca.view.scale),aa.width*ua/(P.width/ca.view.scale))}else ua=isNaN(va)?1:va;ua*=1;!la&&ca.pageVisible?(va=ca.getPageLayout(),U-=va.x*aa.width,Y-=va.y*aa.height):la=!0;f.crop&&(f.selection&&(P=t.getBoundingBox(t.getSelectionCells())),aa.width=(P.width+1)*ua/ca.view.scale,aa.height=(P.height+1)*ua/ca.view.scale);aa.width=Math.ceil(1*
+aa.width);aa.height=Math.ceil(1*aa.height);W=null!=W?"page/id,"+W:null;if(null==ka){ka=PrintDialog.createPrintPreview(ca,ua,null,0,U,Y,la);ka.title=this.getBaseFilename(!0);ka.pageSelector=!1;ka.mathEnabled=!1;U=f.border;isNaN(U)||(ka.pageMargin=U);f.selection&&(ka.isCellVisible=function(Aa){return ca.isCellSelected(Aa)});var Ba=ka.writeHead;ka.writeHead=function(Aa){Ba.apply(this,arguments);mxClient.IS_GC&&(Aa.writeln('<style type="text/css">'),Aa.writeln("@media print {"),Aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
+Aa.writeln("}"),Aa.writeln("</style>"));null!=l.fontCss&&(Aa.writeln('<style type="text/css">'),Aa.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),Aa.writeln("</style>"));for(var Ea=ca.getCustomFonts(),pa=0;pa<Ea.length;pa++){var Ca=Ea[pa].name,za=Ea[pa].url;Graph.isCssFontUrl(za)?Aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(za))+'" charset="UTF-8" type="text/css">'):(Aa.writeln('<style type="text/css">'),Aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ca)+
+'";\nsrc: url("'+mxUtils.htmlEntities(za)+'");\n}'),Aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ya=ka.drawBackgroundImage;ka.drawBackgroundImage=function(Aa){ya.apply(this,arguments);null!=Aa.node&&(EditorUi.embedSvgImages(Aa.node),t.disableSvgLinks(Aa.node,function(Ea){Ea.setAttribute("href","javascript:void(0)")}))}}var La=ka.addGraphFragment;ka.addGraphFragment=function(Aa,Ea,pa,Ca,za,wa){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:za.classList.add("geDisableMathJax")};
+f.grid&&(ka.gridSize=ca.gridSize,ka.gridSteps=ca.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ca.view.gridColor);ka.open(null,null,da,!0,W,aa,f.selection?ca.getSelectionCells():null)}else{P=ca.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";ka.backgroundColor=P;ka.autoOrigin=la;f.grid&&(ka.gridSize=ca.gridSize,ka.gridSteps=ca.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ca.view.gridColor);ka.appendGraph(ca,
+ua,U,Y,da,!0,W,aa,f.selection?ca.getSelectionCells():null);da=ca.getCustomFonts();if(null!=ka.wnd)for(aa=0;aa<da.length;aa++)U=da[aa].name,Y=da[aa].url,Graph.isCssFontUrl(Y)?ka.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Y)+'" charset="UTF-8" type="text/css">'):(ka.wnd.document.writeln('<style type="text/css">'),ka.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(U)+'";\nsrc: url("'+mxUtils.htmlEntities(Y)+'");\n}'),ka.wnd.document.writeln("</style>"))}S&&
+(ca.useCssTransforms=S,ca.currentTranslate=k,ca.currentScale=B,ca.view.translate=K,ca.view.scale=T);return ka}),N=f.pagesFrom,L=f.pagesTo,I=!f.allPages;q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==D&&L==D);if(!I&&null!=this.pages&&this.pages.length){I=0;D=this.pages.length-1;f.allPages||(I=parseInt(N)-1,D=parseInt(L)-1);for(var Z=I;Z<=D;Z++){var ia=this.pages[Z];N=ia==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=
+t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;L=!0;I=!1;var fa=null,ba=null;null==ia.viewState&&null==ia.root&&this.updatePageRoot(ia);null!=ia.viewState&&(L=ia.viewState.pageVisible,I=ia.viewState.mathEnabled,fa=ia.viewState.background,ba=ia.viewState.backgroundImage,N.pageFormat=ia.viewState.pageFormat,N.gridSize=ia.viewState.gridSize);null!=ba&&null!=ba.originalSrc&&(ba=this.createImageForPageLink(ba.originalSrc,ia));N.background=fa;N.backgroundImage=null!=ba?new mxImage(ba.src,
+ba.width,ba.height,ba.x,ba.y):null;N.pageVisible=L;N.mathEnabled=I;var na=N.getGraphBounds;N.getGraphBounds=function(){var ca=na.apply(this,arguments),ka=this.backgroundImage;if(null!=ka&&null!=ka.width&&null!=ka.height){var da=this.view.translate,W=this.view.scale;ca=mxRectangle.fromRectangle(ca);ca.add(new mxRectangle((da.x+ka.x)*W,(da.y+ka.y)*W,ka.width*W,ka.height*W))}return ca};var X=N.getGlobalVariable;N.getGlobalVariable=function(ca){return"page"==ca?ia.getName():"pagenumber"==ca?Z+1:"pagecount"==
+ca?null!=this.pages?this.pages.length:1:X.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ia);N.model.setRoot(ia.root)}q=H(N,q,Z!=D,ia.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else q=H(t);null==q||null==q.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(H=q.wnd.document,c||(q.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),q.closeDocument(),Graph.rewritePageLinks(q.wnd.document,
+!0),q.mathEnabled||c||PrintDialog.printPreview(q));return q}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&
+(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(t);
+if(null==q){var D=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=D&&(10==document.documentMode||11==document.documentMode?q=D.getData("Text"):(q=null,q=0<=mxUtils.indexOf(D.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(D.types,"text/html")?D.getData("text/html"):null,null!=q&&0<q.length?(D=document.createElement("div"),D.innerHTML=Graph.sanitizeHtml(q),D=D.getElementsByTagName("img"),0<D.length&&(q=D[0].getAttribute("src"))):0<=mxUtils.indexOf(D.types,
+"text/plain")&&(q=D.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),
+413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;
+var q=document.documentElement;var D=(t.clientWidth||q.clientWidth)-3;t=Math.max(t.clientHeight||0,q.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,D=c.clientWidth,t=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=l+"px";q.style.width=Math.max(0,D-3)+"px";q.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,q,D){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||
+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var H=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,L,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,
+f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
+200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,t)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);
+else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(q=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,q,null!=q?l:null,D)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var q=new FileReader;q.onload=mxUtils.bind(this,function(D){try{this.openFileHandle(D.target.result,t.name,t,f)}catch(H){this.handleError(H)}});q.onerror=mxUtils.bind(this,
+function(D){this.spinner.stop();this.handleError(D);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?q.readAsText(t):q.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,q,D){var H=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+c,f||this.defaultFilename,l,t,q,D))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=
+function(c,f){function l(H){if(null!=H){var N=H.lastIndexOf(".");0<N&&(H=H.substring(N+1,H.length));null==f[H]&&(f[H]=!0)}}var t=this.editor.graph,q=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=t.model.getChildCount(c);for(var D=0;D<q;D++)this.addBasenamesForCell(t.model.getChildAt(c,D),f)};EditorUi.prototype.setGraphEnabled=
+function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=
+function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,q){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var D=this.editor.graph;D.setGridEnabled(!1);
+D.pageVisible=!1;var H=D.model.cells,N;for(N in H){var L=H[N];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
+this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&
+c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||
+window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
+"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(q){c||this.handleError(q)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,q=null,D=mxUtils.bind(this,function(L,I){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,D);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var I=L.data,Z=null,ia=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.trim()?pa=null:"%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Ca){}return pa});if("json"==urlParams.proto){var fa=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[I])}catch(pa){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=I.titleKey?mxResources.get(I.titleKey):
+I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var ba=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(pa){null!=pa?H.postMessage(JSON.stringify({event:"prompt",
+value:pa,message:I}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(ba.container,300,80,!0,!1);ba.init();return}if("draft"==I.action){var na=ia(I.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();
+H.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&
+this.actions.get("exit").funct()}));try{ba.init()}catch(pa){H.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var X=1==I.enableRecent,ca=1==I.enableSearch,ka=1==I.enableCustomTemp;ba=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(pa,Ca,za,wa){pa=pa||this.emptyDiagramXml;null!=I.callback?H.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Ca,
+tempUrl:za,libs:wa,builtIn:!0,message:I}),"*"):(c(pa,L,pa!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,X?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):null,ca?mxUtils.bind(this,function(pa,Ca){this.remoteInvoke("searchDiagrams",[pa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Ca,za){H.postMessage(JSON.stringify({event:"template",
+docUrl:pa,info:Ca,name:za}),"*")}),null,null,ka?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==I.withoutType);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(pa){null!=this.sidebar&&this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==I.action){var da=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:da,message:I}),"*");return}if("status"==
+I.action){this.updateStatus(mxUtils.bind(this,function(){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message))}));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var W=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();
+return}if("viewport"==I.action){if(null!=I.viewport){var S=this.editor.graph,k=S.view.translate.x,B=S.view.translate.y;this.embedViewport=I.viewport;S.refresh();this.diagramContainer.scrollTop-=(B-S.view.translate.y)*S.view.scale;this.diagramContainer.scrollLeft-=(k-S.view.translate.x)*S.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==I.action){ba=null;try{var K=this.diagramContainer.getAttribute("data-scrollState");null!=K&&(this.diagramContainer.removeAttribute("data-scrollState"),
+ba=JSON.parse(K))}catch(pa){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var T=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);S=this.editor.graph;
+var P=mxUtils.bind(this,function(pa,Ca){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(T,this.editor.graph,null,!0,function(wa){P(pa,wa)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var za=this.createLoadMessage("export");za.format=I.format;za.message=I;za.data=pa;za.svg=Ca;za.xml=T;H.postMessage(JSON.stringify(za),"*")}}),U=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==
+I.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(T)));S!=this.editor.graph&&S.container.parentNode.removeChild(S.container);P(pa)}),Y=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=Y){var pa=S.getGlobalVariable;S=this.createTemporaryGraph(S.getStylesheet());for(var Ca,za=0;za<this.pages.length;za++)if(this.pages[za].getId()==
+Y){Ca=this.updatePageRoot(this.pages[za]);break}null==Ca&&(Ca=this.currentPage);S.getGlobalVariable=function(Ra){return"page"==Ra?Ca.getName():"pagenumber"==Ra?1:pa.apply(this,arguments)};document.body.appendChild(S.container);S.model.setRoot(Ca.root)}if(null!=I.layerIds){var wa=S.model,Xa=wa.getChildCells(wa.getRoot()),Qa={};for(za=0;za<I.layerIds.length;za++)Qa[I.layerIds[za]]=!0;for(za=0;za<Xa.length;za++)wa.setVisible(Xa[za],Qa[Xa[za].id]||!1)}za=null;I.keepTheme&&(za=Editor.isDarkMode()?"dark":
+"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){U(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){U(null)}),null,null,I.scale,I.transparent,I.shadow,null,S,I.border,null,I.grid,za)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(T),l=!1);aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=Y?"&pageId="+Y:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):
+"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?P("data:image/png;base64,"+pa.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(aa=mxUtils.bind(this,function(){var pa=this.createLoadMessage("export");pa.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();pa.xml=mxUtils.getXml(Ca);
+pa.data=this.getFileData(null,null,!0,null,null,null,Ca);pa.format=I.format}else if("html"==I.format)Ca=this.editor.getGraphXml(),pa.data=this.getHtml(Ca,this.editor.graph),pa.xml=mxUtils.getXml(Ca),pa.format=I.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=I.background?I.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);pa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var za=mxUtils.bind(this,function(Xa){this.editor.graph.setEnabled(!0);
+this.spinner.stop();pa.data=I.asText?Xa:Editor.createSvgDataUri(Xa);H.postMessage(JSON.stringify(pa),"*")}),wa="auto";I.keepTheme&&(wa=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(wa=I.theme);if("xmlsvg"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){wa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())wa="auto";null!=I.theme&&(wa=I.theme);this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,za,null,null,I.embedImages,
+Ca,I.scale,I.border,I.shadow,wa)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,wa),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Xa){I.embedImages||null==I.embedImages?this.editor.convertImages(Xa,
+mxUtils.bind(this,function(Qa){za(mxUtils.getXml(Qa))})):za(mxUtils.getXml(Xa))}));return}H.postMessage(JSON.stringify(pa),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);aa()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||aa()}else aa();return}if("load"==I.action){fa=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=
+I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);
+if(null!=I.rough){var va=Editor.sketchMode;this.doSetSketchMode(I.rough);va!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var ua=this.embedExportBorder;this.diagramContainer.style.left=
+Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var qa=I.maxFitScale,Ba=I.rect.width+2*ua,ya=I.rect.height+2*ua;Z=mxUtils.bind(this,function(){var pa=mxUtils.getDocumentSize();Ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ba):Ba,pa.width-80);pa=
+Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ya):ya,pa.height-80);this.diagramContainer.style.width=Ba+"px";this.diagramContainer.style.height=pa+"px";var Ca=this.editor.graph;pa=Ca.maxFitScale;Ca.maxFitScale=qa;Ca.fit(2*ua,null,null,null,null,null,ya);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var za=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=za}Ca.maxFitScale=pa;Ca.container.scrollTop-=ua;Ca.container.scrollLeft-=
+ua;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var wa=Ca.getGraphBounds();Ca.container.clientWidth>wa.width+2*ua&&(Ca.container.scrollLeft=wa.x+(wa.width+ua-Ca.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
+I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&this.setEmbedTitle(I.title);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(pa){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var La=this.getCurrentFile();null!=La&&(na=ia(I.xml),null!=na&&""!=na&&La.mergeFile(new LocalFile(this,na),function(){H.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(pa){H.postMessage(JSON.stringify({event:"merge",message:I,
+error:pa}),"*")}))}else"remoteInvokeReady"==I.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,L.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(pa){this.handleError(pa)}}var Aa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
+Ea=mxUtils.bind(this,function(pa,Ca){l=!0;try{c(pa,Ca,null,fa)}catch(za){this.handleError(za)}l=!1;null!=urlParams.modified&&this.clearStatus();q=Aa();t&&null==f&&(f=mxUtils.bind(this,function(za,wa){za=Aa();za==q||l||(wa=this.createLoadMessage("autosave"),wa.xml=za,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=za}),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)Ca=this.createLoadMessage("load"),Ca.xml=pa,H.postMessage(JSON.stringify(Ca),
+"*");null!=Z&&Z()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==I.substring(0,34)?(ia="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(pa){Ea(pa,L)},mxUtils.bind(this,function(pa){this.handleError(pa)}),ia)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
+this.parseFileData(I,mxUtils.bind(this,function(pa){4==pa.readyState&&(200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)?Ea(pa.responseText,L):this.handleError({message:413==pa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(pa){Ea(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==I||"object"!==typeof I||
+null==I.format||null==I.data&&null==I.url?(I=ia(I),Ea(I,L)):this.loadDescriptor(I,mxUtils.bind(this,function(pa){Ea(Aa(),L)}),mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;D="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(D,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(L,I,Z){N.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",
+href:L,target:I,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var q=document.createElement("button");q.className="geEmbedBtn geBtn";q.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(q,c);t&&q.classList.add("gePrimaryBtn");mxEvent.addListener(q,"click",f);return q};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||
+"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);
+"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&
+this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,
+mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=
+JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(q){this.handleError(q)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var q=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var D=t.value;t.value=JSON.stringify(JSON.parse(D));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));
+t.value=D}catch(H){this.handleError(H)}}));q.setAttribute("title","copy");q.className="geBtn";l.appendChild(q)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(q){this.loadingOrgChart=
+!1;f.clear()&&this.handleError(q)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,
+null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],q=[],D=[],H={};if(0<l.length){var N={},L=this.editor.graph,I=null,Z=null,ia=null,fa=null,ba=null,na=null,X=null,ca="whiteSpace=wrap;html=1;",ka=null,da=null,W="",S="auto",k="auto",B=!1,K=null,T=null,P=40,U=40,
+Y=100,aa=0,la=mxUtils.bind(this,function(){null!=f?f(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),va=L.getFreeInsertPoint(),ua=va.x,qa=va.y;va=qa;var Ba=null,ya="auto";da=null;for(var La=[],Aa=null,Ea=null,pa=0;pa<l.length&&"#"==l[pa].charAt(0);){c=l[pa].replace(/\r$/,"");for(pa++;pa<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[pa].charAt(0);)c=c.substring(0,c.length-
+1)+mxUtils.trim(l[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var za=mxUtils.trim(c.substring(1,Ca)),wa=mxUtils.trim(c.substring(Ca+1));"label"==za?Ba=Graph.sanitizeHtml(wa):"labelname"==za&&0<wa.length&&"-"!=wa?ba=wa:"labels"==za&&0<wa.length&&"-"!=wa?X=JSON.parse(wa):"style"==za?Z=wa:"parentstyle"==za?ca=wa:"unknownStyle"==za&&"-"!=wa?na=wa:"stylename"==za&&0<wa.length&&"-"!=wa?fa=wa:"styles"==za&&0<wa.length&&"-"!=wa?ia=JSON.parse(wa):"vars"==za&&0<wa.length&&"-"!=
+wa?I=JSON.parse(wa):"identity"==za&&0<wa.length&&"-"!=wa?ka=wa:"parent"==za&&0<wa.length&&"-"!=wa?da=wa:"namespace"==za&&0<wa.length&&"-"!=wa?W=wa:"width"==za?S=wa:"height"==za?k=wa:"collapsed"==za&&"-"!=wa?B="true"==wa:"left"==za&&0<wa.length?K=wa:"top"==za&&0<wa.length?T=wa:"ignore"==za?Ea=wa.split(","):"connect"==za?La.push(JSON.parse(wa)):"link"==za?Aa=wa:"padding"==za?aa=parseFloat(wa):"edgespacing"==za?P=parseFloat(wa):"nodespacing"==za?U=parseFloat(wa):"levelspacing"==za?Y=parseFloat(wa):"layout"==
+za&&(ya=wa)}}}if(null==l[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Xa=this.editor.csvToArray(l[pa].replace(/\r$/,""));Ca=c=null;za=[];for(wa=0;wa<Xa.length;wa++)ka==Xa[wa]&&(c=wa),da==Xa[wa]&&(Ca=wa),za.push(mxUtils.trim(Xa[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+za[0]+"%");if(null!=La)for(var Qa=0;Qa<La.length;Qa++)null==N[La[Qa].to]&&(N[La[Qa].to]={});ka=[];for(wa=pa+1;wa<l.length;wa++){var Ra=this.editor.csvToArray(l[wa].replace(/\r$/,
+""));if(null==Ra){var Sa=40<l[wa].length?l[wa].substring(0,40)+"...":l[wa];throw Error(Sa+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ka.push(Ra)}L.model.beginUpdate();try{for(wa=0;wa<ka.length;wa++){Ra=ka[wa];var Ha=null,Ma=null!=c?W+Ra[c]:null;l=!1;null!=Ma&&(Ha=L.model.getCell(Ma),l=null==Ha||0<=mxUtils.indexOf(t,Ha));var y=new mxCell(Ba,new mxGeometry(ua,va,0,0),Z||"whiteSpace=wrap;html=1;");y.collapsed=B;y.vertex=!0;y.id=Ma;null==Ha||l||L.model.setCollapsed(Ha,B);
+for(var O=0;O<Ra.length;O++)L.setAttributeForCell(y,za[O],Ra[O]),null==Ha||l||L.setAttributeForCell(Ha,za[O],Ra[O]);if(null!=ba&&null!=X){var Q=X[y.getAttribute(ba)];null!=Q&&(L.labelChanged(y,Q),null==Ha||l||L.cellLabelChanged(Ha,Q))}if(null!=fa&&null!=ia){var V=ia[y.getAttribute(fa)];null!=V&&(y.style=V)}L.setAttributeForCell(y,"placeholders","1");y.style=L.replacePlaceholders(y,y.style,I);null==Ha||l?L.fireEvent(new mxEventObject("cellsInserted","cells",[y])):(L.model.setStyle(Ha,y.style),0>mxUtils.indexOf(D,
+Ha)&&D.push(Ha),L.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));l=null!=Ha;Ha=y;if(!l)for(Qa=0;Qa<La.length;Qa++)N[La[Qa].to][Ha.getAttribute(La[Qa].to)]=Ha;null!=Aa&&"link"!=Aa&&(L.setLinkForCell(Ha,Ha.getAttribute(Aa)),L.setAttributeForCell(Ha,Aa,null));var ha=this.editor.graph.getPreferredSizeForCell(Ha);da=null!=Ca?L.model.getCell(W+Ra[Ca]):null;if(Ha.vertex){Sa=null!=da?0:ua;pa=null!=da?0:qa;null!=K&&null!=Ha.getAttribute(K)&&(Ha.geometry.x=Sa+parseFloat(Ha.getAttribute(K)));null!=
+T&&null!=Ha.getAttribute(T)&&(Ha.geometry.y=pa+parseFloat(Ha.getAttribute(T)));var ja="@"==S.charAt(0)?Ha.getAttribute(S.substring(1)):null;Ha.geometry.width=null!=ja&&"auto"!=ja?parseFloat(Ha.getAttribute(S.substring(1))):"auto"==S||"auto"==ja?ha.width+aa:parseFloat(S);var oa="@"==k.charAt(0)?Ha.getAttribute(k.substring(1)):null;Ha.geometry.height=null!=oa&&"auto"!=oa&&"width"!=k?parseFloat(oa):"auto"==k||"auto"==oa?ha.height+aa:"width"==k?Ha.geometry.width:parseFloat(k);va+=Ha.geometry.height+U}l?
+(null==H[Ma]&&(H[Ma]=[]),H[Ma].push(Ha)):(t.push(Ha),null!=da?(da.style=L.replacePlaceholders(da,ca,I),L.addCell(Ha,da),q.push(da)):D.push(L.addCell(Ha)))}for(wa=0;wa<q.length;wa++)ja="@"==S.charAt(0)?q[wa].getAttribute(S.substring(1)):null,oa="@"==k.charAt(0)?q[wa].getAttribute(k.substring(1)):null,"auto"!=S&&"auto"!=ja||"auto"!=k&&"auto"!=oa||L.updateGroupBounds([q[wa]],aa,!0);var ta=D.slice(),ra=D.slice();for(Qa=0;Qa<La.length;Qa++){var xa=La[Qa];for(wa=0;wa<t.length;wa++){Ha=t[wa];var Da=mxUtils.bind(this,
+function(kb,pb,fb){var ob=pb.getAttribute(fb.from);if(null!=ob&&""!=ob){ob=ob.split(",");for(var tb=0;tb<ob.length;tb++){var eb=N[fb.to][ob[tb]];if(null==eb&&null!=na){eb=new mxCell(ob[tb],new mxGeometry(ua,qa,0,0),na);eb.style=L.replacePlaceholders(pb,eb.style,I);var nb=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=nb.width+aa;eb.geometry.height=nb.height+aa;N[fb.to][ob[tb]]=eb;eb.vertex=!0;eb.id=ob[tb];D.push(L.addCell(eb))}if(null!=eb){nb=fb.label;null!=fb.fromlabel&&(nb=(pb.getAttribute(fb.fromlabel)||
+"")+(nb||""));null!=fb.sourcelabel&&(nb=L.replacePlaceholders(pb,fb.sourcelabel,I)+(nb||""));null!=fb.tolabel&&(nb=(nb||"")+(eb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(eb,fb.targetlabel,I));var mb="target"==fb.placeholders==!fb.invert?eb:kb;mb=null!=fb.style?L.replacePlaceholders(mb,fb.style,I):L.createCurrentEdgeStyle();nb=L.insertEdge(null,null,nb||"",fb.invert?eb:kb,fb.invert?kb:eb,mb);if(null!=fb.labels)for(mb=0;mb<fb.labels.length;mb++){var qb=
+fb.labels[mb],ub=new mxCell(qb.label||mb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!fb.invert?eb:kb,ub.value,I));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);nb.insert(ub)}if(null!=fb.data)for(var zb in fb.data)L.setAttributeForCell(nb,zb,fb.data[zb]);ra.push(nb);mxUtils.remove(fb.invert?
+kb:eb,ta)}}}});Da(Ha,Ha,xa);if(null!=H[Ha.id])for(O=0;O<H[Ha.id].length;O++)Da(Ha,H[Ha.id][O],xa)}}if(null!=Ea)for(wa=0;wa<t.length;wa++)for(Ha=t[wa],O=0;O<Ea.length;O++)L.setAttributeForCell(Ha,mxUtils.trim(Ea[O]),null);if(0<D.length){var Ia=new mxParallelEdgeLayout(L);Ia.spacing=P;Ia.checkOverlap=!0;var Ya=function(){0<Ia.spacing&&Ia.execute(L.getDefaultParent());for(var kb=0;kb<D.length;kb++){var pb=L.getCellGeometry(D[kb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==S&&
+(pb.width=Math.round(L.snap(pb.width)));"auto"==k&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==ya.charAt(0)){var Za=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(ya)),function(){Ya();Za()});la=null}else if("circle"==ya){var $a=new mxCircleLayout(L);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var Pa=$a.isVertexIgnored;$a.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){$a.execute(L.getDefaultParent());Ya()},
+!0,la);la=null}else if("horizontaltree"==ya||"verticaltree"==ya||"auto"==ya&&ra.length==2*D.length-1&&1==ta.length){L.view.validate();var Na=new mxCompactTreeLayout(L,"horizontaltree"==ya);Na.levelDistance=U;Na.edgeRouting=!1;Na.resetEdges=!1;Na.sortEdges=!0;this.executeLayout(function(){Na.execute(L.getDefaultParent(),0<ta.length?ta[0]:null)},!0,la);la=null}else if("horizontalflow"==ya||"verticalflow"==ya||"auto"==ya&&1==ta.length){L.view.validate();var jb=new mxHierarchicalLayout(L,"horizontalflow"==
+ya?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);jb.intraCellSpacing=U;jb.parallelEdgeSpacing=P;jb.interRankCellSpacing=Y;jb.disableEdgeStyle=!1;this.executeLayout(function(){jb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ua,qa)},!0,la);la=null}else if("orgchart"==ya){L.view.validate();var cb=new mxOrgChartLayout(L,2,Y,U),ab=cb.isVertexIgnored;cb.isVertexIgnored=function(kb){return ab.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){cb.execute(L.getDefaultParent());
+Ya()},!0,la);la=null}else if("organic"==ya||"auto"==ya&&ra.length>D.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*U;db.disableEdgeStyle=!1;db.resetEdges=!1;var lb=db.isVertexIgnored;db.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Ya()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=
+function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,q){c=new LinkDialog(this,c,f,l,!0,t,q);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
@@ -3961,25 +3962,25 @@ EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=t
this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=
this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&
!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=
-f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,q,D,H,N){var L=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(L.getSvg(t,q,D)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),Y=L.getGraphBounds(),ha=Math.floor(Y.width*q/L.view.scale),ea=
-Math.floor(Y.height*q/L.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ha*ea<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var aa={globalVars:L.getExportVariables()};N&&(aa.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(f,l,function(na,W){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(W||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<H?"&dpi="+H:"")+"&bg="+(null!=
-t?t:"none")+"&w="+ha+"&h="+ea+"&border="+D+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(q,null==t||"none"==t,!0,!1,!1,D,!0,!1,null,N,H):c.exportImage(q,!1,!0,!1,!1,D,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),
+f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
+null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,q,D,H,N){var L=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(L.getSvg(t,q,D)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),Z=L.getGraphBounds(),ia=Math.floor(Z.width*q/L.view.scale),fa=
+Math.floor(Z.height*q/L.view.scale);if(I.length<=MAX_REQUEST_SIZE&&ia*fa<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var ba={globalVars:L.getExportVariables()};N&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(f,l,function(na,X){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(X||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<H?"&dpi="+H:"")+"&bg="+(null!=
+t?t:"none")+"&w="+ia+"&h="+fa+"&border="+D+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(q,null==t||"none"==t,!0,!1,!1,D,!0,!1,null,N,H):c.exportImage(q,!1,!0,!1,!1,D,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),
this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var q=
-document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var D={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var N=H[c];if("R"==N.substring(0,1)){var L=JSON.parse(decodeURIComponent(N.substring(1)));D[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){q.innerText="";
-if(0==J.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Y=0;Y<J.length;Y++){var ha=J[Y];D[ha.id]&&(f[ha.id]=ha);var ea=this.addCheckbox(q,ha.title,D[ha.id]);(function(aa,na){mxEvent.addListener(na,"change",function(){this.checked?f[aa.id]=aa:delete f[aa.id]})})(ha,ea)}},mxUtils.bind(this,function(J){q.innerText="";var Y=document.createElement("div");Y.style.padding="8px";Y.style.textAlign=
-"center";mxUtils.write(Y,mxResources.get("error")+": ");mxUtils.write(Y,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));q.appendChild(Y)}));l.appendChild(q);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,Y;for(Y in f)null==D[Y]&&(J++,mxUtils.bind(this,function(ha){this.remoteInvoke("getFileContent",[ha.downloadUrl],null,mxUtils.bind(this,function(ea){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-ea,ha)),this.showSidebar()}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Y]));for(Y in D)f[Y]||this.closeLibrary(new RemoteLibrary(this,null,D[Y]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns=
+document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var D={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var N=H[c];if("R"==N.substring(0,1)){var L=JSON.parse(decodeURIComponent(N.substring(1)));D[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){q.innerText="";
+if(0==I.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<I.length;Z++){var ia=I[Z];D[ia.id]&&(f[ia.id]=ia);var fa=this.addCheckbox(q,ia.title,D[ia.id]);(function(ba,na){mxEvent.addListener(na,"change",function(){this.checked?f[ba.id]=ba:delete f[ba.id]})})(ia,fa)}},mxUtils.bind(this,function(I){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign=
+"center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));q.appendChild(Z)}));l.appendChild(q);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,Z;for(Z in f)null==D[Z]&&(I++,mxUtils.bind(this,function(ia){this.remoteInvoke("getFileContent",[ia.downloadUrl],null,mxUtils.bind(this,function(fa){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+fa,ia)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));for(Z in D)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,D[Z]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns=
{getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=
[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,q){var D=!0,H=window.setTimeout(mxUtils.bind(this,function(){D=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(H);D&&t.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(H);D&&q.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
-f){var l=mxUtils.bind(this,function(J,Y){var ha={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Y?ha.error={errResp:Y}:null!=J&&(ha.resp=J);this.remoteWin.postMessage(JSON.stringify(ha),"*")});try{var t=c.funtionName,q=this.remoteInvokableFns[t];if(null!=q&&"function"===typeof this[t]){if(q.allowedDomains){for(var D=!1,H=0;H<q.allowedDomains.length;H++)if(f=="https://"+q.allowedDomains[H]){D=!0;break}if(!D){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||
-(N=[]);if(q.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var L=this[t].apply(this,N);l([L])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=
+f){var l=mxUtils.bind(this,function(I,Z){var ia={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ia.error={errResp:Z}:null!=I&&(ia.resp=I);this.remoteWin.postMessage(JSON.stringify(ia),"*")});try{var t=c.funtionName,q=this.remoteInvokableFns[t];if(null!=q&&"function"===typeof this[t]){if(q.allowedDomains){for(var D=!1,H=0;H<q.allowedDomains.length;H++)if(f=="https://"+q.allowedDomains[H]){D=!0;break}if(!D){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||
+(N=[]);if(q.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),this[t].apply(this,N);else{var L=this[t].apply(this,N);l([L])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=
function(q){try{var D=t.result;1>q.oldVersion&&D.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(D.createObjectStore("files",{keyPath:"title"}),D.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};t.onsuccess=mxUtils.bind(this,function(q){try{var D=t.result;this.database=D;EditorUi.migrateStorageFiles&&(StorageFile.migrate(D),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var N=document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var L=!0,J=!1,Y,ha=0,ea=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){ha++;na()}),na=mxUtils.bind(this,function(){try{if(ha>=Y.length)ea();else{var ba=Y[ha];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(ja){null==ja||".scratchpad"==ba&&ja==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):aa()}),aa)}}catch(ja){console.log(ja)}}),W=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}],aa,aa,["filesInfo","files"])}catch(ja){console.log(ja)}});H=mxUtils.bind(this,function(ba){try{if(ba.source==N.contentWindow){var ja={};try{ja=JSON.parse(ba.data)}catch(ca){}"init"==ja.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=
-ja.event||J||(L?null!=ja.resp&&0<ja.resp.length&&null!=ja.resp[0]?(Y=ja.resp[0],L=!1,na()):ea():null!=ja.resp&&0<ja.resp.length&&null!=ja.resp[0]?W(ja.resp[0]):aa())}}catch(ca){console.log(ca)}});window.addEventListener("message",H)}})));c(D);D.onversionchange=function(){D.close()}}catch(H){null!=f?f(H):null!=window.console&&console.warn(H)}});t.onerror=f;t.onblocked=function(){}}catch(q){null!=f?f(q):null!=window.console&&console.error(q)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var N=document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var L=!0,I=!1,Z,ia=0,fa=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ia++;na()}),na=mxUtils.bind(this,function(){try{if(ia>=Z.length)fa();else{var ca=Z[ia];StorageFile.getFileContent(this,ca,mxUtils.bind(this,function(ka){null==ka||".scratchpad"==ca&&ka==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ca]}),"*"):ba()}),ba)}}catch(ka){console.log(ka)}}),X=mxUtils.bind(this,function(ca){try{this.setDatabaseItem(null,
+[{title:ca.title,size:ca.data.length,lastModified:Date.now(),type:ca.isLib?"L":"F"},{title:ca.title,data:ca.data}],ba,ba,["filesInfo","files"])}catch(ka){console.log(ka)}});H=mxUtils.bind(this,function(ca){try{if(ca.source==N.contentWindow){var ka={};try{ka=JSON.parse(ca.data)}catch(da){}"init"==ka.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=
+ka.event||I||(L?null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?(Z=ka.resp[0],L=!1,na()):fa():null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?X(ka.resp[0]):ba())}}catch(da){console.log(da)}});window.addEventListener("message",H)}})));c(D);D.onversionchange=function(){D.close()}}catch(H){null!=f?f(H):null!=window.console&&console.warn(H)}});t.onerror=f;t.onblocked=function(){}}catch(q){null!=f?f(q):null!=window.console&&console.error(q)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};
EditorUi.prototype.setDatabaseItem=function(c,f,l,t,q){this.openDatabase(mxUtils.bind(this,function(D){try{q=q||"objects";Array.isArray(q)||(q=[q],c=[c],f=[f]);var H=D.transaction(q,"readwrite");H.oncomplete=l;H.onerror=t;for(D=0;D<q.length;D++)H.objectStore(q[D]).put(null!=c&&null!=c[D]?{key:c[D],data:f[D]}:f[D])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);
var D=q.transaction(t,"readwrite");D.oncomplete=f;D.onerror=l;for(q=0;q<t.length;q++)D.objectStore(t[q]).delete(c[q])}catch(H){null!=l&&l(H)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";var D=q.transaction([t],"readonly").objectStore(t).get(c);D.onsuccess=function(){f(D.result)};D.onerror=l}catch(H){null!=l&&l(H)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=
l||"objects";var q=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),D=[];q.onsuccess=function(H){null==H.target.result?c(D):(D.push(H.target.result.value),H.target.result.continue())};q.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var q=t.transaction([l],"readonly").objectStore(l).getAllKeys();q.onsuccess=function(){c(q.result)};q.onerror=f}catch(D){null!=
@@ -3987,34 +3988,34 @@ f&&f(D)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCur
function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=
function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,q,D,H,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,q,D,H,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,q,D,
-H,N,L,J,Y,ha,ea,aa,na,W)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,
+return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,q,D,
+H,N,L,I,Z,ia,fa,ba,na,X)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,
f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(c,f,l,t,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var q="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(q||
t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,g,m,v,n){function A(){for(var W=N.getElementsByTagName("div"),ba=0,ja=0;ja<W.length;ja++)"none"!=W[ja].style.display&&W[ja].parentNode==N&&ba++;L.style.display=0==ba?"block":"none"}function G(W,ba,ja,ca){function la(){ba.removeChild(B);ba.removeChild(I);k.style.display="block";Q.style.display="block"}q={div:ba,comment:W,saveCallback:ja,deleteOnCancel:ca};var Q=ba.querySelector(".geCommentTxt"),k=ba.querySelector(".geCommentActionsList"),B=document.createElement("textarea");
-B.className="geCommentEditTxtArea";B.style.minHeight=Q.offsetHeight+"px";B.value=W.content;ba.insertBefore(B,Q);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){ca?(ba.parentNode.removeChild(ba),A()):la();q=null});U.className="geCommentEditBtn";I.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Q.innerText="";W.content=B.value;mxUtils.write(Q,W.content);la();ja(W);q=null});mxEvent.addListener(B,"keydown",
-mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ba.insertBefore(I,Q);k.style.display="none";Q.style.display="none";B.focus()}function S(W,ba){ba.innerText="";W=new Date(W.modifiedDate);var ja=b.timeSince(W);null==ja&&(ja=mxResources.get("lessThanAMinute"));mxUtils.write(ba,
-mxResources.get("timeAgo",[ja],"{1} ago"));ba.setAttribute("title",W.toLocaleDateString()+" "+W.toLocaleTimeString())}function F(W){var ba=document.createElement("img");ba.className="geCommentBusyImg";ba.src=IMAGE_PATH+"/spin.gif";W.appendChild(ba);W.busyImg=ba}function K(W){W.style.border="1px solid red";W.busyImg.parentNode==W&&W.removeChild(W.busyImg)}function c(W){W.style.border="";W.busyImg.parentNode==W&&W.removeChild(W.busyImg)}function f(W,ba,ja,ca,la){function Q(Z,ka,va){var ua=document.createElement("li");
-ua.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,Z);ua.appendChild(qa);mxEvent.addListener(qa,"click",function(Ba){ka(Ba,W);Ba.preventDefault();mxEvent.consume(Ba)});X.appendChild(ua);va&&(ua.style.display="none")}function k(){function Z(ua){ka.push(va);if(null!=ua.replies)for(var qa=0;qa<ua.replies.length;qa++)va=va.nextSibling,Z(ua.replies[qa])}var ka=[],va=I;Z(W);return{pdiv:va,replies:ka}}function B(Z,ka,va,ua,qa){function Ba(){F(Ea);
-W.addReply(za,function(pa){za.id=pa;W.replies.push(za);c(Ea);va&&va()},function(pa){ya();K(Ea);b.handleError(pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ua,qa)}function ya(){G(za,Ea,function(pa){Ba()},!0)}var La=k().pdiv,za=b.newComment(Z,b.getCurrentUser());za.pCommentId=W.id;null==W.replies&&(W.replies=[]);var Ea=f(za,W.replies,La,ca+1);ka?ya():Ba()}if(la||!W.isResolved){L.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",
-W.id);I.style.marginLeft=20*ca+5+"px";W.isResolved&&(D.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=W.user&&null!=W.user.pictureUrl?W.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=W.user?W.user.displayName:
-mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",W.id);S(W,T);P.appendChild(T);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,W.content||"");I.appendChild(U);W.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");X.className="geCommentActionsList";U.appendChild(X);l||W.isLocked||0!=ca&&
-!t||Q(mxResources.get("reply"),function(){B("",!0)},W.isResolved);P=b.getCurrentUser();null==P||null==W.user||P.id!=W.user.id||l||W.isLocked||(Q(mxResources.get("edit"),function(){function Z(){G(W,I,function(){F(I);W.editComment(W.content,function(){c(I)},function(ka){K(I);Z();b.handleError(ka,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},W.isResolved),Q(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(I);W.deleteComment(function(Z){if(!0===
-Z){Z=I.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ka=I.querySelectorAll(".geCommentAction");for(Z=0;Z<ka.length;Z++)ka[Z].parentNode.removeChild(ka[Z]);c(I);I.style.opacity="0.5"}else{ka=k(W).replies;for(Z=0;Z<ka.length;Z++)N.removeChild(ka[Z]);for(Z=0;Z<ba.length;Z++)if(ba[Z]==W){ba.splice(Z,1);break}L.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Z){K(I);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-W.isResolved));l||W.isLocked||0!=ca||Q(W.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Z){function ka(){var va=Z.target;va.innerText="";W.isResolved=!W.isResolved;mxUtils.write(va,W.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ua=W.isResolved?"none":"",qa=k(W).replies,Ba="light-dark("+(W.isResolved?"ghostWhite":"white")+", transparent)",ya=0;ya<qa.length;ya++){qa[ya].style.backgroundColor=Ba;for(var La=qa[ya].querySelectorAll(".geCommentAction"),
-za=0;za<La.length;za++)La[za]!=va.parentNode&&(La[za].style.display=ua);ea||(qa[ya].style.display="none")}A()}W.isResolved?B(mxResources.get("reOpened")+": ",!0,ka,!1,!0):B(mxResources.get("markedAsResolved"),!1,ka,!0)});I.appendChild(U);null!=ja?N.insertBefore(I,ja.nextSibling):N.appendChild(I);for(ja=0;null!=W.replies&&ja<W.replies.length;ja++)U=W.replies[ja],U.isResolved=W.isResolved,f(U,W.replies,null,ca+1,la);null!=q&&(q.comment.id==W.id?(la=W.content,W.content=q.comment.content,G(W,I,q.saveCallback,
-q.deleteOnCancel),W.content=la):null==q.comment.id&&q.comment.pCommentId==W.id&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return I}}var l=!b.canComment(),t=b.canReplyToReplies(),q=null,D=document.createElement("div");D.className="geCommentsWin";var H=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.bottom=parseInt(H)+7+"px";D.appendChild(N);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(L,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=H;J.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!l){var Y=H.cloneNode();Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(W){function ba(){G(ja,ca,function(la){F(ca);b.addComment(la,function(Q){la.id=Q;aa.push(la);
-c(ca)},function(Q){K(ca);ba();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ja=b.newComment("",b.getCurrentUser()),ca=f(ja,aa,null,0);ba();W.preventDefault();mxEvent.consume(W)});J.appendChild(Y)}var ha=H.cloneNode();ha.style.backgroundImage="url("+Editor.checkImage+")";ha.setAttribute("title",mxResources.get("showResolved"));var ea=!1;mxEvent.addListener(ha,"click",function(W){(ea=!ea)?ha.classList.add("geActiveItem"):ha.classList.remove("geActiveItem");
-na();W.preventDefault();mxEvent.consume(W)});J.appendChild(ha);b.commentsRefreshNeeded()&&(Y=H.cloneNode(),Y.style.backgroundImage="url("+Editor.refreshImage+")",Y.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Y,"click",function(W){na();W.preventDefault();mxEvent.consume(W)}),J.appendChild(Y));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className=
-"geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(W){n();W.preventDefault();mxEvent.consume(W)}),J.appendChild(H));D.appendChild(J);var aa=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var W=q.div.querySelector(".geCommentEditTxtArea"),ba=q.div.querySelector(".geCommentEditBtns");q.comment.content=W.value;W.parentNode.removeChild(W);ba.parentNode.removeChild(ba)}catch(ja){b.handleError(ja)}N.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(ja){function ca(la){if(null!=la){la.sort(function(k,B){return new Date(k.modifiedDate)-new Date(B.modifiedDate)});for(var Q=0;Q<la.length;Q++)ca(la[Q].replies)}}ja.sort(function(la,Q){return new Date(la.modifiedDate)-new Date(Q.modifiedDate)});N.innerText="";N.appendChild(L);L.style.display="block";aa=ja;for(ja=0;ja<aa.length;ja++)ca(aa[ja].replies),
-f(aa[ja],aa,null,0,ea);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(ja){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ja&&ja.message?": "+ja.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;J=mxUtils.bind(this,function(){function W(Q){var k=ja[Q.id];if(null!=k)for(S(Q,k),k=0;null!=Q.replies&&k<Q.replies.length;k++)W(Q.replies[k])}
-if(this.window.isVisible()){for(var ba=N.querySelectorAll(".geCommentDate"),ja={},ca=0;ca<ba.length;ca++){var la=ba[ca];ja[la.getAttribute("data-commentId")]=la}for(ca=0;ca<aa.length;ca++)W(aa[ca])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=new mxWindow(mxResources.get("comments"),D,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
-this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,n,A,G,S,F,K){var c=document.createElement("div");c.style.textAlign="center";K=null!=K?K:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=K+"px";f.style.lineHeight="1.2em";mxUtils.write(f,e);c.appendChild(f);null!=F&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",e=document.createElement("img"),
+var CommentsWindow=function(b,e,g,m,v,n){function A(){for(var X=N.getElementsByTagName("div"),ca=0,ka=0;ka<X.length;ka++)"none"!=X[ka].style.display&&X[ka].parentNode==N&&ca++;L.style.display=0==ca?"block":"none"}function G(X,ca,ka,da){function W(){ca.removeChild(B);ca.removeChild(K);k.style.display="block";S.style.display="block"}q={div:ca,comment:X,saveCallback:ka,deleteOnCancel:da};var S=ca.querySelector(".geCommentTxt"),k=ca.querySelector(".geCommentActionsList"),B=document.createElement("textarea");
+B.className="geCommentEditTxtArea";B.style.minHeight=S.offsetHeight+"px";B.value=X.content;ca.insertBefore(B,S);var K=document.createElement("div");K.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){da?(ca.parentNode.removeChild(ca),A()):W();q=null});T.className="geCommentEditBtn";K.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){S.innerText="";X.content=B.value;mxUtils.write(S,X.content);W();ka(X);q=null});mxEvent.addListener(B,"keydown",
+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";K.appendChild(P);ca.insertBefore(K,S);k.style.display="none";S.style.display="none";B.focus()}function R(X,ca){ca.innerText="";X=new Date(X.modifiedDate);var ka=b.timeSince(X);null==ka&&(ka=mxResources.get("lessThanAMinute"));mxUtils.write(ca,
+mxResources.get("timeAgo",[ka],"{1} ago"));ca.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function F(X){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";X.appendChild(ca);X.busyImg=ca}function J(X){X.style.border="1px solid red";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function c(X){X.style.border="";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function f(X,ca,ka,da,W){function S(aa,la,va){var ua=document.createElement("li");
+ua.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);ua.appendChild(qa);mxEvent.addListener(qa,"click",function(Ba){la(Ba,X);Ba.preventDefault();mxEvent.consume(Ba)});Y.appendChild(ua);va&&(ua.style.display="none")}function k(){function aa(ua){la.push(va);if(null!=ua.replies)for(var qa=0;qa<ua.replies.length;qa++)va=va.nextSibling,aa(ua.replies[qa])}var la=[],va=K;aa(X);return{pdiv:va,replies:la}}function B(aa,la,va,ua,qa){function Ba(){F(Ea);
+X.addReply(Aa,function(pa){Aa.id=pa;X.replies.push(Aa);c(Ea);va&&va()},function(pa){ya();J(Ea);b.handleError(pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ua,qa)}function ya(){G(Aa,Ea,function(pa){Ba()},!0)}var La=k().pdiv,Aa=b.newComment(aa,b.getCurrentUser());Aa.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Ea=f(Aa,X.replies,La,da+1);la?ya():Ba()}if(W||!X.isResolved){L.style.display="none";var K=document.createElement("div");K.className="geCommentContainer";K.setAttribute("data-commentId",
+X.id);K.style.marginLeft=20*da+5+"px";X.isResolved&&(D.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=X.user&&null!=X.user.pictureUrl?X.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=X.user?X.user.displayName:
+mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",X.id);R(X,U);P.appendChild(U);K.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,X.content||"");K.appendChild(T);X.isLocked&&(K.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";T.appendChild(Y);l||X.isLocked||0!=da&&
+!t||S(mxResources.get("reply"),function(){B("",!0)},X.isResolved);P=b.getCurrentUser();null==P||null==X.user||P.id!=X.user.id||l||X.isLocked||(S(mxResources.get("edit"),function(){function aa(){G(X,K,function(){F(K);X.editComment(X.content,function(){c(K)},function(la){J(K);aa();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},X.isResolved),S(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(K);X.deleteComment(function(aa){if(!0===
+aa){aa=K.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var la=K.querySelectorAll(".geCommentAction");for(aa=0;aa<la.length;aa++)la[aa].parentNode.removeChild(la[aa]);c(K);K.style.opacity="0.5"}else{la=k(X).replies;for(aa=0;aa<la.length;aa++)N.removeChild(la[aa]);for(aa=0;aa<ca.length;aa++)if(ca[aa]==X){ca.splice(aa,1);break}L.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(aa){J(K);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+X.isResolved));l||X.isLocked||0!=da||S(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function la(){var va=aa.target;va.innerText="";X.isResolved=!X.isResolved;mxUtils.write(va,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ua=X.isResolved?"none":"",qa=k(X).replies,Ba="light-dark("+(X.isResolved?"ghostWhite":"white")+", transparent)",ya=0;ya<qa.length;ya++){qa[ya].style.backgroundColor=Ba;for(var La=qa[ya].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<La.length;Aa++)La[Aa]!=va.parentNode&&(La[Aa].style.display=ua);fa||(qa[ya].style.display="none")}A()}X.isResolved?B(mxResources.get("reOpened")+": ",!0,la,!1,!0):B(mxResources.get("markedAsResolved"),!1,la,!0)});K.appendChild(T);null!=ka?N.insertBefore(K,ka.nextSibling):N.appendChild(K);for(ka=0;null!=X.replies&&ka<X.replies.length;ka++)T=X.replies[ka],T.isResolved=X.isResolved,f(T,X.replies,null,da+1,W);null!=q&&(q.comment.id==X.id?(W=X.content,X.content=q.comment.content,G(X,K,q.saveCallback,
+q.deleteOnCancel),X.content=W):null==q.comment.id&&q.comment.pCommentId==X.id&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return K}}var l=!b.canComment(),t=b.canReplyToReplies(),q=null,D=document.createElement("div");D.className="geCommentsWin";var H=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.bottom=parseInt(H)+7+"px";D.appendChild(N);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(L,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=H;I.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!l){var Z=H.cloneNode();Z.style.backgroundImage="url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(X){function ca(){G(ka,da,function(W){F(da);b.addComment(W,function(S){W.id=S;ba.push(W);
+c(da)},function(S){J(da);ca();b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ka=b.newComment("",b.getCurrentUser()),da=f(ka,ba,null,0);ca();X.preventDefault();mxEvent.consume(X)});I.appendChild(Z)}var ia=H.cloneNode();ia.style.backgroundImage="url("+Editor.checkImage+")";ia.setAttribute("title",mxResources.get("showResolved"));var fa=!1;mxEvent.addListener(ia,"click",function(X){(fa=!fa)?ia.classList.add("geActiveItem"):ia.classList.remove("geActiveItem");
+na();X.preventDefault();mxEvent.consume(X)});I.appendChild(ia);b.commentsRefreshNeeded()&&(Z=H.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(X){na();X.preventDefault();mxEvent.consume(X)}),I.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className=
+"geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(X){n();X.preventDefault();mxEvent.consume(X)}),I.appendChild(H));D.appendChild(I);var ba=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var X=q.div.querySelector(".geCommentEditTxtArea"),ca=q.div.querySelector(".geCommentEditBtns");q.comment.content=X.value;X.parentNode.removeChild(X);ca.parentNode.removeChild(ca)}catch(ka){b.handleError(ka)}N.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(ka){function da(W){if(null!=W){W.sort(function(k,B){return new Date(k.modifiedDate)-new Date(B.modifiedDate)});for(var S=0;S<W.length;S++)da(W[S].replies)}}ka.sort(function(W,S){return new Date(W.modifiedDate)-new Date(S.modifiedDate)});N.innerText="";N.appendChild(L);L.style.display="block";ba=ka;for(ka=0;ka<ba.length;ka++)da(ba[ka].replies),
+f(ba[ka],ba,null,0,fa);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(ka){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ka&&ka.message?": "+ka.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;I=mxUtils.bind(this,function(){function X(S){var k=ka[S.id];if(null!=k)for(R(S,k),k=0;null!=S.replies&&k<S.replies.length;k++)X(S.replies[k])}
+if(this.window.isVisible()){for(var ca=N.querySelectorAll(".geCommentDate"),ka={},da=0;da<ca.length;da++){var W=ca[da];ka[W.getAttribute("data-commentId")]=W}for(da=0;da<ba.length;da++)X(ba[da])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=new mxWindow(mxResources.get("comments"),D,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,n,A,G,R,F,J){var c=document.createElement("div");c.style.textAlign="center";J=null!=J?J:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=J+"px";f.style.lineHeight="1.2em";mxUtils.write(f,e);c.appendChild(f);null!=F&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",e=document.createElement("img"),
e.setAttribute("src",F),f.appendChild(e),c.appendChild(f));F=document.createElement("div");F.style.textAlign="center";F.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(l.checked)});n.className="geBtn";null!=G&&(n.innerHTML=G+"<br>"+n.innerHTML,n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");
-b.editor.cancelFirst&&F.appendChild(n);var t=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});F.appendChild(t);null!=A?(t.innerHTML=A+"<br>"+t.innerHTML+"<br>",t.style.display="inline-block",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||F.appendChild(n);c.appendChild(F);S?(F.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop=
+b.editor.cancelFirst&&F.appendChild(n);var t=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});F.appendChild(t);null!=A?(t.innerHTML=A+"<br>"+t.innerHTML+"<br>",t.style.display="inline-block",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||F.appendChild(n);c.appendChild(F);R?(F.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop=
"20px",f.style.marginBottom="0px",f.appendChild(l),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),f.appendChild(v),c.appendChild(f),mxEvent.addListener(v,"click",function(q){l.checked=!l.checked;mxEvent.consume(q)})):F.style.marginTop="12px";this.init=function(){t.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);
HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}
@@ -4036,7 +4037,7 @@ function(){var A=g.apply(this,arguments);null!=v.currentPage&&m!=v.currentPage&&
this.editor.addListener("pageSelected",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};
EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.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!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:A,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,m,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
@@ -4060,7 +4061,7 @@ EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(v){this.handleError(v)}return b};
EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var n={},A=m.createCellLookup([m.model.root]);g=new DiagramPage(v);g.root=m.cloneCell(m.model.root,null,n);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(n,A),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);
-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
+g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(v){e.push(mxResources.get("pageWithNumber",[m+1])+": "+v.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(v){}throw b;}return g};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -4077,88 +4078,87 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(v,n){this.menus.get("pages").funct(v,n)}));e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),m=mxEvent.getClientY(b);e.popup(g,
m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),v=b.getId();g.setAttribute("title",m+(null!=v?" ("+v+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.style.backgroundImage="url("+Editor.thinExpandImage+")";m.className="geButton";e.appendChild(m);var v=!1,n=!1,A=mxUtils.bind(this,function(S){v=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||n||this.selectPage(b)}),G=mxUtils.bind(this,
-function(S){if(!g.isMouseDown&&(n&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));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 K=mxEvent.getClientX(S),c=mxEvent.getClientY(S);F.popup(K,c,null,S);
-this.setCurrentMenu(F,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(R){this.renamePage(b);mxEvent.consume(R)}));var m=document.createElement("div");m.style.backgroundImage="url("+Editor.thinExpandImage+")";m.className="geButton";e.appendChild(m);var v=!1,n=!1,A=mxUtils.bind(this,function(R){v=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||n||this.selectPage(b)}),G=mxUtils.bind(this,
+function(R){if(!g.isMouseDown&&(n&&(mxEvent.isTouchEvent(R)||mxEvent.getSource(R)==m)||mxEvent.isPopupTrigger(R))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(R)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));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 J=mxEvent.getClientX(R),c=mxEvent.getClientY(R);F.popup(J,c,null,R);
+this.setCurrentMenu(F,e)}mxEvent.consume(R)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));this.editor.graph.isEnabled()&&(g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),
m),g.addSeparator(m),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m))})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(v,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?n:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};
b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var v=g.ownerDocument.createElement("diagram");v.setAttribute("id",g.getAttribute("relatedPage"));v.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(v);v=g.getAttribute("viewState");null!=v&&(m.relatedPage.viewState=JSON.parse(v),g.removeAttribute("viewState"));g=g.cloneNode(!0);v=g.firstChild;if(null!=v)for(m.relatedPage.root=e.decodeCell(v,!1),m=
-v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var n=v.getAttribute("id");null==e.lookup(n)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,n,A,G){v=null!=v?v:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=n.slice(),F=0;F<n.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[F]),"treeFolding","0")&&this.foldTreeCell(m,n[F]);n=S;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var n=
-[];this.traverse(v,!0,mxUtils.bind(this,function(G,S){var F=null!=S&&this.isTreeEdge(S);F&&n.push(S);G==v||null!=S&&!F||n.push(G);return(null==S||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<n.length;A++)this.model.setVisible(n[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,n,A,G,S){return this.model.filterCells(this.getEdges(m,v,n,A,G,S),mxUtils.bind(this,
-function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!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(ca){return q.isVertex(ca)&&n(ca)}function v(ca){var la=!1;null!=ca&&
-(la="1"==t.getCurrentCellStyle(ca).treeMoving);return la}function n(ca){var la=!1;null!=ca&&(ca=q.getParent(ca),la=t.view.getState(ca),la="tree"==(null!=la?la.style:t.getCellStyle(ca)).containerType);return la}function A(ca){var la=!1;null!=ca&&(ca=q.getParent(ca),la=t.view.getState(ca),t.view.getState(ca),la=null!=(null!=la?la.style:t.getCellStyle(ca)).childLayout);return la}function G(ca){ca=t.view.getState(ca);if(null!=ca){var la=t.getIncomingTreeEdges(ca.cell);if(0<la.length&&(la=t.view.getState(la[0]),
-null!=la&&(la=la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==ca.y&&Math.abs(la.x-ca.getCenterX())<ca.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==ca.y+ca.height&&Math.abs(la.x-ca.getCenterX())<ca.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>ca.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(ca,la){la=null!=la?la:!0;t.model.beginUpdate();try{var Q=t.model.getParent(ca),k=t.getIncomingTreeEdges(ca),B=t.cloneCells([k[0],
-ca]);t.model.setTerminal(B[0],t.model.getTerminal(k[0],!0),!0);var I=G(ca),U=Q.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?B[1].geometry.x+=la?ca.geometry.width+10:-B[1].geometry.width-10:B[1].geometry.y+=la?ca.geometry.height+10:-B[1].geometry.height-10;t.view.currentRoot!=Q&&(B[1].geometry.x-=U.x,B[1].geometry.y-=U.y);var P=t.view.getState(ca),T=t.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?
-X.x+=(la?ca.geometry.width+10:-B[1].geometry.width-10)*T:X.y+=(la?ca.geometry.height+10:-B[1].geometry.height-10)*T;var Z=t.getOutgoingTreeEdges(t.model.getTerminal(k[0],!0));if(null!=Z){for(var ka=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,va=U=k=0;va<Z.length;va++){var ua=t.model.getTerminal(Z[va],!1);if(I==G(ua)){var qa=t.view.getState(ua);ua!=ca&&null!=qa&&(ka&&la!=qa.getCenterX()<P.getCenterX()||!ka&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,
-(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,qa.x))/T),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/T))}}ka?U=0:k=0;for(va=0;va<Z.length;va++)if(ua=t.model.getTerminal(Z[va],!1),I==G(ua)&&(qa=t.view.getState(ua),ua!=ca&&null!=qa&&(ka&&la!=qa.getCenterX()<P.getCenterX()||!ka&&la!=qa.getCenterY()<P.getCenterY()))){var Ba=[];t.traverse(qa.cell,!0,function(ya,La){var za=null!=La&&t.isTreeEdge(La);za&&Ba.push(La);(null==La||za)&&Ba.push(ya);return null==La||za});t.moveCells(Ba,
-(la?1:-1)*k,(la?1:-1)*U)}}}return t.addCells(B,Q)}finally{t.model.endUpdate()}}function F(ca){t.model.beginUpdate();try{var la=G(ca),Q=t.getIncomingTreeEdges(ca),k=t.cloneCells([Q[0],ca]);t.model.setTerminal(Q[0],k[1],!1);t.model.setTerminal(k[0],k[1],!0);t.model.setTerminal(k[0],ca,!1);var B=t.model.getParent(ca),I=B.geometry,U=[];t.view.currentRoot!=B&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);t.traverse(ca,!0,function(X,Z){var ka=null!=Z&&t.isTreeEdge(Z);ka&&U.push(Z);(null==Z||ka)&&U.push(X);
-return null==Z||ka});var P=ca.geometry.width+40,T=ca.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);t.moveCells(U,P,T);return t.addCells(k,B)}finally{t.model.endUpdate()}}function K(ca,la){t.model.beginUpdate();try{var Q=t.model.getParent(ca),k=t.getIncomingTreeEdges(ca),B=G(ca);0==k.length&&(k=[t.createEdge(Q,null,"",null,null,t.createCurrentEdgeStyle())],B=la);var I=
-t.cloneCells([k[0],ca]);t.model.setTerminal(I[0],ca,!0);null==t.model.getTerminal(I[0],!1)&&(t.model.setTerminal(I[0],I[1],!1),t.applyNewEdgeStyle(I[1],[I[0]],B));k=t.getOutgoingTreeEdges(ca);var U=Q.geometry;la=[];t.view.currentRoot==Q&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=t.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var X=t.view.getBounds(la),Z=t.view.translate,ka=t.view.scale;B==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?ca.geometry.x+(ca.geometry.width-I[1].geometry.width)/
-2:(X.x+X.width)/ka-Z.x-U.x+10,I[1].geometry.y+=I[1].geometry.height-U.y+40):B==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?ca.geometry.x+(ca.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ka-Z.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=B==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?ca.geometry.y+(ca.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ka-Z.y+
--U.y+10);return t.addCells(I,Q)}finally{t.model.endUpdate()}}function c(ca,la,Q){ca=t.getOutgoingTreeEdges(ca);Q=t.view.getState(Q);var k=[];if(null!=Q&&null!=ca){for(var B=0;B<ca.length;B++){var I=t.view.getState(t.model.getTerminal(ca[B],!1));null!=I&&(!la&&Math.min(I.x+I.width,Q.x+Q.width)>=Math.max(I.x,Q.x)||la&&Math.min(I.y+I.height,Q.y+Q.height)>=Math.max(I.y,Q.y))&&k.push(I)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function f(ca,la){var Q=
-G(ca),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==k&&Q!=la?l.actions.get("selectParent").funct():Q==la?(la=t.getOutgoingTreeEdges(ca),null!=la&&0<la.length&&t.setSelectionCell(t.model.getTerminal(la[0],!1))):(Q=t.getIncomingTreeEdges(ca),null!=Q&&0<Q.length&&(k=c(t.model.getTerminal(Q[0],!0),k,ca),ca=t.view.getState(ca),null!=ca&&(ca=mxUtils.indexOf(k,ca),0<=ca&&(ca+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?
--1:1,0<=ca&&ca<=k.length-1&&t.setSelectionCell(k[ca].cell)))))}var l=this,t=l.editor.graph,q=t.getModel(),D=l.menus.createPopupMenu;l.menus.createPopupMenu=function(ca,la,Q){D.apply(this,arguments);if(1==t.getSelectionCount()){la=t.getSelectionCell();var k=t.getOutgoingTreeEdges(la);ca.addSeparator();0<k.length&&(m(t.getSelectionCell())&&this.addMenuItems(ca,["selectChildren"],null,Q),this.addMenuItems(ca,["selectDescendants"],null,Q));m(t.getSelectionCell())?(ca.addSeparator(),0<t.getIncomingTreeEdges(la).length&&
-this.addMenuItems(ca,["selectSiblings","selectParent"],null,Q)):0<t.model.getEdgeCount(la)&&this.addMenuItems(ca,["selectConnections"],null,Q)}};l.actions.addAction("selectChildren",function(ca){if(t.isEnabled()&&1==t.getSelectionCount()){var la=t.getSelectionCell();ca=mxEvent.isControlDown(ca)?null:t.getOutgoingTreeEdges(la);if(null!=ca&&0<ca.length){la=[];for(var Q=0;Q<ca.length;Q++)la.push(t.model.getTerminal(ca[Q],!1));t.setSelectionCells(la)}else t.setSelectionCells(t.model.getChildren(la))}},
-null,null,"Alt+Shift+C");l.actions.addAction("selectDescendants",function(ca){var la=t.getSelectionCell();if(t.isEnabled()&&null!=la){var Q=[];mxEvent.isControlDown(ca)||t.traverse(la,!0,function(k,B){var I=null!=B&&t.isTreeEdge(B);I&&mxEvent.isControlDown(ca)&&Q.push(B);(null==B||I)&&Q.push(k);return null==B||I});if(0==Q.length||1==Q.length&&Q[0]==la)Q=t.model.getDescendants(la);t.setSelectionCells(Q)}},null,null,"Alt+Shift+X");l.actions.addAction("selectParent",function(ca){var la=t.getSelectionCell();
-t.isEnabled()&&null!=la&&(ca=mxEvent.isControlDown(ca)?null:t.getIncomingTreeEdges(la),null!=ca&&0<ca.length?t.setSelectionCell(t.model.getTerminal(ca[0],!0)):t.selectParentCell())},null,null,"Alt+Shift+P");l.actions.addAction("selectSiblings",function(ca){if(t.isEnabled()&&1==t.getSelectionCount()){var la=t.getSelectionCell(),Q=mxEvent.isControlDown(ca)?null:t.getIncomingTreeEdges(la);ca=[];if(null!=Q&&0<Q.length&&(Q=t.getOutgoingTreeEdges(t.model.getTerminal(Q[0],!0)),null!=Q))for(var k=0;k<Q.length;k++)ca.push(t.model.getTerminal(Q[k],
-!1));0==ca.length&&(ca=t.model.getChildren(t.model.getParent(la)));t.setSelectionCells(ca)}},null,null,"Alt+Shift+S");var H=t.removeCells;t.removeCells=function(ca,la){la=null!=la?la:!0;null==ca&&(ca=this.getDeletableCells(this.getSelectionCells()));la&&(ca=this.getDeletableCells(this.addAllEdges(ca)));for(var Q=[],k=0;k<ca.length;k++){var B=ca[k];q.isEdge(B)&&n(B)&&(Q.push(B),B=q.getTerminal(B,!1));if(m(B)){var I=[];t.traverse(B,!0,function(U,P){var T=null!=P&&t.isTreeEdge(P);T&&I.push(P);(null==
-P||T)&&I.push(U);return null==P||T});0<I.length&&(Q=Q.concat(I),B=t.getIncomingTreeEdges(ca[k]),ca=ca.concat(B))}else null!=B&&Q.push(ca[k])}ca=Q;return H.apply(this,arguments)};l.hoverIcons.getStateAt=function(ca,la,Q){return m(ca.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Q))};var N=t.duplicateCells;t.duplicateCells=function(ca,la){ca=null!=ca?ca:this.getSelectionCells();for(var Q=ca.slice(0),k=0;k<Q.length;k++){var B=t.view.getState(Q[k]);if(null!=B&&m(B.cell)){var I=t.getIncomingTreeEdges(B.cell);
-for(B=0;B<I.length;B++)mxUtils.remove(I[B],ca)}}this.model.beginUpdate();try{var U=N.call(this,ca,la);if(U.length==ca.length)for(k=0;k<ca.length;k++)if(m(ca[k])){var P=t.getIncomingTreeEdges(U[k]);I=t.getIncomingTreeEdges(ca[k]);if(0==P.length&&0<I.length){var T=this.cloneCell(I[0]);this.addEdge(T,t.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var L=t.moveCells;t.moveCells=function(ca,la,Q,k,B,I,U){for(var P=null,T=[],X=0;X<ca.length;X++)(v(ca[X])||
-m(ca[X]))&&!A(ca[X])&&this.isCellCollapsed(ca[X])?T=T.concat(this.getSubtree(ca[X])):T.push(ca[X]);ca=mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=B;var Z=this.getCurrentCellStyle(B);if(null!=ca&&m(B)&&"1"==mxUtils.getValue(Z,"treeFolding","0")){for(X=0;X<ca.length;X++)if(m(ca[X])||t.model.isEdge(ca[X])&&null==t.model.getTerminal(ca[X],!0)){B=t.model.getParent(ca[X]);break}if(null!=T&&B!=T&&null!=this.view.getState(ca[0])){var ka=t.getIncomingTreeEdges(ca[0]);if(0<ka.length){var va=
-t.view.getState(t.model.getTerminal(ka[0],!0));if(null!=va){var ua=t.view.getState(T);null!=ua&&(la=(ua.getCenterX()-va.getCenterX())/t.view.scale,Q=(ua.getCenterY()-va.getCenterY())/t.view.scale)}}}}P=L.apply(this,arguments);if(null!=P&&null!=ca&&P.length==ca.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],T,!0);else if(m(ca[X])&&(ka=t.getIncomingTreeEdges(ca[X]),0<ka.length))if(!k)m(T)&&0>mxUtils.indexOf(ca,
-this.model.getTerminal(ka[0],!0))&&this.model.setTerminal(ka[0],T,!0);else if(0==t.getIncomingTreeEdges(P[X]).length){Z=T;if(null==Z||Z==t.model.getParent(ca[X]))Z=t.model.getTerminal(ka[0],!0);k=this.cloneCell(ka[0]);this.addEdge(k,t.getDefaultParent(),Z,P[X])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var J=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(ca,la,Q,k){var B=t.model,I=null;B.beginUpdate();try{if(I=J.apply(this,arguments),m(ca))for(var U=0;U<I.length;U++)if(B.isEdge(I[U])&&
-null==B.getTerminal(I[U],!0)){B.setTerminal(I[U],ca,!0);var P=t.getCellGeometry(I[U]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{B.endUpdate()}return I}}var Y={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ha={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},ea=l.onKeyDown;l.onKeyDown=function(ca){try{var la=t.getSelectionCell();if(t.isEnabled()&&!t.isEditing()&&
-null!=la){var Q=mxEvent.isAltDown(ca)&&mxEvent.isShiftDown(ca)?Y[ca.keyCode]:mxEvent.isAltDown(ca)?ha[ca.keyCode]:null;null!=Q?(Q.funct(ca),mxEvent.consume(ca)):m(la)&&(Q=null,0<t.getIncomingTreeEdges(la).length&&(9==ca.which?Q=mxEvent.isShiftDown(ca)?F(la):K(la):13==ca.which&&(Q=S(la,!mxEvent.isShiftDown(ca)))),null!=Q&&0<Q.length?(1==Q.length&&t.model.isEdge(Q[0])?t.setSelectionCell(t.model.getTerminal(Q[0],!1)):t.setSelectionCell(Q[Q.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(t.view.getState(la)),
-t.startEditingAtCell(la),mxEvent.consume(ca)):37==ca.keyCode?(f(la,mxConstants.DIRECTION_WEST),mxEvent.consume(ca)):38==ca.keyCode?(f(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(ca)):39==ca.keyCode?(f(la,mxConstants.DIRECTION_EAST),mxEvent.consume(ca)):40==ca.keyCode&&(f(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(ca)))}}catch(k){l.handleError(k)}mxEvent.isConsumed(ca)||ea.apply(this,arguments)};var aa=t.connectVertex;t.connectVertex=function(ca,la,Q,k,B,I,U){var P=t.getIncomingTreeEdges(ca);
-if(m(ca)){var T=G(ca),X=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return T==la||0==P.length?K(ca,la):X==Z?F(ca):S(ca,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};t.getSubtree=function(ca){var la=[ca];!v(ca)&&!m(ca)||A(ca)||t.traverse(ca,!0,function(Q,k){var B=null!=k&&t.isTreeEdge(k);B&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||B)&&0>mxUtils.indexOf(la,Q)&&la.push(Q);
-return null==k||B});return la};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){na.apply(this,arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor=
-"pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(ca){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca);this.graph.isMouseDown=!0;l.hoverIcons.reset();
-mxEvent.consume(ca)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var W=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){W.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>
-this.state.height?10:0)+2+"px")};var ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(ca){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=ca?"":"none")};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(ca,la){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;
-Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,n=this;return m.concat([this.addEntry("tree container",function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var S=
-new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(S);return n.createVertexTemplateFromCells([A],
-A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-G.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var K=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-K.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);K.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var n=v.getAttribute("id");null==e.lookup(n)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,n,A,G){v=null!=v?v:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var R=n.slice(),F=0;F<n.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[F]),"treeFolding","0")&&this.foldTreeCell(m,n[F]);n=R;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var n=
+[];this.traverse(v,!0,mxUtils.bind(this,function(G,R){var F=null!=R&&this.isTreeEdge(R);F&&n.push(R);G==v||null!=R&&!F||n.push(G);return(null==R||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<n.length;A++)this.model.setVisible(n[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,n,A,G,R){return this.model.filterCells(this.getEdges(m,v,n,A,G,R),mxUtils.bind(this,
+function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!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(da){return q.isVertex(da)&&n(da)}function v(da){var W=!1;null!=da&&
+(W="1"==t.getCurrentCellStyle(da).treeMoving);return W}function n(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),W="tree"==(null!=W?W.style:t.getCellStyle(da)).containerType);return W}function A(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),t.view.getState(da),W=null!=(null!=W?W.style:t.getCellStyle(da)).childLayout);return W}function G(da){da=t.view.getState(da);if(null!=da){var W=t.getIncomingTreeEdges(da.cell);if(0<W.length&&(W=t.view.getState(W[0]),null!=W&&
+(W=W.absolutePoints,null!=W&&0<W.length&&(W=W[W.length-1],null!=W)))){if(W.y==da.y&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_SOUTH;if(W.y==da.y+da.height&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_NORTH;if(W.x>da.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(da,W){W=null!=W?W:!0;t.model.beginUpdate();try{var S=t.model.getParent(da),k=t.getIncomingTreeEdges(da),B=t.cloneCells([k[0],da]);t.model.setTerminal(B[0],
+t.model.getTerminal(k[0],!0),!0);var K=G(da),T=S.geometry;K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?B[1].geometry.x+=W?da.geometry.width+10:-B[1].geometry.width-10:B[1].geometry.y+=W?da.geometry.height+10:-B[1].geometry.height-10;t.view.currentRoot!=S&&(B[1].geometry.x-=T.x,B[1].geometry.y-=T.y);var P=t.view.getState(da),U=t.view.scale;if(null!=P){var Y=mxRectangle.fromRectangle(P);K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?Y.x+=(W?da.geometry.width+10:-B[1].geometry.width-
+10)*U:Y.y+=(W?da.geometry.height+10:-B[1].geometry.height-10)*U;var aa=t.getOutgoingTreeEdges(t.model.getTerminal(k[0],!0));if(null!=aa){for(var la=K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH,va=T=k=0;va<aa.length;va++){var ua=t.model.getTerminal(aa[va],!1);if(K==G(ua)){var qa=t.view.getState(ua);ua!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(Y,qa)&&(k=10+Math.max(k,(Math.min(Y.x+Y.width,qa.x+qa.width)-Math.max(Y.x,
+qa.x))/U),T=10+Math.max(T,(Math.min(Y.y+Y.height,qa.y+qa.height)-Math.max(Y.y,qa.y))/U))}}la?T=0:k=0;for(va=0;va<aa.length;va++)if(ua=t.model.getTerminal(aa[va],!1),K==G(ua)&&(qa=t.view.getState(ua),ua!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY()))){var Ba=[];t.traverse(qa.cell,!0,function(ya,La){var Aa=null!=La&&t.isTreeEdge(La);Aa&&Ba.push(La);(null==La||Aa)&&Ba.push(ya);return null==La||Aa});t.moveCells(Ba,(W?1:-1)*k,(W?1:-1)*T)}}}return t.addCells(B,
+S)}finally{t.model.endUpdate()}}function F(da){t.model.beginUpdate();try{var W=G(da),S=t.getIncomingTreeEdges(da),k=t.cloneCells([S[0],da]);t.model.setTerminal(S[0],k[1],!1);t.model.setTerminal(k[0],k[1],!0);t.model.setTerminal(k[0],da,!1);var B=t.model.getParent(da),K=B.geometry,T=[];t.view.currentRoot!=B&&(k[1].geometry.x-=K.x,k[1].geometry.y-=K.y);t.traverse(da,!0,function(Y,aa){var la=null!=aa&&t.isTreeEdge(aa);la&&T.push(aa);(null==aa||la)&&T.push(Y);return null==aa||la});var P=da.geometry.width+
+40,U=da.geometry.height+40;W==mxConstants.DIRECTION_SOUTH?P=0:W==mxConstants.DIRECTION_NORTH?(P=0,U=-U):W==mxConstants.DIRECTION_WEST?(P=-P,U=0):W==mxConstants.DIRECTION_EAST&&(U=0);t.moveCells(T,P,U);return t.addCells(k,B)}finally{t.model.endUpdate()}}function J(da,W){t.model.beginUpdate();try{var S=t.model.getParent(da),k=t.getIncomingTreeEdges(da),B=G(da);0==k.length&&(k=[t.createEdge(S,null,"",null,null,t.createCurrentEdgeStyle())],B=W);var K=t.cloneCells([k[0],da]);t.model.setTerminal(K[0],da,
+!0);null==t.model.getTerminal(K[0],!1)&&(t.model.setTerminal(K[0],K[1],!1),t.applyNewEdgeStyle(K[1],[K[0]],B));k=t.getOutgoingTreeEdges(da);var T=S.geometry;W=[];t.view.currentRoot==S&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=t.model.getTerminal(k[P],!1);null!=U&&W.push(U)}var Y=t.view.getBounds(W),aa=t.view.translate,la=t.view.scale;B==mxConstants.DIRECTION_SOUTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x-T.x+10,K[1].geometry.y+=
+K[1].geometry.height-T.y+40):B==mxConstants.DIRECTION_NORTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x+-T.x+10,K[1].geometry.y-=K[1].geometry.height+T.y+40):(K[1].geometry.x=B==mxConstants.DIRECTION_WEST?K[1].geometry.x-(K[1].geometry.width+T.x+40):K[1].geometry.x+(K[1].geometry.width-T.x+40),K[1].geometry.y=null==Y?da.geometry.y+(da.geometry.height-K[1].geometry.height)/2:(Y.y+Y.height)/la-aa.y+-T.y+10);return t.addCells(K,S)}finally{t.model.endUpdate()}}
+function c(da,W,S){da=t.getOutgoingTreeEdges(da);S=t.view.getState(S);var k=[];if(null!=S&&null!=da){for(var B=0;B<da.length;B++){var K=t.view.getState(t.model.getTerminal(da[B],!1));null!=K&&(!W&&Math.min(K.x+K.width,S.x+S.width)>=Math.max(K.x,S.x)||W&&Math.min(K.y+K.height,S.y+S.height)>=Math.max(K.y,S.y))&&k.push(K)}k.sort(function(T,P){return W?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function f(da,W){var S=G(da),k=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;
+(S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST)==k&&S!=W?l.actions.get("selectParent").funct():S==W?(W=t.getOutgoingTreeEdges(da),null!=W&&0<W.length&&t.setSelectionCell(t.model.getTerminal(W[0],!1))):(S=t.getIncomingTreeEdges(da),null!=S&&0<S.length&&(k=c(t.model.getTerminal(S[0],!0),k,da),da=t.view.getState(da),null!=da&&(da=mxUtils.indexOf(k,da),0<=da&&(da+=W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_WEST?-1:1,0<=da&&da<=k.length-1&&t.setSelectionCell(k[da].cell)))))}
+var l=this,t=l.editor.graph,q=t.getModel(),D=l.menus.createPopupMenu;l.menus.createPopupMenu=function(da,W,S){D.apply(this,arguments);if(1==t.getSelectionCount()){W=t.getSelectionCell();var k=t.getOutgoingTreeEdges(W);da.addSeparator();0<k.length&&(m(t.getSelectionCell())&&this.addMenuItems(da,["selectChildren"],null,S),this.addMenuItems(da,["selectDescendants"],null,S));m(t.getSelectionCell())?(da.addSeparator(),0<t.getIncomingTreeEdges(W).length&&this.addMenuItems(da,["selectSiblings","selectParent"],
+null,S)):0<t.model.getEdgeCount(W)&&this.addMenuItems(da,["selectConnections"],null,S)}};l.actions.addAction("selectChildren",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell();da=mxEvent.isControlDown(da)?null:t.getOutgoingTreeEdges(W);if(null!=da&&0<da.length){W=[];for(var S=0;S<da.length;S++)W.push(t.model.getTerminal(da[S],!1));t.setSelectionCells(W)}else t.setSelectionCells(t.model.getChildren(W))}},null,null,"Alt+Shift+C");l.actions.addAction("selectDescendants",
+function(da){var W=t.getSelectionCell();if(t.isEnabled()&&null!=W){var S=[];mxEvent.isControlDown(da)||t.traverse(W,!0,function(k,B){var K=null!=B&&t.isTreeEdge(B);K&&mxEvent.isControlDown(da)&&S.push(B);(null==B||K)&&S.push(k);return null==B||K});if(0==S.length||1==S.length&&S[0]==W)S=t.model.getDescendants(W);t.setSelectionCells(S)}},null,null,"Alt+Shift+X");l.actions.addAction("selectParent",function(da){var W=t.getSelectionCell();t.isEnabled()&&null!=W&&(da=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W),
+null!=da&&0<da.length?t.setSelectionCell(t.model.getTerminal(da[0],!0)):t.selectParentCell())},null,null,"Alt+Shift+P");l.actions.addAction("selectSiblings",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell(),S=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W);da=[];if(null!=S&&0<S.length&&(S=t.getOutgoingTreeEdges(t.model.getTerminal(S[0],!0)),null!=S))for(var k=0;k<S.length;k++)da.push(t.model.getTerminal(S[k],!1));0==da.length&&(da=t.model.getChildren(t.model.getParent(W)));
+t.setSelectionCells(da)}},null,null,"Alt+Shift+S");var H=t.removeCells;t.removeCells=function(da,W){W=null!=W?W:!0;null==da&&(da=this.getDeletableCells(this.getSelectionCells()));W&&(da=this.getDeletableCells(this.addAllEdges(da)));for(var S=[],k=0;k<da.length;k++){var B=da[k];q.isEdge(B)&&n(B)&&(S.push(B),B=q.getTerminal(B,!1));if(m(B)){var K=[];t.traverse(B,!0,function(T,P){var U=null!=P&&t.isTreeEdge(P);U&&K.push(P);(null==P||U)&&K.push(T);return null==P||U});0<K.length&&(S=S.concat(K),B=t.getIncomingTreeEdges(da[k]),
+da=da.concat(B))}else null!=B&&S.push(da[k])}da=S;return H.apply(this,arguments)};l.hoverIcons.getStateAt=function(da,W,S){return m(da.cell)?null:this.graph.view.getState(this.graph.getCellAt(W,S))};var N=t.duplicateCells;t.duplicateCells=function(da,W){da=null!=da?da:this.getSelectionCells();for(var S=da.slice(0),k=0;k<S.length;k++){var B=t.view.getState(S[k]);if(null!=B&&m(B.cell)){var K=t.getIncomingTreeEdges(B.cell);for(B=0;B<K.length;B++)mxUtils.remove(K[B],da)}}this.model.beginUpdate();try{var T=
+N.call(this,da,W);if(T.length==da.length)for(k=0;k<da.length;k++)if(m(da[k])){var P=t.getIncomingTreeEdges(T[k]);K=t.getIncomingTreeEdges(da[k]);if(0==P.length&&0<K.length){var U=this.cloneCell(K[0]);this.addEdge(U,t.getDefaultParent(),this.model.getTerminal(K[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var L=t.moveCells;t.moveCells=function(da,W,S,k,B,K,T){for(var P=null,U=[],Y=0;Y<da.length;Y++)(v(da[Y])||m(da[Y]))&&!A(da[Y])&&this.isCellCollapsed(da[Y])?U=U.concat(this.getSubtree(da[Y])):
+U.push(da[Y]);da=mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=B;var aa=this.getCurrentCellStyle(B);if(null!=da&&m(B)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(Y=0;Y<da.length;Y++)if(m(da[Y])||t.model.isEdge(da[Y])&&null==t.model.getTerminal(da[Y],!0)){B=t.model.getParent(da[Y]);break}if(null!=U&&B!=U&&null!=this.view.getState(da[0])){var la=t.getIncomingTreeEdges(da[0]);if(0<la.length){var va=t.view.getState(t.model.getTerminal(la[0],!0));if(null!=va){var ua=t.view.getState(U);
+null!=ua&&(W=(ua.getCenterX()-va.getCenterX())/t.view.scale,S=(ua.getCenterY()-va.getCenterY())/t.view.scale)}}}}P=L.apply(this,arguments);if(null!=P&&null!=da&&P.length==da.length)for(Y=0;Y<P.length;Y++)if(this.model.isEdge(P[Y]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[Y],!0))&&this.model.setTerminal(P[Y],U,!0);else if(m(da[Y])&&(la=t.getIncomingTreeEdges(da[Y]),0<la.length))if(!k)m(U)&&0>mxUtils.indexOf(da,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],U,!0);else if(0==
+t.getIncomingTreeEdges(P[Y]).length){aa=U;if(null==aa||aa==t.model.getParent(da[Y]))aa=t.model.getTerminal(la[0],!0);k=this.cloneCell(la[0]);this.addEdge(k,t.getDefaultParent(),aa,P[Y])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var I=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(da,W,S,k){var B=t.model,K=null;B.beginUpdate();try{if(K=I.apply(this,arguments),m(da))for(var T=0;T<K.length;T++)if(B.isEdge(K[T])&&null==B.getTerminal(K[T],!0)){B.setTerminal(K[T],da,!0);
+var P=t.getCellGeometry(K[T]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{B.endUpdate()}return K}}var Z={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ia={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},fa=l.onKeyDown;l.onKeyDown=function(da){try{var W=t.getSelectionCell();if(t.isEnabled()&&!t.isEditing()&&null!=W){var S=mxEvent.isAltDown(da)&&mxEvent.isShiftDown(da)?
+Z[da.keyCode]:mxEvent.isAltDown(da)?ia[da.keyCode]:null;null!=S?(S.funct(da),mxEvent.consume(da)):m(W)&&(S=null,0<t.getIncomingTreeEdges(W).length&&(9==da.which?S=mxEvent.isShiftDown(da)?F(W):J(W):13==da.which&&(S=R(W,!mxEvent.isShiftDown(da)))),null!=S&&0<S.length?(1==S.length&&t.model.isEdge(S[0])?t.setSelectionCell(t.model.getTerminal(S[0],!1)):t.setSelectionCell(S[S.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(t.view.getState(W)),t.startEditingAtCell(W),mxEvent.consume(da)):37==da.keyCode?
+(f(W,mxConstants.DIRECTION_WEST),mxEvent.consume(da)):38==da.keyCode?(f(W,mxConstants.DIRECTION_NORTH),mxEvent.consume(da)):39==da.keyCode?(f(W,mxConstants.DIRECTION_EAST),mxEvent.consume(da)):40==da.keyCode&&(f(W,mxConstants.DIRECTION_SOUTH),mxEvent.consume(da)))}}catch(k){l.handleError(k)}mxEvent.isConsumed(da)||fa.apply(this,arguments)};var ba=t.connectVertex;t.connectVertex=function(da,W,S,k,B,K,T){var P=t.getIncomingTreeEdges(da);if(m(da)){var U=G(da),Y=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,
+aa=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;return U==W||0==P.length?J(da,W):Y==aa?F(da):R(da,W!=mxConstants.DIRECTION_NORTH&&W!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};t.getSubtree=function(da){var W=[da];!v(da)&&!m(da)||A(da)||t.traverse(da,!0,function(S,k){var B=null!=k&&t.isTreeEdge(k);B&&0>mxUtils.indexOf(W,k)&&W.push(k);(null==k||B)&&0>mxUtils.indexOf(W,S)&&W.push(S);return null==k||B});return W};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=
+function(){na.apply(this,arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(da){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(da),mxEvent.getClientY(da),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(da);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(da)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var X=
+mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){X.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(da){ca.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=da?"":"none")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(da,W){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,n=this;return m.concat([this.addEntry("tree container",
+function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var R=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(R);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var R=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);var J=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+J.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);J.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),F.style);l.geometry.relative=!0;l.edge=!0;G.insertEdge(l,!0);f.insertEdge(l,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),F.style);q.geometry.relative=!0;q.edge=!0;G.insertEdge(q,!0);t.insertEdge(q,!1);A.insert(F);A.insert(c);A.insert(l);A.insert(q);A.insert(G);A.insert(S);A.insert(K);A.insert(f);A.insert(t);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),F.style);q.geometry.relative=!0;q.edge=!0;G.insertEdge(q,!0);t.insertEdge(q,!1);A.insert(F);A.insert(c);A.insert(l);A.insert(q);A.insert(G);A.insert(R);A.insert(J);A.insert(f);A.insert(t);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
A.vertex=!0;return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var A=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var A=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree orgchart organization division",function(){var A=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=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"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var K=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"};');K.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;G.insertEdge(c,!0);K.insertEdge(c,!1);A.insert(F);A.insert(c);A.insert(G);A.insert(S);A.insert(K);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=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"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return n.createVertexTemplateFromCells([A],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var R=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"};');R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);var J=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"};');J.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;G.insertEdge(c,!0);J.insertEdge(c,!1);A.insert(F);A.insert(c);A.insert(G);A.insert(R);A.insert(J);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=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"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return n.createVertexTemplateFromCells([A],
A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree division",function(){var A=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"};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree sub sections",function(){var A=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;S.insertEdge(F,!1);return n.createVertexTemplateFromCells([G,F,A,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(K,c){if(EditorUi.windowed){var f=K.editor.graph;f.popupMenuHandler.hideMenu();null==K.formatWindow?(K.formatWindow=new WrapperWindow(K,"",Math.max(10,K.diagramContainer.clientWidth-248),60,240,Math.min(566,f.container.clientHeight-10),function(l){l.className="geSidebarContainer geFormatContainer";K.createFormat(l).init()}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.formatWindow.window.setTitle(mxResources.get("format"))})),K.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){K.formatWindow.window.fit()})),K.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):K.formatWindow.window.setVisible(null!=c?c:!K.formatWindow.window.isVisible())}else null==K.formatElt&&(K.formatElt=K.createSidebarContainer(),K.createFormat(K.formatElt).init(),K.formatElt.style.border="none",K.formatElt.style.width="240px",K.formatElt.style.borderLeftWidth="1px",K.formatElt.style.borderLeftStyle="solid",K.formatElt.style.right="0px"),c=K.diagramContainer.parentNode,
-null!=K.formatElt.parentNode?(K.formatElt.parentNode.removeChild(K.formatElt),c.style.right="0px"):(c.parentNode.appendChild(K.formatElt),c.style.right=K.formatElt.style.width)}function e(K,c){if(EditorUi.windowed){var f=K.editor.graph;f.popupMenuHandler.hideMenu();null==K.sidebarWindow?(K.sidebarWindow=new WrapperWindow(K,"",10,56,Math.min(f.container.clientWidth-10,218)-6,Math.min(f.container.clientHeight-40,650)-6,function(l){K.createShapesPanel(l)}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
-K.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){K.sidebarWindow.window.fit()})),K.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),K.sidebarWindow.window.setVisible(!0),isLocalStorage&&K.getLocalData("sidebar",function(l){K.sidebar.showEntries(l,null,!0)}),K.restoreLibraries()):K.sidebarWindow.window.setVisible(null!=c?c:!K.sidebarWindow.window.isVisible())}else null==K.sidebarElt&&(K.sidebarElt=K.createSidebarContainer(),K.createShapesPanel(K.sidebarElt),K.sidebarElt.style.border=
-"none",K.sidebarElt.style.width="210px",K.sidebarElt.style.borderRight="1px solid gray"),c=K.diagramContainer.parentNode,null!=K.sidebarElt.parentNode?(K.sidebarElt.parentNode.removeChild(K.sidebarElt),c.style.left="0px"):(c.parentNode.appendChild(K.sidebarElt),c.style.left=K.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth}catch(K){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
+G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var R=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;R.insertEdge(F,!1);return n.createVertexTemplateFromCells([G,F,A,R],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(J,c){if(EditorUi.windowed){var f=J.editor.graph;f.popupMenuHandler.hideMenu();null==J.formatWindow?(J.formatWindow=new WrapperWindow(J,"",Math.max(10,J.diagramContainer.clientWidth-248),60,240,Math.min(566,f.container.clientHeight-10),function(l){l.className="geSidebarContainer geFormatContainer";J.createFormat(l).init()}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.formatWindow.window.setTitle(mxResources.get("format"))})),J.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){J.formatWindow.window.fit()})),J.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):J.formatWindow.window.setVisible(null!=c?c:!J.formatWindow.window.isVisible())}else null==J.formatElt&&(J.formatElt=J.createSidebarContainer(),J.createFormat(J.formatElt).init(),J.formatElt.style.border="none",J.formatElt.style.width="240px",J.formatElt.style.borderLeftWidth="1px",J.formatElt.style.borderLeftStyle="solid",J.formatElt.style.right="0px"),c=J.diagramContainer.parentNode,
+null!=J.formatElt.parentNode?(J.formatElt.parentNode.removeChild(J.formatElt),c.style.right="0px"):(c.parentNode.appendChild(J.formatElt),c.style.right=J.formatElt.style.width)}function e(J,c){if(EditorUi.windowed){var f=J.editor.graph;f.popupMenuHandler.hideMenu();null==J.sidebarWindow?(J.sidebarWindow=new WrapperWindow(J,"",10,56,Math.min(f.container.clientWidth-10,218)-6,Math.min(f.container.clientHeight-40,650)-6,function(l){J.createShapesPanel(l)}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
+J.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){J.sidebarWindow.window.fit()})),J.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),J.sidebarWindow.window.setVisible(!0),isLocalStorage&&J.getLocalData("sidebar",function(l){J.sidebar.showEntries(l,null,!0)}),J.restoreLibraries()):J.sidebarWindow.window.setVisible(null!=c?c:!J.sidebarWindow.window.isVisible())}else null==J.sidebarElt&&(J.sidebarElt=J.createSidebarContainer(),J.createShapesPanel(J.sidebarElt),J.sidebarElt.style.border=
+"none",J.sidebarElt.style.width="210px",J.sidebarElt.style.borderRight="1px solid gray"),c=J.diagramContainer.parentNode,null!=J.sidebarElt.parentNode?(J.sidebarElt.parentNode.removeChild(J.sidebarElt),c.style.left="0px"):(c.parentNode.appendChild(J.sidebarElt),c.style.left=J.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth}catch(J){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(K,c){null!=c.shortcut&&900>g&&!mxClient.IS_IOS?K.firstChild.nextSibling.setAttribute("title",c.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(K){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=K?K:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();n.apply(this,arguments)};var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(K){A.apply(this,
-arguments);if(K){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,
-arguments);var K=this.editorUi;EditorUi.enablePlantUml&&!K.isOffline()&&K.actions.put("plantUml",new Action("plantUml...",function(){var l=new ParseDialog(K,mxResources.get("plantUml")+"...","plantUml");K.showDialog(l.container,620,420,!0,!1);l.init()}));K.actions.put("mermaid",new Action("mermaid...",function(){var l=new ParseDialog(K,mxResources.get("mermaid")+"...","mermaid");K.showDialog(l.container,620,420,!0,!1);l.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-f=function(l,t,q,D){l.addItem(q,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(K,q,D);K.showDialog(H.container,620,420,!0,!1);H.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,t){for(var q=0;q<c.length;q++)"-"==c[q]?l.addSeparator(t):f(l,t,mxResources.get(c[q])+"...",c[q])})))};EditorUi.prototype.installFormatToolbar=function(K){var c=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,t){0<c.getSelectionCount()?(K.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var S=!1;EditorUi.prototype.initFormatWindow=function(){if(!S&&null!=this.formatWindow){S=!0;var K=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){K.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,c){null!=c.shortcut&&900>g&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title",c.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(J){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=J?J:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();n.apply(this,arguments)};var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(J){A.apply(this,
+arguments);if(J){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,
+arguments);var J=this.editorUi;EditorUi.enablePlantUml&&!J.isOffline()&&J.actions.put("plantUml",new Action("plantUml...",function(){var l=new ParseDialog(J,mxResources.get("plantUml")+"...","plantUml");J.showDialog(l.container,620,420,!0,!1);l.init()}));J.actions.put("mermaid",new Action("mermaid...",function(){var l=new ParseDialog(J,mxResources.get("mermaid")+"...","mermaid");J.showDialog(l.container,620,420,!0,!1);l.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+f=function(l,t,q,D){l.addItem(q,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(J,q,D);J.showDialog(H.container,620,420,!0,!1);H.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,t){for(var q=0;q<c.length;q++)"-"==c[q]?l.addSeparator(t):f(l,t,mxResources.get(c[q])+"...",c[q])})))};EditorUi.prototype.installFormatToolbar=function(J){var c=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,t){0<c.getSelectionCount()?(J.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var R=!1;EditorUi.prototype.initFormatWindow=function(){if(!R&&null!=this.formatWindow){R=!0;var J=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){J.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var F=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function K(B,I,U){var P=q.menus.get(B);I=N.addMenu(mxResources.get(B),mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(B));q.menus.menuCreated(P,I,"geButton");null!=U&&(I.style.backgroundImage="url("+U+")",I.innerText="");return I}function c(B,I,U,P,T,X){var Z=document.createElement("a");Z.className="geButton";H.appendChild(Z);null!=X?Z.style.backgroundImage="url("+X+")":mxUtils.write(Z,B);mxEvent.addListener(Z,
-"click",function(ka){"disabled"!=Z.getAttribute("disabled")&&I(ka);mxEvent.consume(ka)});mxEvent.preventDefault(Z);null!=P&&Z.setAttribute("title",P);null!=T&&(B=function(){T.isEnabled()?Z.removeAttribute("disabled"):Z.setAttribute("disabled","disabled")},T.addListener("stateChanged",B),D.addListener("enabledChanged",B),B());return Z}function f(B,I,U){I=document.createElement("div");I.className="geButtonGroup";for(U=0;U<B.length;U++)null!=B[U]&&I.appendChild(B[U]);H.appendChild(I);return I}function l(){g=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;H.innerHTML="";var B=1E3>g,I=K("diagram",null,B?Editor.menuImage:null);f([I,c(mxResources.get("shapes"),q.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),q.actions.get("image"),B?Editor.shapesImage:null),c(mxResources.get("format"),q.actions.get("format").funct,null,mxResources.get("format")+" ("+q.actions.get("format").shortcut+")",q.actions.get("image"),B?Editor.formatImage:null)]);I=K("insert",!0,
-B?ea:null);f([I,c(mxResources.get("delete"),q.actions.get("delete").funct,null,mxResources.get("delete"),q.actions.get("delete"),B?Editor.trashImage:null)]);D.isEnabled()||I.setAttribute("disabled","disabled");la.setAttribute("title",mxResources.get("undo")+" ("+ja.shortcut+")");Q.setAttribute("title",mxResources.get("redo")+" ("+ca.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(f([la,Q]),520<=g&&f([k,640<=g?c("",W.funct,!0,mxResources.get("zoomIn")+
-" ("+Editor.ctrlKey+" +)",W,Editor.zoomInImage):null,640<=g?c("",ba.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ba,Editor.zoomOutImage):null]));H.appendChild(q.statusContainer);H.appendChild(q.buttonContainer)}F.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"),t.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
+function(){function J(B,K,T){var P=q.menus.get(B);K=N.addMenu(mxResources.get(B),mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));K.className="geButton";K.setAttribute("title",mxResources.get(B));q.menus.menuCreated(P,K,"geButton");null!=T&&(K.style.backgroundImage="url("+T+")",K.innerText="");return K}function c(B,K,T,P,U,Y){var aa=document.createElement("a");aa.className="geButton";H.appendChild(aa);null!=Y?aa.style.backgroundImage="url("+Y+")":mxUtils.write(aa,B);mxEvent.addListener(aa,
+"click",function(la){"disabled"!=aa.getAttribute("disabled")&&K(la);mxEvent.consume(la)});mxEvent.preventDefault(aa);null!=P&&aa.setAttribute("title",P);null!=U&&(B=function(){U.isEnabled()?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")},U.addListener("stateChanged",B),D.addListener("enabledChanged",B),B());return aa}function f(B,K,T){K=document.createElement("div");K.className="geButtonGroup";for(T=0;T<B.length;T++)null!=B[T]&&K.appendChild(B[T]);H.appendChild(K);return K}
+function l(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;H.innerHTML="";var B=1E3>g,K=J("diagram",null,B?Editor.menuImage:null);f([K,c(mxResources.get("shapes"),q.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),q.actions.get("image"),B?Editor.shapesImage:null),c(mxResources.get("format"),q.actions.get("format").funct,null,mxResources.get("format")+" ("+q.actions.get("format").shortcut+")",q.actions.get("image"),B?Editor.formatImage:null)]);
+K=J("insert",!0,B?fa:null);f([K,c(mxResources.get("delete"),q.actions.get("delete").funct,null,mxResources.get("delete"),q.actions.get("delete"),B?Editor.trashImage:null)]);D.isEnabled()||K.setAttribute("disabled","disabled");W.setAttribute("title",mxResources.get("undo")+" ("+ka.shortcut+")");S.setAttribute("title",mxResources.get("redo")+" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(f([W,S]),520<=g&&f([k,640<=g?c("",X.funct,!0,mxResources.get("zoomIn")+
+" ("+Editor.ctrlKey+" +)",X,Editor.zoomInImage):null,640<=g?c("",ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ca,Editor.zoomOutImage):null]));H.appendChild(q.statusContainer);H.appendChild(q.buttonContainer)}F.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"),t.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
if(1E3<=g||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var q=this,D=q.editor.graph;q.toolbar=this.createToolbar(q.createDiv("geToolbar"));var H=document.createElement("div");H.className="geMenubarContainer";
-var N=new Menubar(q,H),L=q.hideCurrentMenu;q.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var J=q.descriptorChanged;q.descriptorChanged=function(){J.apply(this,arguments);var B=q.getCurrentFile();if(null!=B&&null!=B.getTitle()){var I=B.getMode();"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);H.setAttribute("title",B.getTitle()+(null!=I?" ("+I+")":""))}else H.removeAttribute("title")};
-q.setStatusText(q.editor.getStatus());H.appendChild(q.statusContainer);q.buttonContainer=this.createButtonContainer();H.appendChild(q.buttonContainer);q.menubarContainer=q.buttonContainer;q.tabContainer=this.createTabContainer();var Y=this.createZoomInput(!0),ha=q.updateTabContainer;q.updateTabContainer=function(){ha.apply(this,arguments);q.tabContainer.appendChild(Y)};var ea=Editor.addBoxImage;if(null!=q.hoverIcons){var aa=q.hoverIcons.update;q.hoverIcons.update=function(){D.freehand.isDrawing()||
-aa.apply(this,arguments)}}if(null!=D.freehand){var na=D.freehand.createStyle;D.freehand.createStyle=function(B){return na.apply(this,arguments)+"sketch=0;"}}q.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.setStatusText(q.editor.getStatus())}));q.setStatusText(q.editor.getStatus());var W=q.actions.get("zoomIn"),ba=q.actions.get("zoomOut");t=q.actions.get("resetView");var ja=q.actions.get("undo"),ca=q.actions.get("redo"),la=c("",ja.funct,null,"",ja,Editor.undoImage),Q=c("",ca.funct,
-null,"",ca,Editor.redoImage),k=c("",function(B){mxEvent.isAltDown(B)?(q.hideCurrentMenu(),q.actions.get("customZoom").funct()):(q.hideCurrentMenu(),q.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",t,Editor.zoomFitImage);q.container.appendChild(q.tabContainer);q.container.appendChild(H);q.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);l();q.addListener("lockedChanged",l);q.addListener("languageChanged",l);q.editor.graph.addListener("enabledChanged",l);mxEvent.addListener(window,
+var N=new Menubar(q,H),L=q.hideCurrentMenu;q.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var I=q.descriptorChanged;q.descriptorChanged=function(){I.apply(this,arguments);var B=q.getCurrentFile();if(null!=B&&null!=B.getTitle()){var K=B.getMode();"google"==K?K="googleDrive":"github"==K?K="gitHub":"gitlab"==K?K="gitLab":"onedrive"==K&&(K="oneDrive");K=mxResources.get(K);H.setAttribute("title",B.getTitle()+(null!=K?" ("+K+")":""))}else H.removeAttribute("title")};
+q.setStatusText(q.editor.getStatus());H.appendChild(q.statusContainer);q.buttonContainer=this.createButtonContainer();H.appendChild(q.buttonContainer);q.menubarContainer=q.buttonContainer;q.tabContainer=this.createTabContainer();var Z=this.createZoomInput(!0),ia=q.updateTabContainer;q.updateTabContainer=function(){ia.apply(this,arguments);q.tabContainer.appendChild(Z)};var fa=Editor.addBoxImage;if(null!=q.hoverIcons){var ba=q.hoverIcons.update;q.hoverIcons.update=function(){D.freehand.isDrawing()||
+ba.apply(this,arguments)}}if(null!=D.freehand){var na=D.freehand.createStyle;D.freehand.createStyle=function(B){return na.apply(this,arguments)+"sketch=0;"}}q.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.setStatusText(q.editor.getStatus())}));q.setStatusText(q.editor.getStatus());var X=q.actions.get("zoomIn"),ca=q.actions.get("zoomOut");t=q.actions.get("resetView");var ka=q.actions.get("undo"),da=q.actions.get("redo"),W=c("",ka.funct,null,"",ka,Editor.undoImage),S=c("",da.funct,
+null,"",da,Editor.redoImage),k=c("",function(B){mxEvent.isAltDown(B)?(q.hideCurrentMenu(),q.actions.get("customZoom").funct()):(q.hideCurrentMenu(),q.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",t,Editor.zoomFitImage);q.container.appendChild(q.tabContainer);q.container.appendChild(H);q.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);l();q.addListener("lockedChanged",l);q.addListener("languageChanged",l);q.editor.graph.addListener("enabledChanged",l);mxEvent.addListener(window,
"resize",function(){l();null!=q.sidebarWindow&&q.sidebarWindow.window.fit();null!=q.formatWindow&&q.formatWindow.window.fit();null!=q.actions.outlineWindow&&q.actions.outlineWindow.window.fit();null!=q.actions.layersWindow&&q.actions.layersWindow.window.fit();null!=q.menus.chatWindow&&q.menus.chatWindow.window.fit();null!=q.menus.tagsWindow&&q.menus.tagsWindow.window.fit();null!=q.menus.findWindow&&q.menus.findWindow.window.fit();null!=q.menus.findReplaceWindow&&q.menus.findReplaceWindow.window.fit()})}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,v,n,A){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=v;this.isResolved=n;this.user=A;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,v){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,v){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=v};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
@@ -4169,13 +4169,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(
null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var v=
mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var G=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?G.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(G.style.padding="8px");G.style.forcedColorAdjust="none";G.style.boxSizing="border-box";G.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var q=
this.view.graphBounds,D=this.view.translate;G.setAttribute("viewBox",q.x+D.x-this.panDx+" "+(q.y+D.y-this.panDy)+" "+(q.width+1)+" "+(q.height+1));this.container.style.backgroundColor=G.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",q))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(q){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(q){}this.graph.getImageFromBundles=function(q){return m.getImageUrl(q)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);
-if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(S=0;S<F.length;S++)if(this.pageId==F[S].getAttribute("id")){this.currentPage=S;break}var K=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(q){var D=F[m.currentPage];return"page"==q?D.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==q?m.currentPage+1:"pagecount"==q?F.length:K.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=
-function(q){this.handlingResize||(this.currentPage=mxUtils.mod(q,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(q){q=this.getIndexById(q);var D=0<=q;D&&this.selectPage(q);return D};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var f=this.graph.setBackgroundImage;this.graph.setBackgroundImage=
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var R=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=R&&R!=e)try{this.xml=mxUtils.getXml(R),this.xmlNode=R,this.xmlDocument=R.ownerDocument}catch(q){}this.graph.getImageFromBundles=function(q){return m.getImageUrl(q)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);
+if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(R=0;R<F.length;R++)if(this.pageId==F[R].getAttribute("id")){this.currentPage=R;break}var J=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(q){var D=F[m.currentPage];return"page"==q?D.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==q?m.currentPage+1:"pagecount"==q?F.length:J.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=
+function(q){this.handlingResize||(this.currentPage=mxUtils.mod(q,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(q){q=this.getIndexById(q);var D=0<=q;D&&this.selectPage(q);return D};R=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var f=this.graph.setBackgroundImage;this.graph.setBackgroundImage=
function(q){if(null!=q&&Graph.isPageLink(q.src)){var D=q.src,H=D.indexOf(",");0<H&&(H=m.getIndexById(D.substring(H+1)),0<=H&&(q=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[H])),q.originalSrc=D))}f.apply(this,arguments)};var l=this.graph.getGraphBounds;this.graph.getGraphBounds=function(q){var D=l.apply(this,arguments);q=this.backgroundImage;if(null!=q){var H=this.view.translate,N=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((H.x+q.x)*N,(H.y+q.y)*N,q.width*N,
-q.height*N))}return D};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+q.height*N))}return D};this.addListener("xmlNodeChanged",R);R();urlParams.page=m.currentPage;R=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,R=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(q){return!mxEvent.isPopupTrigger(q.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(q,D){try{if(Graph.isPageLink(q)){var H=q.indexOf(",");m.selectPageById(q.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var N=
+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.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=R&&this.setLayersVisible(R);this.graph.customLinkClicked=function(q,D){try{if(Graph.isPageLink(q)){var H=q.indexOf(",");m.selectPageById(q.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var N=
this.getGraphBounds();this.handleCustomLink(q,D);N.equals(this.getGraphBounds())||m.crop()}}catch(L){alert(L.message)}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"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var n=
this.getObservableParent(b),A=new g(mxUtils.bind(this,function(G){0<b.offsetWidth&&(A.disconnect(),v())}));A.observe(n,{attributes:!0})}else v()}};
GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",
@@ -4188,37 +4188,37 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var v=0;v<m.getChildCount(m.root);v++){var n=m.getChildAt(m.root,v);e=e&&m.isVisible(n);g.push(m.isVisible(n));m.setVisible(n,null!=b?b[v]:!0)}}finally{m.endUpdate()}}return e?null:g};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};G={left:G.left-S.left,top:G.top-S.top,bottom:G.bottom-S.top,right:G.right-S.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.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}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var S=b.offsetWidth;S==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G: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},v=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
+R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};G={left:G.left-R.left,top:G.top-R.top,bottom:G.bottom-R.top,right:G.right-R.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.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}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var R=b.offsetWidth;R==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G: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},v=R,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 n=v=null;m=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=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 A=mxUtils.bind(this,function(G){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||
-null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};
+m);var A=mxUtils.bind(this,function(G){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||
+null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,n=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;n={};if(v)for(var G=0;G<m.length;G++){var S=b.getCell(m[G]);null!=S&&(e=!0,n[S.id]=!0)}else for(G=0;G<g.length;G++)S=b.getChildAt(b.root,parseInt(g[G])),null!=S&&(e=!0,n[S.id]=!0);for(G=0;e&&
-G<A;G++)S=b.getChildAt(b.root,G),b.setVisible(S,n[S.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,n=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;n={};if(v)for(var G=0;G<m.length;G++){var R=b.getCell(m[G]);null!=R&&(e=!0,n[R.id]=!0)}else for(G=0;G<g.length;G++)R=b.getChildAt(b.root,parseInt(g[G])),null!=R&&(e=!0,n[R.id]=!0);for(G=0;e&&
+G<A;G++)R=b.getChildAt(b.root,G),b.setVisible(R,n[R.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}n=!0}return n};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=
this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(e,30);var m=null,v=null,n=mxUtils.bind(this,function(aa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),aa||200)}),A=mxUtils.bind(this,function(aa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=
-"";mxUtils.setOpacity(e,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(A(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(aa){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(aa){A(100);mxEvent.consume(aa)}));mxEvent.addListener(e,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||A(30)}));var G=this.graph,S=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(aa,na){},mouseUp:function(aa,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<S&&Math.abs(this.scrollTop-G.container.scrollTop)<
-S&&Math.abs(this.startX-na.getGraphX())<S&&Math.abs(this.startY-na.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?n():A(30))}})}g=this.toolbarItems;for(var F=0,K=mxUtils.bind(this,function(aa,na,W,ba){aa=this.createToolbarButton(aa,na,W,ba);e.appendChild(aa);F++;return aa}),c=this.graph.getModel(),f=null,l=null,t=null,q=null,D=0;D<g.length;D++){var H=g[D];if("pages"==H){q=b.ownerDocument.createElement("div");q.style.display="inline-flex";q.style.position="relative";q.style.alignItems="center";
-q.style.padding="4px";q.style.fontFamily=GraphViewer.cssFontFamily;q.style.fontSize="12px";q.style.cursor="default";q.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(q,70);var N=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");N.style.borderRightStyle="none";N.style.paddingLeft="0px";N.style.paddingRight="0px";e.appendChild(q);var L=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-flex":"none";N.style.display=q.style.display;L.style.display=q.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var J=K(mxUtils.bind(this,function(aa){if(null!=f)f.parentNode.removeChild(f),
-f=null;else{f=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var W=this.graph.getGraphBounds(),ba=this.graph.view;0>W.x||0>W.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale}):null!=this.graph.originalViewState&&0<W.x/ba.scale+this.graph.originalViewState.translate.x-ba.translate.x&&0<W.y/ba.scale+this.graph.originalViewState.translate.y-
-ba.translate.y&&(ba.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale})}}));mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});aa=J.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily=GraphViewer.cssFontFamily;
-f.style.fontSize="11px";f.style.overflowY="auto";f.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";f.style.zIndex=this.toolbarZIndex+1;f.style.color="#000";mxUtils.setOpacity(f,85);var na=mxUtils.getDocumentScrollOrigin(document);f.style.left=na.x+aa.left-1+"px";f.style.top=na.y+aa.bottom-2+"px";this.isDarkMode()&&(f.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
-function(){J.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});J.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Y=K(mxUtils.bind(this,function(aa){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
+mxUtils.setOpacity(e,30);var m=null,v=null,n=mxUtils.bind(this,function(ba){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),ba||200)}),A=mxUtils.bind(this,function(ba){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=
+"";mxUtils.setOpacity(e,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(A(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ba){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ba){A(100);mxEvent.consume(ba)}));mxEvent.addListener(e,"mouseleave",
+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||A(30)}));var G=this.graph,R=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(ba,na){},mouseUp:function(ba,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<R&&Math.abs(this.scrollTop-G.container.scrollTop)<
+R&&Math.abs(this.startX-na.getGraphX())<R&&Math.abs(this.startY-na.getGraphY())<R&&(0<parseFloat(e.style.opacity||0)?n():A(30))}})}g=this.toolbarItems;for(var F=0,J=mxUtils.bind(this,function(ba,na,X,ca){ba=this.createToolbarButton(ba,na,X,ca);e.appendChild(ba);F++;return ba}),c=this.graph.getModel(),f=null,l=null,t=null,q=null,D=0;D<g.length;D++){var H=g[D];if("pages"==H){q=b.ownerDocument.createElement("div");q.style.display="inline-flex";q.style.position="relative";q.style.alignItems="center";
+q.style.padding="4px";q.style.fontFamily=GraphViewer.cssFontFamily;q.style.fontSize="12px";q.style.cursor="default";q.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(q,70);var N=J(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");N.style.borderRightStyle="none";N.style.paddingLeft="0px";N.style.paddingRight="0px";e.appendChild(q);var L=J(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-flex":"none";N.style.display=q.style.display;L.style.display=q.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(J(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),J(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),J(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"==H){if(this.layersEnabled){var I=J(mxUtils.bind(this,function(ba){if(null!=f)f.parentNode.removeChild(f),
+f=null;else{f=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var X=this.graph.getGraphBounds(),ca=this.graph.view;0>X.x||0>X.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale}):null!=this.graph.originalViewState&&0<X.x/ca.scale+this.graph.originalViewState.translate.x-ca.translate.x&&0<X.y/ca.scale+this.graph.originalViewState.translate.y-
+ca.translate.y&&(ca.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale})}}));mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ba=I.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily=GraphViewer.cssFontFamily;
+f.style.fontSize="11px";f.style.overflowY="auto";f.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";f.style.zIndex=this.toolbarZIndex+1;f.style.color="#000";mxUtils.setOpacity(f,85);var na=mxUtils.getDocumentScrollOrigin(document);f.style.left=na.x+ba.left-1+"px";f.style.top=na.y+ba.bottom-2+"px";this.isDarkMode()&&(f.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
+function(){I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Z=J(mxUtils.bind(this,function(ba){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
"fixed",l.div.style.fontFamily=GraphViewer.cssFontFamily,l.div.style.fontSize="11px",l.div.style.backgroundColor="#eee",l.div.style.color="#000",l.div.style.border="1px solid #d0d0d0",l.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(l.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(l.div,85));if(null!=t)t.parentNode.removeChild(t),t=null;else{t=l.div;t.style.position="absolute";mxEvent.addListener(t,"mouseleave",function(){null!=t&&(t.parentNode.removeChild(t),t=null)});
-aa=Y.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);t.style.left=na.x+aa.left-1+"px";t.style.top=na.y+aa.bottom-2+"px";document.body.appendChild(t);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=t&&0==this.graph.getAllTags().length&&(t.parentNode.removeChild(t),t=null)}));Y.style.display=0<this.graph.getAllTags().length?"inline-flex":
-"none"}}else"lightbox"==H?this.lightboxEnabled&&K(mxUtils.bind(this,function(){try{this.showLightbox()}catch(aa){alert(aa.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=K(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=
-b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var ha=b.style.border,
-ea=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var aa=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};aa={left:aa.left-na.left,top:aa.top-na.top,bottom:aa.bottom-na.top,right:aa.right-na.left};e.style.left=
-aa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=aa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=aa.top+1+"px"):e.style.top=aa.top+"px";"1px solid transparent"==ha&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var W=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=t&&(t.parentNode.removeChild(t),t=null);null!=f&&(f.parentNode.removeChild(f),f=null);
-b.style.border=ha});mxEvent.addListener(document,"mousemove",function(ba){for(ba=mxEvent.getSource(ba);null!=ba;){if(ba==b||ba==e||ba==f||ba==t)return;ba=ba.parentNode}W()});mxEvent.addListener(document.body,"mouseleave",function(ba){W()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};
+ba=Z.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);t.style.left=na.x+ba.left-1+"px";t.style.top=na.y+ba.bottom-2+"px";document.body.appendChild(t);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=t&&0==this.graph.getAllTags().length&&(t.parentNode.removeChild(t),t=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
+"none"}}else"lightbox"==H?this.lightboxEnabled&&J(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=J(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=
+b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var ia=b.style.border,
+fa=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 ba=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};ba={left:ba.left-na.left,top:ba.top-na.top,bottom:ba.bottom-na.top,right:ba.right-na.left};e.style.left=
+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ba.top+1+"px"):e.style.top=ba.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var X=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=t&&(t.parentNode.removeChild(t),t=null);null!=f&&(f.parentNode.removeChild(f),f=null);
+b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ca){for(ca=mxEvent.getSource(ca);null!=ca;){if(ca==b||ca==e||ca==f||ca==t)return;ca=ca.parentNode}X()});mxEvent.addListener(document.body,"mouseleave",function(ca){X()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",fa):fa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&fa()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var v=document.createElement("div");v.style.borderRight="1px solid #d0d0d0";v.style.display="inline-flex";v.style.alignItems="center";v.style.padding="6px";mxEvent.addListener(v,"click",b);null!=g&&v.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(v,"mouseenter",function(){v.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(v,"mouseleave",function(){v.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),v.style.cursor="pointer"):mxUtils.setOpacity(v,30);v.appendChild(b);return v};
GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};
@@ -4231,9 +4231,9 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElement
g.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){n.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);n.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));v.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(v))}catch(l){}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(){};v=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=v;n.refresh=function(){};var A=mxUtils.bind(this,function(l){27==l.keyCode&&n.destroy()}),G=this.initialOverflow,
-S=n.destroy;n.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var F=n.editor.graph,K=F.container;K.style.overflow="hidden";K.style.inset="0";this.lightboxChrome&&null==b?(K.style.border="1px solid #c0c0c0",K.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",
-g.style.display="none");var c=this;F.getImageFromBundles=function(l){return c.getImageUrl(l)};var f=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=f.apply(this,arguments);l.getImageFromBundles=function(t){return c.getImageUrl(t)};return l};this.graphConfig.move&&(F.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(K.style,"border-radius","4px");K.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,n);
-window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){n.destroy()}),K.style.outline="none",K.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(K)):(document.body.appendChild(K),document.body.appendChild(g)),n.setFileData(this.xml),mxUtils.setPrefixedStyle(K.style,"transform","rotateY(0deg)"),n.chromelessToolbar.style.bottom="60px",n.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(n.chromelessToolbar),
+R=n.destroy;n.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,R.apply(this,arguments))};var F=n.editor.graph,J=F.container;J.style.overflow="hidden";J.style.inset="0";this.lightboxChrome&&null==b?(J.style.border="1px solid #c0c0c0",J.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",
+g.style.display="none");var c=this;F.getImageFromBundles=function(l){return c.getImageUrl(l)};var f=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=f.apply(this,arguments);l.getImageFromBundles=function(t){return c.getImageUrl(t)};return l};this.graphConfig.move&&(F.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(J.style,"border-radius","4px");J.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,n);
+window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){n.destroy()}),J.style.outline="none",J.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(J)):(document.body.appendChild(J),document.body.appendChild(g)),n.setFileData(this.xml),mxUtils.setPrefixedStyle(J.style,"transform","rotateY(0deg)"),n.chromelessToolbar.style.bottom="60px",n.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(n.chromelessToolbar),
n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(F,this.graph),n.lightboxFit(),n.chromelessResize()}catch(l){n.handleError(l,null,function(){n.destroy()})}}),0);return n};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};
@@ -4250,9 +4250,9 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function v(){this.q=[];this.add=function(q){this.q.push(q)};var l,t;this.call=function(){l=0;for(t=this.q.length;l<t;l++)this.q[l].call()}}function n(l,t){return l.currentStyle?l.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue(t):l.style[t]}function A(l,t){if(!l.resizedAttached)l.resizedAttached=
new v,l.resizedAttached.add(t);else if(l.resizedAttached){l.resizedAttached.add(t);return}l.resizeSensor=document.createElement("div");l.resizeSensor.className="resize-sensor";l.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";l.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>';
-l.appendChild(l.resizeSensor);"static"==n(l,"position")&&(l.style.position="relative");var q=l.resizeSensor.childNodes[0],D=q.childNodes[0],H=l.resizeSensor.childNodes[1],N=function(){D.style.width="100000px";D.style.height="100000px";q.scrollLeft=1E5;q.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};N();var L=!1,J=function(){l.resizedAttached&&(L&&(l.resizedAttached.call(),L=!1),b(J))};b(J);var Y,ha,ea,aa;t=function(){if((ea=l.offsetWidth)!=Y||(aa=l.offsetHeight)!=ha)L=!0,Y=ea,ha=aa;N()};var na=
-function(W,ba,ja){W.attachEvent?W.attachEvent("on"+ba,ja):W.addEventListener(ba,ja)};na(q,"scroll",t);na(H,"scroll",t)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,F=!1;(new ResizeObserver(function(){F||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){F=!0;G();S=null;F=!1},200))})).observe(g)}else{var K=Object.prototype.toString.call(g),c="[object Array]"===K||"[object NodeList]"===K||"[object HTMLCollection]"===
-K||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(c){K=0;for(var f=g.length;K<f;K++)A(g[K],G)}else A(g,G);this.detach=function(){if(c)for(var l=0,t=g.length;l<t;l++)e.detach(g[l]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
+l.appendChild(l.resizeSensor);"static"==n(l,"position")&&(l.style.position="relative");var q=l.resizeSensor.childNodes[0],D=q.childNodes[0],H=l.resizeSensor.childNodes[1],N=function(){D.style.width="100000px";D.style.height="100000px";q.scrollLeft=1E5;q.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};N();var L=!1,I=function(){l.resizedAttached&&(L&&(l.resizedAttached.call(),L=!1),b(I))};b(I);var Z,ia,fa,ba;t=function(){if((fa=l.offsetWidth)!=Z||(ba=l.offsetHeight)!=ia)L=!0,Z=fa,ia=ba;N()};var na=
+function(X,ca,ka){X.attachEvent?X.attachEvent("on"+ca,ka):X.addEventListener(ca,ka)};na(q,"scroll",t);na(H,"scroll",t)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var R=null,F=!1;(new ResizeObserver(function(){F||(null!=R&&window.clearTimeout(R),R=window.setTimeout(function(){F=!0;G();R=null;F=!1},200))})).observe(g)}else{var J=Object.prototype.toString.call(g),c="[object Array]"===J||"[object NodeList]"===J||"[object HTMLCollection]"===
+J||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(c){J=0;for(var f=g.length;J<f;J++)A(g[J],G)}else A(g,G);this.detach=function(){if(c)for(var l=0,t=g.length;l<t;l++)e.detach(g[l]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 164c84ae5..e868dae33 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -29,7 +29,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"27.0.5",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -167,17 +167,17 @@ function(l){null!=d?d(l):mxEvent.isConsumed(l)||b.fireMouseEvent(mxEvent.MOUSE_D
a){mxEvent.removeAllListeners(a);var b=a.childNodes;if(null!=b){var c=b.length;for(a=0;a<c;a+=1)mxEvent.release(b[a])}}}catch(d){}},addMouseWheelListener:function(a,b){if(null!=a){b=null!=b?b:window;if(mxClient.IS_SF&&!mxClient.IS_TOUCH){var c=1;mxEvent.addListener(b,"gesturestart",function(g){mxEvent.consume(g);c=1});mxEvent.addListener(b,"gesturechange",function(g){mxEvent.consume(g);var k=c-g.scale;.2<Math.abs(k)&&(a(g,0>k,!0),c=g.scale)});mxEvent.addListener(b,"gestureend",function(g){mxEvent.consume(g)})}else{var d=
[],e=0,f=0;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)||null==g.pointerId||d.push(g)}),mxUtils.bind(this,function(g){if(!mxEvent.isMouseEvent(g)&&2==d.length){for(var k=0;k<d.length;k++)if(g.pointerId==d[k].pointerId){d[k]=g;break}g=Math.abs(d[0].clientX-d[1].clientX);k=Math.abs(d[0].clientY-d[1].clientY);var l=Math.abs(g-e),m=Math.abs(k-f);if(l>mxEvent.PINCH_THRESHOLD||m>mxEvent.PINCH_THRESHOLD)a(d[0],l>m?g>e:k>f,!0,d[0].clientX+(d[1].clientX-d[0].clientX)/
2,d[0].clientY+(d[1].clientY-d[0].clientY)/2),e=g,f=k}}),mxUtils.bind(this,function(g){d=[];f=e=0}))}mxEvent.addListener(b,"wheel",function(g){null==g&&(g=window.event);g.ctrlKey&&g.preventDefault();(.5<Math.abs(g.deltaX)||.5<Math.abs(g.deltaY))&&a(g,0==g.deltaY?0<-g.deltaX:0<-g.deltaY)})}},disableContextMenu:function(a){mxEvent.addListener(a,"contextmenu",function(b){b.preventDefault&&b.preventDefault();return!1})},getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=
-a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.mozInputSource?5==a.mozInputSource:0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.mozInputSource?2==a.mozInputSource:0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},
-isMouseEvent:function(a){return!mxClient.IS_ANDROID&&mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.mozInputSource?1==a.mozInputSource:0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in
-a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||
-null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,
-mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",
-CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",
-BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",
-CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",
-EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
-mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};
-mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
+a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:null!=a.type&&0==a.type.indexOf("touch")},isPenEvent:function(a){return null!=a.pointerType?"pen"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_PEN:null!=a.type&&0==a.type.indexOf("pen")},isMultiTouchEvent:function(a){return null!=a.type&&0==a.type.indexOf("touch")&&null!=a.touches&&1<a.touches.length},isMouseEvent:function(a){return!mxClient.IS_ANDROID&&
+mxClient.IS_LINUX&&mxClient.IS_GC?!0:null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:null!=a.type&&0==a.type.indexOf("mouse")},isLeftMouseButton:function(a){return"buttons"in a&&("mousedown"==a.type||"mousemove"==a.type)?1==a.buttons:"which"in a?1===a.which:1===a.button},isMiddleMouseButton:function(a){return"which"in a?2===a.which:4===a.button},isRightMouseButton:function(a){return"which"in a?3===a.which:2===a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||
+mxClient.IS_MAC&&mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){"touchstart"!=a.type&&"touchmove"!=a.type||null==a.touches||null==a.touches[0]?"touchend"==a.type&&null!=a.changedTouches&&null!=a.changedTouches[0]&&
+(a=a.changedTouches[0]):a=a.touches[0];return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},preventDefault:function(a){mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(b){b.preventDefault()}))},
+LABEL_HANDLE:-1,ROTATION_HANDLE:-2,CUSTOM_HANDLE:-100,VIRTUAL_HANDLE:-1E5,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",
+FIRE_MOUSE_EVENT:"fireMouseEvent",CONSUME_MOUSE_EVENT:"consumeMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",
+BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",
+REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",START_EDITING:"startEditing",EDITING_STARTED:"editingStarted",EDITING_STOPPED:"editingStopped",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",
+UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset",PINCH_THRESHOLD:10};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.withCredentials=!1;
+mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.acceptResponse=!0;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getStatus=function(){return null!=this.request?this.request.status:null};
mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
mxXmlRequest.prototype.send=function(a,b,c,d){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&this.acceptResponse&&(this.acceptResponse=!1,a(this),this.request.onreadystatechange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),window.XMLHttpRequest&&this.withCredentials&&(this.request.withCredentials="true"),null!=b&&(this.request.onerror=
mxUtils.bind(this,function(e){this.acceptResponse&&(this.acceptResponse=!1,b(this,e))})),(null==document.documentMode||9<document.documentMode)&&window.XMLHttpRequest&&null!=c&&null!=d&&(this.request.timeout=c,this.request.ontimeout=d),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
@@ -1971,100 +1971,99 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,v){e.undoableEditHappened(v.getProperty("edit"))};var g=mxUtils.bind(this,function(m,v){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,v){m=v.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);v=!1;if(0<m.length){for(var n=[],A=0;A<m.length;A++)null!=b.view.getState(m[A])&&(n.push(m[A]),
v||(b.scrollCellToVisible(m[A]),v=!0));b.setSelectionCells(n)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,g,m,v,n,A,G,S,F,K){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));v&&document.body.appendChild(this.bg);v=b.createDiv(S?"geTransDialog":"geDialog");v.style.width=g+60+"px";v.style.height=m+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(v.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",v.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");v.appendChild(e);document.body.appendChild(v);if(n&&(e=document.createElement("div"),
-e.className="geButton",e.setAttribute("title",mxResources.get("close")),e.style.backgroundImage="url("+Editor.crossImage+")",e.style.position="absolute",e.style.top="0px",e.style.right="0px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),v.appendChild(e),!K)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(f){c=!0}),null,mxUtils.bind(this,function(f){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=A;this.container=v;b.editor.fireEvent(new mxEventObject("showDialog"))}
+function Dialog(b,e,g,m,v,n,A,G,R,F,J){this.editorUi=b;null==this.bg&&(this.bg=b.createDiv("geBackground"));v&&document.body.appendChild(this.bg);v=b.createDiv(R?"geTransDialog":"geDialog");v.style.width=g+60+"px";v.style.height=m+60+"px";"1"!=urlParams.embedInline||Editor.inlineFullscreen||null==b.embedViewport||(v.style.left=b.embedViewport.x+b.embedViewport.width/2+"px",v.style.top=b.embedViewport.y+b.embedViewport.height/2+"px");v.appendChild(e);document.body.appendChild(v);if(n&&(e=document.createElement("div"),
+e.className="geButton",e.setAttribute("title",mxResources.get("close")),e.style.backgroundImage="url("+Editor.crossImage+")",e.style.position="absolute",e.style.top="0px",e.style.right="0px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),v.appendChild(e),!J)){var c=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(f){c=!0}),null,mxUtils.bind(this,function(f){c&&(b.hideDialog(!0),c=!1)}))}this.onDialogClose=A;this.container=v;b.editor.fireEvent(new mxEventObject("showDialog"))}
Dialog.prototype.noColorImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC";
Dialog.prototype.closeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==";Dialog.prototype.clearImage="data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==";
Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};
Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,g,m,v,n,A,G,S,F,K){S=null!=S?S:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="10px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,e);f.setAttribute("title",e);c.appendChild(f)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);c.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=n&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=K&&K()}),F.className="geBtn",g.appendChild(F));
-var l=mxUtils.button(m,function(){S&&b.hideDialog();null!=v&&v()});l.className="geBtn";g.appendChild(l);null!=A&&(m=mxUtils.button(A,function(){S&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){l.focus()};c.appendChild(g);this.container=c},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};
-PrintDialog.prototype.create=function(b){function e(l){var t=A.checked||F.checked,q=parseInt(c.value)/100;isNaN(q)&&(q=1,c.value="100%");mxClient.IS_SF&&(q*=.75);var D=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/g.pageScale;if(t){var N=A.checked?1:parseInt(K.value);isNaN(N)||(H=mxUtils.getScaleForPageCount(N,g,D))}var L=N=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*q);D.height=Math.ceil(D.height*q);H*=q;!t&&g.pageVisible?(q=g.getPageLayout(),N-=q.x*D.width,L-=q.y*D.height):
-t=!0;t=PrintDialog.createPrintPreview(g,H,D,0,N,L,t);t.open();l&&PrintDialog.printPreview(t)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var n=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
-G.appendChild(S);mxEvent.addListener(S,"click",function(l){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(l)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});n.appendChild(G);v.appendChild(n);n=n.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");G.appendChild(S);mxEvent.addListener(S,
-"click",function(l){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(l)});n.appendChild(G);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(K);mxUtils.write(G," "+mxResources.get("pages")+" (max)");n.appendChild(G);v.appendChild(n);mxEvent.addListener(F,"change",
-function(){F.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");A.checked=!F.checked});n=n.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");n.appendChild(G);G=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";G.appendChild(c);n.appendChild(G);v.appendChild(n);n=document.createElement("tr");G=document.createElement("td");G.colSpan=2;
-G.style.paddingTop="20px";G.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&G.appendChild(S);if(PrintDialog.previewEnabled){var f=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});f.className="geBtn";G.appendChild(f)}f=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||
-G.appendChild(S);n.appendChild(G);v.appendChild(n);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};
-PrintDialog.createPrintPreview=function(b,e,g,m,v,n,A){e=new mxPrintPreview(b,e,g,m,v,n);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};
+var ErrorDialog=function(b,e,g,m,v,n,A,G,R,F,J){R=null!=R?R:!0;var c=document.createElement("div");c.style.textAlign="center";if(null!=e){var f=document.createElement("div");f.style.padding="0px";f.style.margin="0px";f.style.fontSize="18px";f.style.paddingBottom="16px";f.style.marginBottom="10px";f.style.borderBottom="1px solid #c0c0c0";f.style.color="gray";f.style.whiteSpace="nowrap";f.style.textOverflow="ellipsis";f.style.overflow="hidden";mxUtils.write(f,e);f.setAttribute("title",e);c.appendChild(f)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);c.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=n&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();n()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=J&&J()}),F.className="geBtn",g.appendChild(F));
+var l=mxUtils.button(m,function(){R&&b.hideDialog();null!=v&&v()});l.className="geBtn";g.appendChild(l);null!=A&&(m=mxUtils.button(A,function(){R&&b.hideDialog();null!=G&&G()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){l.focus()};c.appendChild(g);this.container=c},PrintDialog=function(b,e,g,m){this.create(b,e,g,m)};
+PrintDialog.prototype.create=function(b){function e(l){var t=A.checked||F.checked,q=parseInt(c.value)/100;isNaN(q)&&(q=1,c.value="100%");mxClient.IS_SF&&(q*=.75);var D=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,H=1/g.pageScale;if(t){var N=A.checked?1:parseInt(J.value);isNaN(N)||(H=mxUtils.getScaleForPageCount(N,g,D))}var L=N=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*q);D.height=Math.ceil(D.height*q);H*=q;!t&&g.pageVisible?(q=g.getPageLayout(),N-=q.x*D.width,L-=q.y*D.height):
+t=!0;t=PrintDialog.createPrintPreview(g,H,D,0,N,L,t);t.open();l&&PrintDialog.printPreview(t)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");var n=document.createElement("tr");var A=document.createElement("input");A.setAttribute("type","checkbox");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";G.appendChild(A);var R=document.createElement("span");mxUtils.write(R," "+mxResources.get("fitPage"));
+G.appendChild(R);mxEvent.addListener(R,"click",function(l){A.checked=!A.checked;F.checked=!A.checked;mxEvent.consume(l)});mxEvent.addListener(A,"change",function(){F.checked=!A.checked});n.appendChild(G);v.appendChild(n);n=n.cloneNode(!1);var F=document.createElement("input");F.setAttribute("type","checkbox");G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(F);R=document.createElement("span");mxUtils.write(R," "+mxResources.get("posterPrint")+":");G.appendChild(R);mxEvent.addListener(R,
+"click",function(l){F.checked=!F.checked;A.checked=!F.checked;mxEvent.consume(l)});n.appendChild(G);var J=document.createElement("input");J.setAttribute("value","1");J.setAttribute("type","number");J.setAttribute("min","1");J.setAttribute("size","4");J.setAttribute("disabled","disabled");J.style.width="50px";G=document.createElement("td");G.style.fontSize="10pt";G.appendChild(J);mxUtils.write(G," "+mxResources.get("pages")+" (max)");n.appendChild(G);v.appendChild(n);mxEvent.addListener(F,"change",
+function(){F.checked?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled");A.checked=!F.checked});n=n.cloneNode(!1);G=document.createElement("td");mxUtils.write(G,mxResources.get("pageScale")+":");n.appendChild(G);G=document.createElement("td");var c=document.createElement("input");c.setAttribute("value","100 %");c.setAttribute("size","5");c.style.width="50px";G.appendChild(c);n.appendChild(G);v.appendChild(n);n=document.createElement("tr");G=document.createElement("td");G.colSpan=2;
+G.style.paddingTop="20px";G.setAttribute("align","right");R=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});R.className="geBtn";b.editor.cancelFirst&&G.appendChild(R);if(PrintDialog.previewEnabled){var f=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});f.className="geBtn";G.appendChild(f)}f=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||
+G.appendChild(R);n.appendChild(G);v.appendChild(n);m.appendChild(v);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};
+PrintDialog.createPrintPreview=function(b,e,g,m,v,n,A){e=new mxPrintPreview(b,e,g,m,v,n);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=A;A=b.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";e.backgroundColor=A;var G=e.isTextLabel;e.isTextLabel=function(F){return"geHint"==!F.className&&G.apply(this,arguments)};var R=e.getLinkForCellState;e.getLinkForCellState=function(F){return b.getAbsoluteUrl(R.apply(this,arguments))};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){var q=c;null!=q&&null!=q.originalSrc&&(q=b.createImageForPageLink(q.originalSrc,null));null!=q&&null!=q.src?(K.style.backgroundImage="url("+q.src+")",K.style.display="inline-block"):(K.style.backgroundImage="",K.style.display="none");K.style.backgroundColor="";null!=f&&f!=mxConstants.NONE&&(K.style.backgroundColor=f,K.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");
+var PageSetupDialog=function(b){function e(){var q=c;null!=q&&null!=q.originalSrc&&(q=b.createImageForPageLink(q.originalSrc,null));null!=q&&null!=q.src?(J.style.backgroundImage="url("+q.src+")",J.style.display="inline-block"):(J.style.backgroundImage="",J.style.display="none");J.style.backgroundColor="";null!=f&&f!=mxConstants.NONE&&(J.style.backgroundColor=f,J.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var v=document.createElement("tbody");
var n=document.createElement("tr");var A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";mxUtils.write(A,mxResources.get("paperSize")+":");n.appendChild(A);A=document.createElement("td");A.style.verticalAlign="top";A.style.fontSize="10pt";var G=PageSetupDialog.addPageFormatPanel(A,"pagesetupdialog",g.pageFormat);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("gridSize")+":");n.appendChild(A);
-A=document.createElement("td");A.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();A.appendChild(S);mxEvent.addListener(S,"change",function(){var q=parseInt(S.value);S.value=Math.max(1,isNaN(q)?g.getGridSize():q)});n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");
-n.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var K=document.createElement("div");K.style.display="inline-block";K.style.verticalAlign="middle";K.style.backgroundPosition="center center";K.style.backgroundRepeat="no-repeat";K.style.backgroundSize="contain";K.style.border="1px solid lightGray";K.style.borderRadius="4px";K.style.marginRight="14px";K.style.height="32px";
-K.style.width="64px";K.style.cursor="pointer";K.style.padding="4px";var c=g.backgroundImage,f=g.background,l=g.shadowVisible,t=function(q){b.showBackgroundImageDialog(function(D,H,N,L){H||(null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src}),c=D,l=L);f=N;e()},c,f,!0);mxEvent.consume(q)};mxEvent.addListener(F,"click",t);mxEvent.addListener(K,"click",t);e();A.appendChild(K);A.appendChild(F);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");
-A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);t=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var q=parseInt(S.value);isNaN(q)||g.gridSize===q||g.setGridSize(q);q=new ChangePageSetup(b,f,c,G.get());q.ignoreColor=g.background==f;q.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
+A=document.createElement("td");A.style.whiteSpace="nowrap";var R=document.createElement("input");R.setAttribute("type","number");R.setAttribute("min","0");R.style.width="40px";R.style.marginLeft="6px";R.value=g.getGridSize();A.appendChild(R);mxEvent.addListener(R,"change",function(){var q=parseInt(R.value);R.value=Math.max(1,isNaN(q)?g.getGridSize():q)});n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");mxUtils.write(A,mxResources.get("background")+":");
+n.appendChild(A);A=document.createElement("td");var F=document.createElement("button");F.className="geBtn";F.style.margin="0px";mxUtils.write(F,mxResources.get("change")+"...");var J=document.createElement("div");J.style.display="inline-block";J.style.verticalAlign="middle";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="contain";J.style.border="1px solid lightGray";J.style.borderRadius="4px";J.style.marginRight="14px";J.style.height="32px";
+J.style.width="64px";J.style.cursor="pointer";J.style.padding="4px";var c=g.backgroundImage,f=g.background,l=g.shadowVisible,t=function(q){b.showBackgroundImageDialog(function(D,H,N,L){H||(null!=D&&null!=D.src&&Graph.isPageLink(D.src)&&(D={originalSrc:D.src}),c=D,l=L);f=N;e()},c,f,!0);mxEvent.consume(q)};mxEvent.addListener(F,"click",t);mxEvent.addListener(J,"click",t);e();A.appendChild(J);A.appendChild(F);n.appendChild(A);v.appendChild(n);n=document.createElement("tr");A=document.createElement("td");
+A.colSpan=2;A.style.paddingTop="16px";A.setAttribute("align","right");F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";b.editor.cancelFirst&&A.appendChild(F);t=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var q=parseInt(R.value);isNaN(q)||g.gridSize===q||g.setGridSize(q);q=new ChangePageSetup(b,f,c,G.get());q.ignoreColor=g.background==f;q.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=c?c.src:null);null!=l&&
(q.shadowVisible=l);g.pageFormat.width==q.previousFormat.width&&g.pageFormat.height==q.previousFormat.height&&q.ignoreColor&&q.ignoreImage&&q.shadowVisible==g.shadowVisible||g.model.execute(q)});t.className="geBtn gePrimaryBtn";A.appendChild(t);b.editor.cancelFirst||A.appendChild(F);n.appendChild(A);v.appendChild(n);m.appendChild(v);this.container=m};
PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var v=document.createElement("input");v.setAttribute("name",e);v.setAttribute("type","radio");v.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",e);n.setAttribute("type","radio");n.setAttribute("value","landscape");var A=document.createElement("select");A.style.position="relative";A.style.marginBottom="4px";A.style.borderRadius="4px";A.style.borderWidth="1px";A.style.borderStyle="solid";
-A.style.boxSizing="border-box";A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);n.style.marginLeft="10px";n.style.marginRight="6px";G.appendChild(n);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,
-mxResources.get("landscape"));G.appendChild(S);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var K=document.createElement("input");K.setAttribute("size","7");K.setAttribute("title",mxResources.get("width"));K.style.textAlign="right";F.appendChild(K);mxUtils.write(F," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
+A.style.boxSizing="border-box";A.style.padding="2px";A.style.width="210px";var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.width="210px";G.style.height="24px";v.style.marginRight="6px";G.appendChild(v);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));G.appendChild(e);n.style.marginLeft="10px";n.style.marginRight="6px";G.appendChild(n);var R=document.createElement("span");R.style.width="100px";mxUtils.write(R,
+mxResources.get("landscape"));G.appendChild(R);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.marginLeft="4px";F.style.fontSize="12px";F.style.width="210px";F.style.height="24px";var J=document.createElement("input");J.setAttribute("size","7");J.setAttribute("title",mxResources.get("width"));J.style.textAlign="right";F.appendChild(J);mxUtils.write(F," x ");var c=document.createElement("input");c.setAttribute("size","7");c.setAttribute("title",mxResources.get("height"));c.style.textAlign=
"right";F.appendChild(c);var f=document.createElement("select");f.style.marginLeft="4px";f.style.maxWidth="78px";f.style.width="78px";for(var l=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],t=0;t<l.length;t++){var q=document.createElement("option");q.setAttribute("value",l[t].unit);mxUtils.write(q,l[t].label);f.appendChild(q)}f.value=Editor.pageSizeUnit;F.appendChild(f);
-G.style.display="none";F.style.display="none";var D={},H=PageSetupDialog.getFormats();for(t=0;t<H.length;t++)l=H[t],D[l.key]=l,q=document.createElement("option"),q.setAttribute("value",l.key),mxUtils.write(q,l.title),A.appendChild(q);var N=function(){A.value="custom";for(var J=0;J<H.length;J++){var Y=H[J];null!=Y.format&&("a4"==Y.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==Y.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),
-g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==Y.format.width&&g.height==Y.format.height?(A.value=Y.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,detected=!0):g.width==Y.format.height&&g.height==Y.format.width&&(A.value=Y.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,detected=n.checked=!0))}"custom"==
-A.value?(K.value=Editor.toUnit(g.width,f.value),c.value=Editor.toUnit(g.height,f.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};N();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var L=function(J,Y){J=D[A.value];null!=J.format?(K.value=Editor.toUnit(n.checked?J.format.height:J.format.width,f.value),c.value=Editor.toUnit(n.checked?J.format.width:J.format.height,f.value),F.style.display=
-"none",G.style.display=""):(G.style.display="none",F.style.display="");J=parseFloat(K.value);if(isNaN(J)||0>=J)K.value=Editor.toUnit(g.width,f.value);J=parseFloat(c.value);if(isNaN(J)||0>=J)c.value=Editor.toUnit(g.height,f.value);J=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(K.value),f.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),f.value)));Y||J.width==g.width&&J.height==g.height||(g=J,null!=m&&m(g))};mxEvent.addListener(e,"click",function(J){v.checked=!0;L(J);mxEvent.consume(J)});
-mxEvent.addListener(S,"click",function(J){n.checked=!0;L(J);mxEvent.consume(J)});mxEvent.addListener(K,"blur",L);mxEvent.addListener(K,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(n,"change",L);mxEvent.addListener(v,"change",L);mxEvent.addListener(A,"change",function(J){L(J,"custom"==A.value);mxEvent.consume(J)});mxEvent.addListener(f,"change",function(J){K.value=Editor.toUnit(Editor.fromUnit(K.value,Editor.pageSizeUnit),f.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
-Editor.pageSizeUnit),f.value);Editor.pageSizeUnit=f.value;L(J,!0);mxEvent.consume(J)});L(null,!0);return{set:function(J){g=J;N(null,null,!0)},get:function(){return g},widthInput:K,heightInput:c}};
+G.style.display="none";F.style.display="none";var D={},H=PageSetupDialog.getFormats();for(t=0;t<H.length;t++)l=H[t],D[l.key]=l,q=document.createElement("option"),q.setAttribute("value",l.key),mxUtils.write(q,l.title),A.appendChild(q);var N=function(){A.value="custom";for(var I=0;I<H.length;I++){var Z=H[I];null!=Z.format&&("a4"==Z.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==Z.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),
+g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==Z.format.width&&g.height==Z.format.height?(A.value=Z.key,v.setAttribute("checked","checked"),v.defaultChecked=!0,v.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,detected=!0):g.width==Z.format.height&&g.height==Z.format.width&&(A.value=Z.key,v.removeAttribute("checked"),v.defaultChecked=!1,v.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,detected=n.checked=!0))}"custom"==
+A.value?(J.value=Editor.toUnit(g.width,f.value),c.value=Editor.toUnit(g.height,f.value),v.setAttribute("checked","checked"),A.value="custom",G.style.display="none",F.style.display=""):(G.style.display="",F.style.display="none")};N();b.appendChild(A);mxUtils.br(b);b.appendChild(G);b.appendChild(F);var L=function(I,Z){I=D[A.value];null!=I.format?(J.value=Editor.toUnit(n.checked?I.format.height:I.format.width,f.value),c.value=Editor.toUnit(n.checked?I.format.width:I.format.height,f.value),F.style.display=
+"none",G.style.display=""):(G.style.display="none",F.style.display="");I=parseFloat(J.value);if(isNaN(I)||0>=I)J.value=Editor.toUnit(g.width,f.value);I=parseFloat(c.value);if(isNaN(I)||0>=I)c.value=Editor.toUnit(g.height,f.value);I=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(J.value),f.value)),Math.floor(Editor.fromUnit(parseFloat(c.value),f.value)));Z||I.width==g.width&&I.height==g.height||(g=I,null!=m&&m(g))};mxEvent.addListener(e,"click",function(I){v.checked=!0;L(I);mxEvent.consume(I)});
+mxEvent.addListener(R,"click",function(I){n.checked=!0;L(I);mxEvent.consume(I)});mxEvent.addListener(J,"blur",L);mxEvent.addListener(J,"click",L);mxEvent.addListener(c,"blur",L);mxEvent.addListener(c,"click",L);mxEvent.addListener(n,"change",L);mxEvent.addListener(v,"change",L);mxEvent.addListener(A,"change",function(I){L(I,"custom"==A.value);mxEvent.consume(I)});mxEvent.addListener(f,"change",function(I){J.value=Editor.toUnit(Editor.fromUnit(J.value,Editor.pageSizeUnit),f.value);c.value=Editor.toUnit(Editor.fromUnit(c.value,
+Editor.pageSizeUnit),f.value);Editor.pageSizeUnit=f.value;L(I,!0);mxEvent.consume(I)});L(null,!0);return{set:function(I){g=I;N(null,null,!0)},get:function(){return g},widthInput:J,heightInput:c}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,g,m,v,n,A,G,S,F,K){S=null!=S?S:!0;var c=document.createElement("div"),f=document.createElement("div");f.style.width="100%";f.style.display="grid";f.style.gap="5px 8px";f.style.gridAutoColumns="auto 1fr";f.style.boxSizing="border-box";f.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var t=document.createElement("div");t.style.display="inline-block";
-t.style.textOverflow="ellipsis";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.fontSize="10pt";t.style.padding="2px 0";t.setAttribute("title",v||mxResources.get("filename"));mxUtils.write(t,(v||mxResources.get("filename"))+":");l.appendChild(t);f.appendChild(l);var q=document.createElement("input");q.setAttribute("value",e||"");q.style.flexGrow="1";var D=mxUtils.button(g,function(){if(null==n||n(q.value))S&&b.hideDialog(),m(q.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-v||null==A)if(null!=K?Editor.selectFilename(q):(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=f.parentNode;if(null!=H){var N=null;mxEvent.addListener(H,"dragleave",function(L){null!=N&&(N.style.backgroundColor="",N=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=q,N.style.backgroundColor=
+var FilenameDialog=function(b,e,g,m,v,n,A,G,R,F,J){R=null!=R?R:!0;var c=document.createElement("div"),f=document.createElement("div");f.style.width="100%";f.style.display="grid";f.style.gap="5px 8px";f.style.gridAutoColumns="auto 1fr";f.style.boxSizing="border-box";f.style.padding="3px";var l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.justifyContent="flex-end";l.style.minWidth="0";var t=document.createElement("div");t.style.display="inline-block";
+t.style.textOverflow="ellipsis";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.fontSize="10pt";t.style.padding="2px 0";t.setAttribute("title",v||mxResources.get("filename"));mxUtils.write(t,(v||mxResources.get("filename"))+":");l.appendChild(t);f.appendChild(l);var q=document.createElement("input");q.setAttribute("value",e||"");q.style.flexGrow="1";var D=mxUtils.button(g,function(){if(null==n||n(q.value))R&&b.hideDialog(),m(q.value)});D.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
+v||null==A)if(null!=J?Editor.selectFilename(q):(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var H=f.parentNode;if(null!=H){var N=null;mxEvent.addListener(H,"dragleave",function(L){null!=N&&(N.style.backgroundColor="",N=null);L.stopPropagation();L.preventDefault()});mxEvent.addListener(H,"dragover",mxUtils.bind(this,function(L){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=q,N.style.backgroundColor=
"#ebf2f9");L.stopPropagation();L.preventDefault()}));mxEvent.addListener(H,"drop",mxUtils.bind(this,function(L){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(L.dataTransfer.getData("text/uri-list")),D.click());L.stopPropagation();L.preventDefault()}))}}};l=document.createElement("div");l.style.display="inline-flex";l.style.alignItems="center";l.style.gap="4px";l.style.whiteSpace="nowrap";l.appendChild(q);f.appendChild(l);
-null==v&&null!=A||null==K||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),f.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",f.appendChild(l),e=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
-e.style.width="100%",l.appendChild(e));null!=A&&f.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=K?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});l.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));
+null==v&&null!=A||null==J||null==b.editor.diagramFileTypes||(l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.textOverflow="ellipsis",l.style.justifyContent="flex-end",l.style.fontSize="10pt",mxUtils.write(l,mxResources.get("type")+":"),f.appendChild(l),l=document.createElement("div"),l.style.display="inline-flex",l.style.alignItems="center",l.style.whiteSpace="nowrap",f.appendChild(l),e=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
+e.style.width="100%",l.appendChild(e));null!=A&&f.appendChild(A);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=J?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=F&&F()});l.className="geBtn";null==G||b.isOffline()||row.appendChild(b.createHelpIcon(G));
b.editor.cancelFirst&&row.appendChild(l);mxEvent.addListener(q,"keypress",function(H){13==H.keyCode&&D.click()});row.appendChild(D);b.editor.cancelFirst||row.appendChild(l);f.appendChild(row);c.appendChild(f);this.container=c};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var v=document.createElement("option");v.setAttribute("value",b);mxUtils.write(v,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(v)}mxEvent.addListener(m,"change",function(n){n=g[m.value].extension;var A=e.value.lastIndexOf(".drawio.");A=0<A?A:e.value.lastIndexOf(".");"drawio"!=n&&(n="drawio."+n);e.value=0<A?e.value.substring(0,A+1)+n:e.value+"."+n;"createEvent"in
-document?(n=document.createEvent("HTMLEvents"),n.initEvent("change",!1,!0),e.dispatchEvent(n)):e.fireEvent("onchange")});b=function(n){n=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var S=g[G].extension,F=null;"drawio"!=S&&(F=S,S=".drawio."+S);if(n.substring(n.length-S.length-1)=="."+S||null!=F&&n.substring(n.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
+document?(n=document.createEvent("HTMLEvents"),n.initEvent("change",!1,!0),e.dispatchEvent(n)):e.fireEvent("onchange")});b=function(n){n=e.value.toLowerCase();for(var A=0,G=0;G<g.length;G++){var R=g[G].extension,F=null;"drawio"!=R&&(F=R,R=".drawio."+R);if(n.substring(n.length-R.length-1)=="."+R||null!=F&&n.substring(n.length-F.length-1)=="."+F){A=G;break}}m.value=A};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};
var WrapperWindow=function(b,e,g,m,v,n,A,G){G=null!=G?G:document.createElement("div");this.window=new mxWindow(e,G,g,m,v,n,!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);A(G)};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=A.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
-this.backgroundPageShape.init(A.container),S.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph;if(null!=A.container&&!A.transparentBackground){if(A.pageVisible){var G=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var R=A.container.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(this.backgroundPageShape=this.createBackgroundPageShape(G),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
+this.backgroundPageShape.init(A.container),R.style.position="absolute",A.container.insertBefore(this.backgroundPageShape.node,R),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(F){A.dblClick(F)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){null!=
A.tooltipHandler&&A.tooltipHandler.isHideOnHover()&&A.tooltipHandler.hide();A.isMouseDown&&!mxEvent.isConsumed(F)&&A.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(F))}),mxUtils.bind(this,function(F){A.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(F))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=G,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(A,G,S){var F=this.graph;A=null!=A?A:1;var K=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,c=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,f=null!=K&&this.gridColor!=K.toLowerCase()?this.gridColor:"#ffffff",l="none",t="";"simple"==F.getAdaptiveColors()&&F.background!=mxConstants.NONE&&null!=F.background&&(K=F.background);if(F.isGridEnabled()||F.gridVisible){t=
-10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(f,A))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",t=F.gridSize*this.scale*this.gridSteps*A):l="url("+this.gridImage+")";var q=f=0;G=null!=G?G-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var D=F.gridSize*this.scale*this.gridSteps,H=G%D;D=S%D;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);t=-Math.round(t-mxUtils.mod(this.translate.x*
-this.scale-f+G,t)+H*A)+"px "+-Math.round(t-mxUtils.mod(this.translate.y*this.scale-q+S,t)+D*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);f=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=t,F.view.backgroundPageShape.node.style.backgroundImage=l,F.view.backgroundPageShape.node.style.backgroundColor=K,F.view.backgroundPageShape.node.style.borderColor=c,F.view.backgroundPageShape.node.style.colorScheme=
-"none"==F.getAdaptiveColors()?"light":"",A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=f?F.diagramBackgroundColor:""):(A.style.backgroundPosition=t,A.style.backgroundImage=l,"1"==urlParams.transparent?F.container.style.background="transparent":!f||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=K:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,
-G){for(var S=this.graph.gridSize*this.scale*(null!=G?G:1);S<this.minGridSize;)S*=2;G=this.gridSteps*S;for(var F=[],K=1;K<this.gridSteps;K++){var c=K*S;F.push("M 0 "+c+" L "+G+" "+c+" M "+c+" 0 L "+c+" "+G)}A=mxUtils.getLightDarkColor(A);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
+mxGraphView.prototype.validateBackgroundStyles=function(A,G,R){var F=this.graph;A=null!=A?A:1;var J=mxUtils.getLightDarkColor(null==F.background||F.background==mxConstants.NONE?F.defaultPageBackgroundColor:F.background).cssText,c=mxUtils.getLightDarkColor(F.defaultPageBorderColor).cssText,f=null!=J&&this.gridColor!=J.toLowerCase()?this.gridColor:"#ffffff",l="none",t="";"simple"==F.getAdaptiveColors()&&F.background!=mxConstants.NONE&&null!=F.background&&(J=F.background);if(F.isGridEnabled()||F.gridVisible){t=
+10;mxClient.IS_SVG?(l=unescape(encodeURIComponent(this.createSvgGrid(f,A))),l=window.btoa?btoa(l):Base64.encode(l,!0),l="url(data:image/svg+xml;base64,"+l+")",t=F.gridSize*this.scale*this.gridSteps*A):l="url("+this.gridImage+")";var q=f=0;G=null!=G?G-this.translate.x*this.scale:0;R=null!=R?R-this.translate.y*this.scale:0;var D=F.gridSize*this.scale*this.gridSteps,H=G%D;D=R%D;null!=F.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);t=-Math.round(t-mxUtils.mod(this.translate.x*
+this.scale-f+G,t)+H*A)+"px "+-Math.round(t-mxUtils.mod(this.translate.y*this.scale-q+R,t)+D*A)+"px"}A=F.view.canvas;null!=A.ownerSVGElement&&(A=A.ownerSVGElement);f=!Editor.isDarkMode()&&F.enableDiagramBackground;null!=F.view.backgroundPageShape?(F.view.backgroundPageShape.node.style.backgroundPosition=t,F.view.backgroundPageShape.node.style.backgroundImage=l,F.view.backgroundPageShape.node.style.backgroundColor=J,F.view.backgroundPageShape.node.style.borderColor=c,F.view.backgroundPageShape.node.style.colorScheme=
+"none"==F.getAdaptiveColors()?"light":"",A.style.backgroundImage="none",A.style.backgroundColor="",F.container.style.backgroundColor=f?F.diagramBackgroundColor:""):(A.style.backgroundPosition=t,A.style.backgroundImage=l,"1"==urlParams.transparent?F.container.style.background="transparent":!f||null!=F.background&&F.background!=mxConstants.NONE?A.style.backgroundColor=J:(A.style.backgroundColor=F.diagramBackgroundColor,F.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(A,
+G){for(var R=this.graph.gridSize*this.scale*(null!=G?G:1);R<this.minGridSize;)R*=2;G=this.gridSteps*R;for(var F=[],J=1;J<this.gridSteps;J++){var c=J*R;F.push("M 0 "+c+" L "+G+" "+c+" M "+c+" 0 L "+c+" "+G)}A=mxUtils.getLightDarkColor(A);R="color-scheme: light dark;";mxClient.IS_SF&&(R="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+R+'" width="'+G+'" height="'+G+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
G+'" height="'+G+'" patternUnits="userSpaceOnUse"><path d="'+F.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" opacity="0.2" stroke-width="1"/><path d="M '+G+" 0 L 0 0 0 "+G+'" fill="none" style="stroke:'+mxUtils.htmlEntities(A.cssText)+';" stroke="'+A.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+G,F))+"px";S.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.view.scale,K=this.view.translate,c=this.pageFormat,f=F*this.pageScale,l=this.view.getBackgroundPageBounds();
-G=l.width;S=l.height;var t=new mxRectangle(F*K.x,F*K.y,c.width*f,c.height*f),q=(A=A&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(S/t.height)-1:0,D=A?Math.ceil(G/t.width)-1:0,H=l.x+G,N=l.y+S;null==this.horizontalPageBreaks&&0<q&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(L){if(null!=L){for(var J=L==this.horizontalPageBreaks?q:D,Y=0;Y<=J;Y++){var ha=L==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
-Math.round(l.y+(Y+1)*t.height)),new mxPoint(Math.round(H),Math.round(l.y+(Y+1)*t.height))]:[new mxPoint(Math.round(l.x+(Y+1)*t.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Y+1)*t.width),Math.round(N))];null!=L[Y]?(L[Y].points=ha,L[Y].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),L[Y]=ha)}for(Y=J;Y<L.length;Y++)null!=L[Y]&&L[Y].destroy();L.splice(J,L.length-J)}});
-A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,S){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var K=this.graph.getCellGeometry(G[F]);if(null!=K&&K.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,S=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,
-K=this.graph.pageScale,c=F.width*K;F=F.height*K;K=Math.floor(Math.min(0,G)/c);var f=Math.floor(Math.min(0,S)/F);return new mxRectangle(this.scale*(this.translate.x+K*c),this.scale*(this.translate.y+f*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/c)-K)*c,this.scale*(Math.ceil(Math.max(1,S+A.height/this.scale)/F)-f)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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=A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,S,F,K,c){var f=v.apply(this,arguments);null==c||c||mxEvent.addListener(f,"mousedown",function(l){mxEvent.consume(l)});return f};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(A,G,S){var F=this.graph.model.getParent(A);if(G){var K=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);K=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=K&&K.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(K=n.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))K=F,this.graph.isTable(K)||(K=this.graph.model.getParent(K)),K=!this.graph.selectionCellsHandler.isHandled(K)||this.graph.isCellSelected(K)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(A)&&this.graph.isCellSelected(F);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),S=G.getParent(A),F=this.graph.view.getState(S),K=this.graph.isCellSelected(A);null!=F&&(G.isVertex(S)||G.isEdge(S));){var c=this.graph.isCellSelected(S);K=K||c;if(c||!K&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=S;S=G.getParent(S)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var n=v.getGraphBounds;v.getGraphBounds=function(){var W=n.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ja=this.view.translate,ca=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ja.x+ba.x)*ca,(ja.y+ba.y)*ca,ba.width*ca,ba.height*ca))}return W};v.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){v.isEnabled=
-function(){return!1};v.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=v.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,S=!1;this.setDefaultStyle=function(W){try{v.getModel().isEdge(W)?
-S=v.pasteEdgeStyle=!1:G=!1;var ba=v.getCellStyle(W,!1),ja=[],ca=[],la;for(la in ba)ja.push(ba[la]),ca.push(la);v.getModel().isEdge(W)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",ja,"cells",[W],"force",!0));v.getModel().isEdge(W)?S=v.pasteEdgeStyle=!0:G=!0}catch(Q){this.handleError(Q)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=
-S=v.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(W,ba){v.pasteCellStyles(v.includeDescendants(ba.getProperty("cells")))});v.addListener("textInserted",function(W,ba){v.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(W){null==W&&(W=window.event);return v.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var W=
-null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ja){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect",
-"none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return F(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=
-!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var K=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();K.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-
-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(W){16==W.which?this.shiftDown=!0:32!=W.which||v.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||
-this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||mxEvent.getSource(W)!=v.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(W){return f.apply(this,
-arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var l=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(W){return l.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};
-var t=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||t.apply(this,arguments)};var q=mxUtils.bind(this,function(){if(null!=this.toolbar)for(var W=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ba=this.toolbar.container.firstChild;null!=ba;){var ja=ba.getAttribute("data-min-width");null!=ja&&parseInt(ja)>W?ba.style.display="none":ba.style.display="";ba=ba.nextSibling}}),D=!1,H=null,N=null,L=null,J=mxUtils.bind(this,function(){if(null!=this.toolbar&&
-D!=v.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ja=W.nextSibling;W.parentNode.removeChild(W);ba.push(W);W=ja}W=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var ca=0;ca<L.length;ca++)this.toolbar.container.appendChild(L[ca]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=N}D=v.cellEditor.isContentEditing();H=W;N=ja;L=ba;q()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);
-this.descriptorChanged();this.updateStatusAgain();J()}));this.addListener("currentThemeChanged",q);mxEvent.addListener(window,"resize",q);q();var Y=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){Y.apply(this,arguments);J();if(v.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ja=v.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ja.fontFamily)),
-m.toolbar.setFontSize(parseInt(ja.fontSize))));W=!1},0))};mxEvent.addListener(v.cellEditor.textarea,"input",ba);mxEvent.addListener(v.cellEditor.textarea,"touchend",ba);mxEvent.addListener(v.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(v.cellEditor.textarea,"keyup",ba);ba()}};var ha=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(W,ba){try{ha.apply(this,arguments),J()}catch(ja){m.handleError(ja)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===
-window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(W){}var ea=v.fireMouseEvent;v.fireMouseEvent=function(W,ba,ja){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ca){m.handleError(ca)}};var aa=v.foldCells;v.foldCells=function(W,ba,ja,ca,la){try{aa.apply(this,arguments)}catch(Q){m.handleError(Q)}};v.popupMenuHandler.autoExpand=!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ja){this.menus.createPopupMenu(W,
-ba,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){v.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ja=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ja.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(v.view.getState(ja[ja.length-1]))},0));v.pasteCellStyles(ja)});this.addListener("styleChanged",
-mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&v.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,S);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&
-"1"==v.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.curvedImage.src):"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||null==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?
-this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),
-null!=this.toolbar.edgeShapeMenu&&("link"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.linkEdgeImage.src):"flexArrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=
-v.currentVertexStyle.fontFamily||"Helvetica",ba=String(v.currentVertexStyle.fontSize||"12"),ja=v.getView().getState(v.getSelectionCell());null!=ja&&(W=ja.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ja.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,b));v.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");
-ba=ba.getProperty("parent");null!=ba&&v.getModel().isLayer(ba)&&!v.isCellVisible(ba)&&null!=W&&0<W.length&&v.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var W=v.getLayerForCells(v.getSelectionCells());null!=W&&v.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,
-this.gestureHandler);var na=null;this.resizeHandler=mxUtils.bind(this,function(){null!=na&&window.clearTimeout(na);na=window.setTimeout(mxUtils.bind(this,function(){na=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=
-mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));
-this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,e,g){function m(G,S){var F=n;n+=S;return G.substring(F,n)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var n=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(n-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
+if(null!=this.shiftPreview1){var R=this.view.canvas;null!=R.ownerSVGElement&&(R=R.ownerSVGElement);var F=this.gridSize*this.view.scale*this.view.gridSteps;F=-Math.round(F-mxUtils.mod(this.view.translate.x*this.view.scale+A,F))+"px "+-Math.round(F-mxUtils.mod(this.view.translate.y*this.view.scale+G,F))+"px";R.style.backgroundPosition=F}};mxGraph.prototype.updatePageBreaks=function(A,G,R){var F=this.view.scale,J=this.view.translate,c=this.pageFormat,f=F*this.pageScale,l=this.view.getBackgroundPageBounds();
+G=l.width;R=l.height;var t=new mxRectangle(F*J.x,F*J.y,c.width*f,c.height*f),q=(A=A&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(R/t.height)-1:0,D=A?Math.ceil(G/t.width)-1:0,H=l.x+G,N=l.y+R;null==this.horizontalPageBreaks&&0<q&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);A=mxUtils.bind(this,function(L){if(null!=L){for(var I=L==this.horizontalPageBreaks?q:D,Z=0;Z<=I;Z++){var ia=L==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),
+Math.round(l.y+(Z+1)*t.height)),new mxPoint(Math.round(H),Math.round(l.y+(Z+1)*t.height))]:[new mxPoint(Math.round(l.x+(Z+1)*t.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(Z+1)*t.width),Math.round(N))];null!=L[Z]?(L[Z].points=ia,L[Z].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(),L[Z]=ia)}for(Z=I;Z<L.length;Z++)null!=L[Z]&&L[Z].destroy();L.splice(I,L.length-I)}});
+A(this.horizontalPageBreaks);A(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(A,G,R){for(var F=0;F<G.length;F++){if(this.graph.isTableCell(G[F])||this.graph.isTableRow(G[F]))return!1;if(this.graph.getModel().isVertex(G[F])){var J=this.graph.getCellGeometry(G[F]);if(null!=J&&J.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var A=g.apply(this,arguments);A.intersects=mxUtils.bind(this,function(G,R){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(A,arguments)});return A};mxGraphView.prototype.createBackgroundPageShape=function(A){return new mxRectangleShape(A,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var A=this.getGraphBounds(),G=0<A.width?A.x/this.scale-this.translate.x:0,R=0<A.height?A.y/this.scale-this.translate.y:0,F=this.graph.pageFormat,
+J=this.graph.pageScale,c=F.width*J;F=F.height*J;J=Math.floor(Math.min(0,G)/c);var f=Math.floor(Math.min(0,R)/F);return new mxRectangle(this.scale*(this.translate.x+J*c),this.scale*(this.translate.y+f*F),this.scale*(Math.ceil(Math.max(1,G+A.width/this.scale)/c)-J)*c,this.scale*(Math.ceil(Math.max(1,R+A.height/this.scale)/F)-f)*F)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(A,G){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=A+"px",this.view.backgroundPageShape.node.style.marginTop=G+"px")};var v=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(A,G,R,F,J,c){var f=v.apply(this,arguments);null==c||c||mxEvent.addListener(f,"mousedown",function(l){mxEvent.consume(l)});return f};var n=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(A,G,R){var F=this.graph.model.getParent(A);if(G){var J=this.graph.model.isEdge(A)?null:this.graph.getCellGeometry(A);J=!this.graph.model.isEdge(F)&&!this.graph.isSiblingSelected(A)&&(null!=J&&J.relative||!this.graph.isContainer(F)||this.graph.isPart(A))}else if(J=n.apply(this,arguments),this.graph.isTableCell(A)||this.graph.isTableRow(A))J=F,this.graph.isTable(J)||(J=this.graph.model.getParent(J)),J=!this.graph.selectionCellsHandler.isHandled(J)||this.graph.isCellSelected(J)&&this.graph.isToggleEvent(R.getEvent())||
+this.graph.isCellSelected(A)&&!this.graph.isToggleEvent(R.getEvent())||this.graph.isTableCell(A)&&this.graph.isCellSelected(F);return J};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(A){A=A.getCell();for(var G=this.graph.getModel(),R=G.getParent(A),F=this.graph.view.getState(R),J=this.graph.isCellSelected(A);null!=F&&(G.isVertex(R)||G.isEdge(R));){var c=this.graph.isCellSelected(R);J=J||c;if(c||!J&&(this.graph.isTableCell(A)||this.graph.isTableRow(A)))A=R;R=G.getParent(R)}return A}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,v=this.editor.graph;v.lightbox=g;var n=v.getGraphBounds;v.getGraphBounds=function(){var X=n.apply(this,arguments),ca=this.backgroundImage;if(null!=ca&&null!=ca.width&&null!=ca.height){var ka=this.view.translate,da=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ka.x+ca.x)*da,(ka.y+ca.y)*da,ca.width*da,ca.height*da))}return X};v.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ca){this.clearSelectionState()});v.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);v.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);v.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);v.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){v.isEnabled=
+function(){return!1};v.panningHandler.isForcePanningEvent=function(X){for(var ca=X.getSource();null!=ca&&ca!=v.container;){if("foreignObject"===ca.nodeName||"text"===ca.nodeName)return!1;ca=ca.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var A=v.panningHandler.start;v.panningHandler.start=function(){A.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!v.standalone){var G=!1,R=!1;this.setDefaultStyle=function(X){try{v.getModel().isEdge(X)?
+R=v.pasteEdgeStyle=!1:G=!1;var ca=v.getCellStyle(X,!1),ka=[],da=[],W;for(W in ca)ka.push(ca[W]),da.push(W);v.getModel().isEdge(X)?v.currentEdgeStyle={}:v.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",da,"values",ka,"cells",[X],"force",!0));v.getModel().isEdge(X)?R=v.pasteEdgeStyle=!0:G=!0}catch(S){this.handleError(S)}};this.clearDefaultStyle=function(){v.currentEdgeStyle=mxUtils.clone(v.defaultEdgeStyle);v.currentVertexStyle=mxUtils.clone(v.defaultVertexStyle);G=R=v.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};v.addListener("cellsInserted",function(X,ca){v.pasteCellStyles(v.includeDescendants(ca.getProperty("cells")))});v.addListener("textInserted",function(X,ca){v.pasteCellStyles(ca.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var F=mxUtils.bind(this,function(X){null==X&&(X=window.event);return v.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,this.formatContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ca=
+navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ca[1],10),parseInt(ca[2],10),parseInt(ca[3]||0,10)]}catch(ka){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,
+"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ca=mxEvent.getSource(X);if("A"==ca.nodeName)for(;null!=ca;){if("geHint"==ca.className)return!0;ca=ca.parentNode}}return F(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):v.panningHandler.usePopupTrigger=!1;v.init(this.diagramContainer);mxClient.IS_SVG&&null!=v.view.getDrawPane()&&
+(e=v.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=v.graphHandler){var J=v.graphHandler.start;v.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(X){var ca=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ca.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ca.y-this.diagramContainer.clientHeight?
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var c=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ca){return m.isSpaceDown()||c.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(X){16==X.which?this.shiftDown=!0:32!=X.which||v.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),v.container.style.cursor="move",v.isEditing()||
+mxEvent.getSource(X)!=v.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){v.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var f=v.panningHandler.isForcePanningEvent;v.panningHandler.isForcePanningEvent=function(X){return f.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&
+(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var l=v.cellEditor.isStopEditingEvent;v.cellEditor.isStopEditingEvent=function(X){return l.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var t=v.isZoomWheelEvent;v.isZoomWheelEvent=function(){return m.isSpaceDown()||t.apply(this,arguments)};var q=mxUtils.bind(this,
+function(){if(null!=this.toolbar)for(var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,ca=this.toolbar.container.firstChild;null!=ca;){var ka=ca.getAttribute("data-min-width");null!=ka&&parseInt(ka)>X?ca.style.display="none":ca.style.display="";ca=ca.nextSibling}}),D=!1,H=null,N=null,L=null,I=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=v.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ca=[];null!=X;){var ka=X.nextSibling;
+X.parentNode.removeChild(X);ca.push(X);X=ka}X=this.toolbar.fontMenu;ka=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var da=0;da<L.length;da++)this.toolbar.container.appendChild(L[da]);this.toolbar.fontMenu=H;this.toolbar.sizeMenu=N}D=v.cellEditor.isContentEditing();H=X;N=ka;L=ca;q()}});this.addListener("languageChanged",mxUtils.bind(this,function(){this.destroyWindows(!0);this.descriptorChanged();this.updateStatusAgain();I()}));this.addListener("currentThemeChanged",
+q);mxEvent.addListener(window,"resize",q);q();var Z=v.cellEditor.startEditing;v.cellEditor.startEditing=function(){Z.apply(this,arguments);I();if(v.cellEditor.isContentEditing()){var X=!1,ca=function(){X||(X=!0,window.setTimeout(function(){var ka=v.getSelectedEditingElement();null!=ka&&(ka=mxUtils.getCurrentStyle(ka),null!=ka&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ka.fontFamily)),m.toolbar.setFontSize(parseInt(ka.fontSize))));X=!1},0))};mxEvent.addListener(v.cellEditor.textarea,
+"input",ca);mxEvent.addListener(v.cellEditor.textarea,"touchend",ca);mxEvent.addListener(v.cellEditor.textarea,"mouseup",ca);mxEvent.addListener(v.cellEditor.textarea,"keyup",ca);ca()}};var ia=v.cellEditor.stopEditing;v.cellEditor.stopEditing=function(X,ca){try{ia.apply(this,arguments),I()}catch(ka){m.handleError(ka)}};v.container.setAttribute("tabindex","0");v.container.style.cursor="default";if(window.self===window.top&&null!=v.container.parentNode)try{v.container.focus()}catch(X){}var fa=v.fireMouseEvent;
+v.fireMouseEvent=function(X,ca,ka){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),fa.apply(this,arguments)}catch(da){m.handleError(da)}};var ba=v.foldCells;v.foldCells=function(X,ca,ka,da,W){try{ba.apply(this,arguments)}catch(S){m.handleError(S)}};v.popupMenuHandler.autoExpand=!0;null!=this.menus&&(v.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ca,ka){this.menus.createPopupMenu(X,ca,ka)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){v.popupMenuHandler.hideMenu()}));
+this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};v.connectionHandler.addListener(mxEvent.CONNECT,function(X,ca){var ka=[ca.getProperty("cell")];ca.getProperty("terminalInserted")&&(ka.push(ca.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(v.view.getState(ka[ka.length-1]))},0));v.pasteCellStyles(ka)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ca){X=ca.getProperty("force");(this.updateDefaultStyle||
+X)&&v.copyCellStyles(ca.getProperty("cells"),ca.getProperty("keys"),ca.getProperty("values"),v.currentVertexStyle,v.currentEdgeStyle,G,R);null!=this.toolbar&&(this.toolbar.setFontName(v.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(v.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&("orthogonalEdgeStyle"==v.currentEdgeStyle.edgeStyle&&"1"==v.currentEdgeStyle.curved?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,
+Format.curvedImage.src):"straight"==v.currentEdgeStyle.edgeStyle||"none"==v.currentEdgeStyle.edgeStyle||null==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.straightImage.src):"entityRelationEdgeStyle"==v.currentEdgeStyle.edgeStyle?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.entityImage.src):"elbowEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalElbowImage.src):
+this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalElbowImage.src):"isometricEdgeStyle"==v.currentEdgeStyle.edgeStyle?"vertical"==v.currentEdgeStyle.elbow?this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.verticalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.horizontalIsometricImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeStyleMenu,Format.orthogonalImage.src)),null!=this.toolbar.edgeShapeMenu&&("link"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,
+Format.linkEdgeImage.src):"flexArrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.arrowImage.src):"arrow"==v.currentEdgeStyle.shape?this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.simpleArrowImage.src):this.toolbar.setMenuIcon(this.toolbar.edgeShapeMenu,Format.connectionImage.src)))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=v.currentVertexStyle.fontFamily||"Helvetica",ca=String(v.currentVertexStyle.fontSize||"12"),ka=v.getView().getState(v.getSelectionCell());
+null!=ka&&(X=ka.style[mxConstants.STYLE_FONTFAMILY]||X,ca=ka.style[mxConstants.STYLE_FONTSIZE]||ca,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ca)}),v.getSelectionModel().addListener(mxEvent.CHANGE,b),v.getModel().addListener(mxEvent.CHANGE,b));v.addListener(mxEvent.CELLS_ADDED,function(X,ca){X=ca.getProperty("cells");ca=ca.getProperty("parent");null!=ca&&v.getModel().isLayer(ca)&&!v.isCellVisible(ca)&&null!=X&&0<X.length&&v.getModel().setVisible(ca,
+!0)});Graph.selectParentLayer&&v.selectionModel.addListener(mxEvent.CHANGE,function(){if(v.isEnabled()&&!v.isSelectionEmpty()){var X=v.getLayerForCells(v.getSelectionCells());null!=X&&v.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var na=null;this.resizeHandler=mxUtils.bind(this,function(){null!=na&&window.clearTimeout(na);
+na=window.setTimeout(mxUtils.bind(this,function(){na=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));
+this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){v.view.validateBackground()}));v.addListener("gridSizeChanged",mxUtils.bind(this,function(){v.isGridEnabled()&&v.view.validateBackground()}));this.editor.resetGraph()}this.init();v.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(b,e,g){function m(G,R){var F=n;n+=R;return G.substring(F,n)}function v(G){G=m(G,4);return G.charCodeAt(3)+(G.charCodeAt(2)<<8)+(G.charCodeAt(1)<<16)+(G.charCodeAt(0)<<24)}var n=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=v(b);var A=m(b,4);if(null!=e&&e(n-8,A,g))break;value=m(b,g);m(b,4);if("IEND"==A)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?220:230);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;
EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var m=b.getRubberband();null!=m&&m.cancel()}));mxEvent.addListener(b.container,
@@ -2072,33 +2071,33 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,v=0;v<e.length;v++){var n=b.getCurrentCellStyle(e[v]);"0"!=mxUtils.getValue(n,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[v],e,m),m=!1)}this.updateSelectionStateForTableCells(g);if(Editor.enableCustomProperties&&null!=this.format){g.customProperties={};b=g.vertices;e=g.edges;for(v=0;v<b.length;v++)this.findCommonProperties(b[v],g.customProperties,
0==v,g);for(v=0;v<e.length;v++)this.findCommonProperties(e[v],g.customProperties,0==b.length&&0==v,g)}return g};
-EditorUi.prototype.findCommonProperties=function(b,e,g,m){if(null!=e){var v=mxUtils.bind(this,function(A){if(null!=A)if(g)for(var G=0;G<A.length;G++){if("function"!==typeof A[G].isVisible||A[G].isVisible(m,this.format))e[A[G].name]=A[G]}else for(var S in e){var F=!1;for(G=0;G<A.length;G++)if(A[G].name==S&&A[G].type==e[S].type){F=!0;break}F||delete e[S]}}),n=this.editor.graph.view.getState(b);null!=n&&null!=n.shape&&(n.shape.commonCustomPropAdded||(n.shape.commonCustomPropAdded=!0,n.shape.customProperties=
+EditorUi.prototype.findCommonProperties=function(b,e,g,m){if(null!=e){var v=mxUtils.bind(this,function(A){if(null!=A)if(g)for(var G=0;G<A.length;G++){if("function"!==typeof A[G].isVisible||A[G].isVisible(m,this.format))e[A[G].name]=A[G]}else for(var R in e){var F=!1;for(G=0;G<A.length;G++)if(A[G].name==R&&A[G].type==e[R].type){F=!0;break}F||delete e[R]}}),n=this.editor.graph.view.getState(b);null!=n&&null!=n.shape&&(n.shape.commonCustomPropAdded||(n.shape.commonCustomPropAdded=!0,n.shape.customProperties=
n.shape.customProperties||[],n.cell.vertex?Array.prototype.push.apply(n.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(n.shape.customProperties,Editor.commonEdgeProperties)),v(n.shape.customProperties));b=b.getAttribute("customProperties");if(null!=b)try{v(JSON.parse(b))}catch(A){}}};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var n=m.getIndex(e[0]),A=v.getIndex(m),G=null,S=1,F=1,K=0,c=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),n):null;K<e.length-1;){var f=e[++K];null==c||c!=f||null!=G&&S!=G||(G=S,S=0,F++,m=g.getParent(c),c=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),n):null);var l=this.editor.graph.view.getState(f);
-if(f==g.getChildAt(m,n+S)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))S++;else break}K==F*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),v=g.getParent(m);if(null!=m&&null!=v){for(var n=m.getIndex(e[0]),A=v.getIndex(m),G=null,R=1,F=1,J=0,c=A<v.getChildCount()-1?g.getChildAt(g.getChildAt(v,A+1),n):null;J<e.length-1;){var f=e[++J];null==c||c!=f||null!=G&&R!=G||(G=R,R=0,F++,m=g.getParent(c),c=A+F<v.getChildCount()?g.getChildAt(g.getChildAt(v,A+F),n):null);var l=this.editor.graph.view.getState(f);
+if(f==g.getChildAt(m,n+R)&&null!=l&&1==mxUtils.getValue(l.style,"colspan",1)&&1==mxUtils.getValue(l.style,"rowspan",1))R++;else break}J==F*R-1&&(b.mergeCell=e[0],b.colspan=R,b.rowspan=F)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.editor.graph.sizeDidChange()}),0)};
EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,v=null,n=mxUtils.bind(this,function(G){v.clear()&&(m=!1,G=null!=G?G:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(G):this.handleError(G))}),A=window.setTimeout(n,null!=b?b:this.timeout);v={clear:function(){window.clearTimeout(A);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(v)}),n);return v};
EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};
-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,n=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var S=0;S<v.length;S++)try{var F=G[v[S]];if(mxUtils.isLightDarkColor(F)){var K=mxUtils.getLightDarkColor(F);m.setCellStyles(v[S],K.light,[b[A]])}}catch(f){}e&&m.isHtmlLabel(b[A])&&
-"0"!=mxUtils.getValue(G,"html","0")&&(n.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(n,null,null,function(f,l,t){return mxUtils.isLightDarkColor(t)?(t=mxUtils.getLightDarkColor(t),f.style.setProperty(l,t.light),!0):!1})&&m.cellLabelChanged(b[A],n.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){K=mxUtils.getLightDarkColor(m.background);var c=new ChangePageSetup(this,K.light);c.ignoreImage=!0;m.model.execute(c)}}finally{m.model.endUpdate()}return b};
+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var v=Graph.colorStyles,n=document.createElement("div");m.model.beginUpdate();try{for(var A=0;A<b.length;A++)if(m.model.isEdge(b[A])||m.model.isVertex(b[A])){var G=m.getCellStyle(b[A],!1);if(null!=G)for(var R=0;R<v.length;R++)try{var F=G[v[R]];if(mxUtils.isLightDarkColor(F)){var J=mxUtils.getLightDarkColor(F);m.setCellStyles(v[R],J.light,[b[A]])}}catch(f){}e&&m.isHtmlLabel(b[A])&&
+"0"!=mxUtils.getValue(G,"html","0")&&(n.innerHTML=Graph.sanitizeHtml(m.getLabel(b[A])),Graph.addLightDarkColors(n,null,null,function(f,l,t){return mxUtils.isLightDarkColor(t)?(t=mxUtils.getLightDarkColor(t),f.style.setProperty(l,t.light),!0):!1})&&m.cellLabelChanged(b[A],n.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){J=mxUtils.getLightDarkColor(m.background);var c=new ChangePageSetup(this,J.light);c.ignoreImage=!0;m.model.execute(c)}}finally{m.model.endUpdate()}return b};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);
b.vertices.push(e);var v=g.getCellGeometry(e);if(null!=v&&(0<v.width?null==b.width?b.width=v.width:b.width!=v.width&&(b.width=""):b.containsLabel=!0,0<v.height?null==b.height?b.height=v.height:b.height!=v.height&&(b.height=""):b.containsLabel=!0,!v.relative||null!=v.offset)){var n=v.relative?v.offset.x:v.x;v=v.relative?v.offset.y:v.y;null==b.x?b.x=n:b.x!=n&&(b.x="");null==b.y?b.y=v:b.y!=v&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);n=g.view.getState(e);null!=n&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(n),b.glass=b.glass&&g.isGlassState(n),b.rounded=b.rounded&&g.isRoundedState(n),b.lineJumps=b.lineJumps&&g.isLineJumpState(n),b.image=b.image||g.isImageState(n),b.shadow=b.shadow&&g.isShadowState(n),b.fill=b.fill&&g.isFillState(n),b.gradient=b.fill&&g.isGradientState(n),b.stroke=b.stroke&&g.isStrokeState(n),e=mxUtils.getValue(n.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||
"image"==e,g.mergeStyle(n.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(S,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(S,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-g);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();n.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(S,F,K){var c=K.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?A.apply(this,arguments):this.graph.connectVertex(S.cell,F,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(f,l,t){var q=b.getCompositeParent(S.cell);f=b.getCellGeometry(q);for(K.consume();null!=q&&b.model.isVertex(q)&&null!=f&&f.relative;)cell=
-q,q=b.model.getParent(cell),f=b.getCellGeometry(q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.getGraphX(),K.getGraphY(),q,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),F)}),30)}),mxUtils.bind(this,function(f){this.graph.selectCellsForConnectVertex(f,c,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var K=
-F.getProperty("arrow"),c=F.getProperty("direction"),f=F.getProperty("event");K=K.getBoundingClientRect();var l=mxUtils.getOffset(b.container),t=b.container.scrollLeft+K.x-l.x;l=b.container.scrollTop+K.y-l.y;var q=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,l,q,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(q,c,b.defaultEdgeLength,f,!0,!1,function(N,L,J){J(H);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(H))},
-function(N){b.selectCellsForConnectVertex(N)},f,this.hoverIcons)}),c,!0);null!=D&&(this.centerShapePicker(D,K,t,l,c),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(S,F){null!=G&&window.clearTimeout(G)}))}};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(R,F){"mouseDown"==F.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;
+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var v=b.dblClick;b.dblClick=function(R,F){if(this.isEnabled())if(null!=F||null==e.sidebar||mxEvent.isShiftDown(R)||b.isCellLocked(b.getDefaultParent()))v.apply(this,arguments);else{var J=mxUtils.convertPoint(this.container,mxEvent.getClientX(R),mxEvent.getClientY(R));mxEvent.consume(R);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(J.x,J.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+g);var n=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();n.apply(this,arguments)};var A=this.hoverIcons.execute;this.hoverIcons.execute=function(R,F,J){var c=J.getEvent();this.graph.isCloneEvent(c)||mxEvent.isShiftDown(c)?A.apply(this,arguments):this.graph.connectVertex(R.cell,F,this.graph.defaultEdgeLength,c,null,null,mxUtils.bind(this,function(f,l,t){var q=b.getCompositeParent(R.cell);f=b.getCellGeometry(q);for(J.consume();null!=q&&b.model.isVertex(q)&&null!=f&&f.relative;)cell=
+q,q=b.model.getParent(cell),f=b.getCellGeometry(q);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(J.getGraphX(),J.getGraphY(),q,mxUtils.bind(this,function(D){t(D);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(D))}),F)}),30)}),mxUtils.bind(this,function(f){this.graph.selectCellsForConnectVertex(f,c,this)}))};var G=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(R,F){null!=G&&window.clearTimeout(G);G=window.setTimeout(mxUtils.bind(this,function(){var J=
+F.getProperty("arrow"),c=F.getProperty("direction"),f=F.getProperty("event");J=J.getBoundingClientRect();var l=mxUtils.getOffset(b.container),t=b.container.scrollLeft+J.x-l.x;l=b.container.scrollTop+J.y-l.y;var q=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=e.showShapePicker(t,l,q,mxUtils.bind(this,function(H){null!=H&&b.connectVertex(q,c,b.defaultEdgeLength,f,!0,!1,function(N,L,I){I(H);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(H))},
+function(N){b.selectCellsForConnectVertex(N)},f,this.hoverIcons)}),c,!0);null!=D&&(this.centerShapePicker(D,J,t,l,c),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(R,F){null!=G&&window.clearTimeout(G)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,g,m,v){if(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)b.style.width="40px";var n=b.getBoundingClientRect();v==mxConstants.DIRECTION_NORTH?(g-=n.width/2-10,m-=n.height+6):v==mxConstants.DIRECTION_SOUTH?(g-=n.width/2-10,m+=e.height+6):v==mxConstants.DIRECTION_WEST?(g-=n.width+6,m-=n.height/2-10):v==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=n.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};
-EditorUi.prototype.showShapePicker=function(b,e,g,m,v,n,A,G,S){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,n,G),n,A,G,S),null!=F&&(null==this.hoverIcons||n||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};
-EditorUi.prototype.createShapePicker=function(b,e,g,m,v,n,A,G,S,F,K){K=null!=K?K:!0;var c=this.editor.graph,f=null;S=null!=S?S:function(q){q=q[0];var D=0,H=0,N=q.geometry;null!=N&&(c.model.isEdge(q)&&(q=N.getTerminalPoint(!1),N=new mxRectangle(0,0,q.x,q.y)),D=N.width/2,H=N.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-D),c.snap(Math.round(e/c.view.scale)-c.view.translate.y-H))};if(null!=A&&0<A.length){var l=this;c=this.editor.graph;f=document.createElement("div");
+EditorUi.prototype.showShapePicker=function(b,e,g,m,v,n,A,G,R){var F=null;this.editor.graph.freehand.isDrawing()||(G=G||null==g,F=this.createShapePicker(b,e,g,m,v,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,n,G),n,A,G,R),null!=F&&(null==this.hoverIcons||n||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=F));return F};
+EditorUi.prototype.createShapePicker=function(b,e,g,m,v,n,A,G,R,F,J){J=null!=J?J:!0;var c=this.editor.graph,f=null;R=null!=R?R:function(q){q=q[0];var D=0,H=0,N=q.geometry;null!=N&&(c.model.isEdge(q)&&(q=N.getTerminalPoint(!1),N=new mxRectangle(0,0,q.x,q.y)),D=N.width/2,H=N.height/2);return new mxPoint(c.snap(Math.round(b/c.view.scale)-c.view.translate.x-D),c.snap(Math.round(e/c.view.scale)-c.view.translate.y-H))};if(null!=A&&0<A.length){var l=this;c=this.editor.graph;f=document.createElement("div");
v=c.view.getState(g);var t=null==g||null!=v&&c.isTransparentState(v)?null:c.copyStyle(g);f.className="geShapePicker";f.setAttribute("title",mxResources.get("sidebarTooltip"));f.style.left=Math.round(b)+"px";f.style.top=Math.round(e)+"px";mxClient.IS_POINTER&&(f.style.touchAction="none");G||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");c.container.appendChild(f);v=mxUtils.bind(this,function(q){var D=document.createElement("a");f.appendChild(D);null!=t&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(t,[q]):this.sidebar.graph.pasteCellStyles([q],c.currentVertexStyle,c.currentEdgeStyle);var H=q.geometry;c.model.isEdge(q)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([q],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(N){if(!mxEvent.isShiftDown(N)||null==g&&c.isSelectionEmpty()){var L=c.cloneCell(q);if(null!=m)m(L);else{var J=S([L]);c.model.isEdge(L)?L.geometry.translate(J.x,J.y):(L.geometry.x=
-J.x,L.geometry.y=J.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);K&&c.startEditing(L);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=g?[g]:c.getSelectionCells()),c.updateShapes(q,L);null!=n&&n(N);mxEvent.consume(N)}),25,25,null,null,g),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",D.appendChild(H))});
+this.sidebar.graph.pasteStyle(t,[q]):this.sidebar.graph.pasteCellStyles([q],c.currentVertexStyle,c.currentEdgeStyle);var H=q.geometry;c.model.isEdge(q)&&(H=H.getTerminalPoint(!1),H=new mxRectangle(0,0,H.x,H.y));null!=H&&(H=this.sidebar.createVertexTemplateFromCells([q],H.width,H.height,"",!0,!1,null,!1,mxUtils.bind(this,function(N){if(!mxEvent.isShiftDown(N)||null==g&&c.isSelectionEmpty()){var L=c.cloneCell(q);if(null!=m)m(L);else{var I=R([L]);c.model.isEdge(L)?L.geometry.translate(I.x,I.y):(L.geometry.x=
+I.x,L.geometry.y=I.y);c.model.beginUpdate();try{c.addCell(L),c.model.isVertex(L)&&c.isAutoSizeCell(L)&&c.updateCellSize(L)}finally{c.model.endUpdate()}c.setSelectionCell(L);c.scrollCellToVisible(L);J&&c.startEditing(L);null!=l.hoverIcons&&l.hoverIcons.update(c.view.getState(L))}}else L=c.getEditableCells(null!=g?[g]:c.getSelectionCells()),c.updateShapes(q,L);null!=n&&n(N);mxEvent.consume(N)}),25,25,null,null,g),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",D.appendChild(H))});
for(F=0;F<(G?Math.min(A.length,4):A.length);F++)v(A[F]);A=f.offsetTop+f.clientHeight-(c.container.scrollTop+c.container.offsetHeight);0<A&&(f.style.top=Math.max(c.container.scrollTop+22,e-A)+"px");A=f.offsetLeft+f.clientWidth-(c.container.scrollLeft+c.container.offsetWidth);0<A&&(f.style.left=Math.max(c.container.scrollLeft+22,b-A)+"px")}return f};
-EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(n,A,G,S){return m.createVertex(null,null,S||"",0,0,A||120,G||60,n,!1)});e=mxUtils.bind(this,function(n,A,G){n=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),n);n.geometry.setTerminalPoint(new mxPoint(0,0),!0);n.geometry.setTerminalPoint(new mxPoint(n.geometry.width,null!=A?A:0),!1);n.geometry.points=null!=A?[new mxPoint(n.geometry.width/2,A)]:[];n.geometry.relative=!0;n.edge=
+EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,v=mxUtils.bind(this,function(n,A,G,R){return m.createVertex(null,null,R||"",0,0,A||120,G||60,n,!1)});e=mxUtils.bind(this,function(n,A,G){n=new mxCell(G||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),n);n.geometry.setTerminalPoint(new mxPoint(0,0),!0);n.geometry.setTerminalPoint(new mxPoint(n.geometry.width,null!=A?A:0),!1);n.geometry.points=null!=A?[new mxPoint(n.geometry.width/2,A)]:[];n.geometry.relative=!0;n.edge=
!0;return n});if(null!=b)try{b=m.cloneCell(b),m.model.isVertex(b)&&null!=b.geometry&&(b.geometry.x=0,b.geometry.y=0)}catch(n){b=null}null==b&&(b=v(m.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",m.vertexFontSize),40,20,"Text"),m.model.isVertex(b)&&m.isAutoSizeCell(b)&&Graph.createOffscreenGraph(m.getStylesheet()).updateCellSize(b));b=[b,v("whiteSpace=wrap;html=1;"),v("ellipse;whiteSpace=wrap;html=1;",80,80),v("rhombus;whiteSpace=wrap;html=1;",
80,80),v("rounded=1;whiteSpace=wrap;html=1;"),v("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),v("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),v("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),v("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),v("triangle;whiteSpace=wrap;html=1;",
60,80),v("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),v("shape=tape;whiteSpace=wrap;html=1;",120,100),v("ellipse;shape=cloud;whiteSpace=wrap;html=1;",120,80),v("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),v("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",20,20)];g&&(b=b.concat([e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;"),e("edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;startArrow=classic;endSize=8;startSize=8;"),
@@ -2113,48 +2112,48 @@ EditorUi.prototype.getImageForMarker=function(b,e,g){return"flexArrow"==g?null!=
b?"1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:
"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(n){n.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(n){var A=null;if(n.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||n.getSelectionCells();A=n.getExportableCells(n.model.getTopmostCells(A));for(var G={},S=n.createCellLookup(A),F=n.cloneCells(A,null,G),K=new mxGraphModel,c=K.getChildAt(K.getRoot(),
-0),f=0;f<F.length;f++){K.add(c,F[f]);var l=n.view.getState(A[f]);if(null!=l){var t=n.getCellGeometry(F[f]);null!=t&&t.relative&&!K.isEdge(A[f])&&null==S[mxObjectIdentity.get(K.getParent(A[f]))]&&(t.offset=null,t.relative=!1,t.x=l.x/l.view.scale-l.view.translate.x,t.y=l.y/l.view.scale-l.view.translate.y)}}n.updateCustomLinks(n.createCellMapping(G,S),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(n){var A=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(n){n.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(n){var A=null;if(n.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{A=A||n.getSelectionCells();A=n.getExportableCells(n.model.getTopmostCells(A));for(var G={},R=n.createCellLookup(A),F=n.cloneCells(A,null,G),J=new mxGraphModel,c=J.getChildAt(J.getRoot(),
+0),f=0;f<F.length;f++){J.add(c,F[f]);var l=n.view.getState(A[f]);if(null!=l){var t=n.getCellGeometry(F[f]);null!=t&&t.relative&&!J.isEdge(A[f])&&null==R[mxObjectIdentity.get(J.getParent(A[f]))]&&(t.offset=null,t.relative=!1,t.x=l.x/l.view.scale-l.view.translate.x,t.y=l.y/l.view.scale-l.view.translate.y)}}n.updateCustomLinks(n.createCellMapping(G,R),F);mxClipboard.insertCount=1;mxClipboard.setCells(F)}b.updatePasteActionStates();return A};var g=mxClipboard.paste;mxClipboard.paste=function(n){var A=
null;n.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):A=g.apply(this,arguments);b.updatePasteActionStates();return A};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var v=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(n,A){v.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,
-this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,X){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,X,Z){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;Z=null!=Z?Z:0;var ka=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),va=mxUtils.hasScrollbars(b.container),ua=b.view.translate,qa=b.view.scale,
-Ba=mxRectangle.fromRectangle(ka);Ba.x=Ba.x/qa-ua.x;Ba.y=Ba.y/qa-ua.y;Ba.width/=qa;Ba.height/=qa;ua=b.container.scrollTop;var ya=b.container.scrollLeft,La=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)La+=3;var za=b.container.offsetWidth-La;La=b.container.offsetHeight-La;P=P?Math.max(.3,Math.min(T||1,za/Ba.width)):qa;T=(za-P*Ba.width)/2/P;var Ea=0==this.lightboxVerticalDivider?0:(La-P*Ba.height)/this.lightboxVerticalDivider/P;va&&(T=Math.max(T,0),Ea=Math.max(Ea,
-0));if(va||ka.width<za||ka.height<La)b.view.scaleAndTranslate(P,Math.floor(T-Ba.x),Math.floor(Ea-Ba.y)),b.container.scrollTop=ua*P/qa,b.container.scrollLeft=ya*P/qa;else if(0!=X||0!=Z)ka=b.view.translate,b.view.setTranslate(Math.floor(ka.x+X/qa),Math.floor(ka.y+Z/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,
+this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,Y){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,Y,aa){if(null!=b.container&&!b.isViewer()){Y=null!=Y?Y:0;aa=null!=aa?aa:0;var la=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),va=mxUtils.hasScrollbars(b.container),ua=b.view.translate,qa=b.view.scale,
+Ba=mxRectangle.fromRectangle(la);Ba.x=Ba.x/qa-ua.x;Ba.y=Ba.y/qa-ua.y;Ba.width/=qa;Ba.height/=qa;ua=b.container.scrollTop;var ya=b.container.scrollLeft,La=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)La+=3;var Aa=b.container.offsetWidth-La;La=b.container.offsetHeight-La;P=P?Math.max(.3,Math.min(U||1,Aa/Ba.width)):qa;U=(Aa-P*Ba.width)/2/P;var Ea=0==this.lightboxVerticalDivider?0:(La-P*Ba.height)/this.lightboxVerticalDivider/P;va&&(U=Math.max(U,0),Ea=Math.max(Ea,
+0));if(va||la.width<Aa||la.height<La)b.view.scaleAndTranslate(P,Math.floor(U-Ba.x),Math.floor(Ea-Ba.y)),b.container.scrollTop=ua*P/qa,b.container.scrollLeft=ya*P/qa;else if(0!=Y||0!=aa)la=b.view.translate,b.view.setTranslate(Math.floor(la.x+Y/qa),Math.floor(la.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var v=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 n=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var A=0;n=mxUtils.bind(this,function(P,T,X){A++;
-var Z=document.createElement("span");Z.style.paddingLeft="8px";Z.style.paddingRight="8px";Z.style.cursor="pointer";mxEvent.addListener(Z,"click",P);null!=X&&Z.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";Z.appendChild(P);this.chromelessToolbar.appendChild(Z);return Z});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&n(mxUtils.bind(this,function(P){window.location.href=
-G;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=n(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.chevronLeftImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var K=n(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,P+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+
-": "+this.currentPage.getName());S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());K.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";K.style.paddingLeft="4px";K.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display=
-"",F.style.display="inline-block"):(K.style.display="none",S.style.display="none",F.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(l.funct);T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var X=mxUtils.getOffset(F);T.popup(X.x,X.y+F.offsetHeight,null,P);mxEvent.addListener(T.div,
-"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c)}n(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){b.isLightboxView()?
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var n=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",n);n();var A=0;n=mxUtils.bind(this,function(P,U,Y){A++;
+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=Y&&aa.setAttribute("title",Y);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=v.backBtn){var G=Graph.sanitizeLink(v.backBtn.url);null!=G&&n(mxUtils.bind(this,function(P){window.location.href=
+G;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var R=n(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.chevronLeftImage,mxResources.get("previousPage")),F=document.createElement("div");F.style.fontFamily=Editor.defaultHtmlFont;F.style.display="inline-block";F.style.verticalAlign="top";F.style.fontWeight="bold";F.style.marginTop="8px";F.style.fontSize="14px";F.style.cursor="default";F.style.color=
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(F);var J=n(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.chevronRightImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){F.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(F,P+1+" / "+this.pages.length);F.setAttribute("title",mxResources.get("currentPage")+
+": "+this.currentPage.getName());R.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());J.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});R.style.paddingLeft="0px";R.style.paddingRight="4px";J.style.paddingLeft="4px";J.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(J.style.display="",R.style.display=
+"",F.style.display="inline-block"):(J.style.display="none",R.style.display="none",F.style.display="none");c()});if(null!=this.menus){var l=this.menus.get("pages");null!=l&&mxEvent.addListener(F,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(l.funct);U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var Y=mxUtils.getOffset(F);U.popup(Y.x,Y.y+F.offsetHeight,null,P);mxEvent.addListener(U.div,
+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c)}n(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(P){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var t=null,q=null,D=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);t=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);t=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),
600)}),P||200)}),H=mxUtils.bind(this,function(P){null!=t&&(window.clearTimeout(t),t=null);null!=q&&(window.clearTimeout(q),q=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var N=n(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=N.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=
-T.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));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){N.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var J=this.lightboxToolbarActions[f];J.elem=n(J.fn,J.icon,J.tooltip)}if(null!=v.refreshBtn){var Y=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);n(mxUtils.bind(this,function(P){null!=
-Y?window.location.href=Y:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(P){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=N.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),L=b.getModel();L.addListener(mxEvent.CHANGE,function(){N.style.display=1<L.getChildCount(L.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var I=this.lightboxToolbarActions[f];I.elem=n(I.fn,I.icon,I.tooltip)}if(null!=v.refreshBtn){var Z=null==v.refreshBtn.url?null:Graph.sanitizeLink(v.refreshBtn.url);n(mxUtils.bind(this,function(P){null!=
+Z?window.location.href=Z:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=v.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(P){v.fullscreenBtn.url?b.openLink(v.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!v.noCloseBtn&&(v.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&n(mxUtils.bind(this,function(P){"1"==urlParams.close||v.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),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(P){mxEvent.isTouchEvent(P)||
(mxEvent.isShiftDown(P)||H(30),D())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?D():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?D():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ha=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ha&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ha&&Math.abs(this.startX-T.getGraphX())<ha&&Math.abs(this.startY-T.getGraphY())<ha&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?D():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,aa=new mxPoint,na=!1,W=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&W!=g.currentPage){W=g.currentPage;na=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,aa,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var X=b.getPageSize();P=T.x-(this.x0||0)*X.width;T=T.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}ea.apply(this,arguments)};
-if(!b.isViewer()){var ba=b.sizeDidChange;b.sizeDidChange=function(){var P=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),X=this.getDefaultTranslate(T),Z=this.view.translate.x,ka=this.view.translate.y;if(X.x!=Z||X.y!=ka){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-Z)*this.view.scale),this.container.scrollTop+=
-Math.round((X.y-ka)*this.view.scale));return}}ba.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Q=null,k=null,B=null,I=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||B)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
-(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin="",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=
-"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),Z=b.view.scale,ka=0,va=0;null!=Q&&(ka=b.container.offsetWidth/2-Q.x+X.x,va=b.container.offsetHeight/2-Q.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=Z&&(null!=k&&(ka+=T.x-k.x,va+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ka*(b.cumulativeZoomFactor-1),va*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ka&&0==va||(b.container.scrollLeft-=
-ka*(b.cumulativeZoomFactor-1),b.container.scrollTop-=va*(b.cumulativeZoomFactor-1)));null!=I&&ca.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=B=Q=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,X,Z){Z=null!=Z?Z:this.zoomFactor;(T=T||!b.scrollbars)&&(Q=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=Z,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/=Z,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,
-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=ca.getAttribute("filter")&&(I=ca.getAttribute("filter"),ca.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);Z=T||null==Q?b.container.scrollLeft+b.container.clientWidth/2:Q.x+b.container.scrollLeft-b.container.offsetLeft;var ka=T||null==Q?b.container.scrollTop+b.container.clientHeight/2:Q.y+b.container.scrollTop-
-b.container.offsetTop;ca.style.transformOrigin=Z+"px "+ka+"px";ca.style.transform="scale("+P+")";ja.style.transformOrigin=Z+"px "+ka+"px";ja.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,"transform-origin",(T||null==Q?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":Q.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Q?b.container.clientHeight/
-2+b.container.scrollTop-Z.offsetTop+"px":Q.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,Z,ka);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
-null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,X,Z,ka){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),Z=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(T?-Z:Z),X.y):b.view.setTranslate(X.x,X.y+(T?Z:-Z));
-else if(X||b.isZoomWheelEvent(P))for(var va=mxEvent.getSource(P);null!=va;){if(va==b.container)return b.tooltipHandler.hideTooltip(),Q=null!=Z&&null!=ka?new mxPoint(Z,ka):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),B=X,X=b.zoomFactor,Z=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),Z=-1),b.lazyZoom(T,null,Z,X),mxEvent.consume(P),
-!1;va=va.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
-EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ia=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ia&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ia&&Math.abs(this.startX-U.getGraphX())<ia&&Math.abs(this.startY-U.getGraphY())<ia&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?D():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var fa=b.view.validate,ba=new mxPoint,na=!1,X=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&X!=g.currentPage){X=g.currentPage;na=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ba,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var Y=b.getPageSize();P=U.x-(this.x0||0)*Y.width;U=U.y-(this.y0||0)*Y.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}fa.apply(this,arguments)};
+if(!b.isViewer()){var ca=b.sizeDidChange;b.sizeDidChange=function(){var P=na;na=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),Y=this.getDefaultTranslate(U),aa=this.view.translate.x,la=this.view.translate.y;if(Y.x!=aa||Y.y!=la){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(Y.x,Y.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((Y.x-aa)*this.view.scale),
+this.container.scrollTop+=Math.round((Y.y-la)*this.view.scale));return}}ca.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ka=b.view.getBackgroundPane(),da=b.view.getDrawPane();b.cumulativeZoomFactor=1;var W=null,S=null,k=null,B=null,K=null,T=function(P){null!=W&&window.clearTimeout(W);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||B)W=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)),da.style.transformOrigin="",ka.style.transformOrigin="",mxClient.IS_SF?(da.style.transform="scale(1)",ka.style.transform="scale(1)",window.setTimeout(function(){da.style.transform="";ka.style.transform=""},0)):(da.style.transform="",ka.style.transform=""),b.view.getDecoratorPane().style.opacity=
+"",b.view.getOverlayPane().style.opacity="");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Y=mxUtils.getOffset(b.container),aa=b.view.scale,la=0,va=0;null!=S&&(la=b.container.offsetWidth/2-S.x+Y.x,va=b.container.offsetHeight/2-S.y+Y.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(la+=U.x-k.x,va+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,la*(b.cumulativeZoomFactor-1),va*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||
+0==la&&0==va||(b.container.scrollLeft-=la*(b.cumulativeZoomFactor-1),b.container.scrollTop-=va*(b.cumulativeZoomFactor-1)));null!=K&&da.setAttribute("filter",K);b.cumulativeZoomFactor=1;K=B=S=k=W=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,Y,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(S=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?
+this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
+this.cumulativeZoomFactor,160))/this.view.scale;if(b.isFastZoomEnabled()){null==K&&""!=da.getAttribute("filter")&&(K=da.getAttribute("filter"),da.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==S?b.container.scrollLeft+b.container.clientWidth/2:S.x+b.container.scrollLeft-b.container.offsetLeft;var la=U||null==S?b.container.scrollTop+b.container.clientHeight/
+2:S.y+b.container.scrollTop-b.container.offsetTop;da.style.transformOrigin=aa+"px "+la+"px";da.style.transform="scale("+P+")";ka.style.transformOrigin=aa+"px "+la+"px";ka.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==S?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":S.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+
+"px")+" "+(U||null==S?b.container.clientHeight/2+b.container.scrollTop-aa.offsetTop+"px":S.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,la);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?Y:0)};mxEvent.addGestureListeners(b.container,
+function(P){null!=W&&window.clearTimeout(W)},null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==W||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,Y,aa,la){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!Y&&b.isScrollWheelEvent(P))Y=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(Y.x+(U?
+-aa:aa),Y.y):b.view.setTranslate(Y.x,Y.y+(U?aa:-aa));else if(Y||b.isZoomWheelEvent(P))for(var va=mxEvent.getSource(P);null!=va;){if(va==b.container)return b.tooltipHandler.hideTooltip(),S=null!=aa&&null!=la?new mxPoint(aa,la):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),B=Y,Y=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?Y=1+Math.abs(P.deltaY)/20*(Y-1):null!=P.movementY&&"pointermove"==P.type&&(Y=1+Math.max(1,Math.abs(P.movementY))/
+20*(Y-1),aa=-1),b.lazyZoom(U,null,aa,Y),mxEvent.consume(P),!1;va=va.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
+EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;if(null!=this.format){var e=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.formatContainer.style,"transition","width "+e+"s ease-in-out");window.setTimeout(mxUtils.bind(this,function(){this.formatWidth=b?240:0;this.refresh();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.formatContainer.style,"transition",null);this.refresh(!0);this.fireEvent(new mxEventObject("formatWidthChanged"))}),
1E3*e)},0))}};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};
EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};
@@ -2174,7 +2173,7 @@ g.width-e.clientWidth,g.x-10)),g.y>e.scrollTop+.9*e.clientHeight&&(e.scrollTop=M
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,g=mxUtils.hasScrollbars(e.container),m=0,v=0;g&&(m=e.view.translate.x*e.view.scale-e.container.scrollLeft,v=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(g){var n=e.getSelectionCells();e.clearSelection();e.setSelectionCells(n)}e.sizeDidChange();g&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-m,e.container.scrollTop=e.view.translate.y*
e.view.scale-v);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
EditorUi.prototype.installResizeHandler=function(b,e,g){e&&(b.window.setSize=function(v,n){if(!this.minimized){var A=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;v=Math.min(v,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());n=Math.min(n,A-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(v,n){var A=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-S));n=Math.max(0,Math.min(n,G-F));this.getX()==v&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),n=b.window.getY();b.window.setLocation(v,n)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
+G=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,R=parseInt(this.div.style.width),F=parseInt(this.div.style.height);v=Math.max(0,Math.min(v,A-R));n=Math.max(0,Math.min(n,G-F));this.getX()==v&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(R,F)};var m=mxUtils.bind(this,function(){var v=b.window.getX(),n=b.window.getY();b.window.setLocation(v,n)});mxEvent.addListener(window,"resize",m);b.destroy=function(){mxEvent.removeListener(window,
"resize",m);b.window.destroy();null!=g&&g()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
function ChangePageSetup(b,e,g,m,v){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=g;this.previousFormat=this.format=m;this.previousPageScale=this.pageScale=v;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var g=this.previousImage;null!=g&&Graph.isPageLink(g.src)&&(g=this.ui.createImageForPageLink(g.src,this.ui.currentPage));this.ui.setBackgroundImage(g);this.previousImage=e}null!=this.previousFormat&&(this.format=this.previousFormat,
@@ -2204,22 +2203,22 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
EditorUi.prototype.clearStatus=function(){this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus("")}))};EditorUi.prototype.updateStatus=function(b){null!=b&&b();this.lastStatusUpdate=b};EditorUi.prototype.updateStatusAgain=function(){null!=this.lastStatusUpdate&&this.lastStatusUpdate()};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.className="geStatusDiv";e.setAttribute("title",b);e.innerText=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.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(c){if(null!=A){var f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));m(Math.max(0,G+(e?f.x-A.x:A.y-f.y)-g));mxEvent.consume(c);G!=K()&&(S=!0,F=null)}}function n(c){v(c);A=G=null}var A=null,G=null,S=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var c=parseInt(e?b.offsetLeft:b.offsetTop);e||(c+=g);return c});mxEvent.addGestureListeners(b,function(c){A=new mxPoint(mxEvent.getClientX(c),
-mxEvent.getClientY(c));G=K();S=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!S&&this.hsplitClickEnabled){var f=null!=F?F-g:0;F=K();m(f);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,v,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,n)})};
+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function v(c){if(null!=A){var f=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));m(Math.max(0,G+(e?f.x-A.x:A.y-f.y)-g));mxEvent.consume(c);G!=J()&&(R=!0,F=null)}}function n(c){v(c);A=G=null}var A=null,G=null,R=!0,F=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var J=mxUtils.bind(this,function(){var c=parseInt(e?b.offsetLeft:b.offsetTop);e||(c+=g);return c});mxEvent.addGestureListeners(b,function(c){A=new mxPoint(mxEvent.getClientX(c),
+mxEvent.getClientY(c));G=J();R=!1;mxEvent.consume(c)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(c){if(!R&&this.hsplitClickEnabled){var f=null!=F?F-g:0;F=J();m(f);mxEvent.consume(c)}}));mxEvent.addGestureListeners(document,null,v,n);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,v,n)})};
EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,g,m,v){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var n=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(v=mxUtils.htmlEntities(b.message));this.showError(e,v,n,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};
-EditorUi.prototype.showError=function(b,e,g,m,v,n,A,G,S,F,K,c,f){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,n,A,c,G,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,K||100+20*e,!0,!1,f);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,n,A,G,S,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,n,A,G,S,F);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,g,m,v,n,A,G,R,F,J,c,f){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,v,n,A,c,G,R);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,F||340,J||100+20*e,!0,!1,f);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,v,n,A,G,R,F){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,v,n,A,G,R,F);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var v=this.dialogs.length-1;0<=v;v--)if(!this.dialogs[v].closing){m=this.dialogs[v];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),g=new mxDictionary,m=[],v=0;v<e.length;v++){var n=b.isTableCell(e[v])?b.model.getParent(e[v]):e[v];null==n||g.get(n)||(g.put(n,!0),m.push(n))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(A){this.handleError(A)}};
-EditorUi.prototype.pickColor=function(b,e,g,m,v){var n=this.editor.graph,A=n.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(S){n.cellEditor.restoreSelection(A);e(S)},function(){n.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};
+EditorUi.prototype.pickColor=function(b,e,g,m,v){var n=this.editor.graph,A=n.cellEditor.saveSelection(),G=(v?240:290)+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,b,function(R){n.cellEditor.restoreSelection(A);e(R)},function(){n.cellEditor.restoreSelection(A)},g,m,v);this.showDialog(b.container,230,G,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),n=0;n<m;++n){for(var A=1024*n,G=Math.min(A+1024,g),S=Array(G-A),F=0;A<G;++F,++A)S[F]=b[A].charCodeAt(0);v[n]=new Uint8Array(S)}return new Blob(v,{type:e})};
+EditorUi.prototype.base64ToBlob=function(b,e){e=e||"";b=atob(b);for(var g=b.length,m=Math.ceil(g/1024),v=Array(m),n=0;n<m;++n){for(var A=1024*n,G=Math.min(A+1024,g),R=Array(G-A),F=0;A<G;++F,++A)R[F]=b[A].charCodeAt(0);v[n]=new Uint8Array(R)}return new Blob(v,{type:e})};
EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var v=this.base64ToBlob(b.substring(b.indexOf(",")+1),"image/png");b=new ClipboardItem({"image/png":v,"text/html":new Blob(['<img src="'+b+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([b])["catch"](m)};EditorUi.prototype.writeHtmlToClipboard=function(b,e){b=new ClipboardItem({"text/plain":new Blob([Editor.convertHtmlToText(b)],{type:"text/plain"}),"text/html":new Blob([b],{type:"text/html"})});navigator.clipboard.write([b])["catch"](e)};
EditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("&lt;mxGraphModel ");if(0<=g){var m=b.lastIndexOf("&lt;/mxGraphModel&gt;");m>g&&(e=b.substring(g,m+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(v){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(v){try{var n=this.parseHtmlData(v),A="text/plain"!=n.getAttribute("data-type")?n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var G=A.lastIndexOf("%3E");
-0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(K){}try{var S=n.getElementsByTagName("span"),F=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(K){}}catch(K){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=G&&G<A.length-3&&(A=A.substring(0,G+3))}catch(J){}try{var R=n.getElementsByTagName("span"),F=null!=R&&0<R.length?mxUtils.trim(decodeURIComponent(R[0].textContent)):decodeURIComponent(A);this.isCompatibleString(F)&&(A=F)}catch(J){}}catch(J){}b(this.isCompatibleString(A)?A:null)}))["catch"](function(v){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(v){b(v)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(g){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&
"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&
@@ -2237,12 +2236,12 @@ EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroun
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
EditorUi.prototype.createKeyHandler=function(b){function e(c,f,l){if(!m.isSelectionEmpty()&&m.isEnabled()){f=null!=f?f:1;var t=m.getCompositeParents(m.getSelectionCells()),q=0<t.length?t[0]:null;if(null!=q)if(l){m.getModel().beginUpdate();try{for(q=0;q<t.length;q++)if(m.getModel().isVertex(t[q])&&m.isCellResizable(t[q])){var D=m.getCellGeometry(t[q]);null!=D&&(D=D.clone(),37==c?D.width=Math.max(0,D.width-f):38==c?D.height=Math.max(0,D.height-f):39==c?D.width+=f:40==c&&(D.height+=f),m.getModel().setGeometry(t[q],
D))}}finally{m.getModel().endUpdate()}}else{D=m.model.getParent(q);var H=m.getView().scale;l=null;1==m.getSelectionCount()&&m.model.isVertex(q)&&null!=m.layoutManager&&!m.isCellLocked(q)&&(l=m.layoutManager.getLayout(D));if(null!=l&&l.constructor==mxStackLayout)f=D.getIndex(q),37==c||38==c?m.model.add(D,q,Math.max(0,f-1)):(39==c||40==c)&&m.model.add(D,q,Math.min(m.model.getChildCount(D),f+1));else{var N=m.graphHandler;null!=N&&(null==N.first&&N.start(q,0,0,m.getMovableCells(t)),null!=N.first&&(q=
-t=0,37==c?t=-f:38==c?q=-f:39==c?t=f:40==c&&(q=f),N.currentDx+=t*H,N.currentDy+=q*H,N.checkPreview(),N.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=N.first){var L=N.roundLength(N.currentDx/H),J=N.roundLength(N.currentDy/H);N.moveCells(N.cells,L,J);N.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),n=v.isEventIgnored;v.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
+t=0,37==c?t=-f:38==c?q=-f:39==c?t=f:40==c&&(q=f),N.currentDx+=t*H,N.currentDy+=q*H,N.checkPreview(),N.updatePreview()),null!=A&&window.clearTimeout(A),A=window.setTimeout(function(){if(null!=N.first){var L=N.roundLength(N.currentDx/H),I=N.roundLength(N.currentDy/H);N.moveCells(N.cells,L,I);N.reset()}},400))}}}}var g=this,m=this.editor.graph,v=new mxKeyHandler(m),n=v.isEventIgnored;v.isEventIgnored=function(c){return!(mxEvent.isShiftDown(c)&&9==c.keyCode)&&(!this.isControlDown(c)||mxEvent.isShiftDown(c)||
90!=c.keyCode&&89!=c.keyCode&&188!=c.keyCode&&190!=c.keyCode&&85!=c.keyCode&&83!=c.keyCode)&&(66!=c.keyCode&&73!=c.keyCode||!this.isControlDown(c)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=c.keyCode&&107!=c.keyCode||!this.isControlDown(c)&&!mxEvent.isShiftDown(c)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&n.apply(this,arguments)};v.isEnabledForEvent=function(c){return!mxEvent.isConsumed(c)&&this.isGraphEvent(c)&&this.isEnabled()&&
-(null==g.dialogs||0==g.dialogs.length)};v.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=v.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(m.isEnabled()){var f=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?f=g.actions.get(g.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
+(null==g.dialogs||0==g.dialogs.length)};v.isControlDown=function(c){return mxEvent.isControlDown(c)||mxClient.IS_MAC&&c.metaKey};var A=null,G={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},R=v.getFunction;mxKeyHandler.prototype.getFunction=function(c){if(m.isEnabled()){var f=null;mxEvent.isShiftDown(c)&&this.isControlDown(c)&&mxEvent.isAltDown(c)?f=g.actions.get(g.ctrlAltShiftActions[c.keyCode]):mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)?
f=g.actions.get(g.altShiftActions[c.keyCode]):this.isControlDown(c)&&mxEvent.isAltDown(c)&&(f=g.actions.get(g.ctrlAltActions[c.keyCode]));if(null!=f)return f.funct;if(null!=G[c.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(c)&&mxEvent.isShiftDown(c)&&mxEvent.isAltDown(c)){if(m.model.isVertex(m.getSelectionCell()))return function(){var l=m.connectVertex(m.getSelectionCell(),G[c.keyCode],m.defaultEdgeLength,c,!0);null!=l&&0<l.length&&(1==l.length&&m.model.isEdge(l[0])?m.setSelectionCell(m.model.getTerminal(l[0],
-!1)):m.setSelectionCell(l[l.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(c)?function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null,!0)}:function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null)}}return S.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(c,f,l,t){var q=this.actions.get(l);null!=q&&(l=function(){q.isEnabled()&&q.funct.apply(this,arguments)},
-f?t?v.bindControlShiftKey(c,l):v.bindControlKey(c,l):t?v.bindShiftKey(c,l):v.bindKey(c,l))});var F=this,K=v.escape;v.escape=function(c){K.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,
+!1)):m.setSelectionCell(l[l.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(c)?function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null,!0)}:function(){e(c.keyCode,mxEvent.isShiftDown(c)?m.gridSize:null)}}return R.apply(this,arguments)};v.bindAction=mxUtils.bind(this,function(c,f,l,t){var q=this.actions.get(l);null!=q&&(l=function(){q.isEnabled()&&q.funct.apply(this,arguments)},
+f?t?v.bindControlShiftKey(c,l):v.bindControlKey(c,l):t?v.bindShiftKey(c,l):v.bindKey(c,l))});var F=this,J=v.escape;v.escape=function(c){J.apply(this,arguments)};v.enter=function(){};v.bindControlShiftKey(36,function(){m.exitGroup()});v.bindControlShiftKey(35,function(){m.enterGroup()});v.bindShiftKey(36,function(){m.home()});v.bindKey(35,function(){m.refresh()});v.bindAction(80,!0,"print");v.bindAction(107,!0,"zoomIn");v.bindAction(109,!0,"zoomOut");v.bindAction(61,!0,"zoomIn");v.bindAction(187,!0,
"zoomIn");v.bindAction(222,!0,"zoomIn");v.bindAction(173,!0,"zoomOut");v.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)v.bindAction(79,!0,"outline",!0),v.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),v.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),v.bindControlKey(13,function(){F.ctrlEnter()}),v.bindAction(8,!1,"delete"),v.bindAction(8,!0,"deleteAll"),v.bindAction(8,!1,"deleteLabels",!0),v.bindAction(46,!1,"delete"),v.bindAction(46,!0,
"deleteAll"),v.bindAction(46,!1,"deleteLabels",!0),v.bindAction(36,!1,"resetView"),v.bindAction(72,!0,"fitWindow",!0),v.bindAction(74,!0,"fitPage"),v.bindAction(74,!0,"fitTwoPages",!0),v.bindAction(48,!0,"customZoom"),v.bindAction(82,!0,"turn"),v.bindAction(82,!0,"clearDefaultStyle",!0),v.bindAction(83,!0,"save"),v.bindAction(83,!0,"saveAs",!0),v.bindAction(65,!0,"selectAll"),v.bindAction(65,!0,"selectNone",!0),v.bindAction(73,!0,"selectVertices",!0),v.bindAction(69,!0,"selectEdges",!0),v.bindAction(69,
!0,"editStyle"),v.bindAction(66,!0,"bold"),v.bindAction(66,!0,"toBack",!0),v.bindAction(70,!0,"toFront",!0),v.bindAction(68,!0,"duplicate"),v.bindAction(68,!0,"setAsDefaultStyle",!0),v.bindAction(90,!0,"undo"),v.bindAction(90,!0,"redo",!0),v.bindAction(89,!0,"redo"),v.bindAction(89,!0,"autosize",!0),v.bindAction(88,!0,"cut"),v.bindAction(67,!0,"copy"),v.bindAction(86,!0,"paste"),v.bindAction(71,!0,"group"),v.bindAction(77,!0,"editData"),v.bindAction(71,!0,"grid",!0),v.bindAction(73,!0,"italic"),v.bindAction(76,
@@ -2253,7 +2252,7 @@ mxUtils.getOffset(b);A.popup(G.x,G.y+b.offsetHeight,null,n);this.setCurrentMenu(
this.currentMenu&&this.currentMenuElt!=b&&mxEvent.isMouseEvent(n)&&this.hideCurrentMenu();m=null==this.currentMenu;"INPUT"!=mxEvent.getSource(n).nodeName?n.preventDefault():n.stopPropagation()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){v(n);m=!0}))}};
EditorUi.prototype.createZoomInput=function(b){var e=document.createElement("input");e.className="geButton geZoomInput";e.style.backgroundImage="url("+Editor.thinExpandImage+")";e.setAttribute("type","text");e.setAttribute("value","100%");var g=this.menus.get("viewZoom");this.dependsOnLanguage(mxUtils.bind(this,function(){e.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)")}));(b||mxClient.IS_TOUCH)&&e.setAttribute("readonly","true");var m=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,
function(v){m=!1;mxClient.IS_TOUCH||mxEvent.getSource(v)!=e||document.activeElement==e||(e.focus(),mxClient.IS_GC||mxClient.IS_FF?e.select():document.execCommand("selectAll",!1,null),m=!0)}),mxUtils.bind(this,function(v){mxEvent.getSource(v)==e&&m&&mxEvent.consume(v)}),mxUtils.bind(this,function(v){m&&(mxEvent.consume(v),m=!1)}));this.addMenuHandler(e,g.funct);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(A){mxEvent.isAltDown(A)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),
-mxEvent.consume(A)):mxEvent.isShiftDown(A)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(A))}));var n=mxUtils.bind(this,function(A,G,S){e.value=Math.round(100*this.editor.graph.view.scale*(null!=S?S:1))+"%";document.activeElement==e&&this.editor.graph.container.focus()});mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(A){if(27==A.keyCode||13==A.keyCode||9==A.keyCode)27==A.keyCode||isNaN(parseInt(e.value))?n():this.editor.graph.zoomTo(parseInt(e.value)/100),
+mxEvent.consume(A)):mxEvent.isShiftDown(A)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(A))}));var n=mxUtils.bind(this,function(A,G,R){e.value=Math.round(100*this.editor.graph.view.scale*(null!=R?R:1))+"%";document.activeElement==e&&this.editor.graph.container.focus()});mxEvent.addListener(e,"keydown",mxUtils.bind(this,function(A){if(27==A.keyCode||13==A.keyCode||9==A.keyCode)27==A.keyCode||isNaN(parseInt(e.value))?n():this.editor.graph.zoomTo(parseInt(e.value)/100),
this.hideCurrentMenu(),mxEvent.consume(A)}));this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,n);this.editor.addListener("resetGraphView",n);this.editor.addListener("pageSelected",n);mxEvent.addListener(e,"blur",n);this.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(A,G){n(A,G,G.getProperty("factor"))}))})(e);return e};
EditorUi.prototype.createHelpIcon=function(b,e){e=document.createElement("img");e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));e.className="geHelpIcon";mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){this.hideCurrentMenu();this.openLink(b);mxEvent.consume(g)}));return e};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(this.selectionStateListener),b.getModel().removeListener(this.selectionStateListener),b.getView().removeListener(this.selectionStateListener),b.removeListener(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&&
@@ -2262,46 +2261,46 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.g
null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.hsplit,this.chromelessToolbar,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var v=0;v<b.length;v++)m=m.replace(new RegExp("&"+b[v][0]+";","g"),"&#"+b[v][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,v,n,A){return g(Graph.sanitizeHtml(m),v,n,A)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var v=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n=1<arguments.length?arguments[1]:void 0,A;if("undefined"!==typeof n){if(!e(n))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(A=
-arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var S=e(this)?Object(new this(G)):Array(G),F=0,K;F<G;)K=v[F],S[F]=n?"undefined"===typeof A?n(K,F):n.call(A,K,F):K,F+=1;S.length=G;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
+arguments[2])}var G=Number(v.length);G=isNaN(G)?0:0!==G&&isFinite(G)?(0<G?1:-1)*Math.floor(Math.abs(G)):G;G=Math.min(Math.max(G,0),g);for(var R=e(this)?Object(new this(G)):Array(G),F=0,J;F<G;)J=v[F],R[F]=n?"undefined"===typeof A?n(J,F):n.call(A,J,F):J,F+=1;R.length=G;return R}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");
mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage="data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=";
mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
mxShape.prototype.getConstraints=function(b,e,g){return null};mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b),this.clippedImage=b;b=this.clippedSvg}return b};
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,v,n){return"default"==v&&null!=n?"fillcolor"==m.nodeName?n.shapeBackgroundColor:n.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();
-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,n,A,G,S){var F=b.apply(this,arguments);if(null!=g){var K=F.getElementsByTagName("img");0<K.length&&(K[0].className="geButton")}return F}})();
-Graph=function(b,e,g,m,v,n){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!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(Q){Q=this.getCurrentCellStyle(Q);
-return null!=Q?"1"==Q.html||"wrap"==Q[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,S=null,F=null,K=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Q=k.getProperty("event");var B=Q.getState();k=this.view.scale;if(!mxEvent.isAltDown(Q.getEvent())&&null!=B&&(c=this.isCellSelected(B.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Q.getEvent()))){var I=this.selectionCellsHandler.getHandler(B.cell);
-if(null==I||null==I.getHandleForEvent(Q)){var U=new mxRectangle(Q.getGraphX()-1,Q.getGraphY()-1),P=mxEvent.isTouchEvent(Q.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;U.grow(P);if(this.isTableCell(B.cell)&&this.isCellMovable(B.cell)&&!this.isCellSelected(B.cell)&&!(mxUtils.contains(B,Q.getGraphX()-I,Q.getGraphY()-I)&&mxUtils.contains(B,Q.getGraphX()-I,Q.getGraphY()+I)&&mxUtils.contains(B,Q.getGraphX()+I,Q.getGraphY()+I)&&mxUtils.contains(B,Q.getGraphX()+
-I,Q.getGraphY()-I))){var T=this.model.getParent(B.cell);I=this.model.getParent(T);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=T&&mxUtils.intersects(U,new mxRectangle(B.x,B.y-P,B.width,X))||this.model.getChildAt(T,0)!=B.cell&&mxUtils.intersects(U,new mxRectangle(B.x-P,B.y,X,B.height))||mxUtils.intersects(U,new mxRectangle(B.x,B.y+B.height-P,B.width,X))||mxUtils.intersects(U,new mxRectangle(B.x+B.width-P,B.y,X,B.height)))T=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,
-Q.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Q),null!=P&&(I.start(Q.getGraphX(),Q.getGraphY(),P),I.blockDelayedSelection=!T,Q.consume()))}}for(;!Q.isConsumed()&&null!=B&&(this.isTableCell(B.cell)||this.isTableRow(B.cell)||this.isTable(B.cell));)this.isSwimlane(B.cell)&&this.isCellMovable(B.cell)&&(I=this.getActualStartSize(B.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(B.x+(I.x-I.width-1)*k+(0==I.x?B.width:0),B.y,1,B.height))||(0<I.y||
-0<I.height)&&mxUtils.intersects(U,new mxRectangle(B.x,B.y+(I.y-I.height-1)*k+(0==I.y?B.height:0),B.width,1)))&&(this.selectCellForEvent(B.cell,Q.getEvent()),I=this.selectionCellsHandler.getHandler(B.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Q.getGraphX(),Q.getGraphY(),P),Q.consume())),B=this.view.getState(this.model.getParent(B.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){if("mouseDown"==k.getProperty("eventName")&&
-this.isEnabled()){Q=k.getProperty("event");var B=Q.getState();mxEvent.isAltDown(Q.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||c||null==B||!this.model.isEdge(B.cell)||(A=new mxPoint(Q.getGraphX(),Q.getGraphY()),K=this.isCellSelected(B.cell),S=B,G=Q,null!=B.text&&null!=B.text.boundingBox&&mxUtils.contains(B.text.boundingBox,Q.getGraphX(),Q.getGraphY())?F=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(B.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(F=k.getHandleForEvent(Q))))}}));
-this.addMouseListener({mouseDown:function(Q,k){},mouseMove:mxUtils.bind(this,function(Q,k){Q=this.selectionCellsHandler.handlers.map;for(var B in Q)if(null!=Q[B].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=A&&null!=S&&null!=G){if(B=S,null!=F||Math.abs(A.x-k.getGraphX())>I||Math.abs(A.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(B.cell));if(null!=U&&null!=
-U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=F?F:U.getHandleForEvent(G),T=this.view.getEdgeStyle(B),X=T==mxEdgeStyle.EntityRelation;I=B.absolutePoints;K||(P=F);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=F,null==P&&(Q=new mxRectangle(A.x,A.y),Q.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Q,I[0].x,I[0].y)?P=0:mxUtils.contains(Q,I[I.length-1].x,I[I.length-1].y)?P=U.bends.length-1:null!=I&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&
-(null!=T&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(B,A.x,A.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Q=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!X&&(null!=B.visibleSourceState||null!=B.visibleTargetState)||Q)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?
-this.isCellSelected(B.cell)||(this.selectionCellsHandler.handlers.put(B.cell,U),this.selectCellForEvent(B.cell,k.getEvent())):this.isCellSelected(B.cell)||U.destroy());K=!1;A=G=S=F=null}}else if(B=k.getState(),null!=B&&this.isCellEditable(B.cell)){Q=this.model.getParent(B.cell);U=null;if(this.model.isEdge(B.cell)&&!this.isCellSelected(B.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(B.cell)&&(this.isSwimlane(Q)||this.model.isLayer(Q)||this.getCurrentRoot()==
-Q)){if(Q=new mxRectangle(k.getGraphX(),k.getGraphY()),Q.grow(mxEdgeHandler.prototype.handleImage.width/2),I=B.absolutePoints,null!=I)null!=B.text&&null!=B.text.boundingBox&&mxUtils.contains(B.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Q,I[0].x,I[0].y)||mxUtils.contains(Q,I[I.length-1].x,I[I.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(B),T==mxEdgeStyle.EntityRelation||null==B.visibleSourceState&&null==B.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&
-T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(B,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Q=new mxRectangle(k.getGraphX(),k.getGraphY());Q.grow(I);if(this.isTableCell(B.cell)&&this.isCellMovable(B.cell)&&(k=this.model.getParent(B.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Q,new mxRectangle(B.x,
-B.y-2,B.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Q,new mxRectangle(B.x,B.y+B.height-2,B.width,4)))U="row-resize";else if(mxUtils.intersects(Q,new mxRectangle(B.x-2,B.y,4,B.height))&&this.model.getChildAt(k,0)!=B.cell||mxUtils.intersects(Q,new mxRectangle(B.x+B.width-2,B.y,4,B.height)))U="col-resize";for(k=B;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),
-P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Q,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Q,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&B.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Q,k){F=A=G=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var f=document.createElement("div");this.cellRenderer.getLabelValue=
-function(Q){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Q.view.graph.isHtmlLabel(Q.cell)&&("0"==mxUtils.getValue(Q.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Q.lastLabelValue!=k&&(Q.lastLabelValue=k,Q.lastSanitizedLabelValue=Graph.sanitizeHtml(k),f.innerHTML=Q.lastSanitizedLabelValue,Graph.addLightDarkColors(f,null,"simple"==Q.view.graph.getAdaptiveColors())&&(Q.lastSanitizedLabelValue=f.innerHTML)),k=Q.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
-this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Q,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var Q=l.apply(this,arguments);if(this.graph.pageVisible){var k=[],B=this.graph.pageFormat,I=this.graph.pageScale,U=B.width*I;B=B.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),X=0;X<T.width;X++)k.push(new mxRectangle(((T.x+X)*U+I.x)*P,(T.y*B+I.y)*P,U*P,B*P));for(X=1;X<T.height;X++)k.push(new mxRectangle((T.x*U+I.x)*P,((T.y+X)*B+I.y)*P,U*P,B*P));Q=k.concat(Q)}return Q};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Q,k){return null==Q.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Q){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var t=this.graphHandler.getCells;this.graphHandler.getCells=function(Q){for(var k=t.apply(this,arguments),B=new mxDictionary,I=[],U=0;U<k.length;U++){var P=
-this.graph.isTableCell(Q)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Q)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||B.get(P)||(B.put(P,!0),I.push(P))}return I};var q=this.graphHandler.start;this.graphHandler.start=function(Q,k,B,I){var U=!1;this.graph.isTableCell(Q)&&(this.graph.isCellSelected(Q)?U=!0:Q=this.graph.model.getParent(Q));U||this.graph.isTableRow(Q)&&
-this.graph.isCellSelected(Q)||(Q=this.graph.getCompositeParent(Q));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Q,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Q,k,B,I,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[T]);return T};var D=new mxRubberband(this);this.getRubberband=function(){return D};
-var H=(new Date).getTime(),N=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Q=this.currentState;L.apply(this,arguments);Q!=this.currentState?(H=(new Date).getTime(),N=0):N=(new Date).getTime()-H};var J=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Q){return mxEvent.isShiftDown(Q.getEvent())&&mxEvent.isAltDown(Q.getEvent())?!1:null!=this.currentState&&Q.getState()==this.currentState&&2E3<N||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&J.apply(this,arguments)};var Y=this.isToggleEvent;this.isToggleEvent=function(Q){return Y.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Q)};var ha=D.isForceRubberbandEvent;D.isForceRubberbandEvent=function(Q){return ha.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Q.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Q.getState()&&mxEvent.isTouchEvent(Q.getEvent())};
-var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Q){return mxEvent.isMouseEvent(Q.getEvent())};var aa=this.click;this.click=function(Q){var k=null==Q.state&&
-null!=Q.sourceState&&this.isCellLocked(this.getLayerForCell(Q.sourceState.cell));if(this.isEnabled()&&!k||Q.isConsumed())return aa.apply(this,arguments);var B=k?Q.sourceState.cell:Q.getCell();if(null!=B){var I=this.getClickableLinkForCell(B);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,B):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Q){return Q.sourceState};var na=this.tooltipHandler.show;this.tooltipHandler.show=function(){na.apply(this,arguments);
-if(null!=this.div)for(var Q=this.div.getElementsByTagName("a"),k=0;k<Q.length;k++)null!=Q[k].getAttribute("href")&&null==Q[k].getAttribute("target")&&Q[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Q){return Q.sourceState};this.getCursorForMouseEvent=function(Q){var k=null==Q.state&&null!=Q.sourceState&&this.isCellLocked(Q.sourceState.cell);return this.getCursorForCell(k?Q.sourceState.cell:Q.getCell())};var W=this.getCursorForCell;this.getCursorForCell=function(Q){if(!this.isEnabled()||
-this.isCellLocked(Q)){if(null!=this.getClickableLinkForCell(Q))return"pointer";if(this.isCellLocked(Q))return"default"}return W.apply(this,arguments)};this.selectRegion=function(Q,k){var B=mxEvent.isAltDown(k)?Q:null;Q=this.getCells(Q.x,Q.y,Q.width,Q.height,null,null,B,null,!0);if(this.isToggleEvent(k))for(B=0;B<Q.length;B++)this.selectCellForEvent(Q[B],k);else this.selectCellsForEvent(Q,k);return Q};var ba=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(Q,k,B){return this.graph.isCellSelected(Q)?!1:ba.apply(this,arguments)};var ja=this.updateMouseEvent;this.updateMouseEvent=function(Q){Q=ja.apply(this,arguments);null!=Q.state&&this.isCellLocked(this.getLayerForCell(Q.getCell()))&&(null==this.getLinkForCell(Q.getCell())?Q.state=this.view.getState(this.getCellAt(Q.getGraphX(),Q.getGraphY(),null,null,null,mxUtils.bind(this,function(k,B,I){return Q.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
-Q.state=null);return Q};var ca=this.isCellSelectable;this.isCellSelectable=function(Q){return ca.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Q))};this.isCellLocked=function(Q){for(;null!=Q;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Q),"locked","0"))return!0;Q=this.model.getParent(Q)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Q,k){"mouseDown"==k.getProperty("eventName")&&(Q=k.getProperty("event").getState(),la=null==Q||this.isSelectionEmpty()||
-this.isCellSelected(Q.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Q,k){if(!mxEvent.isMultiTouchEvent(k)){Q=k.getProperty("event");var B=k.getProperty("cell");null==B?(Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q)),D.start(Q.x,Q.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(B)&&this.removeSelectionCell(B);la=null;k.consume()}}));this.connectionHandler.selectCells=
-function(Q,k){this.graph.setSelectionCell(k||Q)};this.connectionHandler.constraintHandler.isStateIgnored=function(Q,k){var B=Q.view.graph;return k&&(B.isCellSelected(Q.cell)||B.isTableRow(Q.cell)&&B.selectionCellsHandler.isHandled(B.model.getParent(Q.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Q=this.connectionHandler.constraintHandler;null!=Q.currentFocus&&Q.isStateIgnored(Q.currentFocus,!0)&&(Q.currentFocus=null,Q.constraints=null,Q.destroyIcons());Q.destroyFocusHighlight()}));
-Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,v,n,A,G,R){var F=b.apply(this,arguments);if(null!=g){var J=F.getElementsByTagName("img");0<J.length&&(J[0].className="geButton")}return F}})();
+Graph=function(b,e,g,m,v,n){mxGraph.call(this,b,e,g,m);this.themes=v||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=n?n:!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(W){W=this.getCurrentCellStyle(W);
+return null!=W?"1"==W.html||"wrap"==W[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var A=null,G=null,R=null,F=null,J=!1,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,S){if("mouseDown"==S.getProperty("eventName")&&this.isEnabled()){W=S.getProperty("event");var k=W.getState();S=this.view.scale;if(!mxEvent.isAltDown(W.getEvent())&&null!=k&&(c=this.isCellSelected(k.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(W.getEvent()))){var B=this.selectionCellsHandler.getHandler(k.cell);
+if(null==B||null==B.getHandleForEvent(W)){var K=new mxRectangle(W.getGraphX()-1,W.getGraphY()-1),T=mxEvent.isTouchEvent(W.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;B=T+2;K.grow(T);if(this.isTableCell(k.cell)&&this.isCellMovable(k.cell)&&!this.isCellSelected(k.cell)&&!(mxUtils.contains(k,W.getGraphX()-B,W.getGraphY()-B)&&mxUtils.contains(k,W.getGraphX()-B,W.getGraphY()+B)&&mxUtils.contains(k,W.getGraphX()+B,W.getGraphY()+B)&&mxUtils.contains(k,W.getGraphX()+
+B,W.getGraphY()-B))){var P=this.model.getParent(k.cell);B=this.model.getParent(P);if(!this.isCellSelected(B)){T*=S;var U=2*T;if(this.model.getChildAt(B,0)!=P&&mxUtils.intersects(K,new mxRectangle(k.x,k.y-T,k.width,U))||this.model.getChildAt(P,0)!=k.cell&&mxUtils.intersects(K,new mxRectangle(k.x-T,k.y,U,k.height))||mxUtils.intersects(K,new mxRectangle(k.x,k.y+k.height-T,k.width,U))||mxUtils.intersects(K,new mxRectangle(k.x+k.width-T,k.y,U,k.height)))P=this.selectionCellsHandler.isHandled(B),this.selectCellForEvent(B,
+W.getEvent()),B=this.selectionCellsHandler.getHandler(B),null!=B&&(T=B.getHandleForEvent(W),null!=T&&(B.start(W.getGraphX(),W.getGraphY(),T),B.blockDelayedSelection=!P,W.consume()))}}for(;!W.isConsumed()&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(B=this.getActualStartSize(k.cell),(0<B.x||0<B.width)&&mxUtils.intersects(K,new mxRectangle(k.x+(B.x-B.width-1)*S+(0==B.x?k.width:0),k.y,1,k.height))||(0<B.y||
+0<B.height)&&mxUtils.intersects(K,new mxRectangle(k.x,k.y+(B.y-B.height-1)*S+(0==B.y?k.height:0),k.width,1)))&&(this.selectCellForEvent(k.cell,W.getEvent()),B=this.selectionCellsHandler.getHandler(k.cell),null!=B&&null!=B.customHandles&&(T=mxEvent.CUSTOM_HANDLE-B.customHandles.length+1,B.start(W.getGraphX(),W.getGraphY(),T),W.consume())),k=this.view.getState(this.model.getParent(k.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(W,S){if("mouseDown"==S.getProperty("eventName")&&
+this.isEnabled()){W=S.getProperty("event");var k=W.getState();mxEvent.isAltDown(W.getEvent())||mxEvent.isControlDown(S)||mxEvent.isShiftDown(S)||c||null==k||!this.model.isEdge(k.cell)||(A=new mxPoint(W.getGraphX(),W.getGraphY()),J=this.isCellSelected(k.cell),R=k,G=W,null!=k.text&&null!=k.text.boundingBox&&mxUtils.contains(k.text.boundingBox,W.getGraphX(),W.getGraphY())?F=mxEvent.LABEL_HANDLE:(S=this.selectionCellsHandler.getHandler(k.cell),null!=S&&null!=S.bends&&0<S.bends.length&&(F=S.getHandleForEvent(W))))}}));
+this.addMouseListener({mouseDown:function(W,S){},mouseMove:mxUtils.bind(this,function(W,S){W=this.selectionCellsHandler.handlers.map;for(var k in W)if(null!=W[k].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(S.getEvent())){var B=this.tolerance;if(null!=A&&null!=R&&null!=G){if(k=R,null!=F||Math.abs(A.x-S.getGraphX())>B||Math.abs(A.y-S.getGraphY())>B){var K=null;mxEvent.isShiftDown(S.getEvent())||(K=this.selectionCellsHandler.getHandler(k.cell));if(null!=K&&null!=
+K.bends&&0<K.bends.length){K.redrawHandles();var T=null!=F?F:K.getHandleForEvent(G),P=this.view.getEdgeStyle(k),U=P==mxEdgeStyle.EntityRelation;B=k.absolutePoints;J||(T=F);T!=mxEvent.LABEL_HANDLE&&null!=B&&(T=F,null==T&&(W=new mxRectangle(A.x,A.y),W.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(W,B[0].x,B[0].y)?T=0:mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?T=K.bends.length-1:null!=B&&(null==P&&null==T||P==mxEdgeStyle.SegmentConnector||P==mxEdgeStyle.OrthConnector)&&
+(null!=P&&(2==B.length||3==B.length&&(0==Math.round(B[0].x-B[1].x)&&0==Math.round(B[1].x-B[2].x)||0==Math.round(B[0].y-B[1].y)&&0==Math.round(B[1].y-B[2].y)))?T=2:(T=mxUtils.findNearestSegment(k,A.x,A.y),T=null==P?mxEvent.VIRTUAL_HANDLE-T:T+1))),null==T&&(T=mxEvent.VIRTUAL_HANDLE));W=T==mxEvent.LABEL_HANDLE||0==T||T==K.bends.length-1;if(!U&&(null!=k.visibleSourceState||null!=k.visibleTargetState)||W)K.start(S.getGraphX(),S.getGraphX(),T),S.consume(),this.graphHandler.reset()}null!=K&&(this.selectionCellsHandler.isHandlerActive(K)?
+this.isCellSelected(k.cell)||(this.selectionCellsHandler.handlers.put(k.cell,K),this.selectCellForEvent(k.cell,S.getEvent())):this.isCellSelected(k.cell)||K.destroy());J=!1;A=G=R=F=null}}else if(k=S.getState(),null!=k&&this.isCellEditable(k.cell)){W=this.model.getParent(k.cell);K=null;if(this.model.isEdge(k.cell)&&!this.isCellSelected(k.cell)&&!mxEvent.isAltDown(S.getEvent())&&!mxEvent.isShiftDown(S.getEvent())&&!this.isAncestorSelected(k.cell)&&(this.isSwimlane(W)||this.model.isLayer(W)||this.getCurrentRoot()==
+W)){if(W=new mxRectangle(S.getGraphX(),S.getGraphY()),W.grow(mxEdgeHandler.prototype.handleImage.width/2),B=k.absolutePoints,null!=B)null!=k.text&&null!=k.text.boundingBox&&mxUtils.contains(k.text.boundingBox,S.getGraphX(),S.getGraphY())?K="move":mxUtils.contains(W,B[0].x,B[0].y)||mxUtils.contains(W,B[B.length-1].x,B[B.length-1].y)?K="pointer":(P=this.view.getEdgeStyle(k),P==mxEdgeStyle.EntityRelation||null==k.visibleSourceState&&null==k.visibleTargetState||(K="crosshair",P!=mxEdgeStyle.SegmentConnector&&
+P!=mxEdgeStyle.OrthConnector))||(S=mxUtils.findNearestSegment(k,S.getGraphX(),S.getGraphY()),S<B.length-1&&0<=S&&(K=0==Math.round(B[S].x-B[S+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(S.getEvent())){B=mxShape.prototype.svgStrokeTolerance/2;W=new mxRectangle(S.getGraphX(),S.getGraphY());W.grow(B);if(this.isTableCell(k.cell)&&this.isCellMovable(k.cell)&&(S=this.model.getParent(k.cell),B=this.model.getParent(S),!this.isCellSelected(B)))if(mxUtils.intersects(W,new mxRectangle(k.x,
+k.y-2,k.width,4))&&this.model.getChildAt(B,0)!=S||mxUtils.intersects(W,new mxRectangle(k.x,k.y+k.height-2,k.width,4)))K="row-resize";else if(mxUtils.intersects(W,new mxRectangle(k.x-2,k.y,4,k.height))&&this.model.getChildAt(S,0)!=k.cell||mxUtils.intersects(W,new mxRectangle(k.x+k.width-2,k.y,4,k.height)))K="col-resize";for(S=k;null==K&&null!=S&&(this.isTableCell(S.cell)||this.isTableRow(S.cell)||this.isTable(S.cell));)this.isSwimlane(S.cell)&&this.isCellMovable(S.cell)&&(B=this.getActualStartSize(S.cell),
+T=this.view.scale,(0<B.x||0<B.width)&&mxUtils.intersects(W,new mxRectangle(S.x+(B.x-B.width-1)*T+(0==B.x?S.width*T:0),S.y,1,S.height))?K="col-resize":(0<B.y||0<B.height)&&mxUtils.intersects(W,new mxRectangle(S.x,S.y+(B.y-B.height-1)*T+(0==B.y?S.height:0),S.width,1))&&(K="row-resize")),S=this.view.getState(this.model.getParent(S.cell))}null!=K&&k.setCursor(K)}}}),mouseUp:mxUtils.bind(this,function(W,S){F=A=G=R=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var f=document.createElement("div");this.cellRenderer.getLabelValue=
+function(W){var S=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);W.view.graph.isHtmlLabel(W.cell)&&("0"==mxUtils.getValue(W.style,"html","0")?S=mxUtils.htmlEntities(S,!1):(W.lastLabelValue!=S&&(W.lastLabelValue=S,W.lastSanitizedLabelValue=Graph.sanitizeHtml(S),f.innerHTML=W.lastSanitizedLabelValue,Graph.addLightDarkColors(f,null,"simple"==W.view.graph.getAdaptiveColors())&&(W.lastSanitizedLabelValue=f.innerHTML)),S=W.lastSanitizedLabelValue));return S};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(W,S){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var l=this.graphHandler.getGuideStates;
+this.graphHandler.getGuideStates=function(){var W=l.apply(this,arguments);if(this.graph.pageVisible){var S=[],k=this.graph.pageFormat,B=this.graph.pageScale,K=k.width*B;k=k.height*B;B=this.graph.view.translate;for(var T=this.graph.view.scale,P=this.graph.getPageLayout(),U=0;U<P.width;U++)S.push(new mxRectangle(((P.x+U)*K+B.x)*T,(P.y*k+B.y)*T,K*T,k*T));for(U=1;U<P.height;U++)S.push(new mxRectangle((P.x*K+B.x)*T,((P.y+U)*k+B.y)*T,K*T,k*T));W=S.concat(W)}return W};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(W,S){return null==W.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(W){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var t=this.graphHandler.getCells;this.graphHandler.getCells=function(W){for(var S=t.apply(this,arguments),k=new mxDictionary,B=[],K=0;K<S.length;K++){var T=
+this.graph.isTableCell(W)&&this.graph.isTableCell(S[K])&&this.graph.isCellSelected(S[K])?this.graph.model.getParent(S[K]):this.graph.isTableRow(W)&&this.graph.isTableRow(S[K])&&this.graph.isCellSelected(S[K])?S[K]:this.graph.getCompositeParent(S[K]);null==T||k.get(T)||(k.put(T,!0),B.push(T))}return B};var q=this.graphHandler.start;this.graphHandler.start=function(W,S,k,B){var K=!1;this.graph.isTableCell(W)&&(this.graph.isCellSelected(W)?K=!0:W=this.graph.model.getParent(W));K||this.graph.isTableRow(W)&&
+this.graph.isCellSelected(W)||(W=this.graph.getCompositeParent(W));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(W,S){S=this.graph.getCompositeParent(S);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(W,S,k,B,K,T){var P=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=B&&this.graph.applyNewEdgeStyle(B,[P]);return P};var D=new mxRubberband(this);this.getRubberband=function(){return D};
+var H=(new Date).getTime(),N=0,L=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var W=this.currentState;L.apply(this,arguments);W!=this.currentState?(H=(new Date).getTime(),N=0):N=(new Date).getTime()-H};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(W){return mxEvent.isShiftDown(W.getEvent())&&mxEvent.isAltDown(W.getEvent())?!1:null!=this.currentState&&W.getState()==this.currentState&&2E3<N||(null==this.currentState||
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(W){return Z.apply(this,arguments)||mxEvent.isShiftDown(W)};var ia=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ia=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=
+ia)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(W){return mxEvent.isMouseEvent(W.getEvent())};var fa=this.click;this.click=function(W){var S=null==W.state&&null!=W.sourceState&&this.isCellLocked(this.getLayerForCell(W.sourceState.cell));if(this.isEnabled()&&!S||W.isConsumed())return fa.apply(this,arguments);var k=S?W.sourceState.cell:W.getCell();if(null!=k){var B=this.getClickableLinkForCell(k);null!=B?this.isCustomLink(B)?this.customLinkClicked(B,k):this.openLink(B):
+S&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};var ba=this.tooltipHandler.show;this.tooltipHandler.show=function(){ba.apply(this,arguments);if(null!=this.div)for(var W=this.div.getElementsByTagName("a"),S=0;S<W.length;S++)null!=W[S].getAttribute("href")&&null==W[S].getAttribute("target")&&W[S].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(W){return W.sourceState};this.getCursorForMouseEvent=function(W){var S=null==
+W.state&&null!=W.sourceState&&this.isCellLocked(W.sourceState.cell);return this.getCursorForCell(S?W.sourceState.cell:W.getCell())};var na=this.getCursorForCell;this.getCursorForCell=function(W){if(!this.isEnabled()||this.isCellLocked(W)){if(null!=this.getClickableLinkForCell(W))return"pointer";if(this.isCellLocked(W))return"default"}return na.apply(this,arguments)};this.selectRegion=function(W,S){var k=mxEvent.isAltDown(S)?W:null;W=this.getCells(W.x,W.y,W.width,W.height,null,null,k,null,!0);if(this.isToggleEvent(S))for(k=
+0;k<W.length;k++)this.selectCellForEvent(W[k],S);else this.selectCellsForEvent(W,S);return W};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(W,S,k){return this.graph.isCellSelected(W)?!1:X.apply(this,arguments)};var ca=this.updateMouseEvent;this.updateMouseEvent=function(W){W=ca.apply(this,arguments);null!=W.state&&this.isCellLocked(this.getLayerForCell(W.getCell()))&&(null==this.getLinkForCell(W.getCell())?W.state=this.view.getState(this.getCellAt(W.getGraphX(),
+W.getGraphY(),null,null,null,mxUtils.bind(this,function(S,k,B){return W.state==S||this.isCellLocked(this.getLayerForCell(S.cell))&&null==this.getLinkForCell(S.cell)}))):W.state=null);return W};var ka=this.isCellSelectable;this.isCellSelectable=function(W){return ka.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(W))};this.isCellLocked=function(W){for(;null!=W;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(W),"locked","0"))return!0;W=this.model.getParent(W)}return!1};var da=null;
+this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(W,S){"mouseDown"==S.getProperty("eventName")&&(W=S.getProperty("event").getState(),da=null==W||this.isSelectionEmpty()||this.isCellSelected(W.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(W,S){if(!mxEvent.isMultiTouchEvent(S)){W=S.getProperty("event");var k=S.getProperty("cell");null==k?(W=mxUtils.convertPoint(this.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),D.start(W.x,
+W.y)):null!=da?this.addSelectionCells(da):1<this.getSelectionCount()&&this.isCellSelected(k)&&this.removeSelectionCell(k);da=null;S.consume()}}));this.connectionHandler.selectCells=function(W,S){this.graph.setSelectionCell(S||W)};this.connectionHandler.constraintHandler.isStateIgnored=function(W,S){var k=W.view.graph;return S&&(k.isCellSelected(W.cell)||k.isTableRow(W.cell)&&k.selectionCellsHandler.isHandled(k.model.getParent(W.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var W=this.connectionHandler.constraintHandler;null!=W.currentFocus&&W.isStateIgnored(W.currentFocus,!0)&&(W.currentFocus=null,W.constraints=null,W.destroyIcons());W.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
+Graph.foreignObjectWarningLink="https://www.drawio.com/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 draw.io --\x3e";
+Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable horizontal textDirection".split(" ");
Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved linecap linejoin".split(" ");Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shadow glass dashed dashPattern comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents opacity strokeColor strokeWidth align verticalAlign spacingLeft spacingRight spacingTop spacingBottom spacing arcSize absoluteArcSize comicStyle swimlaneFillColor shadowOffsetX shadowOffsetY shadowBlur shadowColor shadowOpacity".split(" "),Graph.textStyles),
Graph.edgeStyles),Graph.cellStyleGroups);Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");Graph.backupStyleAttribute="data-mx-given-colors";Graph.newColorPlaceholder="rgba(0, 0, 0, 0)";Graph.newBackgroundPlaceholder="rgb(0, 0, 0)";Graph.defaultAdaptiveColors=window.mxIsElectron||"0"==urlParams.contrast?"simple":"auto";
@@ -2311,36 +2310,36 @@ Graph.createSvgImage=function(b,e,g,m,v){g=unescape(encodeURIComponent(Graph.svg
Graph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};
Graph.createSvgNode=function(b,e,g,m,v){var n=mxUtils.createXmlDocument(),A=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=v&&A.setAttribute("style","background: "+v.light+"; background-color: "+v.cssText+";");null==n.createElementNS?(A.setAttribute("xmlns",mxConstants.NS_SVG),A.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):A.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);A.setAttribute("version","1.1");A.setAttribute("width",
g+"px");A.setAttribute("height",m+"px");A.setAttribute("viewBox",b+" "+e+" "+g+" "+m);n.appendChild(A);return A};
-Graph.htmlToPng=function(b,e,g,m,v,n){v=null!=v?v:"";n=null!=n?n:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*n;A.height=g*n;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(n,n);F.drawImage(G,0,0);m(A.toDataURL())}catch(K){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);G.onerror=
+Graph.htmlToPng=function(b,e,g,m,v,n){v=null!=v?v:"";n=null!=n?n:Editor.htmlRasterScale;var A=document.createElement("canvas");A.width=e*n;A.height=g*n;var G=document.createElement("img");G.onload=mxUtils.bind(this,function(){try{var F=A.getContext("2d");F.scale(n,n);F.drawImage(G,0,0);m(A.toDataURL())}catch(J){m(null)}});var R=mxUtils.createXmlDocument();R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"svg"):R.createElement("svg");b=(new mxSvgCanvas2D(R)).convertHtml(b);G.onerror=
function(F){m(null)};G.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=v?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+v+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(b,e,g,m){function v(f,l,t){return null!=m?m(f,l,t):mxUtils.isValidColor(t)?(null==A&&null!=e&&(A={}),null!=A&&(A[l]=f.style.getPropertyValue(l)),t=mxUtils.getLightDarkColor(t,null,null,g),f.style.setProperty(l,t.cssText),!0):!1}for(var n=b.getElementsByTagName("*"),A=null,G=!1,S=0;S<n.length;S++)if(n[S]!=b&&null!=n[S].style){A=null;for(var F=0;F<n[S].style.length;F++){var K=n[S].style.item(F),c=n[S].style.getPropertyValue(K);G=v(n[S],K,c)||G}"FONT"==n[S].nodeName&&
-""==n[S].style.getPropertyValue("color")&&(c=n[S].getAttribute("color"),G=v(n[S],"color",c)||G);null!=e&&null!=A&&n[S].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var n=JSON.parse(v),A;for(A in n){var G=n[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(S){}return g};
+Graph.addLightDarkColors=function(b,e,g,m){function v(f,l,t){return null!=m?m(f,l,t):mxUtils.isValidColor(t)?(null==A&&null!=e&&(A={}),null!=A&&(A[l]=f.style.getPropertyValue(l)),t=mxUtils.getLightDarkColor(t,null,null,g),f.style.setProperty(l,t.cssText),!0):!1}for(var n=b.getElementsByTagName("*"),A=null,G=!1,R=0;R<n.length;R++)if(n[R]!=b&&null!=n[R].style){A=null;for(var F=0;F<n[R].style.length;F++){var J=n[R].style.item(F),c=n[R].style.getPropertyValue(J);G=v(n[R],J,c)||G}"FONT"==n[R].nodeName&&
+""==n[R].style.getPropertyValue("color")&&(c=n[R].getAttribute("color"),G=v(n[R],"color",c)||G);null!=e&&null!=A&&n[R].setAttribute(e,JSON.stringify(A))}return G};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var v=b[m].getAttribute(e);if(null!=v){b[m].removeAttribute(e);var n=JSON.parse(v),A;for(A in n){var G=n[A];""==G?(b[m].style[A]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[A]=G;g=!0}}}catch(R){}return g};
Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var v=JSON.parse(m);null!=v&&null!=v[e]&&("color"==e&&"FONT"==b.nodeName&&""==v[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=v[e]&&(g=v[e]))}}catch(n){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};
-Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",n=b.getElementsByTagName("*"),A=[],G=0;G<n.length;G++)A.push({node:n[G],value:n[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(n=b[G].getAttribute(Graph.backupStyleAttribute),null!=n){var S=JSON.parse(n);S[v]=
-"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{n=b[G].getAttribute(Graph.backupStyleAttribute),S=null!=n?JSON.parse(n):{},S[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(S))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=
+Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,v=g?"color":"background-color",n=b.getElementsByTagName("*"),A=[],G=0;G<n.length;G++)A.push({node:n[G],value:n[G].style[v]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(G=0;G<b.length;G++){if(G<A.length&&A[G].node==b[G]&&A[G].value!=b[G].style[v]&&""==b[G].style[v])try{if(n=b[G].getAttribute(Graph.backupStyleAttribute),null!=n){var R=JSON.parse(n);R[v]=
+"";b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}}catch(F){}if(g&&b[G].getAttribute("color")==m||b[G].style[v]==m){g&&b[G].getAttribute("color")==m&&b[G].removeAttribute("color");b[G].style[v]=e!=mxConstants.NONE?mxUtils.getLightDarkColor(e).cssText:null;try{n=b[G].getAttribute(Graph.backupStyleAttribute),R=null!=n?JSON.parse(n):{},R[v]=e!=mxConstants.NONE?e:"",b[G].setAttribute(Graph.backupStyleAttribute,JSON.stringify(R))}catch(F){}if(g&&mxClient.IS_FF){e=b[G];g=e.firstChild;if(null!=
g&&"A"==g.nodeName&&null==g.nextSibling&&null!=g.firstChild){e.parentNode.insertBefore(g,e);for(m=g.firstChild;null!=m;)v=m.nextSibling,e.appendChild(m),m=v;g.appendChild(e)}break}}}};Graph.zapGremlins=function(b){return mxUtils.zapGremlins(b)};Graph.stringToBytes=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=b.charCodeAt(g);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),g=0;g<b.length;g++)e[g]=String.fromCharCode(b[g]);return e.join("")};
Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,g){return String.fromCharCode(parseInt(g,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.byteLength,m=0;m<g;m++)e+=String.fromCharCode(b[m]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
Graph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),v=1,n=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){n=g;break}for(g=n+1;-1<n&&g<b.byteLength&&g<n+e.length-1;g++){if(b[g]!=e.charCodeAt(v))return Graph.arrayBufferIndexOfString(b,e,n+1);v++}return v==e.length-1?n:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};
Graph.fadeNodes=function(b,e,g,m,v){v=null!=v?v:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+v+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},v)},0)};
-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function n(K,c){if(K.getModel().isVertex(c)){var f=K.container.scrollWidth/2,l=K.container.scrollHeight/2;K.rootCell=c.referenceCell||c;K.getModel().beginUpdate();try{for(var t=c.referenceCell||c,q=m.model.getCell(t.sourceCellId),D=m.getEdges(q,null,!0,!0,!1,!0),H=[],N=0;N<D.length;N++)null!=D[N].getTerminal(!0)&&null!=D[N].getTerminal(!1)&&m.isCellVisible(D[N])&&
-!m.isEdgeIgnored(D[N])&&m.isCellVisible(D[N].getTerminal(!0))&&m.isCellVisible(D[N].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(D[N]))&&H.push(D[N]);H=D=H;if(null!=c.startIndex||0<pageSize&&D.length>pageSize){var L=c.startIndex||0;H=D.slice(Math.max(0,L),Math.min(D.length,L+pageSize))}H=m.getOpposites(H,q).concat(H);var J=K.cloneCells(H);for(N=0;N<H.length;N++)if(J[N].sourceCellId=H[N].id,K.model.isEdge(J[N]))for(J[N].geometry.x=0,J[N].geometry.y=0,J[N].geometry.points=null,J[N].setStyle(J[N].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),J[N].setTerminal(t,null==J[N].getTerminal(!0)),q=0;q<J[N].getChildCount();q++){var Y=J[N].getChildAt(q);null!=Y.geometry&&Y.geometry.relative&&(Y.setStyle(Y.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),Y.geometry.offset=new mxPoint(0,0),Y.geometry.y=0,Y.geometry.x=.5>Y.geometry.x?-.8:.5<Y.geometry.x?.8:0)}if(0<c.startIndex){var ha=K.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((c.startIndex||0)/pageSize)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ha.referenceCell=t;ha.startIndex=Math.max(0,(c.startIndex||0)-pageSize);J.splice(0,0,ha)}if(D.length>(c.startIndex||0)+pageSize){var ea=K.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((c.startIndex||0)/pageSize)+2)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-ea.referenceCell=t;ea.startIndex=(c.startIndex||0)+pageSize;J.splice(0,0,ea)}for(var aa in K.getModel().cells){var na=K.getModel().getCell(aa);na!=K.rootCell&&!K.getModel().isAncestor(K.rootCell,na)&&K.getModel().isVertex(na)&&K.removeCells([na])}K.addCells(J);var W=K.getModel().getGeometry(K.rootCell);null!=W&&(W=W.clone(),W.x=f-W.width/2,W.y=l-W.height/3,K.getModel().setGeometry(K.rootCell,W));c=[];for(aa in K.getModel().cells)na=K.getModel().getCell(aa),na!=K.rootCell&&K.getModel().isVertex(na)&&
-K.getModel().getParent(na)==K.getDefaultParent()&&(c.push(na),W=K.getModel().getGeometry(na),null!=W&&(W.x=f-W.width/2,W.y=l-W.height/2));var ba=c.length,ja=2*Math.PI/ba,ca=Math.max(minSize,Math.min(K.container.scrollWidth/2.5-80,K.container.scrollHeight/2.5-80));for(f=0;f<ba;f++)W=K.getModel().getGeometry(c[f]),null!=W&&(W=W.clone(),W.x+=ca*Math.sin(f*ja),W.y+=ca*Math.cos(f*ja),K.getModel().setGeometry(c[f],W))}finally{K.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position=
-"absolute";A.style.display="block";A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=
-"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));A.appendChild(S);document.body.appendChild(A);var F=function(K){27==K.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(K){if(mxClient.isBrowserSupported()){var c=new Graph(K);c.keepEdgesInBackground=!0;c.isCellResizable=function(){return!1};c.isCellRotatable=function(){return!1};c.getCursorForCell=function(H){return this.model.isVertex(H)?"pointer":null};c.getFoldingImage=
-function(){return null};var f=function(){mxEvent.removeListener(document,"keydown",F);K.parentNode.removeChild(K);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",f);mxEvent.addListener(S,"click",f);c.setEnabled(!1);var l=c.click;c.click=function(H){var N=H.getCell(),L=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&c.rootCell!=N&&0<c.getEdges(L).length?n(c,N):l.apply(this,arguments)};f=c.container.scrollWidth/2;var t=c.container.scrollHeight/3;c.model.beginUpdate();var q=c.importCells([v])[0];
-q.sourceCellId=v.id;q.geometry.x=f-q.geometry.width/2;q.geometry.y=t-q.geometry.height/2;c.model.endUpdate();var D=!1;c.getModel().addListener(mxEvent.CHANGE,function(H,N){D||(H=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,c.labelsVisible=!1,D=!0,mxEffects.animateChanges(c,H,function(){var L=new mxParallelEdgeLayout(c);L.spacing=60;var J=L.layout;L.layout=function(Y){L.spacing=Math.min(60,Math.max(30,60-5*Y.length));J.apply(this,arguments)};L.execute(c.getDefaultParent());mxText.prototype.enableBoundingBox=
+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,v){function n(J,c){if(J.getModel().isVertex(c)){var f=J.container.scrollWidth/2,l=J.container.scrollHeight/2;J.rootCell=c.referenceCell||c;J.getModel().beginUpdate();try{for(var t=c.referenceCell||c,q=m.model.getCell(t.sourceCellId),D=m.getEdges(q,null,!0,!0,!1,!0),H=[],N=0;N<D.length;N++)null!=D[N].getTerminal(!0)&&null!=D[N].getTerminal(!1)&&m.isCellVisible(D[N])&&
+!m.isEdgeIgnored(D[N])&&m.isCellVisible(D[N].getTerminal(!0))&&m.isCellVisible(D[N].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(D[N]))&&H.push(D[N]);H=D=H;if(null!=c.startIndex||0<pageSize&&D.length>pageSize){var L=c.startIndex||0;H=D.slice(Math.max(0,L),Math.min(D.length,L+pageSize))}H=m.getOpposites(H,q).concat(H);var I=J.cloneCells(H);for(N=0;N<H.length;N++)if(I[N].sourceCellId=H[N].id,J.model.isEdge(I[N]))for(I[N].geometry.x=0,I[N].geometry.y=0,I[N].geometry.points=null,I[N].setStyle(I[N].getStyle()+
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),I[N].setTerminal(t,null==I[N].getTerminal(!0)),q=0;q<I[N].getChildCount();q++){var Z=I[N].getChildAt(q);null!=Z.geometry&&Z.geometry.relative&&(Z.setStyle(Z.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),Z.geometry.offset=new mxPoint(0,0),Z.geometry.y=0,Z.geometry.x=.5>Z.geometry.x?-.8:.5<Z.geometry.x?.8:0)}if(0<c.startIndex){var ia=J.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((c.startIndex||0)/pageSize)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ia.referenceCell=t;ia.startIndex=Math.max(0,(c.startIndex||0)-pageSize);I.splice(0,0,ia)}if(D.length>(c.startIndex||0)+pageSize){var fa=J.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((c.startIndex||0)/pageSize)+2)+"/"+Math.ceil(D.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+fa.referenceCell=t;fa.startIndex=(c.startIndex||0)+pageSize;I.splice(0,0,fa)}for(var ba in J.getModel().cells){var na=J.getModel().getCell(ba);na!=J.rootCell&&!J.getModel().isAncestor(J.rootCell,na)&&J.getModel().isVertex(na)&&J.removeCells([na])}J.addCells(I);var X=J.getModel().getGeometry(J.rootCell);null!=X&&(X=X.clone(),X.x=f-X.width/2,X.y=l-X.height/3,J.getModel().setGeometry(J.rootCell,X));c=[];for(ba in J.getModel().cells)na=J.getModel().getCell(ba),na!=J.rootCell&&J.getModel().isVertex(na)&&
+J.getModel().getParent(na)==J.getDefaultParent()&&(c.push(na),X=J.getModel().getGeometry(na),null!=X&&(X.x=f-X.width/2,X.y=l-X.height/2));var ca=c.length,ka=2*Math.PI/ca,da=Math.max(minSize,Math.min(J.container.scrollWidth/2.5-80,J.container.scrollHeight/2.5-80));for(f=0;f<ca;f++)X=J.getModel().getGeometry(c[f]),null!=X&&(X=X.clone(),X.x+=da*Math.sin(f*ka),X.y+=da*Math.cos(f*ka),J.getModel().setGeometry(c[f],X))}finally{J.getModel().endUpdate()}}}var A=document.createElement("div");A.style.position=
+"absolute";A.style.display="block";A.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";A.style.width="100%";A.style.height="100%";A.style.left="0px";A.style.top="0px";A.style.zIndex=2;var G=document.createElement("img");G.setAttribute("src",Editor.closeBlackImage);G.style.position="absolute";G.style.cursor="pointer";G.style.right="10px";G.style.top="10px";A.appendChild(G);var R=document.createElement("div");R.style.position="absolute";R.style.cursor="pointer";R.style.right="38px";R.style.top=
+"14px";R.style.textAlign="right";R.style.verticalAlign="top";mxUtils.write(R,mxResources.get("close"));A.appendChild(R);document.body.appendChild(A);var F=function(J){27==J.keyCode&&G.click()};mxEvent.addListener(document,"keydown",F);(function(J){if(mxClient.isBrowserSupported()){var c=new Graph(J);c.keepEdgesInBackground=!0;c.isCellResizable=function(){return!1};c.isCellRotatable=function(){return!1};c.getCursorForCell=function(H){return this.model.isVertex(H)?"pointer":null};c.getFoldingImage=
+function(){return null};var f=function(){mxEvent.removeListener(document,"keydown",F);J.parentNode.removeChild(J);m.scrollCellToVisible(v)};mxEvent.addListener(G,"click",f);mxEvent.addListener(R,"click",f);c.setEnabled(!1);var l=c.click;c.click=function(H){var N=H.getCell(),L=null!=N?null!=N.referenceCell?N.referenceCell:N:null;null!=N&&c.rootCell!=N&&0<c.getEdges(L).length?n(c,N):l.apply(this,arguments)};f=c.container.scrollWidth/2;var t=c.container.scrollHeight/3;c.model.beginUpdate();var q=c.importCells([v])[0];
+q.sourceCellId=v.id;q.geometry.x=f-q.geometry.width/2;q.geometry.y=t-q.geometry.height/2;c.model.endUpdate();var D=!1;c.getModel().addListener(mxEvent.CHANGE,function(H,N){D||(H=N.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,c.labelsVisible=!1,D=!0,mxEffects.animateChanges(c,H,function(){var L=new mxParallelEdgeLayout(c);L.spacing=60;var I=L.layout;L.layout=function(Z){L.spacing=Math.min(60,Math.max(30,60-5*Z.length));I.apply(this,arguments)};L.execute(c.getDefaultParent());mxText.prototype.enableBoundingBox=
!0;c.labelsVisible=!0;c.tooltipHandler.hide();c.refresh();D=!1}))});n(c,q)}else mxUtils.error("Browser is not supported!",200,!1)})(A)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};
Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==
g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};
Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var v=e.getElementsByTagName("svg");if(0<v.length){document.body.appendChild(e);try{m=g=1;var n=v[0].getAttribute("width"),A=v[0].getAttribute("height");n=null!=n&&"%"!=n.charAt(n.length-
-1)?parseFloat(n):NaN;A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;var G=v[0].getAttribute("viewBox");if(null!=G&&!isNaN(n)&&!isNaN(A)){var S=G.split(" ");4<=G.length&&(g=parseFloat(S[2])/n,m=parseFloat(S[3])/A,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var F=v[0].getBBox();if(0<F.width&&0<F.height){n=0;var K=v[0].querySelectorAll("[stroke-width]");for(A=0;A<K.length;A++)n=Math.max(n,parseFloat(K[A].getAttribute("stroke-width")));F=new mxRectangle(F.x,
+1)?parseFloat(n):NaN;A=null!=A&&"%"!=A.charAt(A.length-1)?parseFloat(A):NaN;var G=v[0].getAttribute("viewBox");if(null!=G&&!isNaN(n)&&!isNaN(A)){var R=G.split(" ");4<=G.length&&(g=parseFloat(R[2])/n,m=parseFloat(R[3])/A,new mxRectangle(parseFloat(R[0]),parseFloat(R[1]),parseFloat(R[2]),parseFloat(R[3])))}var F=v[0].getBBox();if(0<F.width&&0<F.height){n=0;var J=v[0].querySelectorAll("[stroke-width]");for(A=0;A<J.length;A++)n=Math.max(n,parseFloat(J[A].getAttribute("stroke-width")));F=new mxRectangle(F.x,
F.y,F.width,F.height);F.grow(n/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",F.x+" "+F.y+" "+F.width+" "+F.height);e.getElementsByTagName("svg")[0].setAttribute("width",F.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",F.height/m)}}catch(c){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(v[0]))}}}catch(c){}return b};
Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};
Graph.rewritePageLinks=function(b,e){function g(v,n){var A=v.getAttribute(n);if(null!=A){Graph.isPageLink(A)&&(A="#"+A.substring(A.indexOf(":")+1));var G=n;e&&"xlink:href"==n&&(v.removeAttribute(n),G="href");v.setAttribute(G,A)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
@@ -2349,33 +2348,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,n=!0,A=null,G=mxUtils.bind(this,function(K){n=!0;A=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){n=n&&null!=A&&Math.abs(A.x-mxEvent.getClientX(K))<v&&Math.abs(A.y-mxEvent.getClientY(K))<v}),F=mxUtils.bind(this,function(K){if(n)for(var c=mxEvent.getSource(K);null!=
-c&&c!=m.node;){if("a"==c.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,c,K);break}c=c.parentNode}});mxEvent.addGestureListeners(m.node,G,S,F);mxEvent.addListener(m.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var v=g.view.graph.tolerance,n=!0,A=null,G=mxUtils.bind(this,function(J){n=!0;A=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J))}),R=mxUtils.bind(this,function(J){n=n&&null!=A&&Math.abs(A.x-mxEvent.getClientX(J))<v&&Math.abs(A.y-mxEvent.getClientY(J))<v}),F=mxUtils.bind(this,function(J){if(n)for(var c=mxEvent.getSource(J);null!=
+c&&c!=m.node;){if("a"==c.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,c,J);break}c=c.parentNode}});mxEvent.addGestureListeners(m.node,G,R,F);mxEvent.addListener(m.node,"click",function(J){mxEvent.consume(J)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=
m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(A){return!this.isSpecialColor(A.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(A.style,"lineShape",null)&&(this.model.isVertex(A.cell)||"arrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(A.style,
-mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var S=G?"color":"background-color",F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,
-S);null==F&&null!=A&&A!=this.cellEditor.textarea.parentNode;)F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,S),A=A.parentNode;if("rgba(0, 0, 0, 0)"==F||"transparent"==F)F=mxConstants.NONE;return F};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return"label"==A||"rectangle"==
+mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(A){return this.isFillState(A)&&"wire"!=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(A){return!0};Graph.prototype.getTextColor=function(A,G){for(var R=G?"color":"background-color",F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,
+R);null==F&&null!=A&&A!=this.cellEditor.textarea.parentNode;)F=A==this.cellEditor.textarea&&G?"default":Graph.getGivenColor(A,R),A=A.parentNode;if("rgba(0, 0, 0, 0)"==F||"transparent"==F)F=mxConstants.NONE;return F};Graph.prototype.isSpecialColor=function(A){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],A)};Graph.prototype.isGlassState=function(A){A=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return"label"==A||"rectangle"==
A||"internalStorage"==A||"ext"==A||"umlLifeline"==A||"swimlane"==A||"process"==A};Graph.prototype.isRoundedState=function(A){return null!=A.shape?A.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(A){var G=mxUtils.getValue(A.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(A.style,mxConstants.STYLE_CURVED,!1)&&("connector"==G||"filledEdge"==G||"wire"==G)};Graph.prototype.isAutoSizeState=
-function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var S=this.model;return S.filterDescendants(function(F){return A&&S.isVertex(F)||G&&S.isEdge(F)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(A,G,S){A=this.getCellStyle(A).newEdgeStyle;
-if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),K;for(K in F)this.setCellStyles(K,F[K],G),"edgeStyle"==K&&"elbowEdgeStyle"==F[K]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},S=0;S<A.length;S++){var F=this.view.getState(A[S]);null!=F&&this.mergeStyle(F.style,G,0==S)}return G};Graph.prototype.mergeStyle=function(A,G,S){if(null!=
-A){var F={},K;for(K in A){var c=A[K];null!=c&&(F[K]=!0,null==G[K]&&S?G[K]=c:G[K]!=c&&delete G[K])}for(K in G)F[K]||delete G[K]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(A)&&
-(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var S=this.model.getChildAt(A,G);if(this.isCellEditable(S)){A=S;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,S,F){null!=A&&(F||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(A,function(K){return 0>mxUtils.indexOf(S,K)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=function(A,G,S,
-F,K,c,f){var l=!1,t=!1;if(0<A.length)for(var q=0;q<A.length&&(l=this.getModel().isVertex(A[q])||l,!(t=this.getModel().isEdge(A[q])||t)||!l);q++);else t=l=!0;l=l&&!c;t=t&&!f;for(q=0;q<G.length;q++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[q]),"strokeColor"!=G[q]||null!=S[q]&&"none"!=S[q])if(0<=mxUtils.indexOf(Graph.cellStyles,G[q])||"shape"==G[q])if("shape"!=G[q]&&(l||A)&&(null==S[q]?delete F[G[q]]:F[G[q]]=S[q]),t||A)null==S[q]?delete K[G[q]]:K[G[q]]=S[q]};Graph.prototype.includeDescendants=function(A){for(var G=
-[],S=0;S<A.length;S++)G=G.concat(this.model.getDescendants(A[S]));return G};Graph.prototype.pasteCellStyles=function(A,G,S,F,K){G=null!=G?G:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;K=null!=K?K:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<A.length;c++){var f=A[c],l=this.model.getStyle(f),t=!1;null!=f.style&&(pairs=f.style.split(";"),t=t||0<=mxUtils.indexOf(pairs,"text"));if(t)var q=Graph.textStyles;else if(q=Graph.cellStyles.slice(),!F)for(var D=null!=l?l.split(";"):
-[],H=0;H<D.length;H++){var N=D[H],L=N.indexOf("=");if(0<=L){var J=N.substring(0,L),Y=mxUtils.indexOf(q,J);0<=Y&&q.splice(Y,1);for(t=0;t<Graph.cellStyleGroups.length;t++){var ha=Graph.cellStyleGroups[t];if(0<=mxUtils.indexOf(ha,J))for(var ea=0;ea<ha.length;ea++){var aa=mxUtils.indexOf(q,ha[ea]);0<=aa&&q.splice(aa,1)}}}}var na=this.model.isEdge(f);t=na?S:G;for(H=0;H<q.length;H++){J=q[H];var W=t[J];null!=W&&("edgeStyle"!=J||K)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,J))&&(l=mxUtils.setStyle(l,
-J,W),"fontFamily"==J&&null==t.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==J&&"1"==W&&null==t.curved&&(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(f,l)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var S=0;S<G.length;S++)if(this.model.isVertex(G[S])||this.model.isEdge(G[S])){var F=this.getCellStyle(G[S],
-!1),K=F[mxConstants.STYLE_PERIMETER],c=!1;for(l in A){var f=A[l];if(F[l]!=f){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[l]&&"umlLifeline"!=f){c=!0;var l="participant"}this.setCellStyles(l,f,[G[S]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,K,[G[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(A,G,S,F,K,c){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,S,F,K,c){F=null!=F?F:!0;K=null!=K?K:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var f=
-this.model.getChildCount(S)-1;0<=f;f--){var l=this.model.getChildAt(S,f),t=this.getScaledCellAt(A,G,l,F,K,c);if(null!=t)return t;if(this.isCellVisible(l)&&(K&&this.model.isEdge(l)||F&&this.model.isVertex(l))&&(t=this.view.getState(l),null!=t&&(null==c||!c(t,A,G))&&this.intersects(t,A,G)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",
-"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,S=[],F=0;F<A.length;F++){var K=this.getCompositeParent(A[F]);
-this.isTableCell(K)&&(K=this.graph.model.getParent(K));this.isTableRow(K)&&(K=this.graph.model.getParent(K));null==K||G.get(K)||(G.put(K,!0),S.push(K))}return S};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);
-if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var S=[],F=0;F<G.length;F++)A(G[F])||S.push(G[F]);G=S}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,S=this.currentTranslate;A=new mxRectangle((A.x+2*S.x)*G-S.x,(A.y+2*S.y)*G-S.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
-function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,S=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*S,(A.y+G.y)*S,A.width*S,A.height*S)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;
+function(A){return"1"==mxUtils.getValue(A.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(A){return null!=mxUtils.getValue(A.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(A){return!0};Graph.prototype.getVerticesAndEdges=function(A,G){A=null!=A?A:!0;G=null!=G?G:!0;var R=this.model;return R.filterDescendants(function(F){return A&&R.isVertex(F)||G&&R.isEdge(F)},R.getRoot())};Graph.prototype.applyNewEdgeStyle=function(A,G,R){A=this.getCellStyle(A).newEdgeStyle;
+if(null!=A){this.model.beginUpdate();try{var F=JSON.parse(A),J;for(J in F)this.setCellStyles(J,F[J],G),"edgeStyle"==J&&"elbowEdgeStyle"==F[J]&&null!=R&&this.setCellStyles("elbow",R==mxConstants.DIRECTION_SOUTH||R==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",G)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(A){for(var G={},R=0;R<A.length;R++){var F=this.view.getState(A[R]);null!=F&&this.mergeStyle(F.style,G,0==R)}return G};Graph.prototype.mergeStyle=function(A,G,R){if(null!=
+A){var F={},J;for(J in A){var c=A[J];null!=c&&(F[J]=!0,null==G[J]&&R?G[J]=c:G[J]!=c&&delete G[J])}for(J in G)F[J]||delete G[J]}};Graph.prototype.getStartEditingCell=function(A,G){G=this.getCellStyle(A);G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0));this.isTable(A)&&(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A)&&(A=this.model.getChildAt(A,0),G=this.getCellStyle(A),G=parseInt(mxUtils.getValue(G,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(A)&&
+(!this.isSwimlane(A)||0==G)&&""==this.getLabel(A)&&0<this.model.getChildCount(A))for(G=0;G<this.model.getChildCount(A);G++){var R=this.model.getChildAt(A,G);if(this.isCellEditable(R)){A=R;break}}return A};Graph.prototype.copyStyle=function(A){return this.getCellStyle(A,!1)};Graph.prototype.pasteStyle=function(A,G,R,F){null!=A&&(F||(R=null!=R?R:Graph.cellStyles,Graph.removeKeys(A,function(J){return 0>mxUtils.indexOf(R,J)})),this.updateCellStyles(A,G))};Graph.prototype.copyCellStyles=function(A,G,R,
+F,J,c,f){var l=!1,t=!1;if(0<A.length)for(var q=0;q<A.length&&(l=this.getModel().isVertex(A[q])||l,!(t=this.getModel().isEdge(A[q])||t)||!l);q++);else t=l=!0;l=l&&!c;t=t&&!f;for(q=0;q<G.length;q++)if(A=0<=mxUtils.indexOf(Graph.textStyles,G[q]),"strokeColor"!=G[q]||null!=R[q]&&"none"!=R[q])if(0<=mxUtils.indexOf(Graph.cellStyles,G[q])||"shape"==G[q])if("shape"!=G[q]&&(l||A)&&(null==R[q]?delete F[G[q]]:F[G[q]]=R[q]),t||A)null==R[q]?delete J[G[q]]:J[G[q]]=R[q]};Graph.prototype.includeDescendants=function(A){for(var G=
+[],R=0;R<A.length;R++)G=G.concat(this.model.getDescendants(A[R]));return G};Graph.prototype.pasteCellStyles=function(A,G,R,F,J){G=null!=G?G:this.currentVertexStyle;R=null!=R?R:this.currentEdgeStyle;J=null!=J?J:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var c=0;c<A.length;c++){var f=A[c],l=this.model.getStyle(f),t=!1;null!=f.style&&(pairs=f.style.split(";"),t=t||0<=mxUtils.indexOf(pairs,"text"));if(t)var q=Graph.textStyles;else if(q=Graph.cellStyles.slice(),!F)for(var D=null!=l?l.split(";"):
+[],H=0;H<D.length;H++){var N=D[H],L=N.indexOf("=");if(0<=L){var I=N.substring(0,L),Z=mxUtils.indexOf(q,I);0<=Z&&q.splice(Z,1);for(t=0;t<Graph.cellStyleGroups.length;t++){var ia=Graph.cellStyleGroups[t];if(0<=mxUtils.indexOf(ia,I))for(var fa=0;fa<ia.length;fa++){var ba=mxUtils.indexOf(q,ia[fa]);0<=ba&&q.splice(ba,1)}}}}var na=this.model.isEdge(f);t=na?R:G;for(H=0;H<q.length;H++){I=q[H];var X=t[I];null!=X&&("edgeStyle"!=I||J)&&(na||!na&&0>mxUtils.indexOf(Graph.edgeStyles,I))&&(l=mxUtils.setStyle(l,
+I,X),"fontFamily"==I&&null==t.fontSource&&(l=mxUtils.setStyle(l,"fontSource",null)),na&&"rounded"==I&&"1"==X&&null==t.curved&&(l=mxUtils.setStyle(l,"curved",null)))}Editor.simpleLabels&&(l=mxUtils.setStyle(mxUtils.setStyle(l,"html",null),"whiteSpace",null));this.model.setStyle(f,l)}}finally{this.model.endUpdate()}return A};Graph.prototype.updateCellStyles=function(A,G){this.model.beginUpdate();try{for(var R=0;R<G.length;R++)if(this.model.isVertex(G[R])||this.model.isEdge(G[R])){var F=this.getCellStyle(G[R],
+!1),J=F[mxConstants.STYLE_PERIMETER],c=!1;for(l in A){var f=A[l];if(F[l]!=f){if(l==mxConstants.STYLE_SHAPE&&"umlLifeline"==F[l]&&"umlLifeline"!=f){c=!0;var l="participant"}this.setCellStyles(l,f,[G[R]])}}c&&this.setCellStyles(mxConstants.STYLE_PERIMETER,J,[G[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(A,G,R,F,J,c){this.useCssTransforms&&(A=A/this.currentScale-this.currentTranslate.x,G=G/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(A,G,R,F,J,c){F=null!=F?F:!0;J=null!=J?J:!0;null==R&&(R=this.getCurrentRoot(),null==R&&(R=this.getModel().getRoot()));if(null!=R)for(var f=
+this.model.getChildCount(R)-1;0<=f;f--){var l=this.model.getChildAt(R,f),t=this.getScaledCellAt(A,G,l,F,J,c);if(null!=t)return t;if(this.isCellVisible(l)&&(J&&this.model.isEdge(l)||F&&this.model.isVertex(l))&&(t=this.view.getState(l),null!=t&&(null==c||!c(t,A,G))&&this.intersects(t,A,G)))return l}return null};Graph.prototype.isRecursiveVertexResize=function(A){return!this.isSwimlane(A.cell)&&0<this.model.getChildCount(A.cell)&&!this.isCellCollapsed(A.cell)&&"1"==mxUtils.getValue(A.style,"recursiveResize",
+"1")&&null==mxUtils.getValue(A.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(A){for(var G=this.getCellGeometry(A);null!=G&&G.relative;)A=this.getModel().getParent(A),G=this.getCellGeometry(A);return A};Graph.prototype.isPart=function(A){return"1"==mxUtils.getValue(this.getCurrentCellStyle(A),"part","0")||this.isTableCell(A)||this.isTableRow(A)};Graph.prototype.getCompositeParents=function(A){for(var G=new mxDictionary,R=[],F=0;F<A.length;F++){var J=this.getCompositeParent(A[F]);
+this.isTableCell(J)&&(J=this.graph.model.getParent(J));this.isTableRow(J)&&(J=this.graph.model.getParent(J));null==J||G.get(J)||(G.put(J,!0),R.push(J))}return R};Graph.prototype.getReferenceTerminal=function(A){if(null!=A){var G=this.getCellGeometry(A);null!=G&&G.relative&&(A=this.model.getParent(A))}null!=A&&this.model.isEdge(A)&&(A=this.model.getParent(A));null!=A&&(A=this.getCompositeParent(A));return A};Graph.prototype.getCompositeParent=function(A){for(;this.isPart(A);){var G=this.model.getParent(A);
+if(!this.model.isVertex(G))break;A=G}return A};Graph.prototype.filterSelectionCells=function(A){var G=this.getSelectionCells();if(null!=A){for(var R=[],F=0;F<G.length;F++)A(G[F])||R.push(G[F]);G=R}return G};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(A){if(this.useCssTransforms){var G=this.currentScale,R=this.currentTranslate;A=new mxRectangle((A.x+2*R.x)*G-R.x,(A.y+2*R.y)*G-R.y,A.width*G,A.height*G)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
+function(A){A=this.strokeWidth;this.graph.useCssTransforms&&(A/=this.graph.currentScale);return A};mxGraphView.prototype.getGraphBounds=function(){var A=this.graphBounds;if(this.graph.useCssTransforms){var G=this.graph.currentTranslate,R=this.graph.currentScale;A=new mxRectangle((A.x+G.x)*R,(A.y+G.y)*R,A.width*R,A.height*R)}return A};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;
mxGraphView.prototype.validate=function(A){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;
-Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],S=0;S<A.length;S++)this.isTable(A[S])||this.isTableRow(A[S])||this.isTableCell(A[S])||G.push(A[S]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=
-A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};
-var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,S=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=S)};var n=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,S){var F=this.useCssTransforms,K=this.view.scale,c=this.view.translate;F&&(this.view.scale=1,this.view.translate=
-new mxPoint(0,0),this.useCssTransforms=!1);n.apply(this,arguments);F&&(this.view.scale=K,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+Graph.prototype.getCellsForGroup=function(A){A=g.apply(this,arguments);for(var G=[],R=0;R<A.length;R++)this.isTableRow(A[R])||this.isTableCell(A[R])||G.push(A[R]);return G};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(A){A=m.apply(this,arguments);for(var G=[],R=0;R<A.length;R++)this.isTable(A[R])||this.isTableRow(A[R])||this.isTableCell(A[R])||G.push(A[R]);return G};Graph.prototype.updateCssTransform=function(){var A=this.view.getDrawPane();if(null!=A)if(A=
+A.parentNode,this.useCssTransforms){var G=A.getAttribute("transform");A.setAttribute("transformOrigin","0 0");var R=Math.round(100*this.currentScale)/100;A.setAttribute("transform","scale("+R+","+R+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");G!=A.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",A.getAttribute("transform"))}else A.removeAttribute("transformOrigin"),A.removeAttribute("transform")};
+var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var A=this.graph.useCssTransforms,G=this.scale,R=this.translate;A&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);v.apply(this,arguments);A&&(this.scale=G,this.translate=R)};var n=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(A,G,R){var F=this.useCssTransforms,J=this.view.scale,c=this.view.translate;F&&(this.view.scale=1,this.view.translate=
+new mxPoint(0,0),this.useCssTransforms=!1);n.apply(this,arguments);F&&(this.view.scale=J,this.view.translate=c,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};
Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var v=b.split("#")[1];window.location.hash=="#"+v&&(window.location.hash="");window.location.hash=v}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(n){}return m};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2390,7 +2389,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=
Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var v={};v.id=b[m].id;var n=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(v.value=this.getLabel(b[m]));if(null!=n)for(var A=0;A<n.length;A++)v[n[A].nodeName]=n[A].nodeValue;else v.label=this.convertValueToString(b[m]);g.push(v)}return g};
Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var v=this.cellRenderer.getShapesForState(m),n=0;n<v.length;n++)null!=v[n]&&null!=v[n].node&&e.push(v[n].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var v=this.view.getState(b[m]);null!=v&&null!=v.shape&&(this.model.isEdge(v.cell)&&null!=v.absolutePoints&&1<v.absolutePoints.length?g.push(this.createEdgeWipeAnimation(v,e)):this.model.isVertex(v.cell)&&null!=v.shape.bounds&&g.push(this.createVertexWipeAnimation(v,e)))}return g};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,n=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var S=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,K=1;K<n;K++)if(F<=m[K-1]){S.push(new mxPoint(g[K-1].x+(g[K].x-g[K-1].x)*F/m[K-1],g[K-1].y+(g[K].y-g[K-1].y)*F/m[K-1]));break}else F-=m[K-1],S.push(g[K]);b.shape.points=S;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,v=b.length,n=g.length;return{execute:mxUtils.bind(this,function(A,G){if(null!=b.shape){var R=[g[0]];G=A/G;e||(G=1-G);for(var F=v*G,J=1;J<n;J++)if(F<=m[J-1]){R.push(new mxPoint(g[J-1].x+(g[J].x-g[J-1].x)*F/m[J-1],g[J-1].y+(g[J].y-g[J-1].y)*F/m[J-1]));break}else F-=m[J-1],R.push(g[J]);b.shape.points=R;b.shape.redraw();0==A&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=G)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,v){null!=b.shape&&(v=m/v,e||(v=1-v),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*v,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=v))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var v=null,n=0,A=mxUtils.bind(this,function(){if(n==g||this.stoppingCustomActions){window.clearInterval(v);for(var G=0;G<b.length;G++)b[G].stop();null!=e&&e()}else for(G=0;G<b.length;G++)b[G].execute(n,g);n++});v=window.setInterval(A,m);A()};
@@ -2405,17 +2404,17 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);ret
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,g){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var m=this.dateFormatCache,v=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,A=function(H,N){H=String(H);for(N=N||2;H.length<N;)H="0"+H;return H};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",S=b[G+"Date"](),F=b[G+"Day"](),K=b[G+"Month"](),c=b[G+"FullYear"](),f=b[G+"Hours"](),l=b[G+"Minutes"](),t=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var q=g?0:b.getTimezoneOffset(),D={d:S,dd:A(S),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:K+1,mm:A(K+1),mmm:m.i18n.monthNames[K],mmmm:m.i18n.monthNames[K+
-12],yy:String(c).slice(2),yyyy:c,h:f%12||12,hh:A(f%12||12),H:f,HH:A(f),M:l,MM:A(l),s:t,ss:A(t),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+A(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in D?D[H]:H.slice(1,
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var G=g?"getUTC":"get",R=b[G+"Date"](),F=b[G+"Day"](),J=b[G+"Month"](),c=b[G+"FullYear"](),f=b[G+"Hours"](),l=b[G+"Minutes"](),t=b[G+"Seconds"]();G=b[G+"Milliseconds"]();var q=g?0:b.getTimezoneOffset(),D={d:R,dd:A(R),ddd:m.i18n.dayNames[F],dddd:m.i18n.dayNames[F+7],m:J+1,mm:A(J+1),mmm:m.i18n.monthNames[J],mmmm:m.i18n.monthNames[J+
+12],yy:String(c).slice(2),yyyy:c,h:f%12||12,hh:A(f%12||12),H:f,HH:A(f),M:l,MM:A(l),s:t,ss:A(t),l:A(G,3),L:A(99<G?Math.round(G/10):G),t:12>f?"a":"p",tt:12>f?"am":"pm",T:12>f?"A":"P",TT:12>f?"AM":"PM",Z:g?"UTC":(String(b).match(v)||[""]).pop().replace(n,""),o:(0<q?"-":"+")+A(100*Math.floor(Math.abs(q)/60)+Math.abs(q)%60,4),S:["th","st","nd","rd"][3<R%10?0:(10!=R%100-R%10)*R%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(H){return H in D?D[H]:H.slice(1,
H.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),n=0;n<v;n++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var S=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
-"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";e&&(K.style.filter="invert(100%)",K.style.top="-2px");F.appendChild(K);mxUtils.write(F,S);g.appendChild(F);
+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),v=m.getChildCount(m.root),n=0;n<v;n++)mxUtils.bind(this,function(A){function G(){m.isVisible(A)?(J.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(J.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var R=this.convertValueToString(A)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
+"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(m.isVisible(A)?"hideIt":"show",[R]));var J=document.createElement("img");J.setAttribute("draggable","false");J.setAttribute("align","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.width="16px";J.style.padding="0px 6px 0 4px";e&&(J.style.filter="invert(100%)",J.style.top="-2px");F.appendChild(J);mxUtils.write(F,R);g.appendChild(F);
mxEvent.addListener(F,"click",function(){m.setVisible(A,!m.isVisible(A));G();null!=b&&b(A)});G()})(m.getChildAt(m.root,n));return g};
-Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=n.substring(1);else{var G=n.substring(1,n.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);
-null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,S[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,S[G.substring(7)])))}else if(0>G.indexOf("{"))for(S=b;null==A&&null!=
-S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=S.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=S.hasAttribute(G)?null!=S.getAttribute(G)?S.getAttribute(G):"":null)),S=this.model.getParent(S);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:n));v=match.index+n.length}}m.push(e.substring(v))}return m.join("")};
+Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var v=0;match=this.placeholderPattern.exec(e);){var n=match[0];if(2<n.length&&"%label%"!=n&&"%tooltip%"!=n){var A=null;if(match.index>v&&"%"==e.charAt(match.index-1))A=n.substring(1);else{var G=n.substring(1,n.length-1),R={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==G)A=b.id;else if("width"===G.substring(0,5)&&this.model.isVertex(b)){var F=this.getCellGeometry(b);
+null!=F&&(A=F.width,5<G.length&&(A=Editor.toUnit(A,R[G.substring(6)])))}else if("height"==G.substring(0,6)&&this.model.isVertex(b))F=this.getCellGeometry(b),null!=F&&(A=F.height,6<G.length&&(A=Editor.toUnit(A,R[G.substring(7)])));else if("length"==G.substring(0,6)){for(F=b;null!=F&&!this.model.isEdge(F);)F=this.model.getParent(F);F=this.view.getState(F);null!=F&&(A=Math.round(F.length/this.view.scale),6<G.length&&(A=Editor.toUnit(A,R[G.substring(7)])))}else if(0>G.indexOf("{"))for(R=b;null==A&&null!=
+R;)null!=R.value&&"object"==typeof R.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(A=R.getAttribute(G+"_"+Graph.diagramLanguage)),null==A&&(A=R.hasAttribute(G)?null!=R.getAttribute(G)?R.getAttribute(G):"":null)),R=this.model.getParent(R);null==A&&(A=this.getGlobalVariable(G));null==A&&null!=g&&(A=g[G])}m.push(e.substring(v,match.index)+(null!=A?A:n));v=match.index+n.length}}m.push(e.substring(v))}return m.join("")};
Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],g=0;g<b.length;g++){var m=this.model.getCell(b[g].id);null!=m&&e.push(m)}this.setSelectionCells(e)}else this.clearSelection()};Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),n=this.model.getParent(e);if(v==this.model.getParent(n)){b=m.getIndex(b);m=v.getIndex(m);var A=n.getIndex(e),G=v.getIndex(n);n=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=n;m++){G=this.model.getChildAt(v,m);for(var S=e;S<=b;S++)A.push(this.model.getChildAt(G,S))}0<A.length&&(1<A.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(b,e){var g=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var m=this.model.getParent(b),v=this.model.getParent(m),n=this.model.getParent(e);if(v==this.model.getParent(n)){b=m.getIndex(b);m=v.getIndex(m);var A=n.getIndex(e),G=v.getIndex(n);n=Math.max(m,G);e=Math.min(b,A);b=Math.max(b,A);A=[];for(m=Math.min(m,G);m<=n;m++){G=this.model.getChildAt(v,m);for(var R=e;R<=b;R++)A.push(this.model.getChildAt(G,R))}0<A.length&&(1<A.length||1<this.getSelectionCount()||
!this.isCellSelected(A[0]))&&(this.setSelectionCells(A),g=!0)}}return g};
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var g=0;g<b.length;g++){var m=b[g],v=this.getCellGeometry(m);if(null!=v){v=v.clone();if(this.getModel().isVertex(m))v.x=Math.round(v.x/e)*e,v.y=Math.round(v.y/e)*e,v.width=Math.round(v.width/e)*e,v.height=Math.round(v.height/e)*e;else if(this.getModel().isEdge(m)&&null!=v.points)for(var n=0;n<v.points.length;n++)v.points[n].x=Math.round(v.points[n].x/e)*e,v.points[n].y=Math.round(v.points[n].y/e)*e;this.getModel().setGeometry(m,
v)}}}finally{this.getModel().endUpdate()}};Graph.prototype.removeChildCells=function(b){this.model.beginUpdate();try{for(var e=this.model.getChildCount(b);0<=e;e--)this.model.remove(this.model.getChildAt(b,e))}finally{this.model.endUpdate()}};
@@ -2423,13 +2422,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=
this.model.isEdge(b)&&this.model.isEdge(e[n]))if(g){var A=this.model.getStyle(e[n]);if(null!=A){var G=A.split(";");0<G.length&&0>G[0].indexOf("=")&&(G=G.slice(1));this.model.setStyle(e[n],G.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[n]]);this.setCellStyles("points",null,[e[n]]);this.pasteStyle(v,[e[n]],null,!0)}else v=this.copyStyle(e[n]),this.model.setStyle(e[n],m),this.pasteStyle(v,[e[n]]);"1"==mxUtils.getValue(this.getCellStyle(e[n],!1),"composite","0")&&this.removeChildCells(e[n])}}finally{this.model.endUpdate()}};
Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};
-Graph.prototype.connectVertex=function(b,e,g,m,v,n,A,G){n=n?n:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),F=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(K.x+=F.geometry.width/2,K.y-=g):e==
-mxConstants.DIRECTION_SOUTH?(K.x+=F.geometry.width/2,K.y+=F.geometry.height+g):(K.x=e==mxConstants.DIRECTION_WEST?K.x-g:K.x+(F.geometry.width+g),K.y+=F.geometry.height/2);var c=this.view.getState(this.model.getParent(b));g=this.view.scale;var f=this.view.translate;F=f.x*g;f=f.y*g;null!=c&&this.model.isVertex(c.cell)&&(F=c.x,f=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(F+K.x*g,f+K.y*g)).grow(40*g);n=null!=n?
+Graph.prototype.connectVertex=function(b,e,g,m,v,n,A,G){n=n?n:!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),F=R?b:this.getCompositeParent(b),J=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(F.geometry.x,F.geometry.y);e==mxConstants.DIRECTION_NORTH?(J.x+=F.geometry.width/2,J.y-=g):e==
+mxConstants.DIRECTION_SOUTH?(J.x+=F.geometry.width/2,J.y+=F.geometry.height+g):(J.x=e==mxConstants.DIRECTION_WEST?J.x-g:J.x+(F.geometry.width+g),J.y+=F.geometry.height/2);var c=this.view.getState(this.model.getParent(b));g=this.view.scale;var f=this.view.translate;F=f.x*g;f=f.y*g;null!=c&&this.model.isVertex(c.cell)&&(F=c.x,f=c.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(J.x+=b.parent.geometry.x,J.y+=b.parent.geometry.y);n=n?null:(new mxRectangle(F+J.x*g,f+J.y*g)).grow(40*g);n=null!=n?
this.getCells(0,0,0,0,null,null,n,null,!0):null;c=this.view.getState(b);var l=null,t=null;if(null!=n){n=n.reverse();for(var q=0;q<n.length;q++)if(!this.isCellLocked(n[q])&&!this.model.isEdge(n[q])&&n[q]!=b)if(!this.model.isAncestor(b,n[q])&&this.isContainer(n[q])&&(null==l||n[q]==this.model.getParent(b)))l=n[q];else if(null==t&&this.isCellConnectable(n[q])&&!this.model.isAncestor(n[q],b)&&!this.isSwimlane(n[q])){var D=this.view.getState(n[q]);null==c||null==D||mxUtils.intersects(c,D)||(t=n[q])}}var H=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;H&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var N=[],L=t;t=l;v=mxUtils.bind(this,function(J){if(null==A||null!=J||null==t&&S){this.model.beginUpdate();try{if(null==L&&H){var Y=this.getAbsoluteParent(null!=J?J:b);Y=S?b:this.getCompositeParent(Y);L=null!=J?J:this.duplicateCells([Y],
-!1)[0];null!=J&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(L);null!=ha&&(null!=J&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?K.y-=ha.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=ha.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-ha.width/2:K.x+ha.width/2),ha.x=K.x-ha.width/2,ha.y=K.y-ha.height/2);null!=l?(this.addCells([L],l,null,null,null,!0),t=null):H&&!S&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&H||null==t&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=ea&&(N.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==t&&null!=L&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var aa=b.parent.getIndex(b);this.model.add(b.parent,L,aa)}null==t&&null!=L&&N.push(L);null==L&&null!=ea&&ea.geometry.setTerminalPoint(K,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=G)G(N);else return N});if(null==A||null!=L||!H||null==t&&S)return v(L);A(F+K.x*g,f+K.y*g,v)};
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||v;H&&("1"!=urlParams.sketch||v)&&(e==mxConstants.DIRECTION_NORTH?J.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?J.y+=b.geometry.height/2:J.x=e==mxConstants.DIRECTION_WEST?J.x-b.geometry.width/2:J.x+b.geometry.width/2);var N=[],L=t;t=l;v=mxUtils.bind(this,function(I){if(null==A||null!=I||null==t&&R){this.model.beginUpdate();try{if(null==L&&H){var Z=this.getAbsoluteParent(null!=I?I:b);Z=R?b:this.getCompositeParent(Z);L=null!=I?I:this.duplicateCells([Z],
+!1)[0];null!=I&&this.addCells([L],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(L);null!=ia&&(null!=I&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?J.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?J.y+=ia.height/2:J.x=e==mxConstants.DIRECTION_WEST?J.x-ia.width/2:J.x+ia.width/2),ia.x=J.x-ia.width/2,ia.y=J.y-ia.height/2);null!=l?(this.addCells([L],l,null,null,null,!0),t=null):H&&!R&&this.addCells([L],this.getDefaultParent(),null,null,null,!0)}var fa=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&H||null==t&&R?null:this.insertEdge(this.model.getParent(b),null,"",b,L,this.createCurrentEdgeStyle());null!=fa&&(N.push(fa),this.applyNewEdgeStyle(b,[fa],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(fa,b));if(null==t&&null!=L&&null!=b.parent&&R&&e==mxConstants.DIRECTION_WEST){var ba=b.parent.getIndex(b);this.model.add(b.parent,L,ba)}null==t&&null!=L&&N.push(L);null==L&&null!=fa&&fa.geometry.setTerminalPoint(J,!1);null!=fa&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[fa]))}finally{this.model.endUpdate()}}if(null!=G)G(N);else return N});if(null==A||null!=L||!H||null==t&&R)return v(L);A(F+J.x*g,f+J.y*g,v)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,v=0;v<b.length;v++)if(m=b[v],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),
null==g&&(g=e.getAttribute("label")||"");return g||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};
@@ -2440,8 +2439,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STY
Graph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};
Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<g.length;n++){var A=this.view.getState(g[n]),G=this.getCellGeometry(g[n]);if(null!=A&&null!=G){var S=0,F=0;if(G.alternateBounds)S=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var K=this.useCssTransforms?1:this.view.scale;
-S=Math.round(G.width-A.width/K);F=Math.round(G.height-A.height/K)}if(0!=F||0!=S){var c=this.model.getParent(g[n]),f=this.layoutManager.getLayout(c);null==f?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,c,S,F):null!=v&&mxEvent.isAltDown(v)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,S,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
+Graph.prototype.foldCells=function(b,e,g,m,v){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var n=0;n<g.length;n++){var A=this.view.getState(g[n]),G=this.getCellGeometry(g[n]);if(null!=A&&null!=G){var R=0,F=0;if(G.alternateBounds)R=G.width-G.alternateBounds.width,F=G.height-G.alternateBounds.height;else{var J=this.useCssTransforms?1:this.view.scale;
+R=Math.round(G.width-A.width/J);F=Math.round(G.height-A.height/J)}if(0!=F||0!=R){var c=this.model.getParent(g[n]),f=this.layoutManager.getLayout(c);null==f?null!=v&&this.isMoveCellsEvent(v,A)&&this.moveSiblings(A,c,R,F):null!=v&&mxEvent.isAltDown(v)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,R,F)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};
Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var v=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<v.length;e++)if(v[e]!=b.cell){var n=this.view.getState(v[e]),A=this.getCellGeometry(v[e]);null!=n&&null!=A&&(A=A.clone(),A.translate(Math.round(g*Math.max(0,Math.min(1,(n.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(n.y-b.y)/b.height)))),this.model.setGeometry(v[e],A))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var v=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==v&&!e.resizeLast;){var n=this.getCellGeometry(b),A=this.view.getState(b);null!=A&&null!=n&&(n=n.clone(),e.horizontal?n.width+=g+Math.min(0,A.width/this.view.scale-n.width):n.height+=m+Math.min(0,A.height/this.view.scale-n.height),this.model.setGeometry(b,
n));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2482,10 +2481,10 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),v=g.getGraphX(),n=
HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(G,S,F){if(null!=g){var K=new mxRectangle(S,F,G.clientWidth,G.clientHeight);mxUtils.intersects(K,g)&&(G==this.arrowUp?F-=K.y+K.height-g.y:G==this.arrowRight?S+=g.x+g.width-K.x:G==this.arrowDown?F+=g.y+g.height-K.y:G==this.arrowLeft&&(S-=K.x+K.width-g.x))}G.style.left=S+"px";G.style.top=F+"px";mxUtils.setOpacity(G,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(G,R,F){if(null!=g){var J=new mxRectangle(R,F,G.clientWidth,G.clientHeight);mxUtils.intersects(J,g)&&(G==this.arrowUp?F-=J.y+J.height-g.y:G==this.arrowRight?R+=g.x+g.width-J.x:G==this.arrowDown?F+=g.y+g.height-J.y:G==this.arrowLeft&&(R-=J.x+J.width-g.x))}G.style.left=R+"px";G.style.top=F+"px";mxUtils.setOpacity(G,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()),v=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==v&&v==b&&(b=v=m=e=null);var n=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,S){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,
-this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==n||F.height<3*n.height&&F.width<3*n.width)?S.style.visibility="visible":S.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,this.arrowUp);A(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),v=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==v&&v==b&&(b=v=m=e=null);var n=this.graph.getCellGeometry(this.currentState.cell),A=mxUtils.bind(this,function(G,R){var F=this.graph.model.isVertex(G)&&this.graph.getCellGeometry(G);null==G||this.graph.model.isAncestor(G,
+this.currentState.cell)||this.graph.isSwimlane(G)||!(null==F||null==n||F.height<3*n.height&&F.width<3*n.width)?R.style.visibility="visible":R.style.visibility="hidden"});A(e,this.arrowRight);A(m,this.arrowLeft);A(v,this.arrowUp);A(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};
@@ -2495,43 +2494,43 @@ b||null==this.bbox||null==e||null==g||!mxUtils.contains(this.bbox,e,g))&&(null!=
HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};
Graph.prototype.removeTextStyleForCell=function(b,e){var g=this.getCurrentCellStyle(b),m=!1;this.getModel().beginUpdate();try{if("1"==mxUtils.getValue(g,"html","0")){var v=this.convertValueToString(b);"0"!=mxUtils.getValue(g,"nl2Br","1")&&(v=v.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));v=Editor.convertHtmlToText(v);this.cellLabelChanged(b,v);m=!0}e&&(this.setCellStyles("fontSource",null,[b]),this.setCellStyles(mxConstants.STYLE_FONTFAMILY,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSIZE,
null,[b]),this.setCellStyles(mxConstants.STYLE_FONTSTYLE,null,[b]),this.setCellStyles(mxConstants.STYLE_FONTCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BORDERCOLOR,null,[b]),this.setCellStyles(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null,[b]))}finally{this.getModel().endUpdate()}return m};Graph.prototype.createParent=function(b,e,g,m,v){b=this.cloneCell(b);for(var n=0;n<g;n++){var A=this.cloneCell(e),G=this.getCellGeometry(A);null!=G&&(G.x+=n*m,G.y+=n*v);b.insert(A)}return b};
-Graph.prototype.createTable=function(b,e,g,m,v,n,A,G,S){g=null!=g?g:60;m=null!=m?m:40;n=null!=n?n:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=v?v:"",0,0,e*g,b*m+(null!=v?n:0),null!=A?A:"shape=table;startSize="+(null!=v?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,S),e,g,0),b,0,m)};
+Graph.prototype.createTable=function(b,e,g,m,v,n,A,G,R){g=null!=g?g:60;m=null!=m?m:40;n=null!=n?n:30;G=null!=G?G:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";R=null!=R?R:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=v?v:"",0,0,e*g,b*m+(null!=v?n:0),null!=A?A:"shape=table;startSize="+(null!=v?n:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*g,m,G),this.createVertex(null,null,"",0,0,g,m,R),e,g,0),b,0,m)};
Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCells(b,!0),v=0;v<m.length;v++)if(null!=g&&(m[v].value=g[v]),null!=e)for(var n=this.model.getChildCells(m[v],!0),A=0;A<n.length;A++)null!=e[v][A]&&(n[A].value=e[v][A]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,n,A,G,S){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=n?n:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");n=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=n;v.geometry.height+=
-n;A=this.createVertex(null,null,"",0,n,e*g+n,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",n,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+n,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",n,0,g,m,S),e,g,0),b-1,0,m)):v};
-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var n=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),S=null,F=[],K=0;K<A.length;K++){var c=this.getCellGeometry(A[K]),f={cell:A[K],rospan:1,colspan:1,row:v,col:K,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;f.point=new mxPoint(c.width+(null!=S?S.point.x:b.x+n.x),c.height+(null!=g&&null!=
-g[0]?g[0].point.y:b.y+n.y));f.actual=f;null!=g&&null!=g[K]&&1<g[K].rowspan?(f.rowspan=g[K].rowspan-1,f.colspan=g[K].colspan,f.actual=g[K].actual):null!=S&&1<S.colspan?(f.rowspan=S.rowspan,f.colspan=S.colspan-1,f.actual=S.actual):(S=this.getCurrentCellStyle(A[K],!0),null!=S&&(f.rowspan=parseInt(S.rowspan||1),f.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(f,A.length,
-m.length,b.x+(S?n.x:0),b.y+(S?n.y:0));F.push(f);S=f}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(n,A,G,S,F){e&&n.row<G-1&&(null==m[n.row]&&(m[n.row]=[new mxPoint(S,n.point.y)]),1<n.rowspan&&m[n.row].push(null),m[n.row].push(n.point));g&&n.col<A-1&&(null==v[n.col]&&(v[n.col]=[new mxPoint(n.point.x,F)]),1<n.colspan&&v[n.col].push(null),v[n.col].push(n.point))}));return m.concat(v)};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,v,n,A,G,R){g=null!=g?g:120;m=null!=m?m:120;A=null!=A?A:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";G=null!=G?G:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;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;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";v=this.createVertex(null,null,null!=v?v:"",0,0,e*g,b*m,null!=n?n:"shape=table;childLayout=tableLayout;"+(null==v?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");n=mxUtils.getValue(this.getCellStyle(v),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);v.geometry.width+=n;v.geometry.height+=
+n;A=this.createVertex(null,null,"",0,n,e*g+n,m,A);v.insert(this.createParent(A,this.createVertex(null,null,"",n,0,g,m,G),e,g,0));return 1<b?(A.geometry.y=m+n,this.createParent(v,this.createParent(A,this.createVertex(null,null,"",n,0,g,m,R),e,g,0),b-1,0,m)):v};
+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var v=0;v<m.length;v++){for(var n=this.getActualStartSize(m[v],!0),A=this.model.getChildCells(m[v],!0),G=this.getCellStyle(m[v],!0),R=null,F=[],J=0;J<A.length;J++){var c=this.getCellGeometry(A[J]),f={cell:A[J],rospan:1,colspan:1,row:v,col:J,geo:c};c=null!=c.alternateBounds?c.alternateBounds:c;f.point=new mxPoint(c.width+(null!=R?R.point.x:b.x+n.x),c.height+(null!=g&&null!=
+g[0]?g[0].point.y:b.y+n.y));f.actual=f;null!=g&&null!=g[J]&&1<g[J].rowspan?(f.rowspan=g[J].rowspan-1,f.colspan=g[J].colspan,f.actual=g[J].actual):null!=R&&1<R.colspan?(f.rowspan=R.rowspan,f.colspan=R.colspan-1,f.actual=R.actual):(R=this.getCurrentCellStyle(A[J],!0),null!=R&&(f.rowspan=parseInt(R.rowspan||1),f.colspan=parseInt(R.colspan||1)));R=1==mxUtils.getValue(G,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(G,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(f,A.length,
+m.length,b.x+(R?n.x:0),b.y+(R?n.y:0));F.push(f);R=f}g=F}};Graph.prototype.getTableLines=function(b,e,g){var m=[],v=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(n,A,G,R,F){e&&n.row<G-1&&(null==m[n.row]&&(m[n.row]=[new mxPoint(R,n.point.y)]),1<n.rowspan&&m[n.row].push(null),m[n.row].push(n.point));g&&n.col<A-1&&(null==v[n.col]&&(v[n.col]=[new mxPoint(n.point.x,F)]),1<n.colspan&&v[n.col].push(null),v[n.col].push(n.point))}));return m.concat(v)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var n=m.getParent(b),A=m.getChildCells(n,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var S=A[G+1],F=this.getCellGeometry(S);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(S,F))}}var K=this.getCellGeometry(n);null!=K&&(g||(g=b==A[A.length-1]),g&&(K=K.clone(),K.height+=e,m.setGeometry(n,K)))}}finally{m.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),n=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var S=m.getChildCells(n,!0),F=0;F<S.length;F++){v=S[F];A=m.getChildCells(v,!0);var K=A[b],c=this.getCellGeometry(K);null!=c&&(c=c.clone(),c.width+=e,null!=c.alternateBounds&&(c.alternateBounds.width+=e),m.setGeometry(K,c));b<A.length-1&&(K=A[b+1],c=this.getCellGeometry(K),null!=c&&(c=c.clone(),
-c.x+=e,g||(c.width-=e,null!=c.alternateBounds&&(c.alternateBounds.width-=e)),m.setGeometry(K,c)))}if(G||g){var f=this.getCellGeometry(n);null!=f&&(f=f.clone(),f.width+=e,m.setGeometry(n,f))}null!=this.layoutManager&&this.layoutManager.executeLayout(n)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var v=this.getCellGeometry(b);if(null!=v){v=v.clone();v.height+=e;m.setGeometry(b,v);var n=m.getParent(b),A=m.getChildCells(n,!0);if(!g){var G=mxUtils.indexOf(A,b);if(G<A.length-1){var R=A[G+1],F=this.getCellGeometry(R);null!=F&&(F=F.clone(),F.y+=e,F.height-=e,m.setGeometry(R,F))}}var J=this.getCellGeometry(n);null!=J&&(g||(g=b==A[A.length-1]),g&&(J=J.clone(),J.height+=e,m.setGeometry(n,J)))}}finally{m.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),v=m.getParent(b),n=m.getParent(v),A=m.getChildCells(v,!0);b=mxUtils.indexOf(A,b);var G=b==A.length-1;m.beginUpdate();try{for(var R=m.getChildCells(n,!0),F=0;F<R.length;F++){v=R[F];A=m.getChildCells(v,!0);var J=A[b],c=this.getCellGeometry(J);null!=c&&(c=c.clone(),c.width+=e,null!=c.alternateBounds&&(c.alternateBounds.width+=e),m.setGeometry(J,c));b<A.length-1&&(J=A[b+1],c=this.getCellGeometry(J),null!=c&&(c=c.clone(),
+c.x+=e,g||(c.width-=e,null!=c.alternateBounds&&(c.alternateBounds.width-=e)),m.setGeometry(J,c)))}if(G||g){var f=this.getCellGeometry(n);null!=f&&(f=f.clone(),f.width+=e,m.setGeometry(n,f))}null!=this.layoutManager&&this.layoutManager.executeLayout(n)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var v=this.graph.getCellGeometry(b[m]);null!=v&&(g+=e?v.width:v.height)}return g};
TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var v=[];m=m.x;for(var n=0;n<g.length;n++){var A=this.graph.getCellGeometry(g[n]);null!=A&&(m+=(null!=A.alternateBounds?A.alternateBounds.width:A.width)*e/b,v.push(Math.round(m)))}return v};
-TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),n=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<n.length;S++){var F=this.graph.getCellGeometry(n[S]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[S],F.width=e[S+1]-F.x,S==n.length-1&&S<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,S==n.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,
-0,F.width,F.height),v.setGeometry(n[S],F))}return G};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),n="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var S=g.height-e.y-e.height,F=g.width-e.x-e.width,K=A.getChildCells(b,!0),c=0;c<K.length;c++)A.setVisible(K[c],!0);var f=this.getSize(K,!1);if(0<S&&0<F&&0<
-K.length&&0<f){if(v){var l=this.graph.getCellGeometry(K[K.length-1]);null!=l&&(l=l.clone(),l.height=S-f+l.height,A.setGeometry(K[K.length-1],l))}var t=n?null:this.getRowLayout(K[0],F),q=[],D=e.y;for(c=0;c<K.length;c++)l=this.graph.getCellGeometry(K[c]),null!=l&&(l=l.clone(),l.x=e.x,l.width=F,l.y=Math.round(D),D=v||m?D+l.height:D+l.height/f*S,l.height=Math.round(D)-l.y,A.setGeometry(K[c],l)),G=Math.max(G,this.layoutRow(K[c],t,l.height,F,q));m&&S<f&&(g=g.clone(),g.height=D+e.height,A.setGeometry(b,
-g));n&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){A.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=N.width}H.actual.col==H.col&&(N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=N.height)}}))}else for(c=0;c<K.length;c++)A.setVisible(K[c],
+TableLayout.prototype.layoutRow=function(b,e,g,m){var v=this.graph.getModel(),n=v.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var A=b.x,G=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var R=0;R<n.length;R++){var F=this.graph.getCellGeometry(n[R]);null!=F&&(F=F.clone(),F.y=b.y,F.height=g-b.y-b.height,null!=e?(F.x=e[R],F.width=e[R+1]-F.x,R==n.length-1&&R<e.length-2&&(F.width=m-F.x-b.x-b.width)):(F.x=A,A+=F.width,R==n.length-1?F.width=m-b.x-b.width-G:G+=F.width),F.alternateBounds=new mxRectangle(0,
+0,F.width,F.height),v.setGeometry(n[R],F))}return G};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),v="1"==mxUtils.getValue(m,"resizeLastRow","0"),n="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var A=this.graph.getModel(),G=0;A.beginUpdate();try{for(var R=g.height-e.y-e.height,F=g.width-e.x-e.width,J=A.getChildCells(b,!0),c=0;c<J.length;c++)A.setVisible(J[c],!0);var f=this.getSize(J,!1);if(0<R&&0<F&&0<
+J.length&&0<f){if(v){var l=this.graph.getCellGeometry(J[J.length-1]);null!=l&&(l=l.clone(),l.height=R-f+l.height,A.setGeometry(J[J.length-1],l))}var t=n?null:this.getRowLayout(J[0],F),q=[],D=e.y;for(c=0;c<J.length;c++)l=this.graph.getCellGeometry(J[c]),null!=l&&(l=l.clone(),l.x=e.x,l.width=F,l.y=Math.round(D),D=v||m?D+l.height:D+l.height/f*R,l.height=Math.round(D)-l.y,A.setGeometry(J[c],l)),G=Math.max(G,this.layoutRow(J[c],t,l.height,F,q));m&&R<f&&(g=g.clone(),g.height=D+e.height,A.setGeometry(b,
+g));n&&F<G+Graph.minTableColumnWidth&&(g=g.clone(),g.width=G+e.width+e.x+Graph.minTableColumnWidth,A.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(H){A.setVisible(H.cell,H.actual.cell==H.cell);if(H.actual.cell!=H.cell){if(H.actual.row==H.row){var N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo;H.actual.geo.width+=N.width}H.actual.col==H.col&&(N=null!=H.geo.alternateBounds?H.geo.alternateBounds:H.geo,H.actual.geo.height+=N.height)}}))}else for(c=0;c<J.length;c++)A.setVisible(J[c],
!1)}finally{A.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(c,f){f=null!=f?f:!0;var l=this.getState(c);null!=l&&f&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&!l.invalid&&this.updateLineJumps(l)&&this.graph.cellRenderer.redraw(l,!1,this.isRendering());l=e.apply(this,
arguments);null!=l&&f&&this.graph.model.isEdge(l.cell)&&null!=l.style&&1!=l.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(l);return l};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var c=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
c)for(var f=0;f<c.length;f++)if("hidden"!=c[f].getAttribute("visibility"))return c[f];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(c){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(c){c=m.apply(this,arguments);null!=this.state&&(c.adaptiveColors=this.state.view.graph.getAdaptiveColors());return c};var v=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(c,f){return v.apply(this,arguments)||null!=c.routedPoints&&null!=f.routedPoints&&!mxUtils.equalPoints(f.routedPoints,c.routedPoints)};var n=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(c){n.apply(this,arguments);
-this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var f=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,t=null;if(null!=f&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var q=function(ca,la,Q){var k=new mxPoint(la,Q);k.type=ca;t.push(k);k=null!=c.routedPoints?c.routedPoints[t.length-1]:null;return null==k||k.type!=ca||k.x!=la||k.y!=Q},D=.5*this.scale;
-l=!1;t=[];for(var H=0;H<f.length-1;H++){for(var N=f[H+1],L=f[H],J=[],Y=f[H+2];H<f.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Y.x,Y.y,N.x,N.y)<1*this.scale*this.scale;)N=Y,H++,Y=f[H+2];l=q(0,L.x,L.y)||l;for(var ha=0;ha<this.validEdges.length;ha++){var ea=this.validEdges[ha],aa=ea.absolutePoints;if(null!=aa&&mxUtils.intersects(c,ea)&&"1"!=ea.style.noJump){var na=null;for(ea=0;ea<aa.length-1;ea++){var W=aa[ea+1],ba=aa[ea];for(Y=aa[ea+2];ea<aa.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,Y.x,Y.y,W.x,W.y)<1*this.scale*
-this.scale;)W=Y,ea++,Y=aa[ea+2];var ja=mxUtils.intersection(L.x,L.y,N.x,N.y,ba.x,ba.y,W.x,W.y);if(null!=ja&&(Math.abs(ja.x-L.x)>D||Math.abs(ja.y-L.y)>D)&&(Math.abs(ja.x-N.x)>D||Math.abs(ja.y-N.y)>D)&&(null==na||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,na.x,na.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,ba.x,ba.y)>D)&&(null==Y||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,Y.x,Y.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,W.x,W.y)>D)){Y=ja.x-L.x;na=ja.y-L.y;ja={distSq:Y*Y+na*na,x:ja.x,y:ja.y};for(Y=0;Y<J.length;Y++)if(J[Y].distSq>
-ja.distSq){J.splice(Y,0,ja);ja=null;break}null==ja||0!=J.length&&J[J.length-1].x===ja.x&&J[J.length-1].y===ja.y||J.push(ja)}na=ba}}}for(ea=0;ea<J.length;ea++)l=q(1,J[ea].x,J[ea].y)||l}ja=f[f.length-1];l=q(0,ja.x,ja.y)||l}c.routedPoints=t;return l}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,f,l){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)A.apply(this,
-arguments);else{var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,q=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,D=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,N=null,L=null,J=[],Y=null;c.begin();for(var ha=0;ha<this.state.routedPoints.length;ha++){var ea=this.state.routedPoints[ha],aa=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==ha?aa=f[0]:ha==this.state.routedPoints.length-1&&(aa=f[f.length-1]);var na=
-!1;if(null!=N&&1==ea.type){var W=this.state.routedPoints[ha+1];ea=W.x/this.scale-aa.x;W=W.y/this.scale-aa.y;ea=ea*ea+W*W;null==Y&&(Y=new mxPoint(aa.x-N.x,aa.y-N.y),L=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<L?(Y.x=Y.x*q/L,Y.y=Y.y*q/L):Y=null);ea>q*q&&0<L&&(ea=N.x-aa.x,W=N.y-aa.y,ea=ea*ea+W*W,ea>q*q&&(na=new mxPoint(aa.x-Y.x,aa.y-Y.y),ea=new mxPoint(aa.x+Y.x,aa.y+Y.y),J.push(na),this.addPoints(c,J,l,t,!1,null,H),J=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,H=!1,"sharp"==D?(c.lineTo(na.x-Y.y*
-J,na.y+Y.x*J),c.lineTo(ea.x-Y.y*J,ea.y+Y.x*J),c.lineTo(ea.x,ea.y)):"line"==D?(c.moveTo(na.x+Y.y*J,na.y-Y.x*J),c.lineTo(na.x-Y.y*J,na.y+Y.x*J),c.moveTo(ea.x-Y.y*J,ea.y+Y.x*J),c.lineTo(ea.x+Y.y*J,ea.y-Y.x*J),c.moveTo(ea.x,ea.y)):"arc"==D?(J*=1.3,c.curveTo(na.x-Y.y*J,na.y+Y.x*J,ea.x-Y.y*J,ea.y+Y.x*J,ea.x,ea.y)):(c.moveTo(ea.x,ea.y),H=!0),J=[ea],na=!0))}else Y=null;na||(J.push(aa),N=aa)}this.addPoints(c,J,l,t,!1,null,H);c.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
-function(c,f,l,t){return null!=f&&"centerPerimeter"==f.style[mxConstants.STYLE_PERIMETER]?new mxPoint(f.getCenterX(),f.getCenterY()):G.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,f,l,t){if(null==f||null==c||"1"!=f.style.snapToPoint&&"1"!=c.style.snapToPoint)S.apply(this,arguments);else{f=this.getTerminalPort(c,f,t);var q=this.getNextPoint(c,l,t),D=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||
-"0")),N=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=H){var L=Math.cos(-H),J=Math.sin(-H);q=mxUtils.getRotatedPoint(q,L,J,N)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[t?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);q=this.getPerimeterPoint(f,q,0==H&&D,L);0!=H&&(L=Math.cos(H),J=Math.sin(H),q=mxUtils.getRotatedPoint(q,L,J,N));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,f,l,t,q),t)}};mxGraphView.prototype.snapToAnchorPoint=
+this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(c)};mxGraphView.prototype.updateLineJumps=function(c){var f=c.absolutePoints;if(Graph.lineJumpsEnabled){var l=null!=c.routedPoints,t=null;if(null!=f&&null!=this.validEdges&&"none"!==mxUtils.getValue(c.style,"jumpStyle","none")){var q=function(da,W,S){var k=new mxPoint(W,S);k.type=da;t.push(k);k=null!=c.routedPoints?c.routedPoints[t.length-1]:null;return null==k||k.type!=da||k.x!=W||k.y!=S},D=.5*this.scale;
+l=!1;t=[];for(var H=0;H<f.length-1;H++){for(var N=f[H+1],L=f[H],I=[],Z=f[H+2];H<f.length-2&&mxUtils.ptSegDistSq(L.x,L.y,Z.x,Z.y,N.x,N.y)<1*this.scale*this.scale;)N=Z,H++,Z=f[H+2];l=q(0,L.x,L.y)||l;for(var ia=0;ia<this.validEdges.length;ia++){var fa=this.validEdges[ia],ba=fa.absolutePoints;if(null!=ba&&mxUtils.intersects(c,fa)&&"1"!=fa.style.noJump){var na=null;for(fa=0;fa<ba.length-1;fa++){var X=ba[fa+1],ca=ba[fa];for(Z=ba[fa+2];fa<ba.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Z.x,Z.y,X.x,X.y)<1*this.scale*
+this.scale;)X=Z,fa++,Z=ba[fa+2];var ka=mxUtils.intersection(L.x,L.y,N.x,N.y,ca.x,ca.y,X.x,X.y);if(null!=ka&&(Math.abs(ka.x-L.x)>D||Math.abs(ka.y-L.y)>D)&&(Math.abs(ka.x-N.x)>D||Math.abs(ka.y-N.y)>D)&&(null==na||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,na.x,na.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,ca.x,ca.y)>D)&&(null==Z||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,Z.x,Z.y)>D||mxUtils.ptLineDist(L.x,L.y,N.x,N.y,X.x,X.y)>D)){Z=ka.x-L.x;na=ka.y-L.y;ka={distSq:Z*Z+na*na,x:ka.x,y:ka.y};for(Z=0;Z<I.length;Z++)if(I[Z].distSq>
+ka.distSq){I.splice(Z,0,ka);ka=null;break}null==ka||0!=I.length&&I[I.length-1].x===ka.x&&I[I.length-1].y===ka.y||I.push(ka)}na=ca}}}for(fa=0;fa<I.length;fa++)l=q(1,I[fa].x,I[fa].y)||l}ka=f[f.length-1];l=q(0,ka.x,ka.y)||l}c.routedPoints=t;return l}return!1};var A=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(c,f,l){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)A.apply(this,
+arguments);else{var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,q=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,D=mxUtils.getValue(this.style,"jumpStyle","none"),H=!0,N=null,L=null,I=[],Z=null;c.begin();for(var ia=0;ia<this.state.routedPoints.length;ia++){var fa=this.state.routedPoints[ia],ba=new mxPoint(fa.x/this.scale,fa.y/this.scale);0==ia?ba=f[0]:ia==this.state.routedPoints.length-1&&(ba=f[f.length-1]);var na=
+!1;if(null!=N&&1==fa.type){var X=this.state.routedPoints[ia+1];fa=X.x/this.scale-ba.x;X=X.y/this.scale-ba.y;fa=fa*fa+X*X;null==Z&&(Z=new mxPoint(ba.x-N.x,ba.y-N.y),L=Math.sqrt(Z.x*Z.x+Z.y*Z.y),0<L?(Z.x=Z.x*q/L,Z.y=Z.y*q/L):Z=null);fa>q*q&&0<L&&(fa=N.x-ba.x,X=N.y-ba.y,fa=fa*fa+X*X,fa>q*q&&(na=new mxPoint(ba.x-Z.x,ba.y-Z.y),fa=new mxPoint(ba.x+Z.x,ba.y+Z.y),I.push(na),this.addPoints(c,I,l,t,!1,null,H),I=0>Math.round(Z.x)||0==Math.round(Z.x)&&0>=Math.round(Z.y)?1:-1,H=!1,"sharp"==D?(c.lineTo(na.x-Z.y*
+I,na.y+Z.x*I),c.lineTo(fa.x-Z.y*I,fa.y+Z.x*I),c.lineTo(fa.x,fa.y)):"line"==D?(c.moveTo(na.x+Z.y*I,na.y-Z.x*I),c.lineTo(na.x-Z.y*I,na.y+Z.x*I),c.moveTo(fa.x-Z.y*I,fa.y+Z.x*I),c.lineTo(fa.x+Z.y*I,fa.y-Z.x*I),c.moveTo(fa.x,fa.y)):"arc"==D?(I*=1.3,c.curveTo(na.x-Z.y*I,na.y+Z.x*I,fa.x-Z.y*I,fa.y+Z.x*I,fa.x,fa.y)):(c.moveTo(fa.x,fa.y),H=!0),I=[fa],na=!0))}else Z=null;na||(I.push(ba),N=ba)}this.addPoints(c,I,l,t,!1,null,H);c.stroke()}};var G=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
+function(c,f,l,t){return null!=f&&"centerPerimeter"==f.style[mxConstants.STYLE_PERIMETER]?new mxPoint(f.getCenterX(),f.getCenterY()):G.apply(this,arguments)};var R=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(c,f,l,t){if(null==f||null==c||"1"!=f.style.snapToPoint&&"1"!=c.style.snapToPoint)R.apply(this,arguments);else{f=this.getTerminalPort(c,f,t);var q=this.getNextPoint(c,l,t),D=this.graph.isOrthogonal(c),H=mxUtils.toRadians(Number(f.style[mxConstants.STYLE_ROTATION]||
+"0")),N=new mxPoint(f.getCenterX(),f.getCenterY());if(0!=H){var L=Math.cos(-H),I=Math.sin(-H);q=mxUtils.getRotatedPoint(q,L,I,N)}L=parseFloat(c.style[mxConstants.STYLE_PERIMETER_SPACING]||0);L+=parseFloat(c.style[t?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);q=this.getPerimeterPoint(f,q,0==H&&D,L);0!=H&&(L=Math.cos(H),I=Math.sin(H),q=mxUtils.getRotatedPoint(q,L,I,N));c.setAbsoluteTerminalPoint(this.snapToAnchorPoint(c,f,l,t,q),t)}};mxGraphView.prototype.snapToAnchorPoint=
function(c,f,l,t,q){if(null!=f&&null!=c){c=this.graph.getAllConnectionConstraints(f);t=l=null;if(null!=c)for(var D=0;D<c.length;D++){var H=this.graph.getConnectionPoint(f,c[D]);if(null!=H){var N=(H.x-q.x)*(H.x-q.x)+(H.y-q.y)*(H.y-q.y);if(null==t||N<t)l=H,t=N}}null!=l&&(q=l)}return q};var F=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(c,f,l){var t=F.apply(this,arguments);"1"==c.getAttribute("placeholders")&&null!=l.state&&(t=l.state.view.graph.replacePlaceholders(l.state.cell,
-t));return t};var K=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var l=f.substring(8,f.length-1),t=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(t.documentElement))}catch(q){null!=window.console&&console.log("Error in shape: "+q)}}return K.apply(this,arguments)}})();
+t));return t};var J=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(c){if(null!=c.style&&"undefined"!==typeof pako){var f=mxUtils.getValue(c.style,mxConstants.STYLE_SHAPE,null);if(null!=f&&"string"===typeof f&&"stencil("==f.substring(0,8))try{var l=f.substring(8,f.length-1),t=mxUtils.parseXml(Graph.decompress(l));return new mxShape(new mxStencil(t.documentElement))}catch(q){null!=window.console&&console.log("Error in shape: "+q)}}return J.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var v=e[m];if(!mxStencilRegistry.isFileLoaded(v))if(mxStencilRegistry.setFileLoaded(v),".xml"==v.toLowerCase().substring(v.length-4,v.length))mxStencilRegistry.loadStencilSet(v,
null);else if(".js"==v.toLowerCase().substring(v.length-3,v.length))try{if(mxStencilRegistry.allowEval){var n=mxUtils.load(v);null!=n&&200<=n.getStatus()&&299>=n.getStatus()&&eval.call(window,n.getText())}}catch(A){null!=window.console&&console.log("error in getStencil:",b,g,e,v,A)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
@@ -2545,153 +2544,153 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)||mxEvent.isShiftDown(y)};var g=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return g.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var m=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(y){return m.apply(this,arguments)||this.graph.isEdgeIgnored(y)};var v=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=v.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];if(null!=this.previous){var R=this.previous.style.newEdgeStyle;if(null!=R)try{var V=JSON.parse(R);for(O in V)y.style[O]=V[O]}catch(fa){}}y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};
-var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=n.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return y};mxConnectionHandler.prototype.updatePreview=function(y){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=A.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(R){var V=O.apply(this,arguments);this.error=null;return V});
-return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),R=0;R<O.length;R++)null!=
-this.currentEdgeStyle[O[R]]&&(y+=O[R]+"="+this.currentEdgeStyle[O[R]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];if(null!=this.previous){var Q=this.previous.style.newEdgeStyle;if(null!=Q)try{var V=JSON.parse(Q);for(O in V)y.style[O]=V[O]}catch(ha){}}y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};
+var n=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=n.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return y};mxConnectionHandler.prototype.updatePreview=function(y){};var A=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=A.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(Q){var V=O.apply(this,arguments);this.error=null;return V});
+return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),Q=0;Q<O.length;Q++)null!=
+this.currentEdgeStyle[O[Q]]&&(y+=O[Q]+"="+this.currentEdgeStyle[O[Q]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var R=0;R<y.length;R++){var V=y[R];O[mxObjectIdentity.get(V)]=V.getId();for(var fa=this.model.getChildCount(V),ia=0;ia<fa;ia++)this.createCellLookup([this.model.getChildAt(V,ia)],O)}return O};Graph.prototype.createCellMapping=function(y,O,R){R=null!=R?R:{};for(var V in y){var fa=O[V];null==R[fa]&&(R[fa]=y[V].getId()||"")}return R};Graph.prototype.importGraphModel=function(y,
-O,R,V){O=null!=O?O:0;R=null!=R?R:0;var fa=new mxCodec(y.ownerDocument),ia=new mxGraphModel;fa.decode(y,ia);y=[];fa={};var oa={},ta=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),fa));if(null!=ta){var ra=this.createCellLookup([ia.root]);ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<ta.length;ia++)xa=this.model.getChildren(this.moveCells([ta[ia]],O,R,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=
-ia.getChildren(ta[0]);null!=xa&&(y=this.moveCells(xa,O,R,!1,this.getDefaultParent()),oa[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(fa,ra,oa),this.updateCustomLinks(oa,y),V)){this.isGridEnabled()&&(O=this.snap(O),R=this.snap(R));var Da=this.getBoundingBoxFromGeometry(y,!0);null!=Da&&this.moveCells(y,O-Da.x,R-Da.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},R=this.cloneCells(y,null,O),V=
-new mxDictionary,fa=0;fa<y.length;fa++)V.put(y[fa],!0);var ia=new mxCodec,oa=new mxGraphModel,ta=oa.getChildAt(oa.getRoot(),0);for(fa=0;fa<R.length;fa++){oa.add(ta,R[fa]);var ra=this.view.getState(y[fa]);if(null!=ra){var xa=this.getCellGeometry(R[fa]);null!=xa&&xa.relative&&!this.model.isEdge(y[fa])&&null==V.get(this.model.getParent(y[fa]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,
-this.createCellLookup(y)),R);return ia.encode(oa)};Graph.prototype.isSwimlane=function(y,O){var R=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(R=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return R==mxConstants.SHAPE_SWIMLANE||"table"==R||"tableRow"==R};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(y){return null!=y&&G.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellEditable(this.model.getParent(y)):
-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(y){return null!=y&&S.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellMovable(this.model.getParent(y)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var R=this.getCurrentCellStyle(O);if(null!=R.expand)return"0"!=R.expand}return F.apply(this,arguments)&&(null==O||!this.isTable(O))};var K=Graph.prototype.splitEdge;
-Graph.prototype.splitEdge=function(y,O,R,V,fa,ia,oa,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(ia,oa,null,!0,!1));R=null;this.model.beginUpdate();try{R=K.apply(this,[y,O,R,V,fa,ia,oa,ta]);this.model.setValue(R,"");var ra=this.getChildCells(R,!0);for(O=0;O<ra.length;O++){var xa=this.getCellGeometry(ra[O]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[O])}var Da=this.getChildCells(y,!0);for(O=0;O<Da.length;O++)xa=this.getCellGeometry(Da[O]),
-null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Da[O]);var Ia=this.model.getTerminal(R,!1);if(null!=Ia){var Ya=this.getCurrentCellStyle(Ia);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{this.model.endUpdate()}return R};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,
-O,R){if(O||R)c.apply(this,arguments);else{var V=this.getSelectionCell(),fa=null,ia=[],oa=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(ia.push(ta),ta==V)fa=ia.length-1;else if(y&&null==V&&0<ia.length||null!=fa&&y&&ia.length>fa||!y&&0<fa)return;for(var ra=0;ra<this.model.getChildCount(ta);ra++)oa(this.model.getChildAt(ta,ra))});oa(this.model.root);0<ia.length&&(fa=null!=fa?mxUtils.mod(fa+(y?1:-1),ia.length):0,this.setSelectionCell(ia[fa]))}};
-Graph.prototype.swapShapes=function(y,O){if(this.model.isVertex(y)&&this.model.isVertex(O)&&2==this.getMovableCells([y,O]).length){var R=this.getCellGeometry(y),V=this.getCellGeometry(O);if(null!=R&&null!=V){var fa=R.clone(),ia=V.clone();this.model.beginUpdate();try{fa.x=V.getCenterX()-R.width/2,fa.y=V.getCenterY()-R.height/2,ia.x=R.getCenterX()-V.width/2,ia.y=R.getCenterY()-V.height/2,this.model.setGeometry(y,fa),this.model.setGeometry(O,ia)}finally{this.model.endUpdate()}}}};var f=Graph.prototype.moveCells;
-Graph.prototype.moveCells=function(y,O,R,V,fa,ia,oa){oa=null!=oa?oa:{};if(this.isTable(fa)){for(var ta=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ta=ta.concat(this.model.getChildCells(y[ra],!0).reverse()):ta.push(y[ra]);y=ta}this.model.beginUpdate();try{ta=[];for(ra=0;ra<y.length;ra++)if(null!=fa&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Da=this.getCellGeometry(y[ra]);this.isTable(xa)&&ta.push(xa);if(null!=xa&&null!=Da&&this.isTable(xa)&&this.isTable(fa)&&(V||xa!=fa)){if(!V){var Ia=
-this.getCellGeometry(xa);null!=Ia&&(Ia=Ia.clone(),Ia.height-=Da.height,this.model.setGeometry(xa,Ia))}Ia=this.getCellGeometry(fa);null!=Ia&&(Ia=Ia.clone(),Ia.height+=Da.height,this.model.setGeometry(fa,Ia));var Ya=this.model.getChildCells(fa,!0);if(0<Ya.length){y[ra]=V?this.cloneCell(y[ra]):y[ra];var Za=this.model.getChildCells(y[ra],!0),$a=this.model.getChildCells(Ya[0],!0),Pa=$a.length-Za.length;if(0<Pa)for(var Na=0;Na<Pa;Na++){var jb=this.cloneCell(Za[Za.length-1]);null!=jb&&(jb.value="",this.model.add(y[ra],
+y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var Q=0;Q<y.length;Q++){var V=y[Q];O[mxObjectIdentity.get(V)]=V.getId();for(var ha=this.model.getChildCount(V),ja=0;ja<ha;ja++)this.createCellLookup([this.model.getChildAt(V,ja)],O)}return O};Graph.prototype.createCellMapping=function(y,O,Q){Q=null!=Q?Q:{};for(var V in y){var ha=O[V];null==Q[ha]&&(Q[ha]=y[V].getId()||"")}return Q};Graph.prototype.importGraphModel=function(y,
+O,Q,V){O=null!=O?O:0;Q=null!=Q?Q:0;var ha=new mxCodec(y.ownerDocument),ja=new mxGraphModel;ha.decode(y,ja);y=[];ha={};var oa={},ta=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),ha));if(null!=ta){var ra=this.createCellLookup([ja.root]);ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ta.length;ja++)xa=this.model.getChildren(this.moveCells([ta[ja]],O,Q,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=
+ja.getChildren(ta[0]);null!=xa&&(y=this.moveCells(xa,O,Q,!1,this.getDefaultParent()),oa[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(ha,ra,oa),this.updateCustomLinks(oa,y),V)){this.isGridEnabled()&&(O=this.snap(O),Q=this.snap(Q));var Da=this.getBoundingBoxFromGeometry(y,!0);null!=Da&&this.moveCells(y,O-Da.x,Q-Da.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},Q=this.cloneCells(y,null,O),V=
+new mxDictionary,ha=0;ha<y.length;ha++)V.put(y[ha],!0);var ja=new mxCodec,oa=new mxGraphModel,ta=oa.getChildAt(oa.getRoot(),0);for(ha=0;ha<Q.length;ha++){oa.add(ta,Q[ha]);var ra=this.view.getState(y[ha]);if(null!=ra){var xa=this.getCellGeometry(Q[ha]);null!=xa&&xa.relative&&!this.model.isEdge(y[ha])&&null==V.get(this.model.getParent(y[ha]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,
+this.createCellLookup(y)),Q);return ja.encode(oa)};Graph.prototype.isSwimlane=function(y,O){var Q=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(Q=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var G=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(y){return null!=y&&G.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellEditable(this.model.getParent(y)):
+!0:!1};var R=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(y){return null!=y&&R.apply(this,arguments)?this.isTableCell(y)||this.isTableRow(y)?this.isCellMovable(this.model.getParent(y)):!0:!1};var F=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);if(null!=O){var Q=this.getCurrentCellStyle(O);if(null!=Q.expand)return"0"!=Q.expand}return F.apply(this,arguments)&&(null==O||!this.isTable(O))};var J=Graph.prototype.splitEdge;
+Graph.prototype.splitEdge=function(y,O,Q,V,ha,ja,oa,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(ja,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=J.apply(this,[y,O,Q,V,ha,ja,oa,ta]);this.model.setValue(Q,"");var ra=this.getChildCells(Q,!0);for(O=0;O<ra.length;O++){var xa=this.getCellGeometry(ra[O]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[O])}var Da=this.getChildCells(y,!0);for(O=0;O<Da.length;O++)xa=this.getCellGeometry(Da[O]),
+null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Da[O]);var Ia=this.model.getTerminal(Q,!1);if(null!=Ia){var Ya=this.getCurrentCellStyle(Ia);null!=Ya&&"1"==Ya.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var c=Graph.prototype.selectCell;Graph.prototype.selectCell=function(y,
+O,Q){if(O||Q)c.apply(this,arguments);else{var V=this.getSelectionCell(),ha=null,ja=[],oa=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(ja.push(ta),ta==V)ha=ja.length-1;else if(y&&null==V&&0<ja.length||null!=ha&&y&&ja.length>ha||!y&&0<ha)return;for(var ra=0;ra<this.model.getChildCount(ta);ra++)oa(this.model.getChildAt(ta,ra))});oa(this.model.root);0<ja.length&&(ha=null!=ha?mxUtils.mod(ha+(y?1:-1),ja.length):0,this.setSelectionCell(ja[ha]))}};
+Graph.prototype.swapShapes=function(y,O){if(this.model.isVertex(y)&&this.model.isVertex(O)&&2==this.getMovableCells([y,O]).length){var Q=this.getCellGeometry(y),V=this.getCellGeometry(O);if(null!=Q&&null!=V){var ha=Q.clone(),ja=V.clone();this.model.beginUpdate();try{ha.x=V.getCenterX()-Q.width/2,ha.y=V.getCenterY()-Q.height/2,ja.x=Q.getCenterX()-V.width/2,ja.y=Q.getCenterY()-V.height/2,this.model.setGeometry(y,ha),this.model.setGeometry(O,ja)}finally{this.model.endUpdate()}}}};var f=Graph.prototype.moveCells;
+Graph.prototype.moveCells=function(y,O,Q,V,ha,ja,oa){oa=null!=oa?oa:{};if(this.isTable(ha)){for(var ta=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ta=ta.concat(this.model.getChildCells(y[ra],!0).reverse()):ta.push(y[ra]);y=ta}this.model.beginUpdate();try{ta=[];for(ra=0;ra<y.length;ra++)if(null!=ha&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Da=this.getCellGeometry(y[ra]);this.isTable(xa)&&ta.push(xa);if(null!=xa&&null!=Da&&this.isTable(xa)&&this.isTable(ha)&&(V||xa!=ha)){if(!V){var Ia=
+this.getCellGeometry(xa);null!=Ia&&(Ia=Ia.clone(),Ia.height-=Da.height,this.model.setGeometry(xa,Ia))}Ia=this.getCellGeometry(ha);null!=Ia&&(Ia=Ia.clone(),Ia.height+=Da.height,this.model.setGeometry(ha,Ia));var Ya=this.model.getChildCells(ha,!0);if(0<Ya.length){y[ra]=V?this.cloneCell(y[ra]):y[ra];var Za=this.model.getChildCells(y[ra],!0),$a=this.model.getChildCells(Ya[0],!0),Pa=$a.length-Za.length;if(0<Pa)for(var Na=0;Na<Pa;Na++){var jb=this.cloneCell(Za[Za.length-1]);null!=jb&&(jb.value="",this.model.add(y[ra],
jb))}else if(0>Pa)for(Na=0;Na>Pa;Na--)this.model.remove(Za[Za.length+Na-1]);Za=this.model.getChildCells(y[ra],!0);for(Na=0;Na<$a.length;Na++){var cb=this.getCellGeometry($a[Na]),ab=this.getCellGeometry(Za[Na]);null!=cb&&null!=ab&&(ab=ab.clone(),ab.width=cb.width,this.model.setGeometry(Za[Na],ab))}}}}var db=f.apply(this,arguments);for(ra=0;ra<ta.length;ra++)!V&&this.model.contains(ta[ra])&&0==this.model.getChildCount(ta[ra])&&this.model.remove(ta[ra]);V&&this.updateCustomLinks(this.createCellMapping(oa,
-this.createCellLookup(y)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var R=[];this.model.beginUpdate();try{for(var V=0;V<y.length;V++)if(this.isTableCell(y[V])){var fa=this.model.getParent(y[V]),ia=this.model.getParent(fa);1==this.model.getChildCount(fa)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(y,ia)&&0>mxUtils.indexOf(R,ia)&&R.push(ia):this.labelChanged(y[V],"")}else{if(this.isTableRow(y[V])&&(ia=this.model.getParent(y[V]),
-0>mxUtils.indexOf(y,ia)&&0>mxUtils.indexOf(R,ia))){for(var oa=this.model.getChildCells(ia,!0),ta=0,ra=0;ra<oa.length;ra++)0<=mxUtils.indexOf(y,oa[ra])&&ta++;ta==oa.length&&R.push(ia)}R.push(y[V])}R=l.apply(this,[R,O])}finally{this.model.endUpdate()}return R};Graph.prototype.updateCustomLinks=function(y,O,R){R=null!=R?R:new Graph;for(var V=0;V<O.length;V++)null!=O[V]&&R.updateCustomLinksForCell(y,O[V],R)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var R=
-this.model.getChildCount(O),V=0;V<R;V++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,V))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var R=JSON.parse(O);for(O=0;O<R.length;O++){var V=R[O];y.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ia){}return y}if(null!=
-y.shape&&null!=y.shape.bounds){V=y.shape.direction;O=y.shape.bounds;var fa=y.shape.scale;R=O.width/fa;O=O.height/fa;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=R,R=O,O=V;O=y.shape.getConstraints(y.style,R,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=
-mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),R=0,V=0;V<O;V++){var fa=this.model.getChildAt(y,V);this.model.isVertex(fa)&&(fa=this.getCellGeometry(fa),null==fa||fa.relative||R++)}return 0<R||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,
-R){for(var V=this.getCurrentCellStyle(y),fa=!0,ia=!0,oa=0;oa<O.length&&ia;oa++)fa=fa&&this.isTable(O[oa]),ia=ia&&this.isTableRow(O[oa]);return!this.isCellLocked(y)&&(this.isTargetShape(y,O,R)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ia||fa))};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,
-arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var R=this.model.getParent(y);null!=R&&(R=this.layoutManager.getLayout(R),null!=R&&R.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=function(y,O,R){R=null!=R?R:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=
-10,V.height+=4,R&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(y,O){var R=this.getModel(),V=[];R.beginUpdate();try{for(var fa=0;fa<y.length;fa++){var ia=y[fa];if(R.isEdge(ia)){var oa=R.getTerminal(ia,!0),ta=R.getTerminal(ia,!1);R.setTerminal(ia,ta,!0);R.setTerminal(ia,oa,!1);var ra=R.getGeometry(ia);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);ra.setTerminalPoint(xa,
-!1);ra.setTerminalPoint(Da,!0);R.setGeometry(ia,ra);var Ia=this.view.getState(ia),Ya=this.view.getState(oa),Za=this.view.getState(ta);if(null!=Ia){var $a=null!=Ya?this.getConnectionConstraint(Ia,Ya,!0):null,Pa=null!=Za?this.getConnectionConstraint(Ia,Za,!1):null;this.setConnectionConstraint(ia,oa,!0,Pa);this.setConnectionConstraint(ia,ta,!1,$a);var Na=mxUtils.getValue(Ia.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ia.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Na,[ia])}V.push(ia)}}else if(R.isVertex(ia)&&(ra=this.getCellGeometry(ia),null!=ra)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var jb=ra.width;ra.width=ra.height;ra.height=jb;R.setGeometry(ia,ra)}var cb=this.view.getState(ia);if(null!=cb){var ab=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,ab[mxUtils.mod(mxUtils.indexOf(ab,db)+(O?-1:1),ab.length)],[ia])}V.push(ia)}}}finally{R.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
-y=y.nextSibling}return!1};var t=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var R=this.view.getState(O);null!=R&&null!=R.shape&&(this.view.invalidate(O),R.shape.bounds=null)}t.apply(this,arguments);
-y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var R=this.view.getState(y[O]);null!=R&&null!=R.shape&&null!=R.shape.stencil&&this.stencilHasPlaceholders(R.shape.stencil)?this.removeStateForCell(y[O]):this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};
-Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var R=Array.prototype.slice.call(y.attributes);attr=R.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var R=0;R<y.length;R++)null!=y[R]&&O(y[R])}};Graph.prototype.updateLabelElements=function(y,O,R){y=null!=y?y:this.getSelectionCells();for(var V=document.createElement("div"),
-fa=0;fa<y.length;fa++){var ia=this.getCurrentCellStyle(y[fa]);if(null!=ia&&"1"==ia.html&&(ia=this.convertValueToString(y[fa]),null!=ia&&0<ia.length)){V.innerHTML=Graph.sanitizeHtml(ia);for(var oa=V.getElementsByTagName(null!=R?R:"*"),ta=0;ta<oa.length;ta++)O(oa[ta]);V.innerHTML!=ia&&this.cellLabelChanged(y[fa],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,R){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
-null!=y.getAttribute("placeholder"))for(var V=y.getAttribute("placeholder"),fa=y;null!=fa;){if(fa==this.model.getRoot()||null!=fa.value&&"object"==typeof fa.value&&fa.hasAttribute(V)){this.setAttributeForCell(fa,V,O);break}fa=this.model.getParent(fa)}var ia=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,O):ia.setAttribute("label",O);O=ia}mxGraph.prototype.cellLabelChanged.apply(this,
-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,R=0;R<y.length;R++)O.put(y[R],!0);var V=[];for(R=0;R<y.length;R++){var fa=this.model.getParent(y[R]);null==fa||O.get(fa)||(O.put(fa,!0),V.push(fa))}for(R=0;R<V.length;R++)if(fa=this.view.getState(V[R]),null!=fa&&(this.model.isEdge(fa.cell)||this.model.isVertex(fa.cell))&&this.isCellDeletable(fa.cell)&&this.isTransparentState(fa)){for(var ia=!0,oa=0;oa<this.model.getChildCount(fa.cell)&&
-ia;oa++)O.get(this.model.getChildAt(fa.cell,oa))||(ia=!1);ia&&y.push(fa.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],R=0;R<y.length;R++)this.isCellDeletable(y[R])&&this.isTransparentState(this.view.getState(y[R]))&&O.push(y[R]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
-O){var R="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,R,O)};Graph.prototype.getAttributeForCell=function(y,O,R){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:R};Graph.prototype.setAttributeForCell=function(y,O,R){if(null!=y.value&&"object"==typeof y.value)var V=y.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),
-V.setAttribute("label",y.value||"");null!=R?V.setAttribute(O,R):V.removeAttribute(O);this.model.setValue(y,V)};Graph.prototype.isTargetShape=function(y,O,R){y=mxUtils.getValue(this.getCurrentCellStyle(y),mxConstants.STYLE_SHAPE,"");for(R=0;R<O.length;R++){var V=mxUtils.getValue(this.getCurrentCellStyle(O[R]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,y))return!0}return!1};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,R,V){if(mxEvent.isAltDown(O))return null;
-for(var fa=0;fa<y.length;fa++){var ia=this.model.getParent(y[fa]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(y,ia))return null}ia=q.apply(this,arguments);var oa=!0;for(fa=0;fa<y.length&&oa;fa++)oa=oa&&this.isTableRow(y[fa]);oa&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};
-Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var R=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(O)){var V=this.model.isEdge(O)?this.view.getState(O):null,fa=mxEvent.getSource(y);this.firstClickState!=V||this.firstClickSource!=fa||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&
-(mxUtils.contains(V.text.boundingBox,R.x,R.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(y)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&fa==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(R.x,R.y))),O=this.addText(R.x,R.y,V))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,R=
-this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),fa=this.getPageSize();O=Math.max(O,V.x*fa.width);R=Math.max(R,V.y*fa.height)}return new mxPoint(this.snap(O+y),this.snap(R+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,O=this.getGraphBounds(),R=this.getInsertPoint(),V=this.snap(Math.round(Math.max(R.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(R.y,(O.y+O.height)/y.scale-
+this.createCellLookup(y)),db)}finally{this.model.endUpdate()}return db};var l=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var Q=[];this.model.beginUpdate();try{for(var V=0;V<y.length;V++)if(this.isTableCell(y[V])){var ha=this.model.getParent(y[V]),ja=this.model.getParent(ha);1==this.model.getChildCount(ha)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(Q,ja)&&Q.push(ja):this.labelChanged(y[V],"")}else{if(this.isTableRow(y[V])&&(ja=this.model.getParent(y[V]),
+0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(Q,ja))){for(var oa=this.model.getChildCells(ja,!0),ta=0,ra=0;ra<oa.length;ra++)0<=mxUtils.indexOf(y,oa[ra])&&ta++;ta==oa.length&&Q.push(ja)}Q.push(y[V])}Q=l.apply(this,[Q,O])}finally{this.model.endUpdate()}return Q};Graph.prototype.updateCustomLinks=function(y,O,Q){Q=null!=Q?Q:new Graph;for(var V=0;V<O.length;V++)null!=O[V]&&Q.updateCustomLinksForCell(y,O[V],Q)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var Q=
+this.model.getChildCount(O),V=0;V<Q;V++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,V))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var Q=JSON.parse(O);for(O=0;O<Q.length;O++){var V=Q[O];y.push(new mxConnectionConstraint(new mxPoint(V[0],V[1]),2<V.length?"0"!=V[2]:!0,null,3<V.length?V[3]:0,4<V.length?V[4]:0))}}catch(ja){}return y}if(null!=
+y.shape&&null!=y.shape.bounds){V=y.shape.direction;O=y.shape.bounds;var ha=y.shape.scale;Q=O.width/ha;O=O.height/ha;if(V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_SOUTH)V=Q,Q=O,O=V;O=y.shape.getConstraints(y.style,Q,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);O=
+mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),Q=0,V=0;V<O;V++){var ha=this.model.getChildAt(y,V);this.model.isVertex(ha)&&(ha=this.getCellGeometry(ha),null==ha||ha.relative||Q++)}return 0<Q||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,
+Q){for(var V=this.getCurrentCellStyle(y),ha=!0,ja=!0,oa=0;oa<O.length&&ja;oa++)ha=ha&&this.isTable(O[oa]),ja=ja&&this.isTableRow(O[oa]);return!this.isCellLocked(y)&&(this.isTargetShape(y,O,Q)||("1"!=mxUtils.getValue(V,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(V,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ja||ha))};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,
+arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var Q=this.model.getParent(y);null!=Q&&(Q=this.layoutManager.getLayout(Q),null!=Q&&Q.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=function(y,O,Q){Q=null!=Q?Q:this.gridEnabled;var V=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=V&&(V.width+=
+10,V.height+=4,Q&&(V.width=this.snap(V.width),V.height=this.snap(V.height)));return V};Graph.prototype.turnShapes=function(y,O){var Q=this.getModel(),V=[];Q.beginUpdate();try{for(var ha=0;ha<y.length;ha++){var ja=y[ha];if(Q.isEdge(ja)){var oa=Q.getTerminal(ja,!0),ta=Q.getTerminal(ja,!1);Q.setTerminal(ja,ta,!0);Q.setTerminal(ja,oa,!1);var ra=Q.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);ra.setTerminalPoint(xa,
+!1);ra.setTerminalPoint(Da,!0);Q.setGeometry(ja,ra);var Ia=this.view.getState(ja),Ya=this.view.getState(oa),Za=this.view.getState(ta);if(null!=Ia){var $a=null!=Ya?this.getConnectionConstraint(Ia,Ya,!0):null,Pa=null!=Za?this.getConnectionConstraint(Ia,Za,!1):null;this.setConnectionConstraint(ja,oa,!0,Pa);this.setConnectionConstraint(ja,ta,!1,$a);var Na=mxUtils.getValue(Ia.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ia.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Na,[ja])}V.push(ja)}}else if(Q.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var jb=ra.width;ra.width=ra.height;ra.height=jb;Q.setGeometry(ja,ra)}var cb=this.view.getState(ja);if(null!=cb){var ab=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],db=mxUtils.getValue(cb.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,ab[mxUtils.mod(mxUtils.indexOf(ab,db)+(O?-1:1),ab.length)],[ja])}V.push(ja)}}}finally{Q.endUpdate()}return V};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
+y=y.nextSibling}return!1};var t=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var Q=this.view.getState(O);null!=Q&&null!=Q.shape&&(this.view.invalidate(O),Q.shape.bounds=null)}t.apply(this,arguments);
+y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var Q=this.view.getState(y[O]);null!=Q&&null!=Q.shape&&null!=Q.shape.stencil&&this.stencilHasPlaceholders(Q.shape.stencil)?this.removeStateForCell(y[O]):this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};
+Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var Q=Array.prototype.slice.call(y.attributes);attr=Q.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var Q=0;Q<y.length;Q++)null!=y[Q]&&O(y[Q])}};Graph.prototype.updateLabelElements=function(y,O,Q){y=null!=y?y:this.getSelectionCells();for(var V=document.createElement("div"),
+ha=0;ha<y.length;ha++){var ja=this.getCurrentCellStyle(y[ha]);if(null!=ja&&"1"==ja.html&&(ja=this.convertValueToString(y[ha]),null!=ja&&0<ja.length)){V.innerHTML=Graph.sanitizeHtml(ja);for(var oa=V.getElementsByTagName(null!=Q?Q:"*"),ta=0;ta<oa.length;ta++)O(oa[ta]);V.innerHTML!=ja&&this.cellLabelChanged(y[ha],V.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,Q){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
+null!=y.getAttribute("placeholder"))for(var V=y.getAttribute("placeholder"),ha=y;null!=ha;){if(ha==this.model.getRoot()||null!=ha.value&&"object"==typeof ha.value&&ha.hasAttribute(V)){this.setAttributeForCell(ha,V,O);break}ha=this.model.getParent(ha)}var ja=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,O):ja.setAttribute("label",O);O=ja}mxGraph.prototype.cellLabelChanged.apply(this,
+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=y){for(var O=new mxDictionary,Q=0;Q<y.length;Q++)O.put(y[Q],!0);var V=[];for(Q=0;Q<y.length;Q++){var ha=this.model.getParent(y[Q]);null==ha||O.get(ha)||(O.put(ha,!0),V.push(ha))}for(Q=0;Q<V.length;Q++)if(ha=this.view.getState(V[Q]),null!=ha&&(this.model.isEdge(ha.cell)||this.model.isVertex(ha.cell))&&this.isCellDeletable(ha.cell)&&this.isTransparentState(ha)){for(var ja=!0,oa=0;oa<this.model.getChildCount(ha.cell)&&
+ja;oa++)O.get(this.model.getChildAt(ha.cell,oa))||(ja=!1);ja&&y.push(ha.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],Q=0;Q<y.length;Q++)this.isCellDeletable(y[Q])&&this.isTransparentState(this.view.getState(y[Q]))&&O.push(y[Q]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
+O){var Q="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,Q,O)};Graph.prototype.getAttributeForCell=function(y,O,Q){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:Q};Graph.prototype.setAttributeForCell=function(y,O,Q){if(null!=y.value&&"object"==typeof y.value)var V=y.value.cloneNode(!0);else V=mxUtils.createXmlDocument().createElement("UserObject"),
+V.setAttribute("label",y.value||"");null!=Q?V.setAttribute(O,Q):V.removeAttribute(O);this.model.setValue(y,V)};Graph.prototype.isTargetShape=function(y,O,Q){y=mxUtils.getValue(this.getCurrentCellStyle(y),mxConstants.STYLE_SHAPE,"");for(Q=0;Q<O.length;Q++){var V=mxUtils.getValue(this.getCurrentCellStyle(O[Q]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(V,y))return!0}return!1};var q=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,Q,V){if(mxEvent.isAltDown(O))return null;
+for(var ha=0;ha<y.length;ha++){var ja=this.model.getParent(y[ha]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(y,ja))return null}ja=q.apply(this,arguments);var oa=!0;for(ha=0;ha<y.length&&oa;ha++)oa=oa&&this.isTableRow(y[ha]);oa&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||(ja=null));return ja};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};
+Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var Q=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(O)){var V=this.model.isEdge(O)?this.view.getState(O):null,ha=mxEvent.getSource(y);this.firstClickState!=V||this.firstClickSource!=ha||null!=V&&null!=V.text&&null!=V.text.node&&null!=V.text.boundingBox&&
+(mxUtils.contains(V.text.boundingBox,Q.x,Q.y)||mxUtils.isAncestorNode(V.text.node,mxEvent.getSource(y)))||(null!=V||this.isCellLocked(this.getDefaultParent()))&&(null==V||this.isCellLocked(V.cell))||!(null!=V||mxClient.IS_SVG&&ha==this.view.getCanvas().ownerSVGElement)||(null==V&&(V=this.view.getState(this.getCellAt(Q.x,Q.y))),O=this.addText(Q.x,Q.y,V))}return O};Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,Q=
+this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var V=this.getPageLayout(),ha=this.getPageSize();O=Math.max(O,V.x*ha.width);Q=Math.max(Q,V.y*ha.height)}return new mxPoint(this.snap(O+y),this.snap(Q+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,O=this.getGraphBounds(),Q=this.getInsertPoint(),V=this.snap(Math.round(Math.max(Q.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(Q.y,(O.y+O.height)/y.scale-
y.translate.y+2*this.gridSize)));return new mxPoint(V,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/
-2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(y,O){y=null!=y?y:"";null!=O&&(0<y.length&&";"!=y.charAt(y.length-1)&&(y+=";"),y+="fontSize="+O+";");return y};Graph.prototype.addText=function(y,O,R){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=R&&this.model.isEdge(R.cell)){V.style=
-"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var fa=this.view.getRelativePoint(R,y,O);V.geometry.x=Math.round(1E4*fa.x)/1E4;V.geometry.y=Math.round(fa.y);V.geometry.offset=new mxPoint(0,0);fa=this.view.getPoint(R,V.geometry);var ia=this.view.scale;V.geometry.offset=new mxPoint(Math.round((y-fa.x)/ia),Math.round((O-fa.y)/ia))}else fa=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(y/this.view.scale)-fa.x-(null!=R?R.origin.x:0),V.geometry.y=Math.round(O/this.view.scale)-fa.y-(null!=R?R.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=R?R.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(y,O,R){var V=mxUtils.bind(this,
-function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Da=this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Da&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Da),null!=O&&mxEvent.addGestureListeners(ra[xa],null,null,O))}});this.model.addListener(mxEvent.CHANGE,V);V();var fa=this.container.style.cursor,ia=this.getTolerance(),oa=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&
+2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(y,O){y=null!=y?y:"";null!=O&&(0<y.length&&";"!=y.charAt(y.length-1)&&(y+=";"),y+="fontSize="+O+";");return y};Graph.prototype.addText=function(y,O,Q){var V=new mxCell;V.value="Text";V.geometry=new mxGeometry(0,0,0,0);V.vertex=!0;if(null!=Q&&this.model.isEdge(Q.cell)){V.style=
+"edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);V.geometry.relative=!0;V.connectable=!1;var ha=this.view.getRelativePoint(Q,y,O);V.geometry.x=Math.round(1E4*ha.x)/1E4;V.geometry.y=Math.round(ha.y);V.geometry.offset=new mxPoint(0,0);ha=this.view.getPoint(Q,V.geometry);var ja=this.view.scale;V.geometry.offset=new mxPoint(Math.round((y-ha.x)/ja),Math.round((O-ha.y)/ja))}else ha=this.view.translate,V.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+this.vertexFontSize),V.geometry.width=40,V.geometry.height=20,V.geometry.x=Math.round(y/this.view.scale)-ha.x-(null!=Q?Q.origin.x:0),V.geometry.y=Math.round(O/this.view.scale)-ha.y-(null!=Q?Q.origin.y:0),V.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([V],null!=Q?Q.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[V])),this.autoSizeCell(V)}finally{this.getModel().endUpdate()}return V};Graph.prototype.addClickHandler=function(y,O,Q){var V=mxUtils.bind(this,
+function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Da=this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Da&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Da),null!=O&&mxEvent.addGestureListeners(ra[xa],null,null,O))}});this.model.addListener(mxEvent.CHANGE,V);V();var ha=this.container.style.cursor,ja=this.getTolerance(),oa=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&
y!=mxConstants.NONE?new mxCellHighlight(oa,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var xa=ra.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))ra=oa.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Da,Ia,Ya){return null==oa.getLinkForCell(Da.cell)}),xa=null==xa||oa.model.isAncestor(ra,xa.cell)?oa.view.getState(ra):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},
-mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(oa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>ia||xa>ia)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=
+mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(oa.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>ja||xa>ja)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=
ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ra,xa){var Da=xa.getSource();for(ra=xa.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==
-Da&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-oa.container.scrollTop)<ia&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==O||O(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||
-(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?oa.linkTarget:"_top",oa.openLink(this.currentLink,ra),xa.consume())):null!=R&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ia&&Math.abs(this.scrollTop-oa.container.scrollTop)<ia&&Math.abs(this.startX-xa.getGraphX())<ia&&Math.abs(this.startY-xa.getGraphY())<ia&&R(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ra.cell));null!=this.currentLink&&
-(this.currentTarget=oa.getLinkTargetForCell(ra.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=oa.container&&(oa.container.style.cursor=fa);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ra){};oa.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(ra){ta.clear()})};Graph.prototype.duplicateCells=
-function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var R=0;R<y.length;R++)this.isTableCell(y[R])&&(y[R]=this.model.getParent(y[R]));y=this.model.getTopmostCells(y);var V=this.getModel(),fa=this.gridSize,ia=[];V.beginUpdate();try{var oa={},ta=this.createCellLookup(y),ra=this.cloneCells(y,!1,oa,!0);for(R=0;R<y.length;R++){var xa=V.getParent(y[R]);if(null!=xa){var Da=this.moveCells([ra[R]],fa,fa,!1)[0];ia.push(Da);if(O)V.add(xa,ra[R]);else{var Ia=xa.getIndex(y[R]);V.add(xa,ra[R],Ia+
-1)}if(this.isTable(xa)){var Ya=this.getCellGeometry(ra[R]),Za=this.getCellGeometry(xa);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,V.setGeometry(xa,Za))}}else ia.push(ra[R])}this.updateCustomLinks(this.createCellMapping(oa,ta),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{V.endUpdate()}return ia};Graph.prototype.insertImage=function(y,O,R){if(null!=y&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),fa=
-[],ia=0;ia<V.length;ia++)fa.push(V[ia]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==fa.length+1)for(ia=y.length-1;0<=ia;ia--)if(0==ia||y[ia]!=fa[ia-1]){y[ia].setAttribute("width",O);y[ia].setAttribute("height",R);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),R=[],V=
-0;V<O.length;V++)R.push(O[V]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==R.length+1)for(V=O.length-1;0<=V;V--)if(O[V]!=R[V-1]){for(O=O[V].getElementsByTagName("a");0<O.length;){for(R=O[0].parentNode;null!=O[0].firstChild;)R.insertBefore(O[0].firstChild,O[0]);R.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,
-arguments),R=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(R,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==R[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,R){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var V=[],fa=null,ia=null,oa=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var ra=this.view.getState(O[ta]);if(null!=ra){var xa=y?ra.getCenterX():ra.getCenterY();fa=null!=fa?Math.max(fa,
-xa):xa;ia=null!=ia?Math.min(ia,xa):xa;R&&(oa+=y?ra.width:ra.height);V.push(ra)}}if(2<V.length){V.sort(function($a,Pa){return y?$a.x-Pa.x:$a.y-Pa.y});R&&(oa-=y?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ra=this.view.translate;xa=this.view.scale;ia=ia/xa-(y?ra.x:ra.y);fa=fa/xa-(y?ra.x:ra.y);this.getModel().beginUpdate();try{var Da=(fa-ia-oa)/(V.length-1),Ia=ia+(R?y?V[0].width/2:V[0].height/2:0);for(ta=1;ta<V.length-1;ta++){var Ya=this.view.getState(this.model.getParent(V[ta].cell)),
-Za=this.getCellGeometry(V[ta].cell);Ia+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),y?Za.x=Math.round(Ia-(R?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Ia-(R?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(V[ta].cell,Za));R&&(Ia+=y?V[ta].width:V[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(y){y=new mxImageExport;y.addCellData=
-function(R,V,fa){V.setAttribute("data-cell-id",R.id);if(fa)if(mxUtils.isNode(R.value))for(fa=0;fa<R.value.attributes.length;fa++){var ia=R.value.attributes[fa];V.setAttribute("data-cell-"+ia.name,ia.value)}else if("object"===typeof R.value)for(ia in R.value)V.setAttribute("data-cell-"+ia,R.value[ia]);else null!=R.value&&V.setAttribute("data-cell-value",R.value);return V};var O=y.visitStatesRecursive;y.visitStatesRecursive=function(R,V,fa){if(null!=R){var ia=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(R.cell,
-null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ia.appendChild(V.root);O.apply(this,arguments);V.root=ia}};y.getLinkForCellState=mxUtils.bind(this,function(R,V){return this.getLinkForCell(R.cell)});y.getTitleForCellState=mxUtils.bind(this,function(R,V){return Editor.convertHtmlToText(this.convertValueToTooltip(R.cell))});return y};Graph.prototype.parseBackgroundImage=function(y){var O=null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,
-y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,R,V,fa,ia,oa,ta,ra,xa,Da,Ia,Ya,Za,$a,Pa){var Na=null;if(null!=Za)for(Na=new mxDictionary,Da=0;Da<Za.length;Da++)Na.put(Za[Da],!0);Za=this.useCssTransforms;var jb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{O=null!=O?O:1;R=null!=R?R:0;fa=null!=fa?fa:!0;ia=null!=ia?ia:!0;oa=null!=oa?oa:
-!0;xa=null!=xa?xa:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ia&&null==Na||V||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ab=this.backgroundImage,db=this.view.translate,lb=this.view.scale;"diagram"==Ya&&null!=ab&&null!=ab.width&&null!=ab.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((db.x+ab.x)*lb,(db.y+ab.y)*lb,ab.width*lb,ab.height*lb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=O/lb;var kb=Math.max(1,Math.ceil(cb.width*
-V)+2*R)+(xa&&0==R?5:0),pb=Math.max(1,Math.ceil(cb.height*V)+2*R)+(xa&&0==R?5:0);xa=fa?-.5:0;var fb=mxUtils.getLightDarkColor(y),ob=Graph.createSvgNode(xa,xa,kb,pb,fb),tb=ob.ownerDocument;if(null!=y){var eb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,"rect");eb.setAttribute("fill",fb.light);eb.style.fill=fb.cssText;eb.setAttribute("width","100%");eb.setAttribute("height","100%");eb.setAttribute("x","0");eb.setAttribute("y","0");ob.appendChild(eb)}var nb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,
-"g");ob.appendChild(nb);var mb=this.createSvgCanvas(nb);mb.foOffset=fa?-.5:0;mb.textOffset=fa?-.5:0;mb.imageOffset=fa?-.5:0;mb.translate(Math.floor(R/O-cb.x/lb),Math.floor(R/O-cb.y/lb));mb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=mb.getAlternateText;mb.getAlternateText=function(hb,Ab,sb,wb,yb,rb,Bb,d,p,z,u,x,C){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var E=
-Math.ceil(2*wb/this.state.fontSize),da=[],M=0,sa=0;(0==E||M<E)&&sa<rb.length;){var ma=rb.charCodeAt(sa);if(10==ma||13==ma){if(0<M)break}else da.push(rb.charAt(sa)),255>ma&&M++;sa++}da.length<rb.length&&1<rb.length-da.length&&(rb=mxUtils.trim(da.join(""))+"...");return rb}catch(Wa){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=ab&&null!=ab.width&&null!=ab.height&&(y=lb/O,xa=new mxRectangle((ab.x+db.x)*y,(ab.y+db.y)*y,ab.width*y,ab.height*y),mxUtils.intersects(cb,xa)&&
+Da&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=oa.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==O||O(ra,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(ra)||
+(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?oa.linkTarget:"_top",oa.openLink(this.currentLink,ra),xa.consume())):null!=Q&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ja&&Math.abs(this.scrollTop-oa.container.scrollTop)<ja&&Math.abs(this.startX-xa.getGraphX())<ja&&Math.abs(this.startY-xa.getGraphY())<ja&&Q(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(ra.cell));null!=this.currentLink&&
+(this.currentTarget=oa.getLinkTargetForCell(ra.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ha);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(ra){};oa.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(ra){ta.clear()})};Graph.prototype.duplicateCells=
+function(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var Q=0;Q<y.length;Q++)this.isTableCell(y[Q])&&(y[Q]=this.model.getParent(y[Q]));y=this.model.getTopmostCells(y);var V=this.getModel(),ha=this.gridSize,ja=[];V.beginUpdate();try{var oa={},ta=this.createCellLookup(y),ra=this.cloneCells(y,!1,oa,!0);for(Q=0;Q<y.length;Q++){var xa=V.getParent(y[Q]);if(null!=xa){var Da=this.moveCells([ra[Q]],ha,ha,!1)[0];ja.push(Da);if(O)V.add(xa,ra[Q]);else{var Ia=xa.getIndex(y[Q]);V.add(xa,ra[Q],Ia+
+1)}if(this.isTable(xa)){var Ya=this.getCellGeometry(ra[Q]),Za=this.getCellGeometry(xa);null!=Ya&&null!=Za&&(Za=Za.clone(),Za.height+=Ya.height,V.setGeometry(xa,Za))}}else ja.push(ra[Q])}this.updateCustomLinks(this.createCellMapping(oa,ta),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{V.endUpdate()}return ja};Graph.prototype.insertImage=function(y,O,Q){if(null!=y&&null!=this.cellEditor.textarea){for(var V=this.cellEditor.textarea.getElementsByTagName("img"),ha=
+[],ja=0;ja<V.length;ja++)ha.push(V[ja]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==ha.length+1)for(ja=y.length-1;0<=ja;ja--)if(0==ja||y[ja]!=ha[ja-1]){y[ja].setAttribute("width",O);y[ja].setAttribute("height",Q);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),Q=[],V=
+0;V<O.length;V++)Q.push(O[V]);document.execCommand("createlink",!1,mxUtils.trim(y));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==Q.length+1)for(V=O.length-1;0<=V;V--)if(O[V]!=Q[V-1]){for(O=O[V].getElementsByTagName("a");0<O.length;){for(Q=O[0].parentNode;null!=O[0].firstChild;)Q.insertBefore(O[0].firstChild,O[0]);Q.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,
+arguments),Q=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(Q,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==Q[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,O,Q){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var V=[],ha=null,ja=null,oa=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var ra=this.view.getState(O[ta]);if(null!=ra){var xa=y?ra.getCenterX():ra.getCenterY();ha=null!=ha?Math.max(ha,
+xa):xa;ja=null!=ja?Math.min(ja,xa):xa;Q&&(oa+=y?ra.width:ra.height);V.push(ra)}}if(2<V.length){V.sort(function($a,Pa){return y?$a.x-Pa.x:$a.y-Pa.y});Q&&(oa-=y?V[0].width/2+V[V.length-1].width/2:V[0].height/2+V[V.length-1].height/2);ra=this.view.translate;xa=this.view.scale;ja=ja/xa-(y?ra.x:ra.y);ha=ha/xa-(y?ra.x:ra.y);this.getModel().beginUpdate();try{var Da=(ha-ja-oa)/(V.length-1),Ia=ja+(Q?y?V[0].width/2:V[0].height/2:0);for(ta=1;ta<V.length-1;ta++){var Ya=this.view.getState(this.model.getParent(V[ta].cell)),
+Za=this.getCellGeometry(V[ta].cell);Ia+=Da;null!=Za&&null!=Ya&&(Za=Za.clone(),y?Za.x=Math.round(Ia-(Q?0:Za.width/2))-Ya.origin.x:Za.y=Math.round(Ia-(Q?0:Za.height/2))-Ya.origin.y,this.getModel().setGeometry(V[ta].cell,Za));Q&&(Ia+=y?V[ta].width:V[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(y){y=new mxImageExport;y.addCellData=
+function(Q,V,ha){V.setAttribute("data-cell-id",Q.id);if(ha)if(mxUtils.isNode(Q.value))for(ha=0;ha<Q.value.attributes.length;ha++){var ja=Q.value.attributes[ha];V.setAttribute("data-cell-"+ja.name,ja.value)}else if("object"===typeof Q.value)for(ja in Q.value)V.setAttribute("data-cell-"+ja,Q.value[ja]);else null!=Q.value&&V.setAttribute("data-cell-value",Q.value);return V};var O=y.visitStatesRecursive;y.visitStatesRecursive=function(Q,V,ha){if(null!=Q){var ja=V.root,oa=V.root.ownerDocument;V.root=this.addCellData(Q.cell,
+null!=oa.createElementNS?oa.createElementNS(mxConstants.NS_SVG,"g"):oa.createElement("g"),Editor.addSvgMetadata);ja.appendChild(V.root);O.apply(this,arguments);V.root=ja}};y.getLinkForCellState=mxUtils.bind(this,function(Q,V){return this.getLinkForCell(Q.cell)});y.getTitleForCellState=mxUtils.bind(this,function(Q,V){return Editor.convertHtmlToText(this.convertValueToTooltip(Q.cell))});return y};Graph.prototype.parseBackgroundImage=function(y){var O=null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,
+y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,O,Q,V,ha,ja,oa,ta,ra,xa,Da,Ia,Ya,Za,$a,Pa){var Na=null;if(null!=Za)for(Na=new mxDictionary,Da=0;Da<Za.length;Da++)Na.put(Za[Da],!0);Za=this.useCssTransforms;var jb=this.enableFlowAnimation;this.enableFlowAnimation=!1;Za&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{O=null!=O?O:1;Q=null!=Q?Q:0;ha=null!=ha?ha:!0;ja=null!=ja?ja:!0;oa=null!=oa?oa:
+!0;xa=null!=xa?xa:!1;var cb="page"==Ya?this.view.getBackgroundPageBounds():ja&&null==Na||V||"diagram"==Ya?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ab=this.backgroundImage,db=this.view.translate,lb=this.view.scale;"diagram"==Ya&&null!=ab&&null!=ab.width&&null!=ab.height&&(cb=mxRectangle.fromRectangle(cb),cb.add(new mxRectangle((db.x+ab.x)*lb,(db.y+ab.y)*lb,ab.width*lb,ab.height*lb)));if(null==cb)throw Error(mxResources.get("drawingEmpty"));V=O/lb;var kb=Math.max(1,Math.ceil(cb.width*
+V)+2*Q)+(xa&&0==Q?5:0),pb=Math.max(1,Math.ceil(cb.height*V)+2*Q)+(xa&&0==Q?5:0);xa=ha?-.5:0;var fb=mxUtils.getLightDarkColor(y),ob=Graph.createSvgNode(xa,xa,kb,pb,fb),tb=ob.ownerDocument;if(null!=y){var eb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,"rect");eb.setAttribute("fill",fb.light);eb.style.fill=fb.cssText;eb.setAttribute("width","100%");eb.setAttribute("height","100%");eb.setAttribute("x","0");eb.setAttribute("y","0");ob.appendChild(eb)}var nb=mxUtils.createElementNs(tb,mxConstants.NS_SVG,
+"g");ob.appendChild(nb);var mb=this.createSvgCanvas(nb);mb.foOffset=ha?-.5:0;mb.textOffset=ha?-.5:0;mb.imageOffset=ha?-.5:0;mb.translate(Math.floor(Q/O-cb.x/lb),Math.floor(Q/O-cb.y/lb));mb.idPrefix="drawio-svg-"+Editor.guid();var qb=document.createElement("div"),ub=mb.getAlternateText;mb.getAlternateText=function(hb,Ab,sb,wb,yb,rb,Bb,d,p,z,u,x,C){if(null!=rb&&0<this.state.fontSize)try{mxUtils.isNode(rb)?rb=rb.innerText:(qb.innerHTML=rb,rb=mxUtils.extractTextWithWhitespace(qb.childNodes));for(var E=
+Math.ceil(2*wb/this.state.fontSize),ea=[],M=0,sa=0;(0==E||M<E)&&sa<rb.length;){var ma=rb.charCodeAt(sa);if(10==ma||13==ma){if(0<M)break}else ea.push(rb.charAt(sa)),255>ma&&M++;sa++}ea.length<rb.length&&1<rb.length-ea.length&&(rb=mxUtils.trim(ea.join(""))+"...");return rb}catch(Wa){return ub.apply(this,arguments)}else return ub.apply(this,arguments)};null!=ab&&null!=ab.width&&null!=ab.height&&(y=lb/O,xa=new mxRectangle((ab.x+db.x)*y,(ab.y+db.y)*y,ab.width*y,ab.height*y),mxUtils.intersects(cb,xa)&&
mb.image(ab.x+db.x,ab.y+db.y,ab.width,ab.height,ab.src,!0));mb.scale(V);mb.textEnabled=oa;ta=null!=ta?ta:this.createSvgImageExport();var zb=ta.getLinkForCellState;ta.getLinkForCellState=function(hb,Ab){var sb=hb.view.graph.getAbsoluteUrl(zb.apply(this,arguments));return null==sb||hb.view.graph.isCustomLink(sb)?null:sb};ta.getLinkTargetForCellState=function(hb,Ab){return hb.view.graph.getLinkTargetForCell(hb.cell)};var Cb=ta.drawCellState,xb=null,vb=mxUtils.bind(this,function(){if(null==xb){xb="ge-flow-animation-"+
-Editor.guid();var hb=null!=tb.createElementNS?tb.createElementNS(mxConstants.NS_SVG,"style"):tb.createElement("style");hb.innerHTML=this.createFlowAnimationCss(xb);tb.getElementsByTagName("defs")[0].appendChild(hb)}return xb});ta.drawCellState=function(hb,Ab){for(var sb=hb.view.graph,wb=null!=Na?Na.get(hb.cell):sb.isCellSelected(hb.cell),yb=sb.model.getParent(hb.cell);!(ia&&null==Na||wb)&&null!=yb;)wb=null!=Na?Na.get(yb):sb.isCellSelected(yb),yb=sb.model.getParent(yb);if(null!=hb.shape)try{var rb=
-hb.shape.isFlowAnimationEnabled,Bb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return jb&&sb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,O,vb())};if(ia&&null==Na||wb)sb.view.redrawEnumerationState(hb),Cb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Ab)}finally{hb.shape.isFlowAnimationEnabled=rb,hb.shape.addFlowAnimationToShape=
-Bb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ta.drawState(this.getView().getState(ib),mb);this.addForeignObjectWarning(mb,ob);Pa?this.disableSvgLinks(ob):this.updateSvgLinks(ob,ra,!0);return ob}finally{this.enableFlowAnimation=jb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var R=y.createElement("switch"),
-V=y.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var fa=y.createElement("a");fa.setAttribute("transform","translate(0,-5)");null==fa.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(fa.setAttribute("xlink:href",Graph.foreignObjectWarningLink),fa.setAttribute("target","_blank")):(fa.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),fa.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));
-y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);R.appendChild(V);fa.appendChild(y);R.appendChild(fa);O.appendChild(R)}};Graph.prototype.disableSvgLinks=function(y,O){y=y.getElementsByTagName("a");for(var R=0;R<y.length;R++){var V=y[R].getAttribute("href");null==V&&(V=y[R].getAttribute("xlink:href"));null!=V&&(y[R].style.pointerEvents="none",y[R].setAttribute("href",
-""));O&&O(y[R])}};Graph.prototype.updateSvgLinks=function(y,O,R){y=y.getElementsByTagName("a");for(var V=0;V<y.length;V++)if(null==y[V].getAttribute("target")){var fa=y[V].getAttribute("href");null==fa&&(fa=y[V].getAttribute("xlink:href"));null!=fa&&(null!=O&&/^https?:\/\//.test(fa)?y[V].setAttribute("target",O):R&&this.isCustomLink(fa)&&y[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
+Editor.guid();var hb=null!=tb.createElementNS?tb.createElementNS(mxConstants.NS_SVG,"style"):tb.createElement("style");hb.innerHTML=this.createFlowAnimationCss(xb);tb.getElementsByTagName("defs")[0].appendChild(hb)}return xb});ta.drawCellState=function(hb,Ab){for(var sb=hb.view.graph,wb=null!=Na?Na.get(hb.cell):sb.isCellSelected(hb.cell),yb=sb.model.getParent(hb.cell);!(ja&&null==Na||wb)&&null!=yb;)wb=null!=Na?Na.get(yb):sb.isCellSelected(yb),yb=sb.model.getParent(yb);if(null!=hb.shape)try{var rb=
+hb.shape.isFlowAnimationEnabled,Bb=hb.shape.addFlowAnimationToShape;hb.shape.isFlowAnimationEnabled=function(){return jb&&sb.model.isEdge(hb.cell)&&"1"==mxUtils.getValue(hb.style,"flowAnimation","0")};hb.shape.addFlowAnimationToShape=function(){sb.addFlowAnimationToNode(this.getFlowAnimationPath(),hb.style,O,vb())};if(ja&&null==Na||wb)sb.view.redrawEnumerationState(hb),Cb.apply(this,arguments),this.doDrawShape(hb.secondLabel,Ab)}finally{hb.shape.isFlowAnimationEnabled=rb,hb.shape.addFlowAnimationToShape=
+Bb}};var ib=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ta.drawState(this.getView().getState(ib),mb);this.addForeignObjectWarning(mb,ob);Pa?this.disableSvgLinks(ob):this.updateSvgLinks(ob,ra,!0);return ob}finally{this.enableFlowAnimation=jb,Za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var Q=y.createElement("switch"),
+V=y.createElement("g");V.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ha=y.createElement("a");ha.setAttribute("transform","translate(0,-5)");null==ha.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ha.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ha.setAttribute("target","_blank")):(ha.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ha.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));
+y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);Q.appendChild(V);ha.appendChild(y);Q.appendChild(ha);O.appendChild(Q)}};Graph.prototype.disableSvgLinks=function(y,O){y=y.getElementsByTagName("a");for(var Q=0;Q<y.length;Q++){var V=y[Q].getAttribute("href");null==V&&(V=y[Q].getAttribute("xlink:href"));null!=V&&(y[Q].style.pointerEvents="none",y[Q].setAttribute("href",
+""));O&&O(y[Q])}};Graph.prototype.updateSvgLinks=function(y,O,Q){y=y.getElementsByTagName("a");for(var V=0;V<y.length;V++)if(null==y[V].getAttribute("target")){var ha=y[V].getAttribute("href");null==ha&&(ha=y[V].getAttribute("xlink:href"));null!=ha&&(null!=O&&/^https?:\/\//.test(ha)?y[V].setAttribute("target",O):Q&&this.isCustomLink(ha)&&y[V].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
y.adaptiveColors=this.getAdaptiveColors();y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(y=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){var y=null;if(null!=this.cellEditor.textarea)for(y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=
-y.parentNode;return y};Graph.prototype.getParentByName=function(y,O,R){for(;null!=y&&y.nodeName!=O;){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,R){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==R)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var R=document.createRange();R.selectNode(y);O.removeAllRanges();O.addRange(R)}}else(O=
-document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),R=O.createRange(),R.setEndPoint("StartToStart",y),R.select())};Graph.prototype.flipEdgePoints=function(y,O,R){var V=this.getCellGeometry(y);if(null!=V){V=V.clone();if(null!=V.points)for(var fa=0;fa<V.points.length;fa++)O?V.points[fa].x=R+(R-V.points[fa].x):V.points[fa].y=R+(R-V.points[fa].y);fa=function(ia){null!=ia&&(O?ia.x=R+(R-ia.x):ia.y=R+(R-ia.y))};fa(V.getTerminalPoint(!0));fa(V.getTerminalPoint(!1));this.model.setGeometry(y,
-V)}};Graph.prototype.flipChildren=function(y,O,R){this.model.beginUpdate();try{for(var V=this.model.getChildCount(y),fa=0;fa<V;fa++){var ia=this.model.getChildAt(y,fa);if(this.model.isEdge(ia))this.flipEdgePoints(ia,O,R);else{var oa=this.getCellGeometry(ia);null!=oa&&(oa=oa.clone(),O?oa.x=R+(R-oa.x-oa.width):oa.y=R+(R-oa.y-oa.height),this.model.setGeometry(ia,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);
-for(var R=[],V=0;V<y.length;V++)if(this.model.isEdge(y[V])){var fa=this.view.getState(y[V]);null!=fa&&this.flipEdgePoints(y[V],O,(O?fa.getCenterX():fa.getCenterY())/this.view.scale-(O?fa.origin.x:fa.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(y[V]);null!=ia&&this.flipChildren(y[V],O,O?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);R.push(y[V])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,R)}finally{this.model.endUpdate()}};
-Graph.prototype.deleteCells=function(y,O){var R=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var V=0;V<y.length;V++){var fa=this.model.getParent(y[V]);if(this.isTable(fa)){var ia=this.getCellGeometry(y[V]),oa=this.getCellGeometry(fa);null!=ia&&null!=oa&&(oa=oa.clone(),oa.height-=ia.height,this.model.setGeometry(fa,oa))}}var ta=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(R=[],V=0;V<ta.length;V++)this.model.contains(ta[V])&&
-(this.model.isVertex(ta[V])||this.model.isEdge(ta[V]))&&R.push(ta[V])}return R};Graph.prototype.insertTableColumn=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=y,fa=0;if(this.isTableCell(y)){var ia=R.getParent(y);V=R.getParent(ia);fa=mxUtils.indexOf(R.getChildCells(ia,!0),y)}else this.isTableRow(y)?V=R.getParent(y):y=R.getChildCells(V,!0)[0],O||(fa=R.getChildCells(y,!0).length-1);var oa=R.getChildCells(V,!0),ta=Graph.minTableColumnWidth;for(y=0;y<oa.length;y++){var ra=R.getChildCells(oa[y],
-!0)[fa],xa=R.cloneCell(ra,!1);null==xa&&(xa=this.createVertex());var Da=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ta=Da.width;var Ia=this.getCellGeometry(oa[y]);null!=Ia&&(Da.height=Ia.height)}R.add(oa[y],xa,fa+(O?0:1))}var Ya=this.getCellGeometry(V);null!=Ya&&(Ya=Ya.clone(),Ya.width+=
-ta,R.setGeometry(V,Ya))}finally{R.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var R=null;R="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var V=O.getChildCells(R,!0);0==V.length?O.remove(R):(R==y&&(y=V[V.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){V=y;var fa=R.getChildCells(V,
-!0);y=fa[O?0:fa.length-1]}else V=R.getParent(y);var ia=V.getIndex(y);y=R.cloneCell(y,!1);y.value=null;R.add(V,y,ia+(O?0:1))}finally{R.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var R=this.getModel();R.beginUpdate();try{var V=y,fa=y;if(this.isTableCell(y))fa=R.getParent(y),V=R.getParent(fa);else if(this.isTableRow(y))V=R.getParent(y);else{var ia=R.getChildCells(V,!0);fa=ia[O?0:ia.length-1]}var oa=R.getChildCells(fa,!0),ta=V.getIndex(fa);fa=R.cloneCell(fa,!1);fa.value=null;var ra=this.getCellGeometry(fa);
-if(null!=ra){for(ia=0;ia<oa.length;ia++){y=R.cloneCell(oa[ia],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);fa.insert(y)}R.add(V,fa,ta+(O?0:1));var Da=this.getCellGeometry(V);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,R.setGeometry(V,Da))}}finally{R.endUpdate()}};
-Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(V=O.getParent(y));this.isTableRow(V)&&(R=O.getParent(V));var fa=O.getChildCells(R,!0);if(0==fa.length)O.remove(R);else{this.isTableRow(V)||(V=fa[0]);var ia=O.getChildCells(V,!0);if(1>=ia.length)O.remove(R);else{var oa=ia.length-1;this.isTableCell(y)&&(oa=mxUtils.indexOf(ia,y));for(V=y=0;V<fa.length;V++){var ta=O.getChildCells(fa[V],!0)[oa];O.remove(ta);var ra=this.getCellGeometry(ta);
-null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(R);null!=xa&&(xa=xa.clone(),xa.width-=y,O.setGeometry(R,xa))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var R=y,V=y;this.isTableCell(y)&&(y=V=O.getParent(y));this.isTableRow(y)&&(R=O.getParent(V));var fa=O.getChildCells(R,!0);if(1>=fa.length)O.remove(R);else{this.isTableRow(V)||(V=fa[fa.length-1]);O.remove(V);y=0;var ia=this.getCellGeometry(V);null!=ia&&(y=ia.height);
-var oa=this.getCellGeometry(R);null!=oa&&(oa=oa.clone(),oa.height-=y,O.setGeometry(R,oa))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var R=y.tBodies[0],V=R.rows[0].cells,fa=y=0;fa<V.length;fa++){var ia=V[fa].getAttribute("colspan");y+=null!=ia?parseInt(ia):1}O=R.insertRow(O);for(fa=0;fa<y;fa++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var R=y.tHead;if(null!=
-R)for(var V=0;V<R.rows.length;V++){var fa=document.createElement("th");R.rows[V].appendChild(fa);mxUtils.br(fa)}y=y.tBodies[0];for(R=0;R<y.rows.length;R++)V=y.rows[R].insertCell(O),mxUtils.br(V);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var R=0;R<y.length;R++)y[R].cells.length>O&&y[R].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&
-O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var R=document.createElement("div");R.innerHTML=y;y=document.createDocumentFragment();for(var V;V=R.firstChild;)lastNode=y.appendChild(V);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O,R){function V(ia,oa){ia.length>oa&&(ia=ia.substring(0,Math.round(oa/2))+"..."+ia.substring(ia.length-Math.round(oa/4)));return ia}y=null!=y?y:"javascript:void(0);";if(null==
-O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var fa=document.createElement("a");fa.setAttribute("rel",this.linkRelation);fa.setAttribute("href",this.getAbsoluteUrl(y));fa.setAttribute("title",V(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&fa.setAttribute("target",this.linkTarget);mxUtils.write(fa,V(O,40));this.isCustomLink(y)&&mxEvent.addListener(fa,"click",mxUtils.bind(this,function(ia){this.customLinkClicked(y,R);mxEvent.consume(ia)}));return fa};Graph.prototype.initTouch=
-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,oa){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=y.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var oa=this.getCellAt(ia.graphX,ia.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ia.graphX,ia.graphY)||(ia.state=this.view.getState(oa),
-null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var O=!1,R=!1,V=!1,fa=this.fireMouseEvent;this.fireMouseEvent=function(ia,oa,ta){ia==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),O=this.isCellSelected(oa.getCell()),R=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());fa.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,
-function(ia,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var ta=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!ta&&(R&&null==oa.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(oa.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();
-this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ra,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,oa,ta])}})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
-"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),R=O.getRangeAt(0);y=Graph.createTabNode(y);R.insertNode(y);R.setStartAfter(y);R.setEndAfter(y);O.removeAllRanges();O.addRange(R)};mxCellEditor.prototype.alignText=function(y,O){var R=this.graph.getView().getState(this.editingCell);
-if(null!=R){R=mxUtils.getValue(R.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=R&&"vertical-"==R.substring(0,9),fa=null!=O&&mxEvent.isShiftDown(O);if(fa||null!=window.getSelection&&null!=window.getSelection().containsNode){var ia=!0;this.graph.processElements(this.textarea,function(oa){fa||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ia=!1});(ia||V)&&this.graph.cellEditor.setAlign(y)}V||document.execCommand("justify"+
-y.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],R=0,V=y.rangeCount;R<V;++R)O.push(y.getRangeAt(R));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,R=y.length;O<
-R;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(V){}};var D=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));D.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var N=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);N.apply(this,arguments);var R=this.graph.view.getState(y);this.textarea.className=null!=R&&1==R.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?
-"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y)};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),R=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,
-ta.length-1));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),fa=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(y.style,
+y.parentNode;return y};Graph.prototype.getParentByName=function(y,O,Q){for(;null!=y&&y.nodeName!=O;){if(y==Q)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,Q){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==Q)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var Q=document.createRange();Q.selectNode(y);O.removeAllRanges();O.addRange(Q)}}else(O=
+document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),Q=O.createRange(),Q.setEndPoint("StartToStart",y),Q.select())};Graph.prototype.flipEdgePoints=function(y,O,Q){var V=this.getCellGeometry(y);if(null!=V){V=V.clone();if(null!=V.points)for(var ha=0;ha<V.points.length;ha++)O?V.points[ha].x=Q+(Q-V.points[ha].x):V.points[ha].y=Q+(Q-V.points[ha].y);ha=function(ja){null!=ja&&(O?ja.x=Q+(Q-ja.x):ja.y=Q+(Q-ja.y))};ha(V.getTerminalPoint(!0));ha(V.getTerminalPoint(!1));this.model.setGeometry(y,
+V)}};Graph.prototype.flipChildren=function(y,O,Q){this.model.beginUpdate();try{for(var V=this.model.getChildCount(y),ha=0;ha<V;ha++){var ja=this.model.getChildAt(y,ha);if(this.model.isEdge(ja))this.flipEdgePoints(ja,O,Q);else{var oa=this.getCellGeometry(ja);null!=oa&&(oa=oa.clone(),O?oa.x=Q+(Q-oa.x-oa.width):oa.y=Q+(Q-oa.y-oa.height),this.model.setGeometry(ja,oa))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);
+for(var Q=[],V=0;V<y.length;V++)if(this.model.isEdge(y[V])){var ha=this.view.getState(y[V]);null!=ha&&this.flipEdgePoints(y[V],O,(O?ha.getCenterX():ha.getCenterY())/this.view.scale-(O?ha.origin.x:ha.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var ja=this.getCellGeometry(y[V]);null!=ja&&this.flipChildren(y[V],O,O?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);Q.push(y[V])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,Q)}finally{this.model.endUpdate()}};
+Graph.prototype.deleteCells=function(y,O){var Q=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var V=0;V<y.length;V++){var ha=this.model.getParent(y[V]);if(this.isTable(ha)){var ja=this.getCellGeometry(y[V]),oa=this.getCellGeometry(ha);null!=ja&&null!=oa&&(oa=oa.clone(),oa.height-=ja.height,this.model.setGeometry(ha,oa))}}var ta=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,O)}finally{this.model.endUpdate()}if(null!=ta)for(Q=[],V=0;V<ta.length;V++)this.model.contains(ta[V])&&
+(this.model.isVertex(ta[V])||this.model.isEdge(ta[V]))&&Q.push(ta[V])}return Q};Graph.prototype.insertTableColumn=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=y,ha=0;if(this.isTableCell(y)){var ja=Q.getParent(y);V=Q.getParent(ja);ha=mxUtils.indexOf(Q.getChildCells(ja,!0),y)}else this.isTableRow(y)?V=Q.getParent(y):y=Q.getChildCells(V,!0)[0],O||(ha=Q.getChildCells(y,!0).length-1);var oa=Q.getChildCells(V,!0),ta=Graph.minTableColumnWidth;for(y=0;y<oa.length;y++){var ra=Q.getChildCells(oa[y],
+!0)[ha],xa=Q.cloneCell(ra,!1);null==xa&&(xa=this.createVertex());var Da=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ta=Da.width;var Ia=this.getCellGeometry(oa[y]);null!=Ia&&(Da.height=Ia.height)}Q.add(oa[y],xa,ha+(O?0:1))}var Ya=this.getCellGeometry(V);null!=Ya&&(Ya=Ya.clone(),Ya.width+=
+ta,Q.setGeometry(V,Ya))}finally{Q.endUpdate()}};Graph.prototype.deleteLane=function(y){var O=this.getModel();O.beginUpdate();try{var Q=null;Q="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var V=O.getChildCells(Q,!0);0==V.length?O.remove(Q):(Q==y&&(y=V[V.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){V=y;var ha=Q.getChildCells(V,
+!0);y=ha[O?0:ha.length-1]}else V=Q.getParent(y);var ja=V.getIndex(y);y=Q.cloneCell(y,!1);y.value=null;Q.add(V,y,ja+(O?0:1))}finally{Q.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var Q=this.getModel();Q.beginUpdate();try{var V=y,ha=y;if(this.isTableCell(y))ha=Q.getParent(y),V=Q.getParent(ha);else if(this.isTableRow(y))V=Q.getParent(y);else{var ja=Q.getChildCells(V,!0);ha=ja[O?0:ja.length-1]}var oa=Q.getChildCells(ha,!0),ta=V.getIndex(ha);ha=Q.cloneCell(ha,!1);ha.value=null;var ra=this.getCellGeometry(ha);
+if(null!=ra){for(ja=0;ja<oa.length;ja++){y=Q.cloneCell(oa[ja],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);ha.insert(y)}Q.add(V,ha,ta+(O?0:1));var Da=this.getCellGeometry(V);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,Q.setGeometry(V,Da))}}finally{Q.endUpdate()}};
+Graph.prototype.deleteTableColumn=function(y){var O=this.getModel();O.beginUpdate();try{var Q=y,V=y;this.isTableCell(y)&&(V=O.getParent(y));this.isTableRow(V)&&(Q=O.getParent(V));var ha=O.getChildCells(Q,!0);if(0==ha.length)O.remove(Q);else{this.isTableRow(V)||(V=ha[0]);var ja=O.getChildCells(V,!0);if(1>=ja.length)O.remove(Q);else{var oa=ja.length-1;this.isTableCell(y)&&(oa=mxUtils.indexOf(ja,y));for(V=y=0;V<ha.length;V++){var ta=O.getChildCells(ha[V],!0)[oa];O.remove(ta);var ra=this.getCellGeometry(ta);
+null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(Q);null!=xa&&(xa=xa.clone(),xa.width-=y,O.setGeometry(Q,xa))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var Q=y,V=y;this.isTableCell(y)&&(y=V=O.getParent(y));this.isTableRow(y)&&(Q=O.getParent(V));var ha=O.getChildCells(Q,!0);if(1>=ha.length)O.remove(Q);else{this.isTableRow(V)||(V=ha[ha.length-1]);O.remove(V);y=0;var ja=this.getCellGeometry(V);null!=ja&&(y=ja.height);
+var oa=this.getCellGeometry(Q);null!=oa&&(oa=oa.clone(),oa.height-=y,O.setGeometry(Q,oa))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var Q=y.tBodies[0],V=Q.rows[0].cells,ha=y=0;ha<V.length;ha++){var ja=V[ha].getAttribute("colspan");y+=null!=ja?parseInt(ja):1}O=Q.insertRow(O);for(ha=0;ha<y;ha++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var Q=y.tHead;if(null!=
+Q)for(var V=0;V<Q.rows.length;V++){var ha=document.createElement("th");Q.rows[V].appendChild(ha);mxUtils.br(ha)}y=y.tBodies[0];for(Q=0;Q<y.rows.length;Q++)V=y.rows[Q].insertCell(O),mxUtils.br(V);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var Q=0;Q<y.length;Q++)y[Q].cells.length>O&&y[Q].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&
+O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var Q=document.createElement("div");Q.innerHTML=y;y=document.createDocumentFragment();for(var V;V=Q.firstChild;)lastNode=y.appendChild(V);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,O,Q){function V(ja,oa){ja.length>oa&&(ja=ja.substring(0,Math.round(oa/2))+"..."+ja.substring(ja.length-Math.round(oa/4)));return ja}y=null!=y?y:"javascript:void(0);";if(null==
+O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var ha=document.createElement("a");ha.setAttribute("rel",this.linkRelation);ha.setAttribute("href",this.getAbsoluteUrl(y));ha.setAttribute("title",V(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&ha.setAttribute("target",this.linkTarget);mxUtils.write(ha,V(O,40));this.isCustomLink(y)&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ja){this.customLinkClicked(y,Q);mxEvent.consume(ja)}));return ha};Graph.prototype.initTouch=
+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,oa){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=y.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&null==ja.getState()){var oa=this.getCellAt(ja.graphX,ja.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ja.graphX,ja.graphY)||(ja.state=this.view.getState(oa),
+null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var O=!1,Q=!1,V=!1,ha=this.fireMouseEvent;this.fireMouseEvent=function(ja,oa,ta){ja==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),O=this.isCellSelected(oa.getCell()),Q=this.isSelectionEmpty(),V=this.popupMenuHandler.isMenuShowing());ha.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,
+function(ja,oa){if(null!=this.freehand&&!this.freehand.isDrawing()){var ta=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!V&&!ta&&(Q&&null==oa.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(oa.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();
+this.popupMenuHandler.popup(oa.getX()+xa.x+1,oa.getY()+xa.y+1,ra,oa.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,oa,ta])}})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
+"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),Q=O.getRangeAt(0);y=Graph.createTabNode(y);Q.insertNode(y);Q.setStartAfter(y);Q.setEndAfter(y);O.removeAllRanges();O.addRange(Q)};mxCellEditor.prototype.alignText=function(y,O){var Q=this.graph.getView().getState(this.editingCell);
+if(null!=Q){Q=mxUtils.getValue(Q.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var V=null!=Q&&"vertical-"==Q.substring(0,9),ha=null!=O&&mxEvent.isShiftDown(O);if(ha||null!=window.getSelection&&null!=window.getSelection().containsNode){var ja=!0;this.graph.processElements(this.textarea,function(oa){ha||V||window.getSelection().containsNode(oa,!0)?(oa.removeAttribute("align"),oa.style.textAlign=null):ja=!1});(ja||V)&&this.graph.cellEditor.setAlign(y)}V||document.execCommand("justify"+
+y.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],Q=0,V=y.rangeCount;Q<V;++Q)O.push(y.getRangeAt(Q));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,Q=y.length;O<
+Q;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(V){}};var D=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));D.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var N=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);N.apply(this,arguments);var Q=this.graph.view.getState(y);this.textarea.className=null!=Q&&1==Q.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?
+"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y)};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),Q=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,
+ta.length-1));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var V=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ha=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(y.style,
mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&oa.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(ra)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=fa?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,
+Math.round(ra)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ha?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=V;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,
"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var ta=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=Graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className=
"mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding=
-"2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=R;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var R=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&
-0==this.bounds.height){this.bounds.width=160*R;this.bounds.height=60*R;var V=null!=y.text?y.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/R)+"px";this.textarea.style.height=Math.round((this.bounds.height-
-4)/R)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/R)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*R);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/R)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
-R);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+R+","+R+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
-var R=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(R=R.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(R,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(y,O){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(y.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
+"2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=Q;this.resize()}};var L=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var Q=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&
+0==this.bounds.height){this.bounds.width=160*Q;this.bounds.height=60*Q;var V=null!=y.text?y.text.margin:null;null==V&&(V=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=V.x*this.bounds.width;this.bounds.y+=V.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/Q)+"px";this.textarea.style.height=Math.round((this.bounds.height-
+4)/Q)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/Q)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*Q);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/Q)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*
+Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",L.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
+var Q=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(y,O){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(y.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var O=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(y.style,"nl2Br","1")?(O=O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<O.length&&("<br/>"==O.substring(O.length-5)||"<br>"==O.substring(O.length-4))&&(O=O.substring(0,O.lastIndexOf("<br"))+"<div><br/></div>")):
-O=O.replace(/\r\n/g,"").replace(/\n/g,"");return O};var J=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();J.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&
+O=O.replace(/\r\n/g,"").replace(/\n/g,"");return O};var I=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();I.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&
0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getBorderColor=function(y){y=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);y==mxConstants.NONE&&(y=null);return y};mxCellEditor.prototype.getMinimumSize=
function(y){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,O){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,R=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/R-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/R-O.y);R=this.graph.view.unit;this.hint.innerHTML=e(y,R)+", "+e(O,R);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ha=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){ha.apply(this,arguments);var R=this.graph.getCellStyle(y);if(null==R.childLayout){var V=this.graph.model.getParent(y),fa=null!=V?this.graph.getCellGeometry(V):null;if(null!=fa&&(R=this.graph.getCellStyle(V),"stackLayout"==R.childLayout)){var ia=
-parseFloat(mxUtils.getValue(R,"stackBorder",mxStackLayout.prototype.border));R="1"==mxUtils.getValue(R,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);fa=fa.clone();R?fa.height=O.height+oa.y+oa.height+2*ia:fa.width=O.width+oa.x+oa.width+2*ia;this.graph.model.setGeometry(V,fa)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){R.get(ta)||(R.put(ta,!0),fa.push(ta))}for(var O=ea.apply(this,
-arguments),R=new mxDictionary,V=this.graph.model,fa=[],ia=0;ia<O.length;ia++){var oa=O[ia];this.graph.isTableCell(oa)?y(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&y(V.getParent(oa));y(oa)}return fa};var aa=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(y){return aa.apply(this,arguments)&&!mxEvent.isControlDown(y.getEvent())&&!mxEvent.isShiftDown(y.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
-function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var W=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=W.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ba=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
-function(y){var O=ba.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};
-mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ja=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ja.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 ca=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||la.apply(this,arguments)&&
-(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var Q=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Q.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,B=mxVertexHandler.prototype.createCustomHandles;
-mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var y=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var O=function($a,Pa,Na){for(var jb=[],cb=0;cb<$a.length;cb++){var ab=$a[cb];jb.push(null==ab?null:new mxPoint((ra+ab.x+Pa)*ia,(xa+ab.y+Na)*ia))}return jb},R=this,V=this.graph,fa=V.model,ia=V.view.scale,oa=this.state,ta=this.selectionBorder,ra=this.state.origin.x+V.view.translate.x,
-xa=this.state.origin.y+V.view.translate.y;null==y&&(y=[]);var Da=V.view.getCellStates(fa.getChildCells(this.state.cell,!0));if(0<Da.length){var Ia=fa.getChildCells(Da[0].cell,!0),Ya=V.getTableLines(this.state.cell,!1,!0),Za=V.getTableLines(this.state.cell,!0,!1);for(fa=0;fa<Da.length;fa++)mxUtils.bind(this,function($a){var Pa=Da[$a],Na=null;if(V.isCellMovable(Pa.cell)){Na=$a<Da.length-1?Da[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na.cell):null;var jb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:
+this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,Q=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/Q-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/Q-O.y);Q=this.graph.view.unit;this.hint.innerHTML=e(y,Q)+", "+e(O,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ia=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,O){ia.apply(this,arguments);var Q=this.graph.getCellStyle(y);if(null==Q.childLayout){var V=this.graph.model.getParent(y),ha=null!=V?this.graph.getCellGeometry(V):null;if(null!=ha&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ja=
+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ha=ha.clone();Q?ha.height=O.height+oa.y+oa.height+2*ja:ha.width=O.width+oa.x+oa.width+2*ja;this.graph.model.setGeometry(V,ha)}}};var fa=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ta){Q.get(ta)||(Q.put(ta,!0),ha.push(ta))}for(var O=fa.apply(this,
+arguments),Q=new mxDictionary,V=this.graph.model,ha=[],ja=0;ja<O.length;ja++){var oa=O[ja];this.graph.isTableCell(oa)?y(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&y(V.getParent(oa));y(oa)}return ha};var ba=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(y){return ba.apply(this,arguments)&&!mxEvent.isControlDown(y.getEvent())&&!mxEvent.isShiftDown(y.getEvent())};var na=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
+function(){return na.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=X.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ca=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+function(y){var O=ca.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};
+mxVertexHandler.prototype.isCenteredEvent=function(y,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.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 da=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return da.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var W=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||W.apply(this,arguments)&&
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var S=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return S.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,B=mxVertexHandler.prototype.createCustomHandles;
+mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var y=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var O=function($a,Pa,Na){for(var jb=[],cb=0;cb<$a.length;cb++){var ab=$a[cb];jb.push(null==ab?null:new mxPoint((ra+ab.x+Pa)*ja,(xa+ab.y+Na)*ja))}return jb},Q=this,V=this.graph,ha=V.model,ja=V.view.scale,oa=this.state,ta=this.selectionBorder,ra=this.state.origin.x+V.view.translate.x,
+xa=this.state.origin.y+V.view.translate.y;null==y&&(y=[]);var Da=V.view.getCellStates(ha.getChildCells(this.state.cell,!0));if(0<Da.length){var Ia=ha.getChildCells(Da[0].cell,!0),Ya=V.getTableLines(this.state.cell,!1,!0),Za=V.getTableLines(this.state.cell,!0,!1);for(ha=0;ha<Da.length;ha++)mxUtils.bind(this,function($a){var Pa=Da[$a],Na=null;if(V.isCellMovable(Pa.cell)){Na=$a<Da.length-1?Da[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na.cell):null;var jb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:
Na;Na=null!=Za[$a]?new k(Za[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Na=new mxHandle(Pa,"row-resize",null,Na);Na.tableHandle=!0;var cb=0;Na.shape.node.parentNode.insertBefore(Na.shape.node,Na.shape.node.parentNode.firstChild);Na.redraw=function(){if(null!=this.shape){this.shape.stroke=0==cb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Za[$a],0,cb),this.shape.updateBoundsFromLine();else{var db=
-V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ia;this.shape.bounds.x=oa.x+($a==Da.length-1?0:db.x*ia);this.shape.bounds.width=oa.width-($a==Da.length-1?0:db.width+db.x+ia)}this.shape.redraw()}};var ab=!1;Na.setPosition=function(db,lb,kb){cb=Math.max(Graph.minTableRowHeight-db.height,lb.y-db.y-db.height);ab=mxEvent.isShiftDown(kb.getEvent());null!=jb&&ab&&(cb=Math.min(cb,jb.height-Graph.minTableRowHeight))};Na.execute=function(db){if(0!=
-cb)V.setTableRowHeight(this.state.cell,cb,!ab);else if(!R.blockDelayedSelection){var lb=V.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(lb,db)}cb=0};Na.reset=function(){cb=0}}y.push(Na)})(fa);for(fa=0;fa<Ia.length;fa++)mxUtils.bind(this,function($a){var Pa=V.view.getState(Ia[$a]),Na=V.getCellGeometry(Ia[$a]),jb=null!=Na.alternateBounds?Na.alternateBounds:Na;null==Pa&&(Pa=new mxCellState(V.view,Ia[$a],V.getCellStyle(Ia[$a])),Pa.x=oa.x+Na.x*ia,Pa.y=oa.y+Na.y*ia,
-Pa.width=jb.width*ia,Pa.height=jb.height*ia,Pa.updateCachedBounds());Na=$a<Ia.length-1?Ia[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na):null;var cb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:Na;Na=null!=Ya[$a]?new k(Ya[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Na);Pa.tableHandle=!0;var ab=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);
-Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Ya[$a],ab,0),this.shape.updateBoundsFromLine();else{var lb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(jb.width+ab)*ia;this.shape.bounds.y=oa.y+($a==Ia.length-1?0:lb.y*ia);this.shape.bounds.height=oa.height-($a==Ia.length-1?0:(lb.height+lb.y)*ia)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(lb,kb,pb){ab=
-Math.max(Graph.minTableColumnWidth-jb.width,kb.x-lb.x-jb.width);db=mxEvent.isShiftDown(pb.getEvent());null==cb||db||(ab=Math.min(ab,cb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=ab)V.setTableColumnWidth(this.state.cell,ab,db);else if(!R.blockDelayedSelection){var kb=V.getCellAt(lb.getGraphX(),lb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(kb,lb)}ab=0};Pa.positionChanged=function(){};Pa.reset=function(){ab=0};y.push(Pa)})(fa)}}return null!=y?y.reverse():null};var I=
-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){I.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)null!=this.moveHandles[O]&&(this.moveHandles[O].node.style.visibility=y?"":"hidden");if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
+V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+cb*ja;this.shape.bounds.x=oa.x+($a==Da.length-1?0:db.x*ja);this.shape.bounds.width=oa.width-($a==Da.length-1?0:db.width+db.x+ja)}this.shape.redraw()}};var ab=!1;Na.setPosition=function(db,lb,kb){cb=Math.max(Graph.minTableRowHeight-db.height,lb.y-db.y-db.height);ab=mxEvent.isShiftDown(kb.getEvent());null!=jb&&ab&&(cb=Math.min(cb,jb.height-Graph.minTableRowHeight))};Na.execute=function(db){if(0!=
+cb)V.setTableRowHeight(this.state.cell,cb,!ab);else if(!Q.blockDelayedSelection){var lb=V.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(lb,db)}cb=0};Na.reset=function(){cb=0}}y.push(Na)})(ha);for(ha=0;ha<Ia.length;ha++)mxUtils.bind(this,function($a){var Pa=V.view.getState(Ia[$a]),Na=V.getCellGeometry(Ia[$a]),jb=null!=Na.alternateBounds?Na.alternateBounds:Na;null==Pa&&(Pa=new mxCellState(V.view,Ia[$a],V.getCellStyle(Ia[$a])),Pa.x=oa.x+Na.x*ja,Pa.y=oa.y+Na.y*ja,
+Pa.width=jb.width*ja,Pa.height=jb.height*ja,Pa.updateCachedBounds());Na=$a<Ia.length-1?Ia[$a+1]:null;Na=null!=Na?V.getCellGeometry(Na):null;var cb=null!=Na&&null!=Na.alternateBounds?Na.alternateBounds:Na;Na=null!=Ya[$a]?new k(Ya[$a],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Na.isDashed=ta.isDashed;Na.svgStrokeTolerance++;Pa=new mxHandle(Pa,"col-resize",null,Na);Pa.tableHandle=!0;var ab=0;Pa.shape.node.parentNode.insertBefore(Pa.shape.node,Pa.shape.node.parentNode.firstChild);
+Pa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==ab?mxConstants.NONE:ta.stroke;if(this.shape.constructor==k)this.shape.line=O(Ya[$a],ab,0),this.shape.updateBoundsFromLine();else{var lb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(jb.width+ab)*ja;this.shape.bounds.y=oa.y+($a==Ia.length-1?0:lb.y*ja);this.shape.bounds.height=oa.height-($a==Ia.length-1?0:(lb.height+lb.y)*ja)}this.shape.redraw()}};var db=!1;Pa.setPosition=function(lb,kb,pb){ab=
+Math.max(Graph.minTableColumnWidth-jb.width,kb.x-lb.x-jb.width);db=mxEvent.isShiftDown(pb.getEvent());null==cb||db||(ab=Math.min(ab,cb.width-Graph.minTableColumnWidth))};Pa.execute=function(lb){if(0!=ab)V.setTableColumnWidth(this.state.cell,ab,db);else if(!Q.blockDelayedSelection){var kb=V.getCellAt(lb.getGraphX(),lb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(kb,lb)}ab=0};Pa.positionChanged=function(){};Pa.reset=function(){ab=0};y.push(Pa)})(ha)}}return null!=y?y.reverse():null};var K=
+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){K.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)null!=this.moveHandles[O]&&(this.moveHandles[O].node.style.visibility=y?"":"hidden");if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.isMoveHandlesVisible();y&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():y||null==this.moveHandles||this.destroyMoveHandles();if(y&&null==this.moveHandles){for(y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var y=
-this.graph,O=y.model,R=[],V=0;V<O.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(fa){if(null!=fa&&O.isVertex(fa.cell)&&y.isCellMovable(fa.cell)){var ia=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ia=new mxImageShape(ia,this.rowHandleImage.src);ia.rowState=fa;ia.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ia.init(this.graph.getView().getOverlayPane());ia.node.style.cursor="move";mxEvent.addGestureListeners(ia.node,
-mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(fa.cell)||this.graph.selectCellForEvent(fa.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
-null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),fa.cell,oa),mxEvent.consume(oa))}));R.push(ia)}else R.push(null)})(this.graph.view.getState(O.getChildAt(this.state.cell,V)));return R};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
-function(){if(null!=this.cornerHandles){for(var y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
+this.graph,O=y.model,Q=[],V=0;V<O.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ha){if(null!=ha&&O.isVertex(ha.cell)&&y.isCellMovable(ha.cell)){var ja=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ja=new mxImageShape(ja,this.rowHandleImage.src);ja.rowState=ha;ja.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ja.init(this.graph.getView().getOverlayPane());ja.node.style.cursor="move";mxEvent.addGestureListeners(ja.node,
+mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ha.cell)||this.graph.selectCellForEvent(ha.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
+null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ha.cell,oa),mxEvent.consume(oa))}));Q.push(ja)}else Q.push(null)})(this.graph.view.getState(O.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&this.moveHandles[y].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
+function(){if(null!=this.cornerHandles){for(var y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var y=0;4>y;y++){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)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();
-y=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),O=this.tolerance,R=this.state.style.shape;null==mxCellRenderer.defaultShapes[R]&&mxStencilRegistry.getStencil(R);R=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!R&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
-this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var fa=this.customHandles[V].shape.bounds,ia=fa.getCenterX(),oa=fa.getCenterY();if(Math.abs(this.state.x-ia)<fa.width/2||Math.abs(this.state.y-oa)<fa.height/2||Math.abs(this.state.x+this.state.width-ia)<fa.width/2||Math.abs(this.state.y+this.state.height-oa)<fa.height/2){R=!0;break}}R&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=
+y=this.graph.getLinkForCell(this.state.cell);O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),O=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
+this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ha=this.customHandles[V].shape.bounds,ja=ha.getCenterX(),oa=ha.getCenterY();if(Math.abs(this.state.x-ja)<ha.width/2||Math.abs(this.state.y-oa)<ha.height/2||Math.abs(this.state.x+this.state.width-ja)<ha.width/2||Math.abs(this.state.y+this.state.height-oa)<ha.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),y.x=
this.sizers[0].bounds.width+O,y.y=this.sizers[0].bounds.height+O):y=P.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),O)+" x "+e(this.roundLength(this.bounds.height/
y),O)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
-"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var y=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
-var Z=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){Z.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O,R){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,fa=this.graph.view.scale,ia=this.roundLength(O.x/fa-V.x);V=this.roundLength(O.y/fa-V.y);var oa=
-this.graph.view.unit;this.hint.innerHTML=e(ia,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=R&&(R.view.updateEdgeBounds(R),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(R.length/fa):e(R.length/fa,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(R=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*R.x)+"%, "+Math.round(100*
-R.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var y=this.graph.getLinkForCell(this.state.cell),O=this.graph.getLinksForState(this.state);this.updateLinkHint(y,O)};var Y=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,O){Y.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
+var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,O){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,O,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ha=this.graph.view.scale,ja=this.roundLength(O.x/ha-V.x);V=this.roundLength(O.y/ha-V.y);var oa=
+this.graph.view.unit;this.hint.innerHTML=e(ja,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ha):e(Q.length/ha,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*
+Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),O.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
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="'+
@@ -2703,63 +2702,63 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
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(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(y){return mxEvent.isMouseEvent(y.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==y.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};
-mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var R=
-null!=this.div&&"none"!=this.div.style.display,V=null,fa=null,ia=y=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,fa=this.first.y,y=(this.currentX-V)/this.graph.view.scale,ia=(this.currentY-fa)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(R){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();
-try{var oa=this.graph.getCellsBeyond(V,fa,this.graph.getDefaultParent(),!0,!0);for(R=0;R<oa.length;R++)if(this.graph.isCellMovable(oa[R])){var ta=this.graph.view.getState(oa[R]),ra=this.graph.getCellGeometry(oa[R]);null!=ta&&null!=ra&&(ra=ra.clone(),ra.translate(y,ia),this.graph.model.setGeometry(oa[R],ra))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,
-O){if(!O.isConsumed()&&null!=this.first){var R=mxUtils.getScrollOrigin(this.graph.container);y=mxUtils.getOffset(this.graph.container);R.x-=y.x;R.y-=y.y;y=O.getX()+R.x;R=O.getY()+R.y;var V=this.first.x-y,fa=this.first.y-R,ia=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ia||Math.abs(fa)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,R),this.isSpaceEvent(O)?(y=this.x+this.width,R=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||
-(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=R-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
+mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var Q=
+null!=this.div&&"none"!=this.div.style.display,V=null,ha=null,ja=y=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(V=this.first.x,ha=this.first.y,y=(this.currentX-V)/this.graph.view.scale,ja=(this.currentY-ha)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(Q){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();
+try{var oa=this.graph.getCellsBeyond(V,ha,this.graph.getDefaultParent(),!0,!0);for(Q=0;Q<oa.length;Q++)if(this.graph.isCellMovable(oa[Q])){var ta=this.graph.view.getState(oa[Q]),ra=this.graph.getCellGeometry(oa[Q]);null!=ta&&null!=ra&&(ra=ra.clone(),ra.translate(y,ja),this.graph.model.setGeometry(oa[Q],ra))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(y,
+O){if(!O.isConsumed()&&null!=this.first){var Q=mxUtils.getScrollOrigin(this.graph.container);y=mxUtils.getOffset(this.graph.container);Q.x-=y.x;Q.y-=y.y;y=O.getX()+Q.x;Q=O.getY()+Q.y;var V=this.first.x-y,ha=this.first.y-Q,ja=this.graph.tolerance;if(null!=this.div||Math.abs(V)>ja||Math.abs(ha)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,Q),this.isSpaceEvent(O)?(y=this.x+this.width,Q=this.y+this.height,V=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||
+(this.width=this.graph.snap(this.width/V)*V,this.height=this.graph.snap(this.height/V)*V,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=Q-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=
this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):
-(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var ka=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);ka.apply(this,arguments)};var va=(new Date).getTime(),ua=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
-function(y,O,R,V){qa.apply(this,arguments);R!=this.currentTerminalState?(va=(new Date).getTime(),ua=0):ua=(new Date).getTime()-va;this.currentTerminalState=R};var Ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<ua||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(y,O,R){O=null!=y&&0==y;var V=this.state.getVisibleTerminalState(O);y=null!=y&&null!=this.state.absolutePoints&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,V,O):null;R=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?R?this.endFixedHandleImage:this.fixedHandleImage:
-null!=y&&null!=V?R?this.endTerminalHandleImage:this.terminalHandleImage:R?this.endHandleImage:this.handleImage;if(null!=R)return R=new mxImageShape(new mxRectangle(0,0,R.width,R.height),R.src),R.preserveImageAspect=!1,R;R=mxConstants.HANDLE_SIZE;this.preferHtml&&--R;return new mxRectangleShape(new mxRectangle(0,0,R,R),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ya=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,R,V){V=O==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return ya.apply(this,arguments)};var La=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),R=O.getParent(y[0]),V=this.graph.getCellGeometry(y[0]);if(O.isEdge(R)&&null!=V&&V.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return La.apply(this,
-arguments)};var za=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var y=za.apply(this,arguments),O=[],R=0;R<y.length;R++)"1"!=mxUtils.getValue(y[R].style,"part","0")&&O.push(y[R]);return O};var Ea=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),R=O.getParent(y.cell),V=this.graph.getCellGeometry(y.cell);return O.isEdge(R)&&null!=V&&V.relative&&2>y.width&&2>y.height&&null!=
-y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):Ea.apply(this,arguments)};var pa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var R=this.graph.getModel(),V=R.getParent(this.state.cell),fa=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!R.isEdge(V)||null==fa||!fa.relative||null==this.state||
+(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var la=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);la.apply(this,arguments)};var va=(new Date).getTime(),ua=0,qa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=
+function(y,O,Q,V){qa.apply(this,arguments);Q!=this.currentTerminalState?(va=(new Date).getTime(),ua=0):ua=(new Date).getTime()-va;this.currentTerminalState=Q};var Ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<ua||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ba.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(y,O,Q){O=null!=y&&0==y;var V=this.state.getVisibleTerminalState(O);y=null!=y&&null!=this.state.absolutePoints&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,V,O):null;Q=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?Q?this.endFixedHandleImage:this.fixedHandleImage:
+null!=y&&null!=V?Q?this.endTerminalHandleImage:this.terminalHandleImage:Q?this.endHandleImage:this.handleImage;if(null!=Q)return Q=new mxImageShape(new mxRectangle(0,0,Q.width,Q.height),Q.src),Q.preserveImageAspect=!1,Q;Q=mxConstants.HANDLE_SIZE;this.preferHtml&&--Q;return new mxRectangleShape(new mxRectangle(0,0,Q,Q),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ya=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,O,Q,V){V=O==mxEvent.ROTATION_HANDLE?
+HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:V;return ya.apply(this,arguments)};var La=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),Q=O.getParent(y[0]),V=this.graph.getCellGeometry(y[0]);if(O.isEdge(Q)&&null!=V&&V.relative&&(O=this.graph.view.getState(y[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return La.apply(this,
+arguments)};var Aa=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var y=Aa.apply(this,arguments),O=[],Q=0;Q<y.length;Q++)"1"!=mxUtils.getValue(y[Q].style,"part","0")&&O.push(y[Q]);return O};var Ea=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),Q=O.getParent(y.cell),V=this.graph.getCellGeometry(y.cell);return O.isEdge(Q)&&null!=V&&V.relative&&2>y.width&&2>y.height&&null!=
+y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||y.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):Ea.apply(this,arguments)};var pa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,O){var Q=this.graph.getModel(),V=Q.getParent(this.state.cell),ha=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!Q.isEdge(V)||null==ha||!ha.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&pa.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&O==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
-y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(y,O){Aa.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
-this.linkHint=null);else if(null!=y||null!=O&&0<O.length){var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("editLink"));R.setAttribute("width","14");R.setAttribute("height","14");R.style.paddingLeft="8px";R.style.marginLeft="auto";R.style.marginBottom="-1px";R.style.cursor="pointer";var V=R.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y){var fa=document.createElement("div");
-fa.style.display="flex";fa.style.alignItems="center";fa.appendChild(this.graph.createLinkForHint(y,null,this.state.cell));this.linkHint.appendChild(fa);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ia=R.cloneNode(!0);fa.appendChild(ia);mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ta){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ta)}));var oa=V.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener(oa,
-"click",mxUtils.bind(this,function(ta){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ta)}))}}if(null!=O)for(fa=0;fa<O.length;fa++)mxUtils.bind(this,function(ta,ra){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=y||0<ra?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(ta.getAttribute("href"),mxUtils.getTextContent(ta),this.state.cell));var Da=R.cloneNode(!0);xa.appendChild(Da);var Ia=mxUtils.bind(this,function(Ya){var Za=
+y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,O){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var za=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(y,O){za.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=y||null!=O&&0<O.length){var Q=document.createElement("img");Q.className="geAdaptiveAsset";Q.setAttribute("src",Editor.editImage);Q.setAttribute("title",mxResources.get("editLink"));Q.setAttribute("width","14");Q.setAttribute("height","14");Q.style.paddingLeft="8px";Q.style.marginLeft="auto";Q.style.marginBottom="-1px";Q.style.cursor="pointer";var V=Q.cloneNode(!0);V.setAttribute("src",Editor.trashImage);V.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+V.style.paddingLeft="4px";V.style.marginLeft="0";null==this.linkHint&&(this.linkHint=b(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y){var ha=document.createElement("div");
+ha.style.display="flex";ha.style.alignItems="center";ha.appendChild(this.graph.createLinkForHint(y,null,this.state.cell));this.linkHint.appendChild(ha);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var ja=Q.cloneNode(!0);ha.appendChild(ja);mxEvent.addListener(ja,"click",mxUtils.bind(this,function(ta){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ta)}));var oa=V.cloneNode(!0);ha.appendChild(oa);mxEvent.addListener(oa,
+"click",mxUtils.bind(this,function(ta){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ta)}))}}if(null!=O)for(ha=0;ha<O.length;ha++)mxUtils.bind(this,function(ta,ra){var xa=document.createElement("div");xa.style.display="flex";xa.style.alignItems="center";xa.style.marginTop=null!=y||0<ra?"6px":"0px";xa.appendChild(this.graph.createLinkForHint(ta.getAttribute("href"),mxUtils.getTextContent(ta),this.state.cell));var Da=Q.cloneNode(!0);xa.appendChild(Da);var Ia=mxUtils.bind(this,function(Ya){var Za=
document.createElement("div");Za.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var $a=Za.getElementsByTagName("a")[ra];if(null!=$a){if(null==Ya||""==Ya){for(Ya=$a.cloneNode(!0).firstChild;null!=Ya;)$a.parentNode.insertBefore(Ya.cloneNode(!0),$a),Ya=Ya.nextSibling;$a.parentNode.removeChild($a)}else $a.setAttribute("href",Ya);this.graph.labelChanged(this.state.cell,Za.innerHTML)}});mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){this.graph.showLinkDialog(ta.getAttribute("href")||
-"",mxResources.get("ok"),Ia);mxEvent.consume(Ya)}));Da=V.cloneNode(!0);xa.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Ia();mxEvent.consume(Ya)}));this.linkHint.appendChild(xa)})(O[fa],fa)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ta){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var wa=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var y=wa.apply(this,
+"",mxResources.get("ok"),Ia);mxEvent.consume(Ya)}));Da=V.cloneNode(!0);xa.appendChild(Da);mxEvent.addListener(Da,"click",mxUtils.bind(this,function(Ya){Ia();mxEvent.consume(Ya)}));this.linkHint.appendChild(xa)})(O[ha],ha)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ta){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var wa=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var y=wa.apply(this,
arguments);y.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return y};var Xa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Xa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Qa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)null!=
-this.moveHandles[y]&&(this.moveHandles[y].bounds.x=Math.round(this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-this.moveHandles[y].bounds.width/2),this.moveHandles[y].bounds.y=Math.round(this.moveHandles[y].rowState.y+(this.moveHandles[y].rowState.height-this.moveHandles[y].bounds.height)/2),this.moveHandles[y].redraw());if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,R=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=
-this.state.y-R+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
-mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Qa.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),R=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=R?mxUtils.getBoundingBox(this.state,
-this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==R&&(R=this.state),R=R.y+R.height,null!=O&&(R=Math.max(R,O.y+O.height)),this.linkHint.style.left=y.x+y.width/2+"px",this.linkHint.style.top=Math.round(R+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);
+this.moveHandles[y]&&(this.moveHandles[y].bounds.x=Math.round(this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-this.moveHandles[y].bounds.width/2),this.moveHandles[y].bounds.y=Math.round(this.moveHandles[y].rowState.y+(this.moveHandles[y].rowState.height-this.moveHandles[y].bounds.height)/2),this.moveHandles[y].redraw());if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,Q=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=
+this.state.y-Q+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*y;O[2].redraw();O[3].bounds.x=O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
+mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Qa.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),Q=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=Q?mxUtils.getBoundingBox(this.state,
+this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=O&&(Q=Math.max(Q,O.y+O.height)),this.linkHint.style.left=y.x+y.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ra.apply(this,arguments);
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Sa=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Sa.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=y.x+y.width/2+"px";this.linkHint.style.top=Math.round(y.y+y.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){Ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,z){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=z?z:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function n(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function K(){mxCylinder.call(this)}function c(){mxShape.call(this)}
-function f(){mxShape.call(this)}function l(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1}function t(){mxActor.call(this)}function q(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function H(){mxActor.call(this)}function N(){mxActor.call(this)}function L(){mxActor.call(this)}function J(){mxActor.call(this)}function Y(){mxActor.call(this)}function ha(){mxActor.call(this)}function ea(){mxActor.call(this)}function aa(d,p){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function W(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Q(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function B(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}
-function P(){mxShape.call(this)}function T(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function Z(){mxShape.call(this)}function ka(){mxShape.call(this)}function va(){mxShape.call(this)}function ua(){mxShape.call(this)}function qa(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function ya(){mxCylinder.call(this)}function La(){mxRectangleShape.call(this)}function za(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Aa(){mxActor.call(this)}function wa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Ma(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxActor.call(this)}function V(){mxActor.call(this)}function fa(){mxEllipse.call(this)}
-function ia(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ta(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function $a(){mxActor.call(this)}function Pa(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function jb(d,p,z,u,x,C,E,da,M,sa){E+=M;var ma=u.clone();u.x-=x*(2*E+M);u.y-=C*(2*E+M);x*=E+M;C*=E+M;return function(){d.ellipse(ma.x-x-E,ma.y-C-E,2*E,2*E);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var z=this.line[p];null!=z&&(z=new mxRectangle(z.x,z.y,this.strokewidth,this.strokewidth),null==
+function(){Ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ma=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ma.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,p,z){mxShape.call(this);this.line=d;this.stroke=p;this.strokewidth=null!=z?z:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function v(){mxConnector.call(this)}function n(){mxCylinder.call(this)}function A(){mxActor.call(this)}function G(){mxCylinder.call(this)}function R(){mxCylinder.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function c(){mxShape.call(this)}
+function f(){mxShape.call(this)}function l(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1}function t(){mxActor.call(this)}function q(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function H(){mxActor.call(this)}function N(){mxActor.call(this)}function L(){mxActor.call(this)}function I(){mxActor.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(d,p){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=p;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ba.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ba.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ba.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ba.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ba.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ba.prototype.arcTo)}function na(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function ca(){mxActor.call(this)}function ka(){mxActor.call(this)}function da(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function S(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function B(){mxShape.call(this)}function K(){mxShape.call(this)}function T(){mxEllipse.call(this)}
+function P(){mxShape.call(this)}function U(){mxShape.call(this)}function Y(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function la(){mxShape.call(this)}function va(){mxShape.call(this)}function ua(){mxShape.call(this)}function qa(){mxShape.call(this)}function Ba(){mxCylinder.call(this)}function ya(){mxCylinder.call(this)}function La(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Ea(){mxDoubleEllipse.call(this)}function pa(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function za(){mxActor.call(this)}function wa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Qa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Sa(){mxActor.call(this)}function Ha(){mxActor.call(this)}function Ma(){mxActor.call(this)}function y(){mxActor.call(this)}function O(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ha(){mxEllipse.call(this)}
+function ja(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ta(){mxRhombus.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ia(){mxEllipse.call(this)}function Ya(){mxActor.call(this)}function Za(){mxActor.call(this)}function $a(){mxActor.call(this)}function Pa(d,p,z,u){mxShape.call(this);this.bounds=d;this.fill=p;this.stroke=z;this.strokewidth=null!=u?u:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function jb(d,p,z,u,x,C,E,ea,M,sa){E+=M;var ma=u.clone();u.x-=x*(2*E+M);u.y-=C*(2*E+M);x*=E+M;C*=E+M;return function(){d.ellipse(ma.x-x-E,ma.y-C-E,2*E,2*E);sa?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var p=0;p<this.line.length;p++){var z=this.line[p];null!=z&&(z=new mxRectangle(z.x,z.y,this.strokewidth,this.strokewidth),null==
d?d=z:d.add(z))}this.bounds=null!=d?d:new mxRectangle};b.prototype.paintVertexShape=function(d,p,z,u,x){this.paintTableLine(d,this.line,0,0)};b.prototype.paintTableLine=function(d,p,z,u){if(null!=p){var x=null;d.begin();for(var C=0;C<p.length;C++){var E=p[C];null!=E&&(null==x?d.moveTo(E.x+z,E.y+u):null!=x&&d.lineTo(E.x+z,E.y+u));x=E}d.end();d.stroke()}};b.prototype.intersectsRectangle=function(d){var p=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var z=null,
u=0;u<this.line.length&&!p;u++){var x=this.line[u];null!=x&&null!=z&&(p=mxUtils.rectangleIntersectsSegment(d,z,x));z=x}return p};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(d){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(d,p,z,u,x){var C=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,E=this.isHorizontal(),da=this.getTitleSize();0==da||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-z));C||this.outline||!(E&&da<x||!E&&da<u)||this.paintForeground(d,p,z,u,x)};e.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.state){var C=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var da=C;C=E;E=da}d.rotate(-this.getShapeRotation(),
+!1,E=this.isHorizontal(),ea=this.getTitleSize();0==ea||this.outline?Da.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),d.translate(-p,-z));C||this.outline||!(E&&ea<x||!E&&ea<u)||this.paintForeground(d,p,z,u,x)};e.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.state){var C=this.flipH,E=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ea=C;C=E;E=ea}d.rotate(-this.getShapeRotation(),
C,E,p+u/2,z+x/2);s=this.scale;p=this.bounds.x/s;z=this.bounds.y/s;u=this.bounds.width/s;x=this.bounds.height/s;this.paintTableForeground(d,p,z,u,x)}};e.prototype.paintTableForeground=function(d,p,z,u,x){u=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(x=0;x<u.length;x++)b.prototype.paintTableLine(d,u[x],p,z)};e.prototype.configurePointerEvents=function(d){0==this.getTitleSize()?
d.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(g,e);g.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.darkOpacity=0;m.prototype.darkOpacity2=0;m.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),da=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(C,x);d.lineTo(0,x-C);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-C,0),d.lineTo(u,C),
-d.lineTo(C,C),d.close(),d.fill()),0!=da&&(d.setFillAlpha(Math.abs(da)),d.setFillColor(0>da?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,x),d.lineTo(0,x-C),d.close(),d.fill()),d.begin(),d.moveTo(C,x),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(u,C),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ea=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(C,x);d.lineTo(0,x-C);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(u-C,0),d.lineTo(u,C),
+d.lineTo(C,C),d.close(),d.fill()),0!=ea&&(d.setFillAlpha(Math.abs(ea)),d.setFillColor(0>ea?"#FFFFFF":"#000000"),d.begin(),d.moveTo(0,0),d.lineTo(C,C),d.lineTo(C,x),d.lineTo(0,x-C),d.close(),d.fill()),d.begin(),d.moveTo(C,x),d.lineTo(C,C),d.lineTo(0,0),d.moveTo(C,C),d.lineTo(u,C),d.end(),d.stroke())};m.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)?(d=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(d,d,0,0)):null};mxCellRenderer.registerShape("cube",
m);var cb=Math.tan(mxUtils.toRadians(30)),ab=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(v,mxConnector);v.prototype.paintEdgeShape=function(d,p){var z=this.createMarker(d,p,!0),u=this.createMarker(d,p,!1);d.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&d.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);d.setShadow(!1);d.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);d.setStrokeColor(this.stroke);d.setFillColor(this.stroke);d.setDashed(!1);null!=z&&z();null!=u&&u()};mxCellRenderer.registerShape("wire",v);mxUtils.extend(n,mxCylinder);n.prototype.size=6;n.prototype.paintVertexShape=function(d,p,z,u,x){d.setFillColor(this.stroke);var C=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;d.ellipse(p+.5*(u-C),z+.5*(x-C),C,C);d.fill();d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};mxCellRenderer.registerShape("waypoint",
n);mxUtils.extend(A,mxActor);A.prototype.size=20;A.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/cb);d.translate((u-p)/2,(x-p)/2+p/4);d.moveTo(0,.25*p);d.lineTo(.5*p,p*ab);d.lineTo(p,.25*p);d.lineTo(.5*p,(.5-ab)*p);d.lineTo(0,.25*p);d.close();d.end()};mxCellRenderer.registerShape("isoRectangle",A);mxUtils.extend(G,mxCylinder);G.prototype.size=20;G.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(u,x/(.5+cb));C?(d.moveTo(0,.25*p),d.lineTo(.5*p,(.5-ab)*p),d.lineTo(p,.25*p),d.moveTo(.5*
-p,(.5-ab)*p),d.lineTo(.5*p,(1-ab)*p)):(d.translate((u-p)/2,(x-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*ab),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-ab)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
-p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,-p);C||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,x-p),d.curveTo(u,x+p/3,0,x+p/3,0,x-p),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity=
+p,(.5-ab)*p),d.lineTo(.5*p,(1-ab)*p)):(d.translate((u-p)/2,(x-p)/2),d.moveTo(0,.25*p),d.lineTo(.5*p,p*ab),d.lineTo(p,.25*p),d.lineTo(p,.75*p),d.lineTo(.5*p,(1-ab)*p),d.lineTo(0,.75*p),d.close());d.end()};mxCellRenderer.registerShape("isoCube",G);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(d,p,z,u,x,C){p=Math.min(x/2,Math.round(x/8)+this.strokewidth-1);if(C&&null!=this.fill||!C&&null==this.fill)d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,
+p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,p/2),d.moveTo(0,p),d.curveTo(0,2*p,u,2*p,u,p),C||(d.stroke(),d.begin()),d.translate(0,-p);C||(d.moveTo(0,p),d.curveTo(0,-p/3,u,-p/3,u,p),d.lineTo(u,x-p),d.curveTo(u,x+p/3,0,x+p/3,0,x-p),d.close())};R.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",R);mxUtils.extend(F,mxCylinder);F.prototype.size=30;F.prototype.darkOpacity=
0;F.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(u,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(p,z);d.begin();d.moveTo(0,0);d.lineTo(u-C,0);d.lineTo(u,C);d.lineTo(u,x);d.lineTo(0,x);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),
-d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.close(),d.fill()),d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(K,F);mxCellRenderer.registerShape("note2",K);K.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
+d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.close(),d.fill()),d.begin(),d.moveTo(u-C,0),d.lineTo(u-C,C),d.lineTo(u,C),d.end(),d.stroke())};mxCellRenderer.registerShape("note",F);mxUtils.extend(J,F);mxCellRenderer.registerShape("note2",J);J.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,0)}return null};mxUtils.extend(c,mxShape);c.prototype.isoAngle=
15;c.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;C=Math.min(u*Math.tan(C),.5*x);d.translate(p,z);d.begin();d.moveTo(.5*u,0);d.lineTo(u,C);d.lineTo(u,x-C);d.lineTo(.5*u,x);d.lineTo(0,x-C);d.lineTo(0,C);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,C);d.lineTo(.5*u,2*C);d.lineTo(u,C);d.moveTo(.5*u,2*C);d.lineTo(.5*u,x);d.stroke()};mxCellRenderer.registerShape("isoCube2",
c);mxUtils.extend(f,mxShape);f.prototype.size=15;f.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*
u,C,0,0,1,0,C),d.stroke())};mxCellRenderer.registerShape("cylinder2",f);mxUtils.extend(l,mxCylinder);l.prototype.size=15;l.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.max(0,Math.min(.5*x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(p,z);0==C?(d.rect(0,0,u,x),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,C),d.arcTo(.5*u,C,0,0,1,.5*u,0),d.arcTo(.5*u,C,0,0,1,u,C)):(d.moveTo(0,0),d.arcTo(.5*u,C,0,0,0,.5*u,C),d.arcTo(.5*u,C,
0,0,0,u,0)),d.lineTo(u,x-C),d.arcTo(.5*u,C,0,0,1,.5*u,x),d.arcTo(.5*u,C,0,0,1,0,x-C),d.close(),d.fillAndStroke(),d.setShadow(!1),E&&(d.begin(),d.moveTo(u,C),d.arcTo(.5*u,C,0,0,1,.5*u,2*C),d.arcTo(.5*u,C,0,0,1,0,C),d.stroke()))};mxCellRenderer.registerShape("cylinder3",l);mxUtils.extend(t,mxActor);t.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u/2,.5*x,u,0);d.quadTo(.5*u,x/2,u,x);d.quadTo(u/2,.5*x,0,x);d.quadTo(.5*u,x/2,0,0);d.end()};mxCellRenderer.registerShape("switch",t);mxUtils.extend(q,
mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.arcSize=.1;q.prototype.isRoundable=function(){return!0};q.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var C=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),E=mxUtils.getValue(this.style,
-"rounded",!1),da=mxUtils.getValue(this.style,"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));da||(M*=Math.min(u,x));M=Math.min(M,.5*u,.5*(x-z));p=Math.max(p,M);p=Math.min(u-M,p);E||(M=0);d.begin();"left"==C?(d.moveTo(Math.max(M,0),z),d.lineTo(Math.max(M,0),0),d.lineTo(p,0),d.lineTo(p,z)):(d.moveTo(u-p,z),d.lineTo(u-p,0),d.lineTo(u-Math.max(M,0),0),d.lineTo(u-Math.max(M,0),z));E?(d.moveTo(0,M+z),d.arcTo(M,M,0,0,1,M,z),d.lineTo(u-M,z),d.arcTo(M,M,0,0,1,u,M+z),
+"rounded",!1),ea=mxUtils.getValue(this.style,"absoluteArcSize",!1),M=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ea||(M*=Math.min(u,x));M=Math.min(M,.5*u,.5*(x-z));p=Math.max(p,M);p=Math.min(u-M,p);E||(M=0);d.begin();"left"==C?(d.moveTo(Math.max(M,0),z),d.lineTo(Math.max(M,0),0),d.lineTo(p,0),d.lineTo(p,z)):(d.moveTo(u-p,z),d.lineTo(u-p,0),d.lineTo(u-Math.max(M,0),0),d.lineTo(u-Math.max(M,0),z));E?(d.moveTo(0,M+z),d.arcTo(M,M,0,0,1,M,z),d.lineTo(u-M,z),d.arcTo(M,M,0,0,1,u,M+z),
d.lineTo(u,x-M),d.arcTo(M,M,0,0,1,u-M,x),d.lineTo(M,x),d.arcTo(M,M,0,0,1,0,x-M)):(d.moveTo(0,z),d.lineTo(u,z),d.lineTo(u,x),d.lineTo(0,x));d.close();d.fillAndStroke();d.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(d.begin(),d.moveTo(u-30,z+20),d.lineTo(u-20,z+10),d.lineTo(u-10,z+20),d.close(),d.stroke())};mxCellRenderer.registerShape("folder",q);q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};mxUtils.extend(D,mxCylinder);D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);var C=mxUtils.getValue(this.style,"rounded",!1),E=mxUtils.getValue(this.style,"absoluteArcSize",!1);p=parseFloat(mxUtils.getValue(this.style,"arcSize",
@@ -2772,301 +2771,301 @@ mxUtils.getValue(this.style,"size",this.size),z=d.width,u=d.height;if(null==this
x?u*Math.max(0,Math.min(1,x)):db.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*p),0,0)}return null};l.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(p/=2);return new mxRectangle(0,Math.min(d.height*
this.scale,2*p*this.scale),0,Math.max(0,.3*p*this.scale))}return null};q.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var z=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;p=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var u=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1),C=parseFloat(mxUtils.getValue(this.style,
"arcSize",this.arcSize));x||(C*=Math.min(d.width,d.height));C=Math.min(C,.5*d.width,.5*(d.height-p));u||(C=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(C,0,Math.min(d.width,d.width-z),Math.min(d.height,d.height-p)):new mxRectangle(Math.min(d.width,d.width-z),0,C,Math.min(d.height,d.height-p))}return new mxRectangle(0,Math.min(d.height,p),0,0)}return null};D.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=
-mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};K.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,p,z,u,x){p=
-"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("parallelogram",J);mxUtils.extend(Y,mxActor);Y.prototype.size=
-.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
-x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(ha,mxActor);ha.prototype.size=.5;ha.prototype.redrawPath=function(d,p,z,u,x){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,x/2),new mxPoint(0,x/2),new mxPoint(p,x/2),new mxPoint(p,x),new mxPoint(u,x)],this.isRounded,
-z,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ha);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(d,p,z,u,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,x);d.fillAndStroke();d.rect(2*p,0,p,x);d.fillAndStroke();d.rect(4*p,0,p,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);aa.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};aa.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)};aa.prototype.quadTo=function(d,p,z,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=u};aa.prototype.curveTo=function(d,p,z,u,x,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=C};aa.prototype.arcTo=function(d,p,z,u,x,C,E){this.originalArcTo.apply(this.canvas,arguments);
-this.lastX=C;this.lastY=E};aa.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var z=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),x=Math.abs(p-this.lastY),C=Math.sqrt(u*u+x*x);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var E=Math.round(C/10),da=this.defaultVariation;5>E&&(E=5,da/=3);var M=z(d-this.lastX)*u/E;z=z(p-this.lastY)*x/E;u/=C;x/=C;for(C=0;C<E;C++){var sa=(Math.random()-
-.5)*da;this.originalLineTo.call(this.canvas,M*C+this.lastX-sa*x,z*C+this.lastY-sa*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};aa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var lb=mxShape.prototype.beforePaint;
-mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){kb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new aa(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
+mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};J.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var p=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,p*this.scale),0,Math.max(0,p*this.scale))}return null};mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,p,z,u,x){p=
+"0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u,0),new mxPoint(u-p,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("parallelogram",I);mxUtils.extend(Z,mxActor);Z.prototype.size=
+.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,
+x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.5;ia.prototype.redrawPath=function(d,p,z,u,x){d.setFillColor(null);p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(u,0),new mxPoint(p,0),new mxPoint(p,x/2),new mxPoint(0,x/2),new mxPoint(p,x/2),new mxPoint(p,x),new mxPoint(u,x)],this.isRounded,
+z,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ia);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(d,p,z,u,x){d.setStrokeWidth(1);d.setFillColor(this.stroke);p=u/5;d.rect(0,0,p,x);d.fillAndStroke();d.rect(2*p,0,p,x);d.fillAndStroke();d.rect(4*p,0,p,x);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",fa);ba.prototype.moveTo=function(d,p){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;this.firstX=d;this.firstY=p};ba.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)};ba.prototype.quadTo=function(d,p,z,u){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=u};ba.prototype.curveTo=function(d,p,z,u,x,C){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=C};ba.prototype.arcTo=function(d,p,z,u,x,C,E){this.originalArcTo.apply(this.canvas,arguments);
+this.lastX=C;this.lastY=E};ba.prototype.lineTo=function(d,p){if(null!=this.lastX&&null!=this.lastY){var z=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},u=Math.abs(d-this.lastX),x=Math.abs(p-this.lastY),C=Math.sqrt(u*u+x*x);if(2>C){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p;return}var E=Math.round(C/10),ea=this.defaultVariation;5>E&&(E=5,ea/=3);var M=z(d-this.lastX)*u/E;z=z(p-this.lastY)*x/E;u/=C;x/=C;for(C=0;C<E;C++){var sa=(Math.random()-
+.5)*ea;this.originalLineTo.call(this.canvas,M*C+this.lastX-sa*x,z*C+this.lastY-sa*u)}this.originalLineTo.call(this.canvas,d,p)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=p};ba.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var lb=mxShape.prototype.beforePaint;
+mxShape.prototype.beforePaint=function(d){lb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(d){kb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ba(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==
this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var pb=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"))&&pb.apply(this,arguments)};var fb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,p,z,u,x){if(null==d.handJiggle||
-d.handJiggle.constructor!=aa)fb.apply(this,arguments);else{var C=!0;null!=this.style&&(C="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(C||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)C||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?C=Math.min(u/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+d.handJiggle.constructor!=ba)fb.apply(this,arguments);else{var C=!0;null!=this.style&&(C="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(C||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)C||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?C=Math.min(u/2,Math.min(x/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2)):(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,C=Math.min(u*C,x*C)),d.moveTo(p+C,z),d.lineTo(p+u-C,z),d.quadTo(p+u,z,p+u,z+C),d.lineTo(p+u,z+x-C),d.quadTo(p+u,z+x,p+u-C,z+x),d.lineTo(p+C,z+x),d.quadTo(p,z+x,p,z+x-C),d.lineTo(p,z+C),d.quadTo(p,z,p+C,z)):(d.moveTo(p,z),d.lineTo(p+u,z),d.lineTo(p+u,z+x),d.lineTo(p,z+x),d.lineTo(p,z)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(na,mxRectangleShape);na.prototype.size=
.1;na.prototype.fixedSize=!1;na.prototype.isHtmlAllowed=function(){return!1};na.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var p=d.width,z=d.height;d=new mxRectangle(d.x,d.y,p,z);var u=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;u=Math.max(u,Math.min(p*x,z*x))}d.x+=Math.round(u);d.width-=Math.round(2*u);return d}return d};na.prototype.paintForeground=function(d,p,z,u,x){var C=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=C?Math.max(0,Math.min(u,E)):u*Math.max(0,Math.min(1,E));this.isRounded&&(C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,
-Math.min(u*C,x*C)));E=Math.round(E);d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.moveTo(p+u-E,z);d.lineTo(p+u-E,z+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(W,mxRectangleShape);W.prototype.paintBackground=function(d,p,z,u,x){d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};W.prototype.paintForeground=function(d,p,z,u,x){};mxCellRenderer.registerShape("transparent",
-W);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(d,p,z,u,x){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));var C=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),da=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-z),new mxPoint(Math.min(u,C+da),x-z),new mxPoint(E,x),new mxPoint(Math.max(0,C),x-z),new mxPoint(0,x-z)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",
-ba);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.prototype.fixedSize=20;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,
-0),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(0,x),new mxPoint(p,x/2)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("step",ja);mxUtils.extend(ca,mxHexagon);ca.prototype.size=.25;ca.prototype.fixedSize=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*x),new mxPoint(u-p,x),new mxPoint(p,x),new mxPoint(0,.5*x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("hexagon",ca);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,p,z,u,x){var C=Math.min(u/5,x/5)+1;d.begin();d.moveTo(p+u/2,z+C);d.lineTo(p+
-u/2,z+x-C);d.moveTo(p+C,z+x/2);d.lineTo(p+u-C,z+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",la);var ob=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=
-function(d,p,z,u,x){ob.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var C=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&(d.setShadow(!1),ob.apply(this,[d,p,z,u,x]))}};mxUtils.extend(Q,mxRectangleShape);Q.prototype.isHtmlAllowed=function(){return!1};Q.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
-return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};Q.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var C=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);C=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+C]];if(null!=E){var da=this.style["symbol"+C+"Align"],
-M=this.style["symbol"+C+"VerticalAlign"],sa=this.style["symbol"+C+"Width"],ma=this.style["symbol"+C+"Height"],Wa=this.style["symbol"+C+"Spacing"]||0,gb=this.style["symbol"+C+"VSpacing"]||Wa,bb=this.style["symbol"+C+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(u+this.strokewidth,x+this.strokewidth),Wa+=bb,gb+=bb);bb=p;var Fa=z;bb=da==mxConstants.ALIGN_CENTER?bb+(u-sa)/2:da==mxConstants.ALIGN_RIGHT?bb+(u-sa-Wa):bb+Wa;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-ma)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-ma-gb):
-Fa+gb;d.save();da=new E;da.style=this.style;E.prototype.paintVertexShape.call(da,d,bb,Fa,sa,ma);d.restore()}C++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Q);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,p,z,u,x,C){C?(d.moveTo(0,0),d.lineTo(u/2,x/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(B,mxShape);B.prototype.paintBackground=
-function(d,p,z,u,x){d.translate(p,z);d.ellipse(u/4,0,u/2,x/4);d.fillAndStroke();d.begin();d.moveTo(u/2,x/4);d.lineTo(u/2,2*x/3);d.moveTo(u/2,x/3);d.lineTo(0,x/3);d.moveTo(u/2,x/3);d.lineTo(u,x/3);d.moveTo(u/2,2*x/3);d.lineTo(0,x);d.moveTo(u/2,2*x/3);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();
-d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(u/6,x/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,z+x);d.lineTo(p+7*u/8,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=
-function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(u,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,x/8,u,7*x/8);d.fillAndStroke()};T.prototype.paintForeground=
-function(d,p,z,u,x){d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(X,mxRectangleShape);X.prototype.size=40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};X.prototype.paintBackground=function(d,p,z,u,x){var C=Math.max(0,Math.min(x,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,z,u,C):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,p,z,u,C),d.restore()));C<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,z+C),d.lineTo(p+u/2,z+x),d.end(),d.stroke())};X.prototype.paintForeground=
-function(d,p,z,u,x){var C=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,z,u,Math.min(x,C))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(Z,mxShape);Z.prototype.width=60;Z.prototype.height=30;Z.prototype.corner=10;Z.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&
-0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};Z.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Z.prototype.paintBackground=function(d,p,z,u,x){var C=this.corner,E=Math.min(u,Math.max(C,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),
-da=Math.min(x,Math.max(1.5*C,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(p,z,u,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,z,u,x),d.setGradient(this.fill,this.gradient,p,z,u,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(p,
-z);d.lineTo(p+E,z);d.lineTo(p+E,z+Math.max(0,da-1.5*C));d.lineTo(p+Math.max(0,E-C),z+da);d.lineTo(p,z+da);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+E,z);d.lineTo(p+u,z);d.lineTo(p+u,z+x);d.lineTo(p,z+x);d.lineTo(p,z+da);d.stroke()};mxCellRenderer.registerShape("umlFrame",Z);mxPerimeter.CenterPerimeter=function(d,p,z,u){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=
-function(d,p,z,u){u=X.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;z.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,z.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,z,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,z,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return z.x<d.getCenterX()&&(u=-1*(u+1)),new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,z.y)));z.y<d.getCenterY()&&(u=-1*(u+1));return new mxPoint(Math.min(d.x+
-d.width,Math.max(d.x,z.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,z,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ba.prototype.size))*p.view.scale))),p.style),p,z,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,
-p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?J.prototype.fixedSize:J.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,da=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M,da+x),new mxPoint(E+
-M,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da)]):(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M,da),new mxPoint(E+M-x,da+sa),new mxPoint(E,da+sa),new mxPoint(E+x,da)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(da,d,z)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,p,z,u){var x="0"!=
-mxUtils.getValue(p.style,"fixedSize","0"),C=x?Y.prototype.fixedSize:Y.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,da=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M-x,da),new mxPoint(E+M,da+sa),new mxPoint(E,da+sa),new mxPoint(E+
-x,da)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M,da),new mxPoint(E+M-x,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,da)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da+x),new mxPoint(E+M,da),new mxPoint(E+M,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+
-M,da+x),new mxPoint(E+M,da+sa-x),new mxPoint(E,da+sa),new mxPoint(E,da)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(da,d,z)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ja.prototype.fixedSize:ja.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=
-d.x,da=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(E+M-x,da),new mxPoint(E+M,d),new mxPoint(E+M-x,da+sa),new mxPoint(E,da+sa),new mxPoint(E+x,d),new mxPoint(E,da)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,
-C)),da=[new mxPoint(E+x,da),new mxPoint(E+M,da),new mxPoint(E+M-x,d),new mxPoint(E+M,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,d),new mxPoint(E+x,da)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da+x),new mxPoint(ma,da),new mxPoint(E+M,da+x),new mxPoint(E+M,da+sa),new mxPoint(ma,da+sa-x),new mxPoint(E,da+sa),new mxPoint(E,da+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(E,da),new mxPoint(ma,da+
-x),new mxPoint(E+M,da),new mxPoint(E+M,da+sa-x),new mxPoint(ma,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(da,ma,z)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ca.prototype.fixedSize:ca.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=
-d.x,da=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),da=[new mxPoint(ma,da),new mxPoint(E+M,da+x),new mxPoint(E+M,da+sa-x),new mxPoint(ma,da+sa),new mxPoint(E,da+sa-x),new mxPoint(E,da+x),new mxPoint(ma,da)]):(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,
-Math.min(1,C)),da=[new mxPoint(E+x,da),new mxPoint(E+M-x,da),new mxPoint(E+M,d),new mxPoint(E+M-x,da+sa),new mxPoint(E+x,da+sa),new mxPoint(E,d),new mxPoint(E+x,da)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(da,ma,z)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ka,mxShape);ka.prototype.size=10;ka.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-d.translate(p,z);d.ellipse((u-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(u/2,C);d.lineTo(u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",ka);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.inset=2;va.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.begin();d.moveTo(u/2,C+E);d.lineTo(u/2,x);d.end();d.stroke();
-d.begin();d.moveTo((u-C)/2-E,C/2);d.quadTo((u-C)/2-E,C+E,u/2,C+E);d.quadTo((u+C)/2+E,C+E,(u+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",va);mxUtils.extend(ua,mxShape);ua.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ua);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;d.translate(p,z);d.ellipse(0,C,u-2*C,x-2*C);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));z=E/2;E=z+E/2;var da=Math.min(p,x-p),M=Math.min(da+2*p,x-p);C?(d.moveTo(z,da),d.lineTo(E,da),d.lineTo(E,da+p),d.lineTo(z,da+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,da+p),d.lineTo(0,da+p),d.lineTo(0,da),d.lineTo(z,da),d.close());d.end()};mxCellRenderer.registerShape("module",Ba);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=
-32;ya.prototype.jettyHeight=12;ya.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var da=.3*x-p/2,M=.7*x-p/2;C?(d.moveTo(z,da),d.lineTo(E,da),d.lineTo(E,da+p),d.lineTo(z,da+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,
-M),d.lineTo(z,da+p),d.lineTo(0,da+p),d.lineTo(0,da),d.lineTo(z,da),d.close());d.end()};mxCellRenderer.registerShape("component",ya);mxUtils.extend(La,mxRectangleShape);La.prototype.paintForeground=function(d,p,z,u,x){var C=u/2,E=x/2,da=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+C,z),new mxPoint(p+u,z+E),new mxPoint(p+C,z+x),new mxPoint(p,z+E)],this.isRounded,da,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",La);mxUtils.extend(za,mxDoubleEllipse);za.prototype.outerStroke=!0;za.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.min(4,Math.min(u/5,x/5));0<u&&0<x&&(d.ellipse(p+C,z+C,u-2*C,x-2*C),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,z,u,x),d.stroke())};mxCellRenderer.registerShape("endState",za);mxUtils.extend(Ea,za);Ea.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(pa,mxArrowConnector);
-pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",pa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Aa,mxActor);Aa.prototype.size=30;Aa.prototype.isRoundable=function(){return!0};Aa.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("manualInput",Aa);mxUtils.extend(wa,mxRectangleShape);wa.prototype.dx=20;wa.prototype.dy=20;wa.prototype.isHtmlAllowed=function(){return!1};wa.prototype.paintForeground=function(d,p,z,u,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var C=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;C=Math.max(C,Math.min(u*E,x*E))}E=Math.max(C,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));C=Math.max(C,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,z+C);d.lineTo(p+u,z+C);d.end();d.stroke();d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",wa);
-mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.isRoundable=function(){return!0};Xa.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,
-0),new mxPoint(u,z),new mxPoint(p,z),new mxPoint(p,x),new mxPoint(0,x)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(u,0);d.lineTo(u,x);d.end();d.moveTo(0,x/2);d.lineTo(u,x/2);d.end()};mxCellRenderer.registerShape("crossbar",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=
-function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint((u+p)/2,z),new mxPoint((u+p)/2,x),new mxPoint((u-p)/2,x),new mxPoint((u-p)/2,z),new mxPoint(0,
-z)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("tee",Ra);mxUtils.extend(Sa,mxActor);Sa.prototype.arrowWidth=.3;Sa.prototype.arrowSize=.2;Sa.prototype.isRoundable=function(){return!0};Sa.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(0,C)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Sa);mxUtils.extend(Ha,mxActor);Ha.prototype.isRoundable=function(){return!0};Ha.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(p,0),new mxPoint(p,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(p,C),new mxPoint(p,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",Ha);mxUtils.extend(Ma,mxActor);Ma.prototype.size=
-.1;Ma.prototype.fixedSize=20;Ma.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,x/2,u,x);d.lineTo(p,x);d.quadTo(p-2*p,x/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ma);mxUtils.extend(y,mxActor);y.prototype.redrawPath=
-function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.quadTo(u/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(R,mxActor);R.prototype.size=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,.8*p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("loopLimit",R);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-p),new mxPoint(u/2,x),new mxPoint(0,x-p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/2,z+x);d.lineTo(p+u,z+x);d.end();d.stroke()};
-mxCellRenderer.registerShape("tapeData",fa);mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,z);d.lineTo(p+u/2,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ia);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,z+.145*x);d.lineTo(p+.855*u,z+.855*x);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,z+.145*x);d.lineTo(p+.145*u,z+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(d,p,z,u,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",
-ta);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,z,u,x){d.begin();d.moveTo(p,z);d.lineTo(p+u,z);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,z+x);d.lineTo(p+u,z+x);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,p,z,u,x){var C=d.state.strokeWidth/2,E=10+2*C,da=z+x-E/2;d.begin();d.moveTo(p,z);d.lineTo(p,z+x);d.moveTo(p+C,da);d.lineTo(p+
-C+E,da-E/2);d.moveTo(p+C,da);d.lineTo(p+C+E,da+E/2);d.moveTo(p+C,da);d.lineTo(p+u-C,da);d.moveTo(p+u,z);d.lineTo(p+u,z+x);d.moveTo(p+u-C,da);d.lineTo(p+u-E-C,da-E/2);d.moveTo(p+u-C,da);d.lineTo(p+u-E-C,da+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(d,p,z,u,x){this.outline||d.setStrokeColor(null);if(null!=this.style){var C=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;
-"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var da="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||da||sa||ma||M?(d.rect(p,z,u,x),d.fill(),d.pointerEvents=C,d.setStrokeColor(this.stroke),d.setLineCap("square"),d.begin(),d.moveTo(p,z),this.outline||da?d.lineTo(p+u,z):d.moveTo(p+
-u,z),this.outline||sa?d.lineTo(p+u,z+x):d.moveTo(p+u,z+x),this.outline||ma?d.lineTo(p,z+x):d.moveTo(p,z+x),(this.outline||M)&&d.lineTo(p,z),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,z),d.lineTo(p+
-u/2,z+x)):(d.moveTo(p,z+x/2),d.lineTo(p+u,z+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ia);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,u);var C=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));p=(x-C)/2;z=p+C;var E=(u-C)/2;C=E+C;d.moveTo(0,p);d.lineTo(E,p);d.lineTo(E,0);d.lineTo(C,0);d.lineTo(C,p);d.lineTo(u,p);d.lineTo(u,z);d.lineTo(C,z);d.lineTo(C,x);d.lineTo(E,x);d.lineTo(E,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend($a,mxActor);$a.prototype.size=.25;$a.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);z=Math.min(u-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,x/2);d.lineTo(z,
-0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(z,x);d.close();d.end()};mxCellRenderer.registerShape("display",$a);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",
-type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",
-dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",
-dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",
-type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
-dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);this.strictDrawShape(d,0,0,u,x)};Pa.prototype.strictDrawShape=function(d,p,z,u,x,C){var E=C&&C.rectStyle?C.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),da=C&&C.absoluteCornerSize?C.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),M=C&&C.size?C.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=C&&C.rectOutline?
-C.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=C&&C.indent?C.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=C&&C.dashed?C.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=C&&C.dashPattern?C.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=C&&C.relIndent?C.relIndent:Math.max(0,Math.min(50,ma)),Fa=C&&C.top?C.top:mxUtils.getValue(this.style,"top",!0),Ka=C&&C.right?C.right:mxUtils.getValue(this.style,"right",
-!0),Ja=C&&C.bottom?C.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=C&&C.left?C.left:mxUtils.getValue(this.style,"left",!0),Oa=C&&C.topLeftStyle?C.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=C&&C.topRightStyle?C.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=C&&C.bottomRightStyle?C.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=C&&C.bottomLeftStyle?C.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle",
-"default"),Fb=C&&C.fillColor?C.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");C&&C.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=C&&C.strokeWidth?C.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=C&&C.fillColor2?C.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=C&&C.gradientColor2?C.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=C&&C.gradientDirection2?C.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2",
-"south"),Ib=C&&C.opacity?C.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));C=Pa.prototype;d.setDashed(Wa);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*u,M);da||(M=Jb*Math.min(u,x)/100);M=Math.min(M,.5*Math.min(u,x));da||(ma=Math.min(bb*Math.min(u,x)/100));ma=Math.min(ma,.5*Math.min(u,x)-M);(Fa||Ka||Ja||Ga)&&"frame"!=sa&&(d.begin(),Fa?C.moveNW(d,p,z,u,x,E,Oa,M,Ga):d.moveTo(0,0),Fa&&C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,
-Ta,M,Ka),Ka&&C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),Ja&&C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),Ga&&C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Wa=da=Ib,"none"==Db&&(da=0),"none"==Eb&&(Wa=0),d.setGradient(Db,Eb,0,0,u,x,Hb,da,Wa),d.begin(),Fa?C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga):d.moveTo(ma,0),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),Ga&&Ja&&C.paintSWInner(d,p,z,u,x,
-E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),Ja&&Ka&&C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),Ka&&Fa&&C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),Fa&&Ga&&C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),d.fill(),"none"==Fb&&(d.begin(),C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga),d.stroke()));Fa||Ka||Ja||!Ga?Fa||Ka||!Ja||Ga?!Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,
-x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
-p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa||!Ka||Ja||Ga?!Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),
-d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,
-p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,
-M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,
-p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,
-p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa||Ka||Ja||Ga?Fa&&!Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,
-p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,
-p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):
-Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):
-(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&!Ga?"frame"!=
-sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,
-Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,
-p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,
-E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,
-p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,
-p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&Ga&&("frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,
-z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close()),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,
-p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),
-d.fillAndStroke())):"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,
-p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,
-M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,
-ma,Ja,Ga),d.close(),d.fillAndStroke());d.begin();C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga);d.stroke()};Pa.prototype.moveNW=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,0):d.moveTo(0,da)};Pa.prototype.moveNE=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,0):d.moveTo(u-da,0)};Pa.prototype.moveSE=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,x):d.moveTo(u,x-da)};Pa.prototype.moveSW=
-function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,x):d.moveTo(da,x)};Pa.prototype.paintNW=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,da,0)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(da,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,z,u,x,C,E,da,M){"square"==E||
-"default"==E&&"square"==C||!M?d.lineTo(u,0):d.lineTo(u-da,0)};Pa.prototype.paintNE=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,u,da)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u,da);else d.lineTo(u,0)};Pa.prototype.paintRight=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,
-x):d.lineTo(u,x-da)};Pa.prototype.paintLeft=function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,0):d.lineTo(0,da)};Pa.prototype.paintSE=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,u-da,x)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-da,x);else d.lineTo(u,x)};Pa.prototype.paintBottom=
-function(d,p,z,u,x,C,E,da,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,x):d.lineTo(da,x)};Pa.prototype.paintSW=function(d,p,z,u,x,C,E,da,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(da,da,0,0,p,0,x-da)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(0,x-da);else d.lineTo(0,x)};Pa.prototype.paintNWInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==
-E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,M,.5*M+da);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,M,M+da);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(M,.5*M+da);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+da,M+da),d.lineTo(M,M+da)};Pa.prototype.paintTopInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,M):sa&&!ma?d.lineTo(M,0):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==
-C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(da+.5*M,M):d.lineTo(da+M,M):d.lineTo(0,M):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,u-da-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,u-da-M,M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-da-.5*M,M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-da-M,da+M),d.lineTo(u-da-M,M)};Pa.prototype.paintRightInner=
-function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u-M,0):sa&&!ma?d.lineTo(u,M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,da+.5*M):d.lineTo(u-M,da+M):d.lineTo(u-M,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,x):sa&&!ma?d.lineTo(0,x-M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==
-C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-da-.5*M):d.lineTo(M,x-da-M):d.lineTo(M,x):d.lineTo(0,x)};Pa.prototype.paintSEInner=function(d,p,z,u,x,C,E,da,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*M,0,0,0,u-M,x-da-.5*M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,u-M,x-da-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-M,x-da-.5*M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-da-M,x-da-M),d.lineTo(u-M,x-da-M)};Pa.prototype.paintBottomInner=
-function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u,x-M):sa&&!ma?d.lineTo(u-M,x):"square"==E||"default"==E&&"square"==C||!sa?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-da-.5*M,x-M):d.lineTo(u-da-M,x-M):d.lineTo(u,x)};Pa.prototype.paintSWInner=function(d,p,z,u,x,C,E,da,M,sa){if(!sa)d.lineTo(M,x);else if("square"==E||"default"==E&&"square"==C)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(da-.5*M,da-.5*
-M,0,0,0,da+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(da+M,da+M,0,0,1,da+M,x-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(da+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+da,x-da-M),d.lineTo(M+da,x-M)};Pa.prototype.moveSWInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==
-C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,x-da-M):d.moveTo(0,x-M)};Pa.prototype.lineSWInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,x-da-M):d.lineTo(0,x-M)};Pa.prototype.moveSEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==
-C?d.moveTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,x-da-M):d.moveTo(u-M,x)};Pa.prototype.lineSEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,x-da-.5*M):("invRound"==E||"default"==E&&"invRound"==
-C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,x-da-M):d.lineTo(u-M,x)};Pa.prototype.moveNEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.moveTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,da+M):d.moveTo(u,M)};Pa.prototype.lineNEInner=function(d,p,z,u,x,C,E,da,M,sa){sa?"square"==E||"default"==E&&"square"==
-C||sa?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,da+M):d.lineTo(u,M)};Pa.prototype.moveNWInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.moveTo(M,0):sa&&!ma?d.moveTo(0,M):"square"==E||"default"==E&&"square"==C?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,da+.5*M):("invRound"==
-E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,da+M):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,z,u,x,C,E,da,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,0):sa&&!ma?d.lineTo(0,M):"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,da+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,da+M):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,
-p,z,u,x,C,E,da,M,sa,ma,Wa,gb,bb,Fa){if("fold"==C||"fold"==E||"fold"==da||"fold"==M||"fold"==sa)("fold"==E||"default"==E&&"fold"==C)&&Wa&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==da||"default"==da&&"fold"==C)&&Wa&&gb&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==M||"default"==M&&"fold"==C)&&bb&&gb&&(d.moveTo(u-ma,x),d.lineTo(u-ma,x-ma),d.lineTo(u,x-ma)),("fold"==sa||"default"==sa&&"fold"==C)&&bb&&Fa&&(d.moveTo(0,x-ma),d.lineTo(ma,x-ma),d.lineTo(ma,x))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,
-Pa);Pa.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(d,p,z){for(var u=[],x=0;x<p.length;x++)u.push(mxUtils.clone(p[x]));x=d.state.dashed;var C=d.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[d,u,z]);3<=d.state.strokeWidth&&(u=mxUtils.getValue(this.style,"fillColor",null),null!=u&&(d.setStrokeColor(u),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,C),Na.prototype.origPaintEdgeShape.apply(this,
-[d,p,z])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),z=d.apply(this,arguments);"umlFrame"==p.style.shape&&z.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return z}}();mxMarker.addMarker("dash",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();
-d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.x+ma/2,bb=u.y+Wa/2;u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb-ma/2-Wa/2,bb-Wa/2+ma/2);d.lineTo(gb-ma/2+Wa/2,bb-Wa/2-ma/2);d.lineTo(gb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);d.lineTo(gb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,z,u,x,C,E,da,M,
-sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.moveTo(u.x-ma/2+Wa/2,u.y-Wa/2-ma/2);d.lineTo(u.x-Wa/2-3*ma/2,u.y-3*Wa/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",jb);mxMarker.addMarker("circlePlus",function(d,p,z,u,x,C,E,da,M,sa){var ma=u.clone(),Wa=jb.apply(this,arguments),gb=x*(E+2*M),bb=C*(E+2*M);return function(){Wa.apply(this,arguments);d.begin();d.moveTo(ma.x-x*M,ma.y-C*M);d.lineTo(ma.x-2*gb+
-x*M,ma.y-2*bb+C*M);d.moveTo(ma.x-gb-bb+C*M,ma.y-bb+gb-x*M);d.lineTo(ma.x+bb-gb-C*M,ma.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,z,u,x,C,E,da,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.clone();u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb.x-Wa,gb.y+ma);d.quadTo(u.x-Wa,u.y+ma,u.x,u.y);d.quadTo(u.x+Wa,u.y-ma,gb.x+Wa,gb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,z,u,x,C,E,da,M,sa){p=x*M*1.118;z=C*M*1.118;x*=E+M;C*=E+M;var ma=u.clone();ma.x-=p;ma.y-=
-z;u.x+=-x-p;u.y+=-C-z;return function(){d.begin();d.moveTo(ma.x,ma.y);da?d.lineTo(ma.x-x-C/2,ma.y-C+x/2):d.lineTo(ma.x+C/2-x,ma.y-C-x/2);d.lineTo(ma.x-x,ma.y-C);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,z,u,x,C,E,da,M,sa,ma){C*=da+sa;E*=da+sa;var Wa=x.clone();return function(){p.begin();p.moveTo(Wa.x,Wa.y);M?p.lineTo(Wa.x-C-E/d,Wa.y-E+C/d):p.lineTo(Wa.x+E/d-C,Wa.y-E-C/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var tb=
-function(d,p,z){return eb(d,["width"],p,function(u,x,C,E,da){da=d.shape.getEdgeWidth()*d.view.scale+z;return new mxPoint(E.x+x*u/4+C*da/2,E.y+C*u/4-x*da/2)},function(u,x,C,E,da,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));d.style.width=Math.round(2*u)/d.view.scale-z})},eb=function(d,p,z,u,x){return ib(d,p,function(C){var E=d.absolutePoints;if(null!=E&&0<E.length){var da=E.length-1;C=d.view.translate;var M=d.view.scale,sa=z?E[0]:E[da];E=z?E[1]:E[da-1];da=E.x-sa.x;var ma=E.y-sa.y,
-Wa=Math.sqrt(da*da+ma*ma);sa=u.call(this,Wa,da/Wa,ma/Wa,sa,E);return new mxPoint(sa.x/M-C.x,sa.y/M-C.y)}return null},function(C,E,da){var M=d.absolutePoints,sa=M.length-1;C=d.view.translate;var ma=d.view.scale,Wa=z?M[0]:M[sa];M=z?M[1]:M[sa-1];sa=M.x-Wa.x;var gb=M.y-Wa.y,bb=Math.sqrt(sa*sa+gb*gb);E.x=(E.x+C.x)*ma;E.y=(E.y+C.y)*ma;x.call(this,bb,sa/bb,gb/bb,Wa,M,E,da)})},nb=function(d,p){return function(z){return[eb(z,["startWidth"],!0,function(u,x,C,E,da){da=mxUtils.getNumber(z.style,"startWidth",
-d)*z.view.scale+p;return new mxPoint(E.x+x*u/4+C*da/2,E.y+C*u/4-x*da/2)},function(u,x,C,E,da,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));z.style.startWidth=Math.round(2*u)/z.view.scale-p})]}},mb=function(d){return function(p){return[ib(p,["arrowWidth","arrowSize"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Sa.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Sa.prototype.arrowSize)));return new mxPoint(z.x+
-(1-x)*z.width,z.y+(1-u)*z.height/2)},function(z,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(z.y+z.height/2-u.y)/z.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(z.x+z.width-u.x)/z.width))})]}},qb=function(d){return function(p){return[ib(p,["size"],function(z){var u=Math.max(0,Math.min(.5*z.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(z.x,z.y+u)},function(z,u){this.state.style.size=Math.max(0,u.y-z.y)},!0)]}},ub=function(d,p,z){return function(u){var x=
-[ib(u,["size"],function(C){var E=Math.max(0,Math.min(C.width,Math.min(C.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(C.x+E,C.y+E)},function(C,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(C.width,E.x-C.x),Math.min(C.height,E.y-C.y)))/d)},!1)];z&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},zb=function(d,p,z,u,x){z=null!=z?z:.5;return function(C){var E=[ib(C,["size"],function(da){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(da.x+Math.max(0,Math.min(.5*da.width,sa*(M?1:da.width))),da.getCenterY())},function(da,M,sa){da=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?M.x-da.x:Math.max(0,Math.min(z,(M.x-da.x)/da.width));this.state.style.size=da},!1,u)];p&&mxUtils.getValue(C.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(vb(C));return E}},Cb=function(d,p,z){d=null!=d?d:.5;return function(u){var x=[ib(u,["size"],
-function(C){var E=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,da=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?z:p)));return new mxPoint(C.x+Math.min(.75*C.width*d,da*(E?.75:.75*C.width)),C.y+C.height/4)},function(C,E){C=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-C.x:Math.max(0,Math.min(d,(E.x-C.x)/C.width*.75));this.state.style.size=C},!1,!0)];mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},xb=
-function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p}},vb=function(d,p){return ib(d,[mxConstants.STYLE_ARCSIZE],function(z){var u=null!=p?p:z.height/8;if("1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(z.x+z.width-Math.min(z.width/2,x),z.y+u)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(z.x+z.width-Math.min(Math.max(z.width/2,z.height/2),Math.min(z.width,z.height)*x),z.y+u)},function(z,u,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(z.width,2*(z.x+z.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(z.width-u.x+z.x)/Math.min(z.width,z.height))))})},ib=function(d,p,z,u,
-x,C,E){var da=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);da.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);E&&E(sa)};da.getPosition=z;da.setPosition=u;da.ignoreGrid=null!=x?x:!0;if(C){var M=da.positionChanged;da.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return da},hb={link:function(d){return[tb(d,!0,10),tb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,z=[];
-mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,da){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,
-E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<
-p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,da){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,da,
-M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||
-(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,da){u=(d.shape.getEdgeWidth()-
-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*
-u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,da){u=
-(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;da=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(da+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(da+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,da,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,da.x,da.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;
-d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-
-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return z},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(vb(d,z/2))}p.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(u){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,
-1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,x))):new mxPoint(u.x+Math.max(0,Math.min(u.width,x)),u.getCenterY())},function(u,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(u.height,x.y-u.y))):Math.round(Math.max(0,Math.min(u.width,x.x-u.x)))},!1,null,function(u){var x=d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){u=
-x.getSwimlaneDirection(d.style);var C=x.model.getParent(d.cell);C=x.model.getChildCells(C,!0);for(var E=[],da=0;da<C.length;da++)C[da]!=d.cell&&x.isSwimlane(C[da])&&x.getSwimlaneDirection(x.getCurrentCellStyle(C[da]))==u&&E.push(C[da]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,d.style[mxConstants.STYLE_STARTSIZE],E)}}));return p},label:xb(),ext:xb(),rectangle:xb(),triangle:xb(),rhombus:xb(),umlLifeline:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",X.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(p){var z=Math.max(Z.prototype.corner,Math.min(p.width,mxUtils.getValue(this.state.style,"width",Z.prototype.width))),u=Math.max(1.5*Z.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",Z.prototype.height)));return new mxPoint(p.x+z,p.y+u)},function(p,
-z){this.state.style.width=Math.round(Math.max(Z.prototype.corner,Math.min(p.width,z.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*Z.prototype.corner,Math.min(p.height,z.y-p.y)))},!1)]},process:function(d){var p=[ib(d,["size"],function(z){var u="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size));return u?new mxPoint(z.x+x,z.y+z.height/4):new mxPoint(z.x+z.width*x,z.y+z.height/4)},function(z,u){z="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*z.width,u.x-z.x)):Math.max(0,Math.min(.5,(u.x-z.x)/z.width));this.state.style.size=z},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},cross:function(d){return[ib(d,["size"],function(p){var z=Math.min(p.width,p.height);z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*z/2;return new mxPoint(p.getCenterX()-z,p.getCenterY()-z)},function(p,z){var u=Math.min(p.width,p.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-z.y)/u*2,Math.max(0,p.getCenterX()-z.x)/u*2)))})]},note:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},note2:function(d){return[ib(d,["size"],function(p){var z=
-Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},manualInput:function(d){var p=[ib(d,["size"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",Aa.prototype.size)));return new mxPoint(z.x+z.width/4,z.y+3*u/4)},function(z,
-u){this.state.style.size=Math.round(Math.max(0,Math.min(z.height,4*(u.y-z.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},dataStorage:function(d){return[ib(d,["size"],function(p){var z="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",z?Ma.prototype.fixedSize:Ma.prototype.size));return new mxPoint(p.x+p.width-u*(z?1:p.width),p.getCenterY())},function(p,z){p="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-z.x)):Math.max(0,Math.min(1,(p.x+p.width-z.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[ib(d,["size","position"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(z.x+x*z.width,z.y+z.height-
-u)},function(z,u){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(z.height,z.y+z.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["position2"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(z.x+u*z.width,z.y+z.height)},function(z,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(u.x-z.x)/z.width)))/100},!1),ib(d,["base"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position))),C=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(z.x+Math.min(z.width,x*z.width+C),z.y+z.height-u)},function(z,u){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(z.width,u.x-z.x-x*z.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},internalStorage:function(d){var p=[ib(d,["dx","dy"],function(z){var u=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,"dx",wa.prototype.dx))),x=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"dy",wa.prototype.dy)));return new mxPoint(z.x+u,z.y+x)},function(z,u){this.state.style.dx=Math.round(Math.max(0,
-Math.min(z.width,u.x-z.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(z.height,u.y-z.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"jettyWidth",Ba.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(p.x+z/2,p.y+
-2*u)},function(p,z){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Xa.prototype.dy)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,
-Math.min(p.width,z.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));return new mxPoint(p.x+(p.width+z)/2,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,z.x-p.x-p.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},singleArrow:mb(1),doubleArrow:mb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(z=p.width-z);return new mxPoint(p.x+z,p.y+u)},function(p,z){var u=Math.max(0,Math.min(p.width,z.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},document:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},tape:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z*p.height/2)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(z.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[ib(d,
-["isoAngle"],function(p){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(z),.5*p.height))},function(p,z){this.state.style.isoAngle=Math.max(0,50*(z.y-p.y)/p.height)},!0)]},cylinder2:qb(f.prototype.size),cylinder3:qb(l.prototype.size),offPageConnector:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));
-return new mxPoint(p.getCenterX(),p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(z){var u=Math.max(0,Math.min(z.width/2,z.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(z.x+u,z.y+u)},function(z,u){this.state.style.size=Math.round(100*Math.max(0,Math.min(z.height/2,z.width/2,u.x-z.x)))/100})];d=Graph.createHandle(d,
-["indent"],function(z){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(z.x+.75*z.width,z.y+u*z.height/200)},function(z,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-z.y)/z.height)))/100});p.push(d);return p},step:zb(ja.prototype.size,!0,null,!0,ja.prototype.fixedSize),hexagon:zb(ca.prototype.size,!0,.5,!0,ca.prototype.fixedSize),curlyBracket:zb(ha.prototype.size,!1),display:zb($a.prototype.size,!1),cube:ub(1,
-m.prototype.size,!1),card:ub(.5,H.prototype.size,!0),loopLimit:ub(.5,R.prototype.size,!0),trapezoid:Cb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Cb(1,J.prototype.size,J.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&
-null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=hb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=hb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);
-d=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),wb=new mxPoint(1,0),yb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(yb),Math.sin(yb));var rb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,p,z,u,x){var C=d.view;u=null!=u&&0<u.length?u[0]:null;var E=d.absolutePoints,da=E[0];E=E[E.length-1];null!=u&&(u=C.transformControlPoint(d,u));
-null==da&&null!=p&&(da=new mxPoint(p.getCenterX(),p.getCenterY()));null==E&&null!=z&&(E=new mxPoint(z.getCenterX(),z.getCenterY()));var M=sb.x,sa=sb.y,ma=wb.x,Wa=wb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=da){d=function(Fa,Ka,Ja){Fa-=bb.x;var Ga=Ka-bb.y;Ka=(Wa*Fa-ma*Ga)/(M*Wa-sa*ma);Fa=(sa*Fa-M*Ga)/(sa*ma-M*Wa);gb?(Ja&&(bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka),x.push(bb)),bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa)):(Ja&&(bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa),x.push(bb)),
-bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka));x.push(bb)};var bb=da;null==u&&(u=new mxPoint(da.x+(E.x-da.x)/2,da.y+(E.y-da.y)/2));d(u.x,u.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Bb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var z=new mxElbowEdgeHandler(d);z.snapToTerminals=!1;return z}return Bb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.tan(mxUtils.toRadians(30)),x=(.5-u)/2;u=Math.min(p,z/(.5+u));p=(p-u)/2;z=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+u*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+(1-x)*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,z+.75*u));return d};c.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*z);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ba.prototype.getConstraints=function(d,p,z){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=p*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-u)));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));return d};l.prototype.getConstraints=function(d,p,z){d=[];p=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};q.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return d};wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;
-oa.prototype.constraints=mxEllipse.prototype.constraints;Ia.prototype.constraints=mxEllipse.prototype.constraints;Aa.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;$a.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(p,z/2),x=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Ba.prototype.getConstraints=function(d,p,z){p=parseFloat(mxUtils.getValue(d,
-"jettyWidth",Ba.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ba.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(z-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(z-.5*d,3.5*d))];z>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));z>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,p));z>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};R.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];B.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)];ya.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)];t.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)];N.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)];ja.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)];ka.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)];J.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Ra.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(p+u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Xa.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return d};Qa.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)];Sa.prototype.getConstraints=
-function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));return d};Ha.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Za.prototype.getConstraints=
-function(d,p,z){d=[];var u=Math.min(z,p),x=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(z-x)/2;var C=u+x,E=(p-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,x,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),u));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,u));return d};X.prototype.constraints=null;y.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)];O.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(F){n.escape();F=n.deleteCells(n.getDeletableCells(n.getSelectionCells()),F);null!=F&&n.setSelectionCells(F)}function e(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),K=0;K<F.length;K++)n.cellLabelChanged(F[K],"")}finally{n.getModel().endUpdate()}}}function g(F,K,c,f,l){l.getModel().beginUpdate();try{var t=l.getCellGeometry(F);null!=t&&c&&f&&(c/=f,t=t.clone(),1<c?t.height=t.width/c:t.width=t.height*c,l.getModel().setGeometry(F,
-t));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[F]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{l.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,n=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&n.isEnabled()};this.addAction("new...",function(){n.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});var G=new Action("smartFit",function(){n.popupMenuHandler.hideMenu();var F=n.view.scale,
-K=n.container.scrollLeft,c=n.container.scrollTop,f=n.view.translate.x,l=n.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-n.view.scale)&&5>Math.abs(K-n.container.scrollLeft)&&5>Math.abs(c-n.container.scrollTop)&&f==n.view.translate.x&&l==n.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter");G.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",G);this.addAction("keyPressEnter",function(){n.isSelectionEmpty()?
-m.actions.get("smartFit").funct():n.isEnabled()&&n.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(F,K){try{var c=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));m.showDialog((new OpenDialog(this)).container,
+Math.min(u*C,x*C)));E=Math.round(E);d.begin();d.moveTo(p+E,z);d.lineTo(p+E,z+x);d.moveTo(p+u-E,z);d.lineTo(p+u-E,z+x);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",na);mxCellRenderer.registerShape("process2",na);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(d,p,z,u,x){d.setFillColor(mxConstants.NONE);d.rect(p,z,u,x);d.fill()};X.prototype.paintForeground=function(d,p,z,u,x){};mxCellRenderer.registerShape("transparent",
+X);mxUtils.extend(ca,mxHexagon);ca.prototype.size=30;ca.prototype.position=.5;ca.prototype.position2=.5;ca.prototype.base=20;ca.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(d,p,z,u,x){p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));var C=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),ea=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-z),new mxPoint(Math.min(u,C+ea),x-z),new mxPoint(E,x),new mxPoint(Math.max(0,C),x-z),new mxPoint(0,x-z)],this.isRounded,p,!0,[4])};mxCellRenderer.registerShape("callout",
+ca);mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.fixedSize=20;ka.prototype.isRoundable=function(){return!0};ka.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,
+0),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(0,x),new mxPoint(p,x/2)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("step",ka);mxUtils.extend(da,mxHexagon);da.prototype.size=.25;da.prototype.fixedSize=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.5*x),new mxPoint(u-p,x),new mxPoint(p,x),new mxPoint(0,.5*x)],this.isRounded,z,!0)};mxCellRenderer.registerShape("hexagon",da);mxUtils.extend(W,mxRectangleShape);W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(d,p,z,u,x){var C=Math.min(u/5,x/5)+1;d.begin();d.moveTo(p+u/2,z+C);d.lineTo(p+u/2,
+z+x-C);d.moveTo(p+C,z+x/2);d.lineTo(p+u-C,z+x/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",W);var ob=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};mxRhombus.prototype.paintVertexShape=
+function(d,p,z,u,x){ob.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var C=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&(d.setShadow(!1),ob.apply(this,[d,p,z,u,x]))}};mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var p=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;
+return new mxRectangle(d.x+p,d.y+p,d.width-2*p,d.height-2*p)}return d};S.prototype.paintForeground=function(d,p,z,u,x){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var C=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);p+=C;z+=C;u-=2*C;x-=2*C;0<u&&0<x&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);C=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+C]];if(null!=E){var ea=this.style["symbol"+C+"Align"],
+M=this.style["symbol"+C+"VerticalAlign"],sa=this.style["symbol"+C+"Width"],ma=this.style["symbol"+C+"Height"],Wa=this.style["symbol"+C+"Spacing"]||0,gb=this.style["symbol"+C+"VSpacing"]||Wa,bb=this.style["symbol"+C+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(u+this.strokewidth,x+this.strokewidth),Wa+=bb,gb+=bb);bb=p;var Fa=z;bb=ea==mxConstants.ALIGN_CENTER?bb+(u-sa)/2:ea==mxConstants.ALIGN_RIGHT?bb+(u-sa-Wa):bb+Wa;Fa=M==mxConstants.ALIGN_MIDDLE?Fa+(x-ma)/2:M==mxConstants.ALIGN_BOTTOM?Fa+(x-ma-gb):
+Fa+gb;d.save();ea=new E;ea.style=this.style;E.prototype.paintVertexShape.call(ea,d,bb,Fa,sa,ma);d.restore()}C++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",S);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,p,z,u,x,C){C?(d.moveTo(0,0),d.lineTo(u/2,x/2),d.lineTo(u,0),d.end()):(d.moveTo(0,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(0,x),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(B,mxShape);B.prototype.paintBackground=
+function(d,p,z,u,x){d.translate(p,z);d.ellipse(u/4,0,u/2,x/4);d.fillAndStroke();d.begin();d.moveTo(u/2,x/4);d.lineTo(u/2,2*x/3);d.moveTo(u/2,x/3);d.lineTo(0,x/3);d.moveTo(u/2,x/3);d.lineTo(u,x/3);d.moveTo(u/2,2*x/3);d.lineTo(0,x);d.moveTo(u/2,2*x/3);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",B);mxUtils.extend(K,mxShape);K.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};K.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();
+d.moveTo(0,x/4);d.lineTo(0,3*x/4);d.end();d.stroke();d.begin();d.moveTo(0,x/2);d.lineTo(u/6,x/2);d.end();d.stroke();d.ellipse(u/6,0,5*u/6,x);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",K);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(p+u/8,z+x);d.lineTo(p+7*u/8,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=
+function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(u,0);d.lineTo(0,x);d.moveTo(0,0);d.lineTo(u,x);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,0);d.end();d.stroke();d.ellipse(0,x/8,u,7*x/8);d.fillAndStroke()};U.prototype.paintForeground=
+function(d,p,z,u,x){d.begin();d.moveTo(3*u/8,x/8*1.1);d.lineTo(5*u/8,x/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(Y,mxRectangleShape);Y.prototype.size=40;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.getLabelBounds=function(d){var p=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,p)};Y.prototype.paintBackground=function(d,p,z,u,x){var C=Math.max(0,Math.min(x,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,p,z,u,C):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=Y&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,p,z,u,C),d.restore()));C<x&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(p+u/2,z+C),d.lineTo(p+u/2,z+x),d.end(),d.stroke())};Y.prototype.paintForeground=
+function(d,p,z,u,x){var C=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,p,z,u,Math.min(x,C))};mxCellRenderer.registerShape("umlLifeline",Y);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var p=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=p&&p!=mxConstants.NONE&&
+0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,p,z,u,x){var C=this.corner,E=Math.min(u,Math.max(C,parseFloat(mxUtils.getValue(this.style,"width",
+this.width)))),ea=Math.min(x,Math.max(1.5*C,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),M=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);M!=mxConstants.NONE&&(d.setFillColor(M),d.rect(p,z,u,x),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,p,z,u,x),d.setGradient(this.fill,this.gradient,p,z,u,x,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;
+d.begin();d.moveTo(p,z);d.lineTo(p+E,z);d.lineTo(p+E,z+Math.max(0,ea-1.5*C));d.lineTo(p+Math.max(0,E-C),z+ea);d.lineTo(p,z+ea);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(p+E,z);d.lineTo(p+u,z);d.lineTo(p+u,z+x);d.lineTo(p,z+x);d.lineTo(p,z+ea);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,p,z,u){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);
+mxPerimeter.LifelinePerimeter=function(d,p,z,u){u=Y.prototype.size;null!=p&&(u=mxUtils.getValue(p.style,"size",u)*p.view.scale);p=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;z.x<d.getCenterX()&&(p=-1*(p+1));return new mxPoint(d.getCenterX()+p,Math.min(d.y+d.height,Math.max(d.y+u,z.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,p,z,u){u=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};
+mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,p,z,u){u=parseFloat(p.style[mxConstants.STYLE_STROKEWIDTH]||1)*p.view.scale/2-1;null!=p.style.backboneSize&&(u+=parseFloat(p.style.backboneSize)*p.view.scale/2-1);if("south"==p.style[mxConstants.STYLE_DIRECTION]||"north"==p.style[mxConstants.STYLE_DIRECTION])return z.x<d.getCenterX()&&(u=-1*(u+1)),new mxPoint(d.getCenterX()+u,Math.min(d.y+d.height,Math.max(d.y,z.y)));z.y<d.getCenterY()&&
+(u=-1*(u+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,z.x)),d.getCenterY()+u)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,p,z,u){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(p.style,"size",ca.prototype.size))*p.view.scale))),p.style),p,z,u)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);
+mxPerimeter.ParallelogramPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?I.prototype.fixedSize:I.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=
+[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]):(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=
+function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?Z.prototype.fixedSize:Z.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height;p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(.5*M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,ea+sa),
+new mxPoint(E,ea+sa),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,
+C)),ea=[new mxPoint(E,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea)]);sa=d.getCenterX();d=d.getCenterY();d=new mxPoint(sa,d);u&&(z.x<E||z.x>E+M?d.y=z.y:d.x=z.x);return mxUtils.getPerimeterPoint(ea,d,z)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?ka.prototype.fixedSize:ka.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
+"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_EAST?(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E,ea+sa),new mxPoint(E+x,d),new mxPoint(E,ea)]):p==mxConstants.DIRECTION_WEST?(x=x?Math.max(0,
+Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M,ea),new mxPoint(E+M-x,d),new mxPoint(E+M,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]):p==mxConstants.DIRECTION_NORTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E,ea+x),new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa),new mxPoint(ma,ea+sa-x),new mxPoint(E,ea+sa),new mxPoint(E,ea+x)]):(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),
+ea=[new mxPoint(E,ea),new mxPoint(ma,ea+x),new mxPoint(E+M,ea),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,p,z,u){var x="0"!=mxUtils.getValue(p.style,"fixedSize","0"),C=x?da.prototype.fixedSize:da.prototype.size;null!=p&&(C=mxUtils.getValue(p.style,
+"size",C));x&&(C*=p.view.scale);var E=d.x,ea=d.y,M=d.width,sa=d.height,ma=d.getCenterX();d=d.getCenterY();p=null!=p?mxUtils.getValue(p.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;p==mxConstants.DIRECTION_NORTH||p==mxConstants.DIRECTION_SOUTH?(x=x?Math.max(0,Math.min(sa,C)):sa*Math.max(0,Math.min(1,C)),ea=[new mxPoint(ma,ea),new mxPoint(E+M,ea+x),new mxPoint(E+M,ea+sa-x),new mxPoint(ma,ea+sa),new mxPoint(E,ea+sa-x),new mxPoint(E,ea+x),new mxPoint(ma,ea)]):
+(x=x?Math.max(0,Math.min(M,C)):M*Math.max(0,Math.min(1,C)),ea=[new mxPoint(E+x,ea),new mxPoint(E+M-x,ea),new mxPoint(E+M,d),new mxPoint(E+M-x,ea+sa),new mxPoint(E+x,ea+sa),new mxPoint(E,d),new mxPoint(E+x,ea)]);ma=new mxPoint(ma,d);u&&(z.x<E||z.x>E+M?ma.y=z.y:ma.x=z.x);return mxUtils.getPerimeterPoint(ea,ma,z)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,
+"size",this.size));d.translate(p,z);d.ellipse((u-C)/2,0,C,C);d.fillAndStroke();d.begin();d.moveTo(u/2,C);d.lineTo(u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("lollipop",la);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.inset=2;va.prototype.paintBackground=function(d,p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"size",this.size)),E=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.begin();d.moveTo(u/2,C+E);d.lineTo(u/
+2,x);d.end();d.stroke();d.begin();d.moveTo((u-C)/2-E,C/2);d.quadTo((u-C)/2-E,C+E,u/2,C+E);d.quadTo((u+C)/2+E,C+E,(u+C)/2+E,C/2);d.end();d.stroke()};mxCellRenderer.registerShape("requires",va);mxUtils.extend(ua,mxShape);ua.prototype.paintBackground=function(d,p,z,u,x){d.translate(p,z);d.begin();d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.end();d.stroke()};mxCellRenderer.registerShape("requiredInterface",ua);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(d,
+p,z,u,x){var C=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;d.translate(p,z);d.ellipse(0,C,u-2*C,x-2*C);d.fillAndStroke();d.begin();d.moveTo(u/2,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u/2,x);d.end();d.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=20;Ba.prototype.jettyHeight=10;Ba.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));
+p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=Math.min(p,x-p),M=Math.min(ea+2*p,x-p);C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("module",
+Ba);mxUtils.extend(ya,mxCylinder);ya.prototype.jettyWidth=32;ya.prototype.jettyHeight=12;ya.prototype.redrawPath=function(d,p,z,u,x,C){var E=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));p=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));z=E/2;E=z+E/2;var ea=.3*x-p/2,M=.7*x-p/2;C?(d.moveTo(z,ea),d.lineTo(E,ea),d.lineTo(E,ea+p),d.lineTo(z,ea+p),d.moveTo(z,M),d.lineTo(E,M),d.lineTo(E,M+p),d.lineTo(z,M+p)):(d.moveTo(z,0),d.lineTo(u,0),d.lineTo(u,x),d.lineTo(z,
+x),d.lineTo(z,M+p),d.lineTo(0,M+p),d.lineTo(0,M),d.lineTo(z,M),d.lineTo(z,ea+p),d.lineTo(0,ea+p),d.lineTo(0,ea),d.lineTo(z,ea),d.close());d.end()};mxCellRenderer.registerShape("component",ya);mxUtils.extend(La,mxRectangleShape);La.prototype.paintForeground=function(d,p,z,u,x){var C=u/2,E=x/2,ea=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;d.begin();this.addPoints(d,[new mxPoint(p+C,z),new mxPoint(p+u,z+E),new mxPoint(p+C,z+x),new mxPoint(p,z+E)],this.isRounded,
+ea,!0);d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",La);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(d,p,z,u,x){var C=Math.min(4,Math.min(u/5,x/5));0<u&&0<x&&(d.ellipse(p+C,z+C,u-2*C,x-2*C),d.fillAndStroke());d.setShadow(!1);this.outerStroke&&(d.ellipse(p,z,u,x),d.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Ea,Aa);Ea.prototype.outerStroke=
+!1;mxCellRenderer.registerShape("startState",Ea);mxUtils.extend(pa,mxArrowConnector);pa.prototype.defaultWidth=4;pa.prototype.isOpenEnded=function(){return!0};pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};pa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",pa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=
+function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(za,mxActor);za.prototype.size=30;za.prototype.isRoundable=function(){return!0};
+za.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x),new mxPoint(0,p),new mxPoint(u,0),new mxPoint(u,x)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("manualInput",za);mxUtils.extend(wa,mxRectangleShape);wa.prototype.dx=20;wa.prototype.dy=20;wa.prototype.isHtmlAllowed=function(){return!1};wa.prototype.paintForeground=
+function(d,p,z,u,x){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var C=0;if(this.isRounded){var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;C=Math.max(C,Math.min(u*E,x*E))}E=Math.max(C,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));C=Math.max(C,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.begin();d.moveTo(p,z+C);d.lineTo(p+u,z+C);d.end();d.stroke();d.begin();d.moveTo(p+E,z);d.lineTo(p+
+E,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("internalStorage",wa);mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.isRoundable=function(){return!0};Xa.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint(p,z),new mxPoint(p,x),new mxPoint(0,x)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.lineTo(0,x);d.end();d.moveTo(u,0);d.lineTo(u,x);d.end();d.moveTo(0,x/2);d.lineTo(u,x/2);d.end()};mxCellRenderer.registerShape("crossbar",Qa);mxUtils.extend(Ra,mxActor);Ra.prototype.dx=20;Ra.prototype.dy=
+20;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(d,p,z,u,x){p=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,z),new mxPoint((u+p)/2,z),new mxPoint((u+
+p)/2,x),new mxPoint((u-p)/2,x),new mxPoint((u-p)/2,z),new mxPoint(0,z)],this.isRounded,C,!0);d.end()};mxCellRenderer.registerShape("tee",Ra);mxUtils.extend(Sa,mxActor);Sa.prototype.arrowWidth=.3;Sa.prototype.arrowSize=.2;Sa.prototype.isRoundable=function(){return!0};Sa.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));
+z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(0,C)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("singleArrow",Sa);mxUtils.extend(Ha,mxActor);Ha.prototype.isRoundable=function(){return!0};Ha.prototype.redrawPath=function(d,p,z,u,x){var C=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",Sa.prototype.arrowWidth))));p=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));z=(x-C)/2;C=z+C;var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,x/2),new mxPoint(p,0),new mxPoint(p,z),new mxPoint(u-p,z),new mxPoint(u-p,0),new mxPoint(u,x/2),new mxPoint(u-p,x),new mxPoint(u-p,C),new mxPoint(p,C),new mxPoint(p,x)],this.isRounded,E,!0);d.end()};mxCellRenderer.registerShape("doubleArrow",
+Ha);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.1;Ma.prototype.fixedSize=20;Ma.prototype.redrawPath=function(d,p,z,u,x){p="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.moveTo(p,0);d.lineTo(u,0);d.quadTo(u-2*p,x/2,u,x);d.lineTo(p,x);d.quadTo(p-2*p,x/2,p,0);d.close();d.end()};mxCellRenderer.registerShape("dataStorage",Ma);
+mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.close();d.end()};mxCellRenderer.registerShape("or",y);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(d,p,z,u,x){d.moveTo(0,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,0,x);d.quadTo(u/2,x/2,0,0);d.close();d.end()};mxCellRenderer.registerShape("xor",O);mxUtils.extend(Q,mxActor);Q.prototype.size=20;Q.prototype.isRoundable=function(){return!0};Q.prototype.redrawPath=function(d,
+p,z,u,x){p=Math.min(u/2,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(p,0),new mxPoint(u-p,0),new mxPoint(u,.8*p),new mxPoint(u,x),new mxPoint(0,x),new mxPoint(0,.8*p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("loopLimit",Q);mxUtils.extend(V,mxActor);V.prototype.size=.375;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(d,
+p,z,u,x){p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(u,0),new mxPoint(u,x-p),new mxPoint(u/2,x),new mxPoint(0,x-p)],this.isRounded,z,!0);d.end()};mxCellRenderer.registerShape("offPageConnector",V);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+d.begin();d.moveTo(p+u/2,z+x);d.lineTo(p+u,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("tapeData",ha);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+u,z+x/2);d.end();d.stroke();d.begin();d.moveTo(p+u/2,z);d.lineTo(p+u/2,z+x);d.end();d.stroke()};mxCellRenderer.registerShape("orEllipse",ja);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=
+function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p+.145*u,z+.145*x);d.lineTo(p+.855*u,z+.855*x);d.end();d.stroke();d.begin();d.moveTo(p+.855*u,z+.145*x);d.lineTo(p+.145*u,z+.855*x);d.end();d.stroke()};mxCellRenderer.registerShape("sumEllipse",oa);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(d,p,z,u,x){mxRhombus.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();d.moveTo(p,z+x/2);d.lineTo(p+
+u,z+x/2);d.end();d.stroke()};mxCellRenderer.registerShape("sortShape",ta);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(d,p,z,u,x){d.begin();d.moveTo(p,z);d.lineTo(p+u,z);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke();d.begin();d.moveTo(p,z+x);d.lineTo(p+u,z+x);d.lineTo(p+u/2,z+x/2);d.close();d.fillAndStroke()};mxCellRenderer.registerShape("collate",ra);mxUtils.extend(xa,mxEllipse);xa.prototype.paintVertexShape=function(d,p,z,u,x){var C=d.state.strokeWidth/2,E=10+2*C,ea=z+
+x-E/2;d.begin();d.moveTo(p,z);d.lineTo(p,z+x);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea-E/2);d.moveTo(p+C,ea);d.lineTo(p+C+E,ea+E/2);d.moveTo(p+C,ea);d.lineTo(p+u-C,ea);d.moveTo(p+u,z);d.lineTo(p+u,z+x);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea-E/2);d.moveTo(p+u-C,ea);d.lineTo(p+u-E-C,ea+E/2);d.end();d.stroke()};mxCellRenderer.registerShape("dimension",xa);mxUtils.extend(Da,mxEllipse);Da.prototype.drawHidden=!0;Da.prototype.paintVertexShape=function(d,p,z,u,x){this.outline||d.setStrokeColor(null);if(null!=
+this.style){var C=d.pointerEvents,E=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||E||(d.pointerEvents=!1);var ea="1"==mxUtils.getValue(this.style,"top","1"),M="1"==mxUtils.getValue(this.style,"left","1"),sa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||E||this.outline||ea||sa||ma||M?(d.rect(p,z,u,x),d.fill(),d.pointerEvents=C,d.setStrokeColor(this.stroke),d.setLineCap("square"),
+d.begin(),d.moveTo(p,z),this.outline||ea?d.lineTo(p+u,z):d.moveTo(p+u,z),this.outline||sa?d.lineTo(p+u,z+x):d.moveTo(p+u,z+x),this.outline||ma?d.lineTo(p,z+x):d.moveTo(p,z+x),(this.outline||M)&&d.lineTo(p,z),d.end(),d.stroke(),d.setLineCap("flat")):d.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Da);mxUtils.extend(Ia,mxEllipse);Ia.prototype.paintVertexShape=function(d,p,z,u,x){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.setShadow(!1);d.begin();"vertical"==
+mxUtils.getValue(this.style,"line")?(d.moveTo(p+u/2,z),d.lineTo(p+u/2,z+x)):(d.moveTo(p,z+x/2),d.lineTo(p+u,z+x/2));d.end();d.stroke()};mxCellRenderer.registerShape("lineEllipse",Ia);mxUtils.extend(Ya,mxActor);Ya.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);d.moveTo(0,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(0,x);d.close();d.end()};mxCellRenderer.registerShape("delay",Ya);mxUtils.extend(Za,mxActor);Za.prototype.size=.2;Za.prototype.redrawPath=function(d,p,
+z,u,x){p=Math.min(x,u);var C=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-C)/2;z=p+C;var E=(u-C)/2;C=E+C;d.moveTo(0,p);d.lineTo(E,p);d.lineTo(E,0);d.lineTo(C,0);d.lineTo(C,p);d.lineTo(u,p);d.lineTo(u,z);d.lineTo(C,z);d.lineTo(C,x);d.lineTo(E,x);d.lineTo(E,z);d.lineTo(0,z);d.close();d.end()};mxCellRenderer.registerShape("cross",Za);mxUtils.extend($a,mxActor);$a.prototype.size=.25;$a.prototype.redrawPath=function(d,p,z,u,x){p=Math.min(u,x/2);z=Math.min(u-
+p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*u);d.moveTo(0,x/2);d.lineTo(z,0);d.lineTo(u-p,0);d.quadTo(u,0,u,x/2);d.quadTo(u,x,u-p,x);d.lineTo(z,x);d.close();d.end()};mxCellRenderer.registerShape("display",$a);mxUtils.extend(Pa,mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
+{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",
+defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",
+dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},
+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},
+{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(d,p,z,u,x){d.translate(p,z);this.strictDrawShape(d,0,0,u,x)};Pa.prototype.strictDrawShape=function(d,p,z,u,x,C){var E=C&&C.rectStyle?C.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ea=C&&C.absoluteCornerSize?C.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",
+this.absoluteCornerSize),M=C&&C.size?C.size:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),sa=C&&C.rectOutline?C.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=C&&C.indent?C.indent:Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=C&&C.dashed?C.dashed:mxUtils.getValue(this.style,"dashed",!1),gb=C&&C.dashPattern?C.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=C&&C.relIndent?C.relIndent:
+Math.max(0,Math.min(50,ma)),Fa=C&&C.top?C.top:mxUtils.getValue(this.style,"top",!0),Ka=C&&C.right?C.right:mxUtils.getValue(this.style,"right",!0),Ja=C&&C.bottom?C.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=C&&C.left?C.left:mxUtils.getValue(this.style,"left",!0),Oa=C&&C.topLeftStyle?C.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=C&&C.topRightStyle?C.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=C&&C.bottomRightStyle?C.bottomRightStyle:mxUtils.getValue(this.style,
+"bottomRightStyle","default"),Va=C&&C.bottomLeftStyle?C.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=C&&C.fillColor?C.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");C&&C.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=C&&C.strokeWidth?C.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=C&&C.fillColor2?C.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=C&&C.gradientColor2?C.gradientColor2:mxUtils.getValue(this.style,
+"gradientColor2","none"),Hb=C&&C.gradientDirection2?C.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=C&&C.opacity?C.opacity:mxUtils.getValue(this.style,"opacity","100"),Jb=Math.max(0,Math.min(50,M));C=Pa.prototype;d.setDashed(Wa);gb&&""!=gb&&d.setDashPattern(gb);d.setStrokeWidth(Gb);M=Math.min(.5*x,.5*u,M);ea||(M=Jb*Math.min(u,x)/100);M=Math.min(M,.5*Math.min(u,x));ea||(ma=Math.min(bb*Math.min(u,x)/100));ma=Math.min(ma,.5*Math.min(u,x)-M);(Fa||Ka||Ja||Ga)&&"frame"!=
+sa&&(d.begin(),Fa?C.moveNW(d,p,z,u,x,E,Oa,M,Ga):d.moveTo(0,0),Fa&&C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),Ka&&C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),Ja&&C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),Ga&&C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),d.fill(),d.setShadow(!1),d.setFillColor(Db),Wa=ea=Ib,"none"==Db&&(ea=0),"none"==Eb&&(Wa=0),d.setGradient(Db,Eb,0,0,u,x,Hb,ea,Wa),d.begin(),Fa?C.moveNWInner(d,
+p,z,u,x,E,Oa,M,ma,Fa,Ga):d.moveTo(ma,0),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),Ga&&Ja&&C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),Ja&&Ka&&C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),Ka&&Fa&&C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),Fa&&Ga&&C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),d.fill(),"none"==Fb&&(d.begin(),C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga),d.stroke()));Fa||Ka||
+Ja||!Ga?Fa||Ka||!Ja||Ga?!Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,
+p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa||!Ka||Ja||Ga?!Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,
+p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke(),d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):
+!Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),
+C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa&&Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
+p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):!Fa||Ka||Ja||Ga?Fa&&!Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,
+u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke(),d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,
+u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&!Ka&&Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,
+p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),C.paintSWInner(d,
+p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,
+p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&!Ja&&Ga?"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,
+Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,
+Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&!Ga?"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,
+p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,
+p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):Fa&&Ka&&Ja&&Ga&&("frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,
+M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),"double"==sa&&(C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close()),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintNW(d,
+p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.paintNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.paintSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.paintSW(d,p,z,u,x,E,Va,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),d.close(),C.moveSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintSWInner(d,p,z,u,x,E,Va,M,ma,Ja),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),C.paintSEInner(d,p,z,u,x,E,Ua,M,ma),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),C.paintNEInner(d,p,z,u,x,E,Ta,M,ma),C.paintTopInner(d,
+p,z,u,x,E,Oa,M,ma,Ga,Fa),C.paintNWInner(d,p,z,u,x,E,Oa,M,ma),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke())):"frame"!=sa?(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),"double"==sa&&(C.moveNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa)),d.stroke()):(d.begin(),C.moveNW(d,p,z,u,x,E,Oa,M,Ga),C.paintTop(d,p,z,u,x,E,Ta,M,Ka),C.lineNEInner(d,p,z,u,x,E,Ta,M,ma,Ka),C.paintTopInner(d,p,z,u,x,E,Oa,M,ma,Ga,Fa),d.close(),d.fillAndStroke()):
+"frame"!=sa?(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),"double"==sa&&(C.moveSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka)),d.stroke()):(d.begin(),C.moveNE(d,p,z,u,x,E,Ta,M,Fa),C.paintRight(d,p,z,u,x,E,Ua,M,Ja),C.lineSEInner(d,p,z,u,x,E,Ua,M,ma,Ja),C.paintRightInner(d,p,z,u,x,E,Ta,M,ma,Fa,Ka),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),"double"==sa&&(C.moveSWInner(d,
+p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja)),d.stroke()):(d.begin(),C.moveSE(d,p,z,u,x,E,Ua,M,Ka),C.paintBottom(d,p,z,u,x,E,Va,M,Ga),C.lineSWInner(d,p,z,u,x,E,Va,M,ma,Ga),C.paintBottomInner(d,p,z,u,x,E,Ua,M,ma,Ka,Ja),d.close(),d.fillAndStroke()):"frame"!=sa?(d.begin(),C.moveSW(d,p,z,u,x,E,Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),"double"==sa&&(C.moveNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga)),d.stroke()):(d.begin(),C.moveSW(d,p,z,u,x,E,
+Oa,M,Ja),C.paintLeft(d,p,z,u,x,E,Oa,M,Fa),C.lineNWInner(d,p,z,u,x,E,Oa,M,ma,Fa,Ga),C.paintLeftInner(d,p,z,u,x,E,Va,M,ma,Ja,Ga),d.close(),d.fillAndStroke());d.begin();C.paintFolds(d,p,z,u,x,E,Oa,Ta,Ua,Va,M,Fa,Ka,Ja,Ga);d.stroke()};Pa.prototype.moveNW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,0):d.moveTo(0,ea)};Pa.prototype.moveNE=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,0):d.moveTo(u-ea,0)};Pa.prototype.moveSE=function(d,
+p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(u,x):d.moveTo(u,x-ea)};Pa.prototype.moveSW=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.moveTo(0,x):d.moveTo(ea,x)};Pa.prototype.paintNW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,ea,0)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&
+"fold"==C)&&d.lineTo(ea,0);else d.lineTo(0,0)};Pa.prototype.paintTop=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,0):d.lineTo(u-ea,0)};Pa.prototype.paintNE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u,ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u,ea);else d.lineTo(u,
+0)};Pa.prototype.paintRight=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(u,x):d.lineTo(u,x-ea)};Pa.prototype.paintLeft=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,0):d.lineTo(0,ea)};Pa.prototype.paintSE=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,u-ea,x)}else("snip"==E||"default"==
+E&&"snip"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-ea,x);else d.lineTo(u,x)};Pa.prototype.paintBottom=function(d,p,z,u,x,C,E,ea,M){"square"==E||"default"==E&&"square"==C||!M?d.lineTo(0,x):d.lineTo(ea,x)};Pa.prototype.paintSW=function(d,p,z,u,x,C,E,ea,M){if(M)if("rounded"==E||"default"==E&&"rounded"==C||"invRound"==E||"default"==E&&"invRound"==C){p=0;if("rounded"==E||"default"==E&&"rounded"==C)p=1;d.arcTo(ea,ea,0,0,p,0,x-ea)}else("snip"==E||"default"==E&&"snip"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.lineTo(0,x-ea);else d.lineTo(0,x)};Pa.prototype.paintNWInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,M,.5*M+ea);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,M,M+ea);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(M,.5*M+ea);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,M+ea),d.lineTo(M,M+ea)};Pa.prototype.paintTopInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(0,
+M):sa&&!ma?d.lineTo(M,0):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(ea+.5*M,M):d.lineTo(ea+M,M):d.lineTo(0,M):d.lineTo(0,0)};Pa.prototype.paintNEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-ea-.5*M,M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-ea-M,M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(u-
+ea-.5*M,M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,ea+M),d.lineTo(u-ea-M,M)};Pa.prototype.paintRightInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u-M,0):sa&&!ma?d.lineTo(u,M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):d.lineTo(u-M,ea+M):d.lineTo(u-M,0):d.lineTo(u,0)};Pa.prototype.paintLeftInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,
+x):sa&&!ma?d.lineTo(0,x-M):sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):d.lineTo(M,x-ea-M):d.lineTo(M,x):d.lineTo(0,x)};Pa.prototype.paintSEInner=function(d,p,z,u,x,C,E,ea,M){if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,u-M,x-ea-.5*M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,u-M,x-ea-M);else if("snip"==E||"default"==E&&"snip"==
+C)d.lineTo(u-M,x-ea-.5*M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(u-ea-M,x-ea-M),d.lineTo(u-M,x-ea-M)};Pa.prototype.paintBottomInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(u,x-M):sa&&!ma?d.lineTo(u-M,x):"square"==E||"default"==E&&"square"==C||!sa?d.lineTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-ea-.5*M,x-M):d.lineTo(u-ea-M,x-M):d.lineTo(u,x)};Pa.prototype.paintSWInner=function(d,p,z,u,x,C,E,ea,M,sa){if(!sa)d.lineTo(M,
+x);else if("square"==E||"default"==E&&"square"==C)d.lineTo(M,x-M);else if("rounded"==E||"default"==E&&"rounded"==C)d.arcTo(ea-.5*M,ea-.5*M,0,0,0,ea+.5*M,x-M);else if("invRound"==E||"default"==E&&"invRound"==C)d.arcTo(ea+M,ea+M,0,0,1,ea+M,x-M);else if("snip"==E||"default"==E&&"snip"==C)d.lineTo(ea+.5*M,x-M);else if("fold"==E||"default"==E&&"fold"==C)d.lineTo(M+ea,x-ea-M),d.lineTo(M+ea,x-M)};Pa.prototype.moveSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(M,
+x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,x-ea-M):d.moveTo(0,x-M)};Pa.prototype.lineSWInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.lineTo(M,x-ea-M):d.lineTo(0,x-M)};Pa.prototype.moveSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.moveTo(u-M,x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(u-M,x-ea-M):d.moveTo(u-M,x)};Pa.prototype.lineSEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C?d.lineTo(u-M,
+x-M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,x-ea-.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,x-ea-M):d.lineTo(u-M,x)};Pa.prototype.moveNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.moveTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==
+E&&"fold"==C)&&d.moveTo(u-M,ea+M):d.moveTo(u,M)};Pa.prototype.lineNEInner=function(d,p,z,u,x,C,E,ea,M,sa){sa?"square"==E||"default"==E&&"square"==C||sa?d.lineTo(u-M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(u-M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(u-M,ea+M):d.lineTo(u,M)};Pa.prototype.moveNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.moveTo(M,0):sa&&!ma?d.moveTo(0,M):"square"==
+E||"default"==E&&"square"==C?d.moveTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.moveTo(M,ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.moveTo(M,ea+M):d.moveTo(0,0)};Pa.prototype.lineNWInner=function(d,p,z,u,x,C,E,ea,M,sa,ma){sa||ma?!sa&&ma?d.lineTo(M,0):sa&&!ma?d.lineTo(0,M):"square"==E||"default"==E&&"square"==C?d.lineTo(M,M):"rounded"==E||"default"==E&&"rounded"==C||"snip"==E||"default"==E&&"snip"==C?d.lineTo(M,
+ea+.5*M):("invRound"==E||"default"==E&&"invRound"==C||"fold"==E||"default"==E&&"fold"==C)&&d.lineTo(M,ea+M):d.lineTo(0,0)};Pa.prototype.paintFolds=function(d,p,z,u,x,C,E,ea,M,sa,ma,Wa,gb,bb,Fa){if("fold"==C||"fold"==E||"fold"==ea||"fold"==M||"fold"==sa)("fold"==E||"default"==E&&"fold"==C)&&Wa&&Fa&&(d.moveTo(0,ma),d.lineTo(ma,ma),d.lineTo(ma,0)),("fold"==ea||"default"==ea&&"fold"==C)&&Wa&&gb&&(d.moveTo(u-ma,0),d.lineTo(u-ma,ma),d.lineTo(u,ma)),("fold"==M||"default"==M&&"fold"==C)&&bb&&gb&&(d.moveTo(u-
+ma,x),d.lineTo(u-ma,x-ma),d.lineTo(u,x-ma)),("fold"==sa||"default"==sa&&"fold"==C)&&bb&&Fa&&(d.moveTo(0,x-ma),d.lineTo(ma,x-ma),d.lineTo(ma,x))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);Pa.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(d,p,z){for(var u=[],x=0;x<p.length;x++)u.push(mxUtils.clone(p[x]));x=d.state.dashed;var C=d.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,
+[d,u,z]);3<=d.state.strokeWidth&&(u=mxUtils.getValue(this.style,"fillColor",null),null!=u&&(d.setStrokeColor(u),d.setStrokeWidth(d.state.strokeWidth-2),d.setDashed(x,C),Na.prototype.origPaintEdgeShape.apply(this,[d,p,z])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var d=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var p=this.editorUi.getSelectionState(),z=d.apply(this,arguments);"umlFrame"==
+p.style.shape&&z.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return z}}();mxMarker.addMarker("dash",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.stroke()}});mxMarker.addMarker("box",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.x+ma/2,bb=u.y+Wa/2;u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb-ma/2-
+Wa/2,bb-Wa/2+ma/2);d.lineTo(gb-ma/2+Wa/2,bb-Wa/2-ma/2);d.lineTo(gb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);d.lineTo(gb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("cross",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1);return function(){d.begin();d.moveTo(u.x-ma/2-Wa/2,u.y-Wa/2+ma/2);d.lineTo(u.x+Wa/2-3*ma/2,u.y-3*Wa/2-ma/2);d.moveTo(u.x-ma/2+Wa/2,u.y-Wa/2-ma/2);d.lineTo(u.x-Wa/2-3*ma/2,u.y-3*Wa/2+ma/2);d.stroke()}});mxMarker.addMarker("circle",jb);
+mxMarker.addMarker("circlePlus",function(d,p,z,u,x,C,E,ea,M,sa){var ma=u.clone(),Wa=jb.apply(this,arguments),gb=x*(E+2*M),bb=C*(E+2*M);return function(){Wa.apply(this,arguments);d.begin();d.moveTo(ma.x-x*M,ma.y-C*M);d.lineTo(ma.x-2*gb+x*M,ma.y-2*bb+C*M);d.moveTo(ma.x-gb-bb+C*M,ma.y-bb+gb-x*M);d.lineTo(ma.x+bb-gb-C*M,ma.y-bb-gb+x*M);d.stroke()}});mxMarker.addMarker("halfCircle",function(d,p,z,u,x,C,E,ea,M,sa){var ma=x*(E+M+1),Wa=C*(E+M+1),gb=u.clone();u.x-=ma;u.y-=Wa;return function(){d.begin();d.moveTo(gb.x-
+Wa,gb.y+ma);d.quadTo(u.x-Wa,u.y+ma,u.x,u.y);d.quadTo(u.x+Wa,u.y-ma,gb.x+Wa,gb.y-ma);d.stroke()}});mxMarker.addMarker("async",function(d,p,z,u,x,C,E,ea,M,sa){p=x*M*1.118;z=C*M*1.118;x*=E+M;C*=E+M;var ma=u.clone();ma.x-=p;ma.y-=z;u.x+=-x-p;u.y+=-C-z;return function(){d.begin();d.moveTo(ma.x,ma.y);ea?d.lineTo(ma.x-x-C/2,ma.y-C+x/2):d.lineTo(ma.x+C/2-x,ma.y-C-x/2);d.lineTo(ma.x-x,ma.y-C);d.close();sa?d.fillAndStroke():d.stroke()}});mxMarker.addMarker("openAsync",function(d){d=null!=d?d:2;return function(p,
+z,u,x,C,E,ea,M,sa,ma){C*=ea+sa;E*=ea+sa;var Wa=x.clone();return function(){p.begin();p.moveTo(Wa.x,Wa.y);M?p.lineTo(Wa.x-C-E/d,Wa.y-E+C/d):p.lineTo(Wa.x+E/d-C,Wa.y-E-C/d);p.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var tb=function(d,p,z){return eb(d,["width"],p,function(u,x,C,E,ea){ea=d.shape.getEdgeWidth()*d.view.scale+z;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));d.style.width=Math.round(2*
+u)/d.view.scale-z})},eb=function(d,p,z,u,x){return ib(d,p,function(C){var E=d.absolutePoints;if(null!=E&&0<E.length){var ea=E.length-1;C=d.view.translate;var M=d.view.scale,sa=z?E[0]:E[ea];E=z?E[1]:E[ea-1];ea=E.x-sa.x;var ma=E.y-sa.y,Wa=Math.sqrt(ea*ea+ma*ma);sa=u.call(this,Wa,ea/Wa,ma/Wa,sa,E);return new mxPoint(sa.x/M-C.x,sa.y/M-C.y)}return null},function(C,E,ea){var M=d.absolutePoints,sa=M.length-1;C=d.view.translate;var ma=d.view.scale,Wa=z?M[0]:M[sa];M=z?M[1]:M[sa-1];sa=M.x-Wa.x;var gb=M.y-Wa.y,
+bb=Math.sqrt(sa*sa+gb*gb);E.x=(E.x+C.x)*ma;E.y=(E.y+C.y)*ma;x.call(this,bb,sa/bb,gb/bb,Wa,M,E,ea)})},nb=function(d,p){return function(z){return[eb(z,["startWidth"],!0,function(u,x,C,E,ea){ea=mxUtils.getNumber(z.style,"startWidth",d)*z.view.scale+p;return new mxPoint(E.x+x*u/4+C*ea/2,E.y+C*u/4-x*ea/2)},function(u,x,C,E,ea,M){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));z.style.startWidth=Math.round(2*u)/z.view.scale-p})]}},mb=function(d){return function(p){return[ib(p,["arrowWidth",
+"arrowSize"],function(z){var u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Sa.prototype.arrowWidth))),x=Math.max(0,Math.min(d,mxUtils.getValue(this.state.style,"arrowSize",Sa.prototype.arrowSize)));return new mxPoint(z.x+(1-x)*z.width,z.y+(1-u)*z.height/2)},function(z,u){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(z.y+z.height/2-u.y)/z.height*2));this.state.style.arrowSize=Math.max(0,Math.min(d,(z.x+z.width-u.x)/z.width))})]}},qb=function(d){return function(p){return[ib(p,
+["size"],function(z){var u=Math.max(0,Math.min(.5*z.height,parseFloat(mxUtils.getValue(this.state.style,"size",d))));return new mxPoint(z.x,z.y+u)},function(z,u){this.state.style.size=Math.max(0,u.y-z.y)},!0)]}},ub=function(d,p,z){return function(u){var x=[ib(u,["size"],function(C){var E=Math.max(0,Math.min(C.width,Math.min(C.height,parseFloat(mxUtils.getValue(this.state.style,"size",p)))))*d;return new mxPoint(C.x+E,C.y+E)},function(C,E){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(C.width,
+E.x-C.x),Math.min(C.height,E.y-C.y)))/d)},!1)];z&&mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},zb=function(d,p,z,u,x){z=null!=z?z:.5;return function(C){var E=[ib(C,["size"],function(ea){var M=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,sa=parseFloat(mxUtils.getValue(this.state.style,"size",M?x:d));return new mxPoint(ea.x+Math.max(0,Math.min(.5*ea.width,sa*(M?1:ea.width))),ea.getCenterY())},function(ea,M,sa){ea=null!=x&&"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?M.x-ea.x:Math.max(0,Math.min(z,(M.x-ea.x)/ea.width));this.state.style.size=ea},!1,u)];p&&mxUtils.getValue(C.style,mxConstants.STYLE_ROUNDED,!1)&&E.push(vb(C));return E}},Cb=function(d,p,z){d=null!=d?d:.5;return function(u){var x=[ib(u,["size"],function(C){var E=null!=z?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ea=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",E?z:p)));return new mxPoint(C.x+Math.min(.75*C.width*d,ea*(E?.75:.75*C.width)),C.y+C.height/
+4)},function(C,E){C=null!=z&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?E.x-C.x:Math.max(0,Math.min(d,(E.x-C.x)/C.width*.75));this.state.style.size=C},!1,!0)];mxUtils.getValue(u.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(vb(u));return x}},xb=function(){return function(d){var p=[];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p}},vb=function(d,p){return ib(d,[mxConstants.STYLE_ARCSIZE],function(z){var u=null!=p?p:z.height/8;if("1"==mxUtils.getValue(d.style,
+mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var x=mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(z.x+z.width-Math.min(z.width/2,x),z.y+u)}x=Math.max(0,parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(z.x+z.width-Math.min(Math.max(z.width/2,z.height/2),Math.min(z.width,z.height)*x),z.y+u)},function(z,u,x){"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?
+this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(z.width,2*(z.x+z.width-u.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(z.width-u.x+z.x)/Math.min(z.width,z.height))))})},ib=function(d,p,z,u,x,C,E){var ea=new mxHandle(d,null,mxVertexHandler.prototype.secondaryHandleImage);ea.execute=function(sa){for(var ma=0;ma<p.length;ma++)this.copyStyle(p[ma]);E&&E(sa)};ea.getPosition=z;ea.setPosition=u;ea.ignoreGrid=null!=x?x:!0;if(C){var M=ea.positionChanged;
+ea.positionChanged=function(){M.apply(this,arguments);d.view.invalidate(this.state.cell);d.view.validate()}}return ea},hb={link:function(d){return[tb(d,!0,10),tb(d,!1,10)]},flexArrow:function(d){var p=d.view.graph.gridSize/d.view.scale,z=[];mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||
+mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(u,x,C,E,ea){u=(d.shape.getStartArrowWidth()-d.shape.strokewidth)*d.view.scale;
+ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)+C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)-x*u/2)},function(u,x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.startWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/
+d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE],d.style.endWidth=d.style.startWidth;mxEvent.isAltDown(sa.getEvent())||(Math.abs(parseFloat(d.style[mxConstants.STYLE_STARTSIZE])-parseFloat(d.style[mxConstants.STYLE_ENDSIZE]))<p/6&&(d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(d.style.startWidth)-parseFloat(d.style.endWidth))<p&&(d.style.startWidth=
+d.style.endWidth))})));mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(z.push(eb(d,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEdgeWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,
+x,C,E,ea,M,sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.width=Math.round(2*u)/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(sa.getEvent())||Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<
+p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE])})),z.push(eb(d,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(u,x,C,E,ea){u=(d.shape.getEndArrowWidth()-d.shape.strokewidth)*d.view.scale;ea=3*mxUtils.getNumber(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*d.view.scale;return new mxPoint(E.x+x*(ea+d.shape.strokewidth*d.view.scale)-C*u/2,E.y+C*(ea+d.shape.strokewidth*d.view.scale)+x*u/2)},function(u,x,C,E,ea,M,
+sa){u=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,ea.x,ea.y,M.x,M.y));x=mxUtils.ptLineDist(E.x,E.y,E.x+C,E.y-x,M.x,M.y);d.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(x-d.shape.strokewidth)/3)/100/d.view.scale;d.style.endWidth=Math.max(0,Math.round(2*u)-d.shape.getEdgeWidth())/d.view.scale;if(mxEvent.isShiftDown(sa.getEvent())||mxEvent.isControlDown(sa.getEvent()))d.style[mxConstants.STYLE_STARTSIZE]=d.style[mxConstants.STYLE_ENDSIZE],d.style.startWidth=d.style.endWidth;mxEvent.isAltDown(sa.getEvent())||
+(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<p/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<p&&(d.style.endWidth=d.style.startWidth))})));return z},swimlane:function(d){var p=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var z=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));p.push(vb(d,
+z/2))}p.push(ib(d,[mxConstants.STYLE_STARTSIZE],function(u){var x=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(u.getCenterX(),u.y+Math.max(0,Math.min(u.height,x))):new mxPoint(u.x+Math.max(0,Math.min(u.width,x)),u.getCenterY())},function(u,x){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
+Math.min(u.height,x.y-u.y))):Math.round(Math.max(0,Math.min(u.width,x.x-u.x)))},!1,null,function(u){var x=d.view.graph;if(!mxEvent.isShiftDown(u.getEvent())&&!mxEvent.isControlDown(u.getEvent())&&(x.isTableRow(d.cell)||x.isTableCell(d.cell))){u=x.getSwimlaneDirection(d.style);var C=x.model.getParent(d.cell);C=x.model.getChildCells(C,!0);for(var E=[],ea=0;ea<C.length;ea++)C[ea]!=d.cell&&x.isSwimlane(C[ea])&&x.getSwimlaneDirection(x.getCurrentCellStyle(C[ea]))==u&&E.push(C[ea]);x.setCellStyles(mxConstants.STYLE_STARTSIZE,
+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return p},label:xb(),ext:xb(),rectangle:xb(),triangle:xb(),rhombus:xb(),umlLifeline:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(p.getCenterX(),p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},umlFrame:function(d){return[ib(d,["width","height"],function(p){var z=Math.max(aa.prototype.corner,
+Math.min(p.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),u=Math.max(1.5*aa.prototype.corner,Math.min(p.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(p.width,z.x-p.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(p.height,z.y-p.y)))},!1)]},process:function(d){var p=[ib(d,["size"],function(z){var u=
+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),x=parseFloat(mxUtils.getValue(this.state.style,"size",na.prototype.size));return u?new mxPoint(z.x+x,z.y+z.height/4):new mxPoint(z.x+z.width*x,z.y+z.height/4)},function(z,u){z="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*z.width,u.x-z.x)):Math.max(0,Math.min(.5,(u.x-z.x)/z.width));this.state.style.size=z},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},cross:function(d){return[ib(d,
+["size"],function(p){var z=Math.min(p.width,p.height);z=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Za.prototype.size)))*z/2;return new mxPoint(p.getCenterX()-z,p.getCenterY()-z)},function(p,z){var u=Math.min(p.width,p.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,p.getCenterY()-z.y)/u*2,Math.max(0,p.getCenterX()-z.x)/u*2)))})]},note:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",F.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},note2:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(p.width,Math.min(p.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size)))));return new mxPoint(p.x+p.width-z,p.y+z)},function(p,z){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(p.width,
+p.x+p.width-z.x),Math.min(p.height,z.y-p.y))))})]},manualInput:function(d){var p=[ib(d,["size"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",za.prototype.size)));return new mxPoint(z.x+z.width/4,z.y+3*u/4)},function(z,u){this.state.style.size=Math.round(Math.max(0,Math.min(z.height,4*(u.y-z.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},dataStorage:function(d){return[ib(d,["size"],function(p){var z="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"),u=parseFloat(mxUtils.getValue(this.state.style,"size",z?Ma.prototype.fixedSize:Ma.prototype.size));return new mxPoint(p.x+p.width-u*(z?1:p.width),p.getCenterY())},function(p,z){p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(p.width,p.x+p.width-z.x)):Math.max(0,Math.min(1,(p.x+p.width-z.x)/p.width));this.state.style.size=p},!1)]},callout:function(d){var p=[ib(d,["size","position"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,
+"size",ca.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));mxUtils.getValue(this.state.style,"base",ca.prototype.base);return new mxPoint(z.x+x*z.width,z.y+z.height-u)},function(z,u){mxUtils.getValue(this.state.style,"base",ca.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(z.height,z.y+z.height-u.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["position2"],function(z){var u=
+Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ca.prototype.position2)));return new mxPoint(z.x+u*z.width,z.y+z.height)},function(z,u){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(u.x-z.x)/z.width)))/100},!1),ib(d,["base"],function(z){var u=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"size",ca.prototype.size))),x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position))),C=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
+"base",ca.prototype.base)));return new mxPoint(z.x+Math.min(z.width,x*z.width+C),z.y+z.height-u)},function(z,u){var x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ca.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(z.width,u.x-z.x-x*z.width)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},internalStorage:function(d){var p=[ib(d,["dx","dy"],function(z){var u=Math.max(0,Math.min(z.width,mxUtils.getValue(this.state.style,
+"dx",wa.prototype.dx))),x=Math.max(0,Math.min(z.height,mxUtils.getValue(this.state.style,"dy",wa.prototype.dy)));return new mxPoint(z.x+u,z.y+x)},function(z,u){this.state.style.dx=Math.round(Math.max(0,Math.min(z.width,u.x-z.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(z.height,u.y-z.y)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&p.push(vb(d));return p},module:function(d){return[ib(d,["jettyWidth","jettyHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
+"jettyWidth",Ba.prototype.jettyWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"jettyHeight",Ba.prototype.jettyHeight)));return new mxPoint(p.x+z/2,p.y+2*u)},function(p,z){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(p.height,z.y-p.y))/2)})]},corner:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),
+u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Xa.prototype.dy)));return new mxPoint(p.x+z,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,Math.min(p.width,z.x-p.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},tee:function(d){return[ib(d,["dx","dy"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"dy",Ra.prototype.dy)));
+return new mxPoint(p.x+(p.width+z)/2,p.y+u)},function(p,z){this.state.style.dx=Math.round(Math.max(0,2*Math.min(p.width/2,z.x-p.x-p.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},singleArrow:mb(1),doubleArrow:mb(.5),"mxgraph.arrows2.wedgeArrow":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed":nb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":nb(20,20),folder:function(d){return[ib(d,["tabWidth","tabHeight"],function(p){var z=Math.max(0,Math.min(p.width,mxUtils.getValue(this.state.style,
+"tabWidth",q.prototype.tabWidth))),u=Math.max(0,Math.min(p.height,mxUtils.getValue(this.state.style,"tabHeight",q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(z=p.width-z);return new mxPoint(p.x+z,p.y+u)},function(p,z){var u=Math.max(0,Math.min(p.width,z.x-p.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=p.width-u);this.state.style.tabWidth=Math.round(u);this.state.style.tabHeight=
+Math.round(Math.max(0,Math.min(p.height,z.y-p.y)))},!1)]},document:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(p.x+3*p.width/4,p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},tape:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));
+return new mxPoint(p.getCenterX(),p.y+z*p.height/2)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(z.y-p.y)/p.height*2))},!1)]},isoCube2:function(d){return[ib(d,["isoAngle"],function(p){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",c.isoAngle))))*Math.PI/200;return new mxPoint(p.x,p.y+Math.min(p.width*Math.tan(z),.5*p.height))},function(p,z){this.state.style.isoAngle=Math.max(0,50*(z.y-p.y)/p.height)},!0)]},cylinder2:qb(f.prototype.size),cylinder3:qb(l.prototype.size),
+offPageConnector:function(d){return[ib(d,["size"],function(p){var z=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(p.getCenterX(),p.y+(1-z)*p.height)},function(p,z){this.state.style.size=Math.max(0,Math.min(1,(p.y+p.height-z.y)/p.height))},!1)]},"mxgraph.basic.rect":function(d){var p=[Graph.createHandle(d,["size"],function(z){var u=Math.max(0,Math.min(z.width/2,z.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));
+return new mxPoint(z.x+u,z.y+u)},function(z,u){this.state.style.size=Math.round(100*Math.max(0,Math.min(z.height/2,z.width/2,u.x-z.x)))/100})];d=Graph.createHandle(d,["indent"],function(z){var u=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(z.x+.75*z.width,z.y+u*z.height/200)},function(z,u){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(u.y-z.y)/z.height)))/100});p.push(d);return p},step:zb(ka.prototype.size,!0,null,
+!0,ka.prototype.fixedSize),hexagon:zb(da.prototype.size,!0,.5,!0,da.prototype.fixedSize),curlyBracket:zb(ia.prototype.size,!1),display:zb($a.prototype.size,!1),cube:ub(1,m.prototype.size,!1),card:ub(.5,H.prototype.size,!0),loopLimit:ub(.5,Q.prototype.size,!0),trapezoid:Cb(.5,Z.prototype.size,Z.prototype.fixedSize),parallelogram:Cb(1,I.prototype.size,I.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=hb;var Ab=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
+function(){var d=Ab.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var p=this.state.style.shape;null==mxCellRenderer.defaultShapes[p]&&null==mxStencilRegistry.getStencil(p)?p=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(p=mxConstants.SHAPE_SWIMLANE);p=hb[p];null==p&&null!=this.state.shape&&this.state.shape.isRoundable()&&(p=hb[mxConstants.SHAPE_RECTANGLE]);null!=p&&(p=p(this.state),null!=p&&(d=null==d?p:d.concat(p)))}return d};mxEdgeHandler.prototype.createCustomHandles=
+function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=hb[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),wb=new mxPoint(1,0),yb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(yb),Math.sin(yb));var rb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,
+p,z,u,x){var C=d.view;u=null!=u&&0<u.length?u[0]:null;var E=d.absolutePoints,ea=E[0];E=E[E.length-1];null!=u&&(u=C.transformControlPoint(d,u));null==ea&&null!=p&&(ea=new mxPoint(p.getCenterX(),p.getCenterY()));null==E&&null!=z&&(E=new mxPoint(z.getCenterX(),z.getCenterY()));var M=sb.x,sa=sb.y,ma=wb.x,Wa=wb.y,gb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=ea){d=function(Fa,Ka,Ja){Fa-=bb.x;var Ga=Ka-bb.y;Ka=(Wa*Fa-ma*Ga)/(M*Wa-sa*ma);Fa=(sa*Fa-M*Ga)/(sa*ma-M*Wa);gb?
+(Ja&&(bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka),x.push(bb)),bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa)):(Ja&&(bb=new mxPoint(bb.x+ma*Fa,bb.y+Wa*Fa),x.push(bb)),bb=new mxPoint(bb.x+M*Ka,bb.y+sa*Ka));x.push(bb)};var bb=ea;null==u&&(u=new mxPoint(ea.x+(E.x-ea.x)/2,ea.y+(E.y-ea.y)/2));d(u.x,u.y,!0);d(E.x,E.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Bb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(d,p){if(p==mxEdgeStyle.IsometricConnector){var z=
+new mxElbowEdgeHandler(d);z.snapToTerminals=!1;return z}return Bb.apply(this,arguments)};A.prototype.constraints=[];G.prototype.getConstraints=function(d,p,z){d=[];var u=Math.tan(mxUtils.toRadians(30)),x=(.5-u)/2;u=Math.min(p,z/(.5+u));p=(p-u)/2;z=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+u*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+u,z+.25*u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p+u,z+.75*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p+.5*u,z+(1-x)*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z+.75*u));return d};c.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;u=Math.min(p*Math.tan(u),.5*z);d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));return d};ca.prototype.getConstraints=function(d,p,z){d=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var u=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-u)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-u)));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
+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))];Da.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.getConstraints=
+function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};H.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));p>=2*u&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};m.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-.5*u,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z+u)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(z-u)));return d};l.prototype.getConstraints=function(d,p,z){d=[];p=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,p));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-p));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,p+.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z-p-.5*(.5*z-p)));d.push(new mxConnectionConstraint(new mxPoint(.145,
+0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*p));d.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-p));d.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-p));return d};q.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition)?(d.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x))):(d.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-.5*u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,0)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,x)),d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,p,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(z-x)+x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,z));d.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.75,
+1),!1));return d};wa.prototype.constraints=mxRectangleShape.prototype.constraints;Ma.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;Ia.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxRectangleShape.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;
+$a.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(p,z/2),x=Math.min(p-u,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-u,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(x+p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Ba.prototype.getConstraints=function(d,p,z){p=parseFloat(mxUtils.getValue(d,"jettyWidth",Ba.prototype.jettyWidth))/2;d=parseFloat(mxUtils.getValue(d,"jettyHeight",Ba.prototype.jettyHeight));var u=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,p),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,p),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(z-.5*d,1.5*d)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(z-.5*d,3.5*d))];z>5*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,p));z>8*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,p));z>15*d&&u.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,p));return u};Q.prototype.constraints=mxRectangleShape.prototype.constraints;V.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)];B.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)];ya.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)];t.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)];N.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)];ka.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)];la.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)];I.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;L.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;Ra.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*p+.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),z));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p-u),z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-u),x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*p-.25*u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*x));return d};Xa.prototype.getConstraints=function(d,p,z){d=[];var u=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx)))),x=Math.max(0,Math.min(z,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+u),x));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,u,x));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,.5*(z+x)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,u,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*u,z));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return d};Qa.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)];Sa.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p-x),z-u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,z-u));return d};Ha.prototype.getConstraints=function(d,p,z){d=[];var u=z*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Sa.prototype.arrowWidth)))),x=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Sa.prototype.arrowSize))));u=(z-u)/2;d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,u));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p-x,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p-x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,z-u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));return d};Za.prototype.getConstraints=function(d,p,z){d=[];var u=Math.min(z,p),x=Math.max(0,Math.min(u,u*parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=(z-x)/2;var C=u+x,E=(p-x)/2;x=E+x;d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,E,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,z));d.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,z-.5*u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+x),u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,u));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,C));d.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(p+x),C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,u));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,C));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,u));return d};Y.prototype.constraints=
+null;y.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)];O.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)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
+Actions.prototype.init=function(){function b(F){n.escape();F=n.deleteCells(n.getDeletableCells(n.getSelectionCells()),F);null!=F&&n.setSelectionCells(F)}function e(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),J=0;J<F.length;J++)n.cellLabelChanged(F[J],"")}finally{n.getModel().endUpdate()}}}function g(F,J,c,f,l){l.getModel().beginUpdate();try{var t=l.getCellGeometry(F);null!=t&&c&&f&&(c/=f,t=t.clone(),1<c?t.height=t.width/c:t.width=t.height*c,l.getModel().setGeometry(F,
+t));l.setCellStyles(mxConstants.STYLE_CLIP_PATH,J,[F]);l.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[F])}finally{l.getModel().endUpdate()}}var m=this.editorUi,v=m.editor,n=v.graph,A=function(){return Action.prototype.isEnabled.apply(this,arguments)&&n.isEnabled()};this.addAction("new...",function(){n.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});var G=new Action("smartFit",function(){n.popupMenuHandler.hideMenu();var F=n.view.scale,
+J=n.container.scrollLeft,c=n.container.scrollTop,f=n.view.translate.x,l=n.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(F-n.view.scale)&&5>Math.abs(J-n.container.scrollLeft)&&5>Math.abs(c-n.container.scrollTop)&&f==n.view.translate.x&&l==n.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter");G.getTitle=function(){return mxResources.get("fitWindow")+" / "+mxResources.get("resetView")};this.put("smartFit",G);this.addAction("keyPressEnter",function(){n.isSelectionEmpty()?
+m.actions.get("smartFit").funct():n.isEnabled()&&n.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(F,J){try{var c=mxUtils.parseXml(F);v.graph.setSelectionCells(v.graph.importGraphModel(c.documentElement))}catch(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));m.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=A;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=A;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var F=new EditDiagramDialog(m);m.showDialog(F.container,620,420,!0,!1);F.init()}).isEnabled=A;this.addAction("pageSetup...",
function(){m.showDialog((new PageSetupDialog(m)).container,320,240,!0,!0)}).isEnabled=A;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(n,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 F=null;
-try{F=m.copyXml(),null!=F&&n.removeCells(F,!1)}catch(K){}try{null==F&&mxClipboard.cut(n)}catch(K){m.handleError(K)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(n)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(K){if(null!=K){n.getModel().beginUpdate();
-try{m.pasteXml(K,!0)}finally{n.getModel().endUpdate()}}else mxClipboard.paste(n)}),F=!0)}catch(K){}F||mxClipboard.paste(n)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function K(f){if(null!=f){for(var l=!0,t=0;t<f.length&&l;t++)l=l&&n.model.isEdge(f[t]);var q=n.view.translate;t=n.view.scale;var D=q.x,H=q.y;q=null;if(1==f.length&&l){var N=n.getCellGeometry(f[0]);null!=N&&(q=N.getTerminalPoint(!0))}q=null!=q?q:n.getBoundingBoxFromGeometry(f,l);null!=q&&(l=Math.round(n.snap(n.popupMenuHandler.triggerX/
-t-D)),t=Math.round(n.snap(n.popupMenuHandler.triggerY/t-H)),n.cellsMoved(f,l-q.x,t-q.y))}}function c(){n.getModel().beginUpdate();try{K(mxClipboard.paste(n))}finally{n.getModel().endUpdate()}}if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){n.getModel().beginUpdate();try{K(m.pasteXml(f,!0))}finally{n.getModel().endUpdate()}}else c()}),F=!0)}catch(f){}F||c()}});this.addAction("swap",function(){var F=
-n.getSelectionCells();2==F.length&&n.swapShapes(F[0],F[1])});this.addAction("copySize",function(){var F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.getModel().isVertex(F)&&(F=n.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedSize){n.getModel().beginUpdate();try{for(var F=n.getResizableCells(n.getSelectionCells()),K=0;K<F.length;K++)if(n.getModel().isVertex(F[K])){var c=
-n.getCellGeometry(F[K]);null!=c&&(c=c.clone(),c.width=m.copiedSize.width,c.height=m.copiedSize.height,n.getModel().setGeometry(F[K],c))}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=n.getSelectionCell()||n.getModel().getRoot();n.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F)try{n.isHtmlLabel(F)?
-m.writeHtmlToClipboard(n.getLabel(F),mxUtils.bind(this,function(K){m.handleError(K)})):m.writeTextToClipboard(n.getLabel(F),mxUtils.bind(this,function(K){m.handleError(K)}))}catch(K){m.handleError(K)}});this.addAction("pasteData",function(F,K){function c(t,q){var D=f.getValue(t);q=t.cloneValue(q);q.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||q.setAttribute("placeholders",D.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||q.setAttribute("label",n.convertValueToString(t));
-f.setValue(t,q)}F=null!=K?K:F;var f=n.getModel();if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedValue){f.beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());if(0==l.length)c(f.getRoot(),m.copiedValue);else for(K=0;K<l.length;K++)c(l[K],m.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,K){F=null!=K?K:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,
+try{F=m.copyXml(),null!=F&&n.removeCells(F,!1)}catch(J){}try{null==F&&mxClipboard.cut(n)}catch(J){m.handleError(J)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(F){}try{mxClipboard.copy(n)}catch(F){m.handleError(F)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(J){if(null!=J){n.getModel().beginUpdate();
+try{m.pasteXml(J,!0)}finally{n.getModel().endUpdate()}}else mxClipboard.paste(n)}),F=!0)}catch(J){}F||mxClipboard.paste(n)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(F){function J(f){if(null!=f){for(var l=!0,t=0;t<f.length&&l;t++)l=l&&n.model.isEdge(f[t]);var q=n.view.translate;t=n.view.scale;var D=q.x,H=q.y;q=null;if(1==f.length&&l){var N=n.getCellGeometry(f[0]);null!=N&&(q=N.getTerminalPoint(!0))}q=null!=q?q:n.getBoundingBoxFromGeometry(f,l);null!=q&&(l=Math.round(n.snap(n.popupMenuHandler.triggerX/
+t-D)),t=Math.round(n.snap(n.popupMenuHandler.triggerY/t-H)),n.cellsMoved(f,l-q.x,t-q.y))}}function c(){n.getModel().beginUpdate();try{J(mxClipboard.paste(n))}finally{n.getModel().endUpdate()}}if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){F=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(f){if(null!=f){n.getModel().beginUpdate();try{J(m.pasteXml(f,!0))}finally{n.getModel().endUpdate()}}else c()}),F=!0)}catch(f){}F||c()}});this.addAction("swap",function(){var F=
+n.getSelectionCells();2==F.length&&n.swapShapes(F[0],F[1])});this.addAction("copySize",function(){var F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.getModel().isVertex(F)&&(F=n.getCellGeometry(F),null!=F&&(m.copiedSize=new mxRectangle(F.x,F.y,F.width,F.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedSize){n.getModel().beginUpdate();try{for(var F=n.getResizableCells(n.getSelectionCells()),J=0;J<F.length;J++)if(n.getModel().isVertex(F[J])){var c=
+n.getCellGeometry(F[J]);null!=c&&(c=c.clone(),c.width=m.copiedSize.width,c.height=m.copiedSize.height,n.getModel().setGeometry(F[J],c))}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var F=n.getSelectionCell()||n.getModel().getRoot();n.isEnabled()&&null!=F&&(F=F.cloneValue(),null==F||isNaN(F.nodeType)||(m.copiedValue=F))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F)try{n.isHtmlLabel(F)?
+m.writeHtmlToClipboard(n.getLabel(F),mxUtils.bind(this,function(J){m.handleError(J)})):m.writeTextToClipboard(n.getLabel(F),mxUtils.bind(this,function(J){m.handleError(J)}))}catch(J){m.handleError(J)}});this.addAction("pasteData",function(F,J){function c(t,q){var D=f.getValue(t);q=t.cloneValue(q);q.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||q.setAttribute("placeholders",D.getAttribute("placeholders"));null!=F&&mxEvent.isShiftDown(F)||q.setAttribute("label",n.convertValueToString(t));
+f.setValue(t,q)}F=null!=J?J:F;var f=n.getModel();if(n.isEnabled()&&!n.isSelectionEmpty()&&null!=m.copiedValue){f.beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());if(0==l.length)c(f.getRoot(),m.copiedValue);else for(J=0;J<l.length;J++)c(l[J],m.copiedValue)}finally{f.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(F,J){F=null!=J?J:F;null!=F&&mxEvent.isShiftDown(F)?e():b(null!=F&&(mxEvent.isControlDown(F)||mxEvent.isMetaDown(F)||mxEvent.isAltDown(F)))},null,
null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{n.setSelectionCells(n.duplicateCells()),n.scrollCellToVisible(n.getSelectionCell())}catch(F){m.handleError(F)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action("merge",function(){var F=m.getSelectionState();if(null!=F.mergeCell){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",F.rowspan,[F.mergeCell]),
-n.setCellStyles("colspan",F.colspan,[F.mergeCell])}finally{n.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var F=m.getSelectionState();if(0<F.cells.length){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",null,F.cells),n.setCellStyles("colspan",null,F.cells)}finally{n.getModel().endUpdate()}}}));G=new Action("turn",function(F,K){F=null!=K?K:F;n.turnShapes(n.getResizableCells(n.getSelectionCells()),null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?
+n.setCellStyles("colspan",F.colspan,[F.mergeCell])}finally{n.getModel().endUpdate()}}}));this.put("unmergeCells",new Action("unmerge",function(){var F=m.getSelectionState();if(0<F.cells.length){n.getModel().beginUpdate();try{n.setCellStyles("rowspan",null,F.cells),n.setCellStyles("colspan",null,F.cells)}finally{n.getModel().endUpdate()}}}));G=new Action("turn",function(F,J){F=null!=J?J:F;n.turnShapes(n.getResizableCells(n.getSelectionCells()),null!=F?mxEvent.isShiftDown(F):!1)},null,null,mxClient.IS_SF?
null:Editor.ctrlKey+"+R");G.getTitle=function(){return mxResources.get("turn")+" / "+mxResources.get("reverse")};this.put("turn",G);this.put("selectConnections",new Action("selectEdges",function(F){F=n.getSelectionCell();n.isEnabled()&&null!=F&&n.addSelectionCells(n.getEdges(F))}));this.addAction("selectVertices",function(){n.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){n.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",
-function(){n.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){n.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),K=n.getCurrentCellStyle(n.getSelectionCell()),c=1==mxUtils.getValue(K,mxConstants.STYLE_EDITABLE,1)?0:1;n.setCellStyles(mxConstants.STYLE_MOVABLE,c,F);n.setCellStyles(mxConstants.STYLE_RESIZABLE,c,F);n.setCellStyles(mxConstants.STYLE_ROTATABLE,
+function(){n.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){n.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!n.isSelectionEmpty()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),J=n.getCurrentCellStyle(n.getSelectionCell()),c=1==mxUtils.getValue(J,mxConstants.STYLE_EDITABLE,1)?0:1;n.setCellStyles(mxConstants.STYLE_MOVABLE,c,F);n.setCellStyles(mxConstants.STYLE_RESIZABLE,c,F);n.setCellStyles(mxConstants.STYLE_ROTATABLE,
c,F);n.setCellStyles(mxConstants.STYLE_DELETABLE,c,F);n.setCellStyles(mxConstants.STYLE_EDITABLE,c,F);n.setCellStyles("locked",1==c?0:1,F);n.setCellStyles("connectable",c,F)}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){n.model.isVertex(n.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){n.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){n.exitGroup()},
null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){n.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){n.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){n.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){n.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){n.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",
function(F){n.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(F){n.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(n.isEnabled()){var F=mxUtils.sortCells(n.getSelectionCells(),!0);1!=F.length||n.isTable(F[0])||n.isTableRow(F[0])?(F=n.getCellsForGroup(F),1<F.length&&n.setSelectionCell(n.groupCells(null,0,F))):n.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",
-function(){if(n.isEnabled()){var F=n.getEditableCells(n.getSelectionCells());n.model.beginUpdate();try{var K=n.ungroupCells();if(null!=F)for(var c=0;c<F.length;c++)n.model.contains(F[c])&&(0==n.model.getChildCount(F[c])&&n.model.isVertex(F[c])&&n.setCellStyles("container","0",[F[c]]),K.push(F[c]))}finally{n.model.endUpdate()}0<K.length&&n.setSelectionCells(K)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(n.isEnabled()){var F=n.getSelectionCells();if(null!=F){for(var K=
-[],c=0;c<F.length;c++)n.isTableRow(F[c])||n.isTableCell(F[c])||K.push(F[c]);n.removeCellsFromParent(K);0<K.length&&n.scrollCellToVisible(K[0])}}});this.addAction("edit",function(){n.isEnabled()&&n.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=n.getSelectionCell()||n.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var K=
-"";if(mxUtils.isNode(F.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=F.value.getAttribute("tooltip"));null!=c&&(K=c)}K=new TextareaDialog(m,mxResources.get("editTooltip")+":",K,function(f){n.setTooltipForCell(F,f)});m.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=n.getLinkForCell(n.getSelectionCell());
-null!=F&&n.openLink(F)});this.addAction("editLink...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var K=n.getLinkForCell(F,!0)||"";m.showLinkDialog(K,mxResources.get("ok"),function(c,f,l){n.getModel().beginUpdate();try{n.setLinkForCell(F,0<c.length?c:null),n.setAttributeForCell(F,"linkTarget",l)}finally{n.getModel().endUpdate()}},!0,n.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action("image...",function(){n.isEnabled()&&
-!n.isCellLocked(n.getDefaultParent())&&(n.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,K,c){F=mxUtils.trim(F);if(0<F.length){var f=null,l=n.getLinkTitle(F);null!=K&&0<K.length&&(f=K[0].iconUrl,l=K[0].name||K[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),
-30<l.length&&(l=l.substring(0,30)+"..."));K=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));K.vertex=!0;f=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry([K],!0));K.geometry.x=f.x;K.geometry.y=f.y;n.setAttributeForCell(K,"linkTarget",c);n.setLinkForCell(K,F);n.cellSizeUpdated(K,!0);n.getModel().beginUpdate();try{K=n.addCell(K),n.fireEvent(new mxEventObject("cellsInserted",
-"cells",[K]))}finally{n.getModel().endUpdate()}n.setSelectionCell(K);n.scrollCellToVisible(n.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(n.isEnabled())if(n.cellEditor.isContentEditing()){var F=n.getSelectedElement(),K=n.getParentByName(F,"A",n.cellEditor.textarea),c="";if(null==K&&null!=F&&null!=F.getElementsByTagName)for(var f=F.getElementsByTagName("a"),l=0;l<f.length&&null==K;l++)f[l].textContent==F.textContent&&(K=f[l]);null!=
-K&&"A"==K.nodeName&&(c=K.getAttribute("href")||"",n.selectNode(K));var t=n.cellEditor.saveSelection();m.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(q){n.cellEditor.restoreSelection(t);null!=q&&n.insertLink(q)}))}else n.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=n.getSelectionCells();if(null!=F){n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=F[K];n.getModel().isVertex(c)&&
-(0<n.getModel().getChildCount(c)?n.updateGroupBounds([c],0,!0):n.updateCellSize(c))}}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){n.snapCellsToGrid(n.getSelectionCells(),n.gridSize)});this.addAction("formattedText",function(){n.stopEditing();var F=n.getCommonStyle(n.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";n.getModel().beginUpdate();try{for(var K=n.getEditableCells(n.getSelectionCells()),c=0;c<K.length;c++)if(state=
-n.getView().getState(K[c]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==F)n.removeTextStyleForCell(state.cell),n.setCellStyles("html",F,[K[c]]);else if("0"==f&&"1"==F){var l=mxUtils.htmlEntities(n.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));n.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));n.setCellStyles("html",F,[K[c]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=
-F?F:"0"],"cells",K))}finally{n.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=n.getView().getState(n.getSelectionCell()),K="wrap";n.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(K=null);n.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var F="0",K=n.getView().getState(n.getSelectionCell());null!=K&&(F=K.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),function(c){null!=c&&0<
+function(){if(n.isEnabled()){var F=n.getEditableCells(n.getSelectionCells());n.model.beginUpdate();try{var J=n.ungroupCells();if(null!=F)for(var c=0;c<F.length;c++)n.model.contains(F[c])&&(0==n.model.getChildCount(F[c])&&n.model.isVertex(F[c])&&n.setCellStyles("container","0",[F[c]]),J.push(F[c]))}finally{n.model.endUpdate()}0<J.length&&n.setSelectionCells(J)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(n.isEnabled()){var F=n.getSelectionCells();if(null!=F){for(var J=
+[],c=0;c<F.length;c++)n.isTableRow(F[c])||n.isTableCell(F[c])||J.push(F[c]);n.removeCellsFromParent(J);0<J.length&&n.scrollCellToVisible(J[0])}}});this.addAction("edit",function(){n.isEnabled()&&n.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var F=n.getSelectionCell()||n.getModel().getRoot();m.showDataDialog(F)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var J=
+"";if(mxUtils.isNode(F.value)){var c=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&F.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(c=F.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==c&&(c=F.value.getAttribute("tooltip"));null!=c&&(J=c)}J=new TextareaDialog(m,mxResources.get("editTooltip")+":",J,function(f){n.setTooltipForCell(F,f)});m.showDialog(J.container,320,200,!0,!0);J.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var F=n.getLinkForCell(n.getSelectionCell());
+null!=F&&n.openLink(F)});this.addAction("editLink...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&null!=F&&n.isCellEditable(F)){var J=n.getLinkForCell(F,!0)||"";m.showLinkDialog(J,mxResources.get("ok"),function(c,f,l){n.getModel().beginUpdate();try{n.setLinkForCell(F,0<c.length?c:null),n.setAttributeForCell(F,"linkTarget",l)}finally{n.getModel().endUpdate()}},!0,n.getLinkTargetForCell(F))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action("image...",function(){n.isEnabled()&&
+!n.isCellLocked(n.getDefaultParent())&&(n.clearSelection(),m.actions.get("image").funct())})).isEnabled=A;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action("link...",function(){n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(F,J,c){F=mxUtils.trim(F);if(0<F.length){var f=null,l=n.getLinkTitle(F);null!=J&&0<J.length&&(f=J[0].iconUrl,l=J[0].name||J[0].type,l=l.charAt(0).toUpperCase()+l.substring(1),
+30<l.length&&(l=l.substring(0,30)+"..."));J=new mxCell(l,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));J.vertex=!0;f=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry([J],!0));J.geometry.x=f.x;J.geometry.y=f.y;n.setAttributeForCell(J,"linkTarget",c);n.setLinkForCell(J,F);n.cellSizeUpdated(J,!0);n.getModel().beginUpdate();try{J=n.addCell(J),n.fireEvent(new mxEventObject("cellsInserted",
+"cells",[J]))}finally{n.getModel().endUpdate()}n.setSelectionCell(J);n.scrollCellToVisible(n.getSelectionCell())}},!0)},null,null,"L")).isEnabled=A;this.addAction("link...",mxUtils.bind(this,function(){if(n.isEnabled())if(n.cellEditor.isContentEditing()){var F=n.getSelectedElement(),J=n.getParentByName(F,"A",n.cellEditor.textarea),c="";if(null==J&&null!=F&&null!=F.getElementsByTagName)for(var f=F.getElementsByTagName("a"),l=0;l<f.length&&null==J;l++)f[l].textContent==F.textContent&&(J=f[l]);null!=
+J&&"A"==J.nodeName&&(c=J.getAttribute("href")||"",n.selectNode(J));var t=n.cellEditor.saveSelection();m.showLinkDialog(c,mxResources.get("ok"),mxUtils.bind(this,function(q){n.cellEditor.restoreSelection(t);null!=q&&n.insertLink(q)}))}else n.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=A;this.addAction("autosize",function(){var F=n.getSelectionCells();if(null!=F){n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=F[J];n.getModel().isVertex(c)&&
+(0<n.getModel().getChildCount(c)?n.updateGroupBounds([c],0,!0):n.updateCellSize(c))}}finally{n.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){n.snapCellsToGrid(n.getSelectionCells(),n.gridSize)});this.addAction("formattedText",function(){n.stopEditing();var F=n.getCommonStyle(n.getSelectionCells());F="1"==mxUtils.getValue(F,"html","0")?null:"1";n.getModel().beginUpdate();try{for(var J=n.getEditableCells(n.getSelectionCells()),c=0;c<J.length;c++)if(state=
+n.getView().getState(J[c]),null!=state){var f=mxUtils.getValue(state.style,"html","0");if("1"==f&&null==F)n.removeTextStyleForCell(state.cell),n.setCellStyles("html",F,[J[c]]);else if("0"==f&&"1"==F){var l=mxUtils.htmlEntities(n.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(l=l.replace(/\n/g,"<br/>"));n.cellLabelChanged(state.cell,Graph.sanitizeHtml(l));n.setCellStyles("html",F,[J[c]])}}m.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=
+F?F:"0"],"cells",J))}finally{n.getModel().endUpdate()}});this.addAction("wordWrap",function(){var F=n.getView().getState(n.getSelectionCell()),J="wrap";n.stopEditing();null!=F&&"wrap"==F.style[mxConstants.STYLE_WHITE_SPACE]&&(J=null);n.setCellStyles(mxConstants.STYLE_WHITE_SPACE,J)});this.addAction("rotation",function(){var F="0",J=n.getView().getState(n.getSelectionCell());null!=J&&(F=J.style[mxConstants.STYLE_ROTATION]||F);F=new FilenameDialog(m,F,mxResources.get("apply"),function(c){null!=c&&0<
c.length&&n.setCellStyles(mxConstants.STYLE_ROTATION,c)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(F.container,375,80,!0,!0);F.init()});this.addAction("resetView",function(){n.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(F){n.isFastZoomEnabled()?n.lazyZoom(!0,!0,m.buttonZoomDelay):n.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(F){n.isFastZoomEnabled()?n.lazyZoom(!1,
!0,m.buttonZoomDelay):n.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){n.pageVisible&&n.isSelectionEmpty()?n.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(2):this.get("pageView").funct()}),null,null,
-Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(K){K=parseInt(K);!isNaN(K)&&0<K&&n.zoomTo(K/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}),null,
-null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(K){K=parseInt(K);!isNaN(K)&&0<K&&(K=new ChangePageSetup(m,null,null,null,K/100),K.ignoreColor=!0,K.ignoreImage=!0,n.model.execute(K))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));G=null;G=this.addAction("grid",function(){n.setGridEnabled(!n.isGridEnabled());
+Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){n.pageVisible?n.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action("custom...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(J){J=parseInt(J);!isNaN(J)&&0<J&&n.zoomTo(J/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}),null,
+null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var F=new FilenameDialog(this.editorUi,parseInt(100*n.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(J){J=parseInt(J);!isNaN(J)&&0<J&&(J=new ChangePageSetup(m,null,null,null,J/100),J.ignoreColor=!0,J.ignoreImage=!0,n.model.execute(J))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(F.container,300,80,!0,!0);F.init()}));G=null;G=this.addAction("grid",function(){n.setGridEnabled(!n.isGridEnabled());
n.defaultGridEnabled=n.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.isGridEnabled()});G.setEnabled(!1);G=this.addAction("guides",function(){n.graphHandler.guidesEnabled=!n.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.graphHandler.guidesEnabled});G.setEnabled(!1);G=this.addAction("animations",
function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.enableAnimations});G=this.addAction("tooltips",function(){n.tooltipHandler.setEnabled(!n.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.tooltipHandler.isEnabled()});G=this.addAction("collapseExpand",function(){var F=
new ChangePageSetup(m);F.ignoreColor=!0;F.ignoreImage=!0;F.foldingEnabled=!n.foldingEnabled;n.model.execute(F)});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.foldingEnabled});G.isEnabled=A;G=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!n.pageVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return n.pageVisible});G=this.addAction("connectionArrows",function(){n.connectionArrowsEnabled=!n.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},
null,null,"Alt+Shift+A");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionArrowsEnabled});G=this.addAction("connectionPoints",function(){n.setConnectable(!n.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isEnabled()});G=this.addAction("copyConnect",function(){n.connectionHandler.setCreateTarget(!n.connectionHandler.isCreateTarget());
m.fireEvent(new mxEventObject("copyConnectChanged"))});G.setToggleAction(!0);G.setSelectedCallback(function(){return n.connectionHandler.isCreateTarget()});G.isEnabled=A;G=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});G.setToggleAction(!0);G.setSelectedCallback(function(){return m.editor.autosave});G.isEnabled=A;G.visible=!1;this.addAction("help",function(){var F="";mxResources.isLanguageSupported(mxClient.language)&&(F="_"+mxClient.language);n.openLink(RESOURCES_PATH+
-"/help"+F+".html")});var S=!1;G=new Action("about",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)});G.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",G);G=mxUtils.bind(this,function(F,K,c,f){return this.addAction(F,function(){if(null!=c&&n.cellEditor.isContentEditing())c();else{n.stopEditing(!1);n.getModel().beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());n.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
-K,l);(K&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?n.updateLabelElements(l,function(q){q.style.fontWeight=null;"B"==q.nodeName&&n.replaceElement(q)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?n.updateLabelElements(l,function(q){q.style.fontStyle=null;"I"==q.nodeName&&n.replaceElement(q)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.updateLabelElements(l,function(q){q.style.textDecoration=null;"U"==q.nodeName&&n.replaceElement(q)});for(var t=0;t<l.length;t++)0==n.model.getChildCount(l[t])&&
+"/help"+F+".html")});var R=!1;G=new Action("about",function(){R||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){R=!1}),R=!0)});G.getTitle=function(){return mxResources.get("about")+" Graph Editor..."};this.put("about",G);G=mxUtils.bind(this,function(F,J,c,f){return this.addAction(F,function(){if(null!=c&&n.cellEditor.isContentEditing())c();else{n.stopEditing(!1);n.getModel().beginUpdate();try{var l=n.getEditableCells(n.getSelectionCells());n.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+J,l);(J&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?n.updateLabelElements(l,function(q){q.style.fontWeight=null;"B"==q.nodeName&&n.replaceElement(q)}):(J&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?n.updateLabelElements(l,function(q){q.style.fontStyle=null;"I"==q.nodeName&&n.replaceElement(q)}):(J&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&n.updateLabelElements(l,function(q){q.style.textDecoration=null;"U"==q.nodeName&&n.replaceElement(q)});for(var t=0;t<l.length;t++)0==n.model.getChildCount(l[t])&&
n.autoSizeCell(l[t],!1)}finally{n.getModel().endUpdate()}}},null,null,f)});G("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");G("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");G("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",
"default",n.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",n.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
-"backcolor",null,"default",n.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("removeFormat",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&!n.isEditing()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),K=0;K<F.length;K++)n.removeTextStyleForCell(F[K],!0)}finally{n.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+"backcolor",null,"default",n.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",n.shapeForegroundColor)});this.addAction("removeFormat",function(){if(n.isEnabled()&&!n.isSelectionEmpty()&&!n.isEditing()){n.getModel().beginUpdate();try{for(var F=n.getSelectionCells(),J=0;J<F.length;J++)n.removeTextStyleForCell(F[J],!0)}finally{n.getModel().endUpdate()}}});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(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,null),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dashed",function(){n.getModel().beginUpdate();
try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("dotted",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_DASHED,"1"),n.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",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("sharp",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});
-this.addAction("rounded",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!n.isSelectionEmpty()&&n.isEnabled()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),K=n.getCurrentCellStyle(F[0]),
-c="1"==mxUtils.getValue(K,mxConstants.STYLE_ROUNDED,"0")?"0":"1";n.setCellStyles(mxConstants.STYLE_ROUNDED,c);n.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}});this.addAction("curved",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=n.view.getState(n.getSelectionCell()),K="1";null!=F&&null!=n.getFoldingImage(F)&&(K="0");n.setCellStyles("collapsible",K);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[K],"cells",n.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var F=n.getEditableCells(n.getSelectionCells());if(null!=F&&0<F.length){var K=n.getModel();K=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",K.getStyle(F[0])||"",function(c){null!=c&&n.setCellStyle(mxUtils.trim(c),F)},null,null,400,220);this.editorUi.showDialog(K.container,420,300,!0,!0);K.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){n.isEnabled()&&!n.isSelectionEmpty()&&m.setDefaultStyle(n.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){n.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=n.getSelectionCell();if(null!=F&&n.getModel().isEdge(F)){var K=v.graph.selectionCellsHandler.getHandler(F);if(K instanceof mxEdgeHandler){var c=n.view.translate,f=n.view.scale,l=c.x;c=c.y;F=n.getModel().getParent(F);for(var t=n.getCellGeometry(F);n.getModel().isVertex(F)&&null!=t;)l+=t.x,c+=t.y,F=
-n.getModel().getParent(F),t=n.getCellGeometry(F);l=Math.round(n.snap(n.popupMenuHandler.triggerX/f-l));f=Math.round(n.snap(n.popupMenuHandler.triggerY/f-c));K.addPointAt(K.state,l,f)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=
-F[K];n.getModel().isEdge(c)&&(n.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),n.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{n.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var K=0;K<F.length;K++){var c=F[K];if(n.getModel().isEdge(c)){var f=n.getCellGeometry(c);
+this.addAction("rounded",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),n.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!n.isSelectionEmpty()&&n.isEnabled()){n.getModel().beginUpdate();try{var F=n.getSelectionCells(),J=n.getCurrentCellStyle(F[0]),
+c="1"==mxUtils.getValue(J,mxConstants.STYLE_ROUNDED,"0")?"0":"1";n.setCellStyles(mxConstants.STYLE_ROUNDED,c);n.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[c,"0"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}}});this.addAction("curved",function(){n.getModel().beginUpdate();try{n.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),n.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",n.getSelectionCells()))}finally{n.getModel().endUpdate()}});this.addAction("collapsible",function(){var F=n.view.getState(n.getSelectionCell()),J="1";null!=F&&null!=n.getFoldingImage(F)&&(J="0");n.setCellStyles("collapsible",J);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[J],"cells",n.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var F=n.getEditableCells(n.getSelectionCells());if(null!=F&&0<F.length){var J=n.getModel();J=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",J.getStyle(F[0])||"",function(c){null!=c&&n.setCellStyle(mxUtils.trim(c),F)},null,null,400,220);this.editorUi.showDialog(J.container,420,300,!0,!0);J.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){n.isEnabled()&&!n.isSelectionEmpty()&&m.setDefaultStyle(n.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){n.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var F=n.getSelectionCell();if(null!=F&&n.getModel().isEdge(F)){var J=v.graph.selectionCellsHandler.getHandler(F);if(J instanceof mxEdgeHandler){var c=n.view.translate,f=n.view.scale,l=c.x;c=c.y;F=n.getModel().getParent(F);for(var t=n.getCellGeometry(F);n.getModel().isVertex(F)&&null!=t;)l+=t.x,c+=t.y,F=
+n.getModel().getParent(F),t=n.getCellGeometry(F);l=Math.round(n.snap(n.popupMenuHandler.triggerX/f-l));f=Math.round(n.snap(n.popupMenuHandler.triggerY/f-c));J.addPointAt(J.state,l,f)}}});this.addAction("removeWaypoint",function(){var F=m.actions.get("removeWaypoint");null!=F.handler&&F.handler.removePoint(F.handler.state,F.index)});this.addAction("clearAnchors",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=
+F[J];n.getModel().isEdge(c)&&(n.setCellStyles(mxConstants.STYLE_EXIT_X,null,[c]),n.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[c]),n.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[c]))}}finally{n.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var F=n.getSelectionCells();if(null!=F){F=n.getEditableCells(n.addAllEdges(F));n.getModel().beginUpdate();try{for(var J=0;J<F.length;J++){var c=F[J];if(n.getModel().isEdge(c)){var f=n.getCellGeometry(c);
null!=f&&(f=f.clone(),f.points=null,f.x=0,f.y=0,f.offset=null,n.getModel().setGeometry(c,f))}}}finally{n.getModel().endUpdate()}}},null,null,"Alt+Shift+R");G=this.addAction("subscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");G=this.addAction("superscript",mxUtils.bind(this,function(){n.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");G=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,F-1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");G=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!n.isSelectionEmpty()){var F=n.getCurrentCellStyle(n.getSelectionCell());F=mxUtils.getValue(F,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=n.getView().getState(n.getSelectionCell()),c="",f=null;null!=K&&(c=K.style[mxConstants.STYLE_IMAGE]||c,f=K.style[mxConstants.STYLE_CLIP_PATH]||f);var l=n.cellEditor.saveSelection();
-m.showImageDialog(F,c,function(t,q,D,H,N,L){if(n.cellEditor.isContentEditing())n.cellEditor.restoreSelection(l),n.insertImage(t,q,D);else{var J=n.getSelectionCells();if(null!=t&&(0<t.length||0<J.length)){var Y=null;n.getModel().beginUpdate();try{if(0==J.length){J=[n.insertVertex(n.getDefaultParent(),null,"",0,0,q,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ha=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(J,!0));J[0].geometry.x=ha.x;J[0].geometry.y=
-ha.y;null!=H&&g(J[0],H,N,L,n);Y=J;n.fireEvent(new mxEventObject("cellsInserted","cells",Y))}n.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,J);var ea=n.getCurrentCellStyle(J[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_SHAPE,"image",J):0==t.length&&n.setCellStyles(mxConstants.STYLE_SHAPE,null,J);null==H&&n.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,J);if(null!=q&&null!=D)for(t=0;t<J.length;t++){var aa=J[t];if("0"!=n.getCurrentCellStyle(aa).expand){var na=
-n.getModel().getGeometry(aa);null!=na&&(na=na.clone(),na.width=q,na.height=D,n.getModel().setGeometry(aa,na))}null!=H&&g(aa,H,N,L,n)}}finally{n.getModel().endUpdate()}null!=Y&&(n.setSelectionCells(Y),n.scrollCellToVisible(Y[0]))}}},n.cellEditor.isContentEditing(),!n.cellEditor.isContentEditing(),!0,f)}}).isEnabled=A;this.addAction("crop...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F){var K=n.getCurrentCellStyle(F),c=K[mxConstants.STYLE_IMAGE],
-f=K[mxConstants.STYLE_SHAPE];c&&"image"==f&&(K=new CropImageDialog(m,c,K[mxConstants.STYLE_CLIP_PATH],function(l,t,q){g(F,l,t,q,n)}),m.showDialog(K.container,300,390,!0,!0))}}).isEnabled=A;G=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",
+mxConstants.DEFAULT_FONTSIZE);n.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,F+1),n.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())){var F=mxResources.get("image")+" ("+mxResources.get("url")+"):",J=n.getView().getState(n.getSelectionCell()),c="",f=null;null!=J&&(c=J.style[mxConstants.STYLE_IMAGE]||c,f=J.style[mxConstants.STYLE_CLIP_PATH]||f);var l=n.cellEditor.saveSelection();
+m.showImageDialog(F,c,function(t,q,D,H,N,L){if(n.cellEditor.isContentEditing())n.cellEditor.restoreSelection(l),n.insertImage(t,q,D);else{var I=n.getSelectionCells();if(null!=t&&(0<t.length||0<I.length)){var Z=null;n.getModel().beginUpdate();try{if(0==I.length){I=[n.insertVertex(n.getDefaultParent(),null,"",0,0,q,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ia=n.getCenterInsertPoint(n.getBoundingBoxFromGeometry(I,!0));I[0].geometry.x=ia.x;I[0].geometry.y=
+ia.y;null!=H&&g(I[0],H,N,L,n);Z=I;n.fireEvent(new mxEventObject("cellsInserted","cells",Z))}n.setCellStyles(mxConstants.STYLE_IMAGE,0<t.length?t:null,I);var fa=n.getCurrentCellStyle(I[0]);"image"!=fa[mxConstants.STYLE_SHAPE]&&"label"!=fa[mxConstants.STYLE_SHAPE]?n.setCellStyles(mxConstants.STYLE_SHAPE,"image",I):0==t.length&&n.setCellStyles(mxConstants.STYLE_SHAPE,null,I);null==H&&n.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,I);if(null!=q&&null!=D)for(t=0;t<I.length;t++){var ba=I[t];if("0"!=n.getCurrentCellStyle(ba).expand){var na=
+n.getModel().getGeometry(ba);null!=na&&(na=na.clone(),na.width=q,na.height=D,n.getModel().setGeometry(ba,na))}null!=H&&g(ba,H,N,L,n)}}finally{n.getModel().endUpdate()}null!=Z&&(n.setSelectionCells(Z),n.scrollCellToVisible(Z[0]))}}},n.cellEditor.isContentEditing(),!n.cellEditor.isContentEditing(),!0,f)}}).isEnabled=A;this.addAction("crop...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F){var J=n.getCurrentCellStyle(F),c=J[mxConstants.STYLE_IMAGE],
+f=J[mxConstants.STYLE_SHAPE];c&&"image"==f&&(J=new CropImageDialog(m,c,J[mxConstants.STYLE_CLIP_PATH],function(l,t,q){g(F,l,t,q,n)}),m.showDialog(J.container,300,390,!0,!0))}}).isEnabled=A;G=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");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));G=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,
null,Editor.ctrlKey+"+Shift+P");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));G=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");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F&&null!=F.geometry){var K=
-new ConnectionPointsDialog(m,F);m.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){var n=b;"..."==n.substring(n.length-3)&&(n=n.substring(0,n.length-3));return this.put(n,new Action(b,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");G.setToggleAction(!0);G.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var F=n.getSelectionCell();if(n.isEnabled()&&!n.isCellLocked(n.getDefaultParent())&&null!=F&&null!=F.geometry){var J=
+new ConnectionPointsDialog(m,F);m.showDialog(J.container,350,450,!0,!1,function(){J.destroy()});J.init()}},null,null,"Alt+Shift+Q").isEnabled=A};Actions.prototype.addAction=function(b,e,g,m,v){var n=b;"..."==n.substring(n.length-3)&&(n=n.substring(0,n.length-3));return this.put(n,new Action(b,e,g,m,v))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,g,m,v){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=v;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.getTitle=function(){var b=this.label;"..."==b.substring(b.length-3)?(b=b.substring(0,b.length-3),b=mxResources.get(b)+"..."):b=mxResources.get(b);return b};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;DrawioFile.RESTRICT_EXPORT=!1;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;
@@ -3076,25 +3075,25 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e
function(A){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,A))}),v,n):this.updateFile(mxUtils.bind(this,function(){g&&(window.clearTimeout(m),null!=b&&b())}),v,n)}};
DrawioFile.prototype.updateFile=function(b,e,g,m,v){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",v,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,
m,v):this.reloadFile(b,e))}catch(A){null!=e&&e(A)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,n)],S=this.ignorePatches(G);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,
-this.isRealtime()?this.ownPages:this.ui.pages):null,K=this.ui.patchPages(this.ui.clonePages(A),G[0]),c=this.ui.getHashValueForPages(K,{}),f=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",n,"patched",K,"patches",G,"changes",F,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(g,G,null,null,"mergeFile",
+DrawioFile.prototype.mergeFile=function(b,e,g,m,v){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var A=this.getShadowPages(),G=[this.ui.diffPages(null!=m?m:A,n)],R=this.ignorePatches(G);if(R)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",R),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var F=this.isModified()?this.ui.diffPages(A,
+this.isRealtime()?this.ownPages:this.ui.pages):null,J=this.ui.patchPages(this.ui.clonePages(A),G[0]),c=this.ui.getHashValueForPages(J,{}),f=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",A,"pages",n,"patched",J,"patches",G,"changes",F,"checksum",c,"current",f,"valid",c==f,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",v);if(null!=c&&c!=f)this.checksumError(g,G,null,null,"mergeFile",
c,f,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var l=this.sync.patchRealtime(G,DrawioFile.LAST_WRITE_WINS?F:null,null,v);null==l||mxUtils.isEmptyObject(l)||G.push(l)}this.patch(G,DrawioFile.LAST_WRITE_WINS?F:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(D);try{var t=this.getCurrentUser(),q=null!=t?
t.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),q,D)}catch(H){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(D){null!=g&&g(D)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var v=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(v=this.ui.anonymizeNode(v,!0));v.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,v,!0);g.appendChild(v)}return mxUtils.getPrettyXml(g)};
DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,g,m,v,n,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),F=null!=S?S.id:"unknown",K=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(e).length,f=null;if(null!=e&&1E3>c){b=[];for(g=0;g<e.length;g++)b.push(this.ui.anonymizePatch(e[g]));f=JSON.stringify(b);f=null!=f&&1E3>
-f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var t=null!=f?"report":"error",q=this.ui.getHashValueForPages(l.getShadowPages()),D="unknown",H="unknown",N="unknown";try{var L=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(D=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(N=L.getAttribute("type")))}catch(J){}EditorUi.logError("Checksum "+
-t+" in "+v,null,this.getMode()+"."+K,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=q?"-latest_"+q:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+D)+("-latestAgent_"+H)+("-latestType_"+N));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+K,action:v,label:"user_"+
-F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(J){}}),function(){})}catch(l){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),K=F.lastIndexOf(".");A="xml";0<K&&(A=F.substring(K));var c=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()+" ("+A+")\nUser="+G+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.checksumError=function(b,e,g,m,v,n,A,G){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var R=this.getCurrentUser(),F=null!=R?R.id:"unknown",J=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",c=JSON.stringify(e).length,f=null;if(null!=e&&1E3>c){b=[];for(g=0;g<e.length;g++)b.push(this.ui.anonymizePatch(e[g]));f=JSON.stringify(b);f=null!=f&&1E3>
+f.length?Graph.compress(f):null}this.getLatestVersion(mxUtils.bind(this,function(l){try{var t=null!=f?"report":"error",q=this.ui.getHashValueForPages(l.getShadowPages()),D="unknown",H="unknown",N="unknown";try{var L=null!=l.initialData&&0<l.initialData.length?mxUtils.parseXml(l.initialData).documentElement:null;null!=L&&(null!=L.getAttribute("version")&&(D=L.getAttribute("version")),null!=L.getAttribute("agent")&&(H=L.getAttribute("agent")),null!=L.getAttribute("type")&&(N=L.getAttribute("type")))}catch(I){}EditorUi.logError("Checksum "+
+t+" in "+v,null,this.getMode()+"."+J,"user_"+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+(null!=f?"-json_"+f:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=A?"-current_"+A:"")+(null!=G?"-rev_"+this.ui.hashValue(G):"")+(null!=q?"-latest_"+q:"")+"-latestRev_"+this.ui.hashValue(l.getCurrentRevisionId())+("-latestVersion_"+D)+("-latestAgent_"+H)+("-latestType_"+N));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+J,action:v,label:"user_"+
+F+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),function(){})}catch(l){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var v=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),A=this.getCurrentUser(),G=null!=A?this.ui.hashValue(A.id):"unknown",R=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",F=this.getTitle(),J=F.lastIndexOf(".");A="xml";0<J&&(A=F.substring(J));var c=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()+" ("+A+")\nUser="+G+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!=e?"\n\n"+e:
"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+c+"\n\nShadow:\n"+v+"\n\nData:\n"+n,m)}catch(f){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,v=m.getSelectionCells(),n=m.getViewState(),A=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(G){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[n],"latestFile",G);null!=G?(this.ui.replaceFileData(G.getData(),
-[g]),this.ui.restoreViewState(A,n,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(A,n,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};
+[g]),this.ui.restoreViewState(A,n,v),this.setDescriptor(G.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var R=this.ui.getCurrentFile();null!=R&&(R.stats=this.stats,R.patch([g]),R.fileChanged());this.ui.restoreViewState(A,n,v);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(G){null!=e&&e(G)}};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};
-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,n=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,K=G.mathEnabled,c=G.cellRenderer.redraw;G.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};G.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var v=this.ui.editor.undoManager,n=v.history.slice(),A=v.indexOfNextAdd,G=this.ui.editor.graph;G.container.style.visibility="hidden";var R=this.changeListenerEnabled;this.changeListenerEnabled=g;var F=G.foldingEnabled,J=G.mathEnabled,c=G.cellRenderer.redraw;G.cellRenderer.redraw=function(H){H.view.graph.isEditing(H.cell)&&(H.view.graph.scrollCellToVisible(H.cell),H.view.graph.cellEditor.resize());c.apply(this,arguments)};G.model.beginUpdate();
try{if(g){for(var f=this.ui.pages.slice(),l=this.ui.currentPage,t=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),q=0;q<t.length;q++){var D=mxUtils.indexOf(this.ui.pages,t[q]);0>D?this.ui.insertPage(t[q],Math.min(q,this.ui.pages.length)):this.ui.movePage(D,q)}for(q=0;q<f.length;q++)0>mxUtils.indexOf(t,f[q])&&this.ui.removePage(f[q]);0<=mxUtils.indexOf(this.ui.pages,l)&&this.ui.selectPage(l,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=c;this.changeListenerEnabled=S;g||(v.history=n,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)K!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);G.checkDefaultParent()}finally{G.container.style.visibility="";G.model.endUpdate();G.cellRenderer.redraw=c;this.changeListenerEnabled=R;g||(v.history=n,v.indexOfNextAdd=A,v.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)J!=G.mathEnabled?(this.ui.editor.updateGraphComponents(),G.refresh()):(F!=G.foldingEnabled?
G.view.revalidate():G.view.validate(),G.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};
DrawioFile.prototype.save=function(b,e,g,m,v,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",v,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!v&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(A){if(null!=g)g(A);else throw A;}};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};
@@ -3145,7 +3144,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
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);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,g,m,v,n,A){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(n,e,g,m,v,A)}catch(F){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),S=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,F)}catch(K){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};
+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(F);try{var G=this.getCurrentUser(),R=null!=G?G.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),R,F)}catch(J){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(F){this.descriptorChanged(),null!=m&&m(F)}};
DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var v=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var A=this.isAutosaveRevision();
A&&(this.lastAutosaveRevision=(new Date).getTime());this.save(A,mxUtils.bind(this,function(G){this.autosaveCompleted();null!=g&&g(G)}),mxUtils.bind(this,function(G){null!=m&&m(G)}))}else this.isModified()||this.ui.clearStatus(),null!=g&&g(null)}catch(G){null!=m&&m(G)}}),v);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",v,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -3154,10 +3153,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
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,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,v,n,A){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=v;this.desc=n;this.editable=A};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,v){this.saveAs(this.title,e,g,m,v)};LocalFile.prototype.saveAs=function(b,e,g,m,v){this.saveFile(b,!1,e,g,null,m,v)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,g,m,v,n,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),K=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var f=mxUtils.bind(this,function(t){this.savingFile=!1;null!=m&&m({error:t})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(t){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);A||this.desc.lastModified==q.lastModified?t.write(G?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){t.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(D){try{var H=this.desc;this.savingFile=!1;this.desc=D;this.fileSaved(S,H,F,f);this.removeDraft()}catch(N){f(N)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;f(q)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,G?"image/png":"text/xml",G);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){K(c)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):K(S)};
+LocalFile.prototype.saveFile=function(b,e,g,m,v,n,A){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;v||this.updateFileData();var G=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var R=this.getData(),F=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),J=mxUtils.bind(this,function(c){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var f=mxUtils.bind(this,function(t){this.savingFile=!1;null!=m&&m({error:t})});this.saveDraft(R);this.fileHandle.createWritable().then(mxUtils.bind(this,function(t){this.fileHandle.getFile().then(mxUtils.bind(this,function(q){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[q],"conflict",this.desc.lastModified!=q.lastModified);A||this.desc.lastModified==q.lastModified?t.write(G?this.ui.base64ToBlob(c,"image/png"):c).then(mxUtils.bind(this,function(){t.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(D){try{var H=this.desc;this.savingFile=!1;this.desc=D;this.fileSaved(R,H,F,f);this.removeDraft()}catch(N){f(N)}}),f)}),f)}),f):(this.inConflictState=!0,f())}),mxUtils.bind(this,function(q){this.invalidFileHandle=!0;f(q)}))}),f)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,G?"image/png":"text/xml",G);else if(c.length<MAX_REQUEST_SIZE){var l=b.lastIndexOf(".");l=0<l?b.substring(l+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+l+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+(G?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));F()}});G?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(c){J(c)}),m,this.ui.getCurrentFile()!=this?R:null,e.scale,e.border)):J(R)};
LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
@@ -3231,207 +3230,208 @@ B){k=B.editorUi.editor.graph.getCellStyle(1==k.vertices.length&&0==k.edges.lengt
{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(k,B){return B.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,B){return 0<k.vertices.length&&0==k.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",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&B.isSwimlane(k)},
-isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&(B.isSwimlane(k)||0<B.model.getChildCount(k))},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,B){var I=1==k.vertices.length&&0==k.edges.length?
-k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=I&&(B.isContainer(I)&&"0"!=k.style.collapsible||!B.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length&&!B.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
+isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,B){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=k&&(B.isSwimlane(k)||0<B.model.getChildCount(k))},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,B){var K=1==k.vertices.length&&0==k.edges.length?
+k.vertices[0]:null;B=B.editorUi.editor.graph;return null!=K&&(B.isContainer(K)&&"0"!=k.style.collapsible||!B.isContainer(K)&&"1"==k.style.collapsible)},isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,B){return 1==k.vertices.length&&0==k.edges.length&&!B.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",
type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(k,B){B=B.editorUi.editor.graph.model;return 0<k.vertices.length?B.isVertex(B.getParent(k.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(k,B){k=0<k.vertices.length?B.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,B){return 0<k.vertices.length&&B.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{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(k,B){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||B.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,B){var K=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||B.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(k,B){return 0<k.vertices.length&&B.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(k){var B=rough.canvas({getContext:function(){return k}});B.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=I.stroke&&this._drawToContext(k,T,I);break;case "fillPath":this._drawToContext(k,T,I);break;case "fillSketch":this.fillSketch(k,T,I)}}};B.fillSketch=function(I,U,P){var T=k.state.strokeColor,X=k.state.strokeWidth,Z=k.state.strokeAlpha,ka=k.state.dashed,va=P.fillWeight;
-0>va&&(va=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(va);k.setDashed(!1);this._drawToContext(I,U,P);k.setDashed(ka);k.setStrokeWidth(X);k.setStrokeColor(T);k.setStrokeAlpha(Z)};B._drawToContext=function(I,U,P){I.begin();for(var T=0;T<U.ops.length;T++){var X=U.ops[T],Z=X.data;switch(X.op){case "move":I.moveTo(Z[0],Z[1]);break;case "bcurveTo":I.curveTo(Z[0],Z[1],Z[2],Z[3],Z[4],Z[5]);break;case "lineTo":I.lineTo(Z[0],Z[1])}}I.end();"fillPath"===
-U.type&&P.filled?I.fill():I.stroke()};return B};(function(){function k(T,X,Z){this.canvas=T;this.rc=X;this.shape=Z;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
-mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,X){var Z=1;if(null!=this.shape.state){var ka=this.shape.state.cell.id;if(null!=ka)for(var va=0;va<ka.length;va++)Z=(Z<<5)-Z+ka.charCodeAt(va)<<0}Z={strokeWidth:this.canvas.state.strokeWidth,seed:Z,preserveVertices:!0};ka=this.rc.getDefaultOptions();Z.stroke=T?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;T=null;(Z.filled=X)?(Z.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Z.fill="";Z.bowing=mxUtils.getValue(this.shape.style,"bowing",ka.bowing);Z.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ka.hachureAngle);Z.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ka.curveFitting);Z.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ka.roughness);Z.simplification=mxUtils.getValue(this.shape.style,"simplification",ka.simplification);Z.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ka.disableMultiStroke);Z.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ka.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);Z.hachureGap="auto"==X?-1:X;Z.dashGap=mxUtils.getValue(this.shape.style,"dashGap",X);Z.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",X);Z.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);Z.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=null!=Z.fill&&(null!=T||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(Z.fill)))?
-"solid":ka.fillStyle);Z.fillStyle=X;return Z};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-k.prototype.lineTo=function(T,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,X),this.lastX=T,this.lastY=X)};k.prototype.moveTo=function(T,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,X),this.lastX=T,this.lastY=X,this.firstX=T,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,X,Z,ka){this.passThrough?
-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,X,Z,ka),this.lastX=Z,this.lastY=ka)};k.prototype.curveTo=function(T,X,Z,ka,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,X,Z,ka,va,ua),this.lastX=va,this.lastY=ua)};k.prototype.arcTo=function(T,X,Z,ka,va,ua,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY,T,X,Z,ka,va,ua,qa);if(null!=Ba)for(var ya=
-0;ya<Ba.length;ya+=6)this.curveTo(Ba[ya],Ba[ya+1],Ba[ya+2],Ba[ya+3],Ba[ya+4],Ba[ya+5]);this.lastX=ua;this.lastY=qa}};k.prototype.rect=function(T,X,Z,ka){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,X,Z,ka,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,X,Z,ka){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+Z/2,X+ka/2,Z,ka,this.getStyle(!0,
-!0)))};k.prototype.roundrect=function(T,X,Z,ka,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+va,X),this.lineTo(T+Z-va,X),this.quadTo(T+Z,X,T+Z,X+ua),this.lineTo(T+Z,X+ka-ua),this.quadTo(T+Z,X+ka,T+Z-va,X+ka),this.lineTo(T+va,X+ka),this.quadTo(T,X+ka,T,X+ka-ua),this.lineTo(T,X+ua),this.quadTo(T,X,T+va,X))};k.prototype.drawPath=function(T){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(Z){}this.passThrough=
-!1}else if(null!=this.nextShape){for(var X in T)this.nextShape.options[X]=T[X];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):
-this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=
-this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(T){return this.outline||
-null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,X,Z,ka,va){null!=T.handJiggle&&T.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=function(T){var X=T.addTolerance,Z=!0;null!=this.style&&(Z="1"==mxUtils.getValue(this.style,
-mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ka=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var Ba=T.setFillColor;T.setFillColor=function(){};Z||null==ka||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,arguments);T.handJiggle.passThrough=!1;T.setFillColor=Ba;T.setStrokeColor=qa;this.configurePointerEvents=
-ua;this.stroke=va;this.fill=ka;T.restore();Z&&null!=ka&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,X,Z,ka,va,ua){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};
-Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,B,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=
-mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};
-null==k||B||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||B&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,B,I){Editor.validateDiagramNode(k);var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(B=Graph.decompress(U,null,B),null!=B&&0<B.length&&(P=mxUtils.parseXml(B).documentElement)):
-(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,B,!1)),B=mxUtils.createXmlDocument(),B.appendChild(B.importNode(P,!0)),P=B.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var B=mxUtils.getNodeValue(k),I=null;0<B.length?I=Graph.decompress(B):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&
-0==mxUtils.getChildNodes(k).length){var B=new mxCodec,I=new mxGraphModel;k.appendChild(B.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var B=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,
-P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){I=U.substring(P+14,U.indexOf(">",P));if(null!=I){B=I;I=[];for(U=0;U<B.length;U+=2)P=B.substr(U,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,16)));B=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==B&&"%PDF-1.4"==k.substring(0,8)){I="";P=U=0;for(var T=[],X=null;P<k.length;){var Z=
-k.charCodeAt(P);P+=1;10!=Z&&(I+=String.fromCharCode(Z));Z=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ka=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ka>P){B=k.substring(P,ka);break}}10==Z&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],T[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==B&&null!=T&&(B=Editor.extractGraphModelFromXref(T));null!=B&&(B=decodeURIComponent(B.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return B};Editor.extractGraphModelFromXref=
-function(k){var B=k.trailer,I=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=k[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(k=k[B[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,B){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=B||mxResources.get("invalidChars"),B=k[0].getElementsByTagName("div"),0<B.length&&(I=mxUtils.getTextContent(B[0])));
-return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,B){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=B))};Editor.mermaidToDrawio=function(k,B,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,B,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);
-null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=
-k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);
-null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+
-", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
-k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(k.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(B,I)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=
-k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
-k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(B=parseFloat(k.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&
-(B=parseInt(k.defaultGridSize),!isNaN(B)&&0<B?mxGraph.prototype.gridSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(B=parseInt(k.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(B=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,I),mxGraph.prototype.pageFormat=
-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&
-(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(B=parseInt(k.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(B=parseInt(k.autosaveDelay),
-!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
-k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);
-null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var B=document.getElementsByTagName("script")[0];
-if(null!=B&&null!=B.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));B.parentNode.insertBefore(I,B);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+",
-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var B=[],I=0;I<k;I++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.updateStatusInterval=
-1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",
-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var B=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[k],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==k.nodeName){B=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));B=k.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(B=k.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<B.length;I++)this.graph.addExtFont(B[I].name,B[I].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,B){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var B=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=
-unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var I=mxUtils.parseXml(B).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,B,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,B){if("undefined"===
-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(Z){MathJax.typesetClear([X]),null!=Z.retry?(U=X,Z.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ka){console.log("Error in MathJax.typesetPromise: "+
-ka.toString());I()})})["catch"](function(ka){console.log("Error in MathJax.retry: "+ka.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+Z.toString())}};window.MathJax=null!=B?B:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};
-Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(Z,ka){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};B=
-document.getElementsByTagName("script");if(null!=B&&0<B.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);B[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var B="",I=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===B&&(I[U]+=T),P=!P):","===T&&P?T=I[++U]="":I[U]+=T,B=T;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||
-/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var B=EditorUi.isVisioFilename(k);B=/\.png$/i.test(k)||/\.pdf$/i.test(k)||B;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(B?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=
-new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var B=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,
-k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=B.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,B,I,U,P){try{var T=!0,X=window.setTimeout(mxUtils.bind(this,function(){T=!1;B(k)}),this.timeout),Z=mxUtils.bind(this,function(){null!=
-U?this.convertImageToDataUri(k,B,I,U,!0):B(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(va){window.clearTimeout(X);T&&(200>va.getStatus()||299<va.getStatus()?Z():B(Editor.createSvgDataUri(va.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);T&&Z()}));else{var ka=new Image;this.crossOriginImages&&(ka.crossOrigin="anonymous");ka.onload=function(){window.clearTimeout(X);if(T)try{U=null!=U&&P?U:1;var va=document.createElement("canvas"),ua=va.getContext("2d");
-ua.scale(U,U);va.height=ka.height*U;va.width=ka.width*U;ua.drawImage(ka,0,0);B(va.toDataURL())}catch(qa){B(k)}};ka.onerror=function(){window.clearTimeout(X);T&&(null!=I?I():B(k))};ka.src=k}}catch(va){null!=I?I():B(k)}};Editor.prototype.convertImages=function(k,B,I,U){function P(){0<T.length?T.shift()():B(k)}null==U&&(U=this.createImageUrlConverter());var T=[],X=I||{};I=mxUtils.bind(this,function(Z,ka){Z=k.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(ua){T.push(mxUtils.bind(this,
-function(){try{if(null!=ua){var qa=U.convert(ua.getAttribute(ka));if(null!=qa&&"data:"!=qa.substring(0,5)){var Ba=X[qa];null==Ba?this.convertImageToDataUri(qa,function(ya){null!=ya&&(X[qa]=ya,ua.setAttribute(ka,ya));P()},null,Editor.svgRasterScale):(ua.setAttribute(ka,Ba),P())}else null!=qa&&ua.setAttribute(ka,qa),P()}}catch(ya){P()}}))})(Z[va])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var B="",I=0,U=k.length,P,T,X;I<U;){P=k.charCodeAt(I++)&255;if(I==U){B+=
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);B+="==";break}T=k.charCodeAt(I++);if(I==U){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);B+="=";break}X=k.charCodeAt(I++);
-B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(X&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return B};Editor.prototype.loadUrl=function(k,B,I,U,P,T,X,Z){try{var ka=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||
-/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var va=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(ua){200<=ua.getStatus()&&299>=ua.getStatus()?null!=B&&(ua=ua.getText(),ka&&(T=null!=T?T:"data:image/png;base64,",ua=T+Editor.base64Encode(ua)),B(ua)):null!=I&&(0==ua.getStatus()?I({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?I({message:mxResources.get("fileNotFound"),code:ua.getStatus()},ua):I({message:this.getErrorMessage(ua)},ua))}),function(ua){null!=I&&I({message:mxResources.get("error")+
-" "+ua.getStatus()})},ka,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:va})},Z)});va()}catch(ua){null!=I&&I(ua)}};Editor.prototype.getErrorMessage=function(k){var B=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);null!=U&&null!=U.error&&null!=U.error.message&&(B=U.error.message+" ("+B+")")}catch(P){}return B};Editor.prototype.absoluteCssFonts=function(k){var B=null;if(null!=k){var I=k.split("url(");if(0<I.length){B=[I[0]];k=window.location.pathname;
-var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<I.length;T++)if(U=I[T].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[T].substring(0,U));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);B.push('url("'+X+'"'+I[T].substring(U))}else B.push(I[T])}else B=[k]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=
-function(k,B,I){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));I(k,B)};Editor.prototype.embedCssFonts=function(k,B){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ka=[I[0]],va=1;va<I.length;va++){var ua=I[va].indexOf(")");ka.push('url("');ka.push(this.cachedFonts[Editor.trimCssUrl(I[va].substring(0,ua))]);ka.push('"'+I[va].substring(ua))}B(ka.join(""))}});if(0<I.length){for(k=
-1;k<I.length;k++){var T=I[k].indexOf(")"),X=null,Z=I[k].indexOf("format(",T);0<Z&&(X=Editor.trimCssUrl(I[k].substring(Z+7,I[k].indexOf(")",Z))));mxUtils.bind(this,function(ka){if(null==this.cachedFonts[ka]){this.cachedFonts[ka]=ka;U++;var va="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ka))va="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ka))va="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ka))va="application/font-woff";else if("woff2"==
-X||/(\.woff2)($|\?)/i.test(ka))va="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ka))va="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ka))va="application/font-sfnt";this.mapFontUrl(va,ka,mxUtils.bind(this,function(ua,qa){this.loadUrl(qa,mxUtils.bind(this,function(Ba){this.cachedFonts[ka]=Ba;U--;P()}),mxUtils.bind(this,function(Ba){U--;P()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,T)),X)}P()}else B(k)};Editor.prototype.loadFonts=
-function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(k[B]=Graph.fontMapping[B]);return k};Editor.prototype.embedExtFonts=function(k){var B=this.graph.getCustomFonts();if(0<B.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());
-for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),T=0;T<B.length;T++)mxUtils.bind(this,function(X,Z){Graph.isCssFontUrl(Z)?null==this.cachedGoogleFonts[Z]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(Z),mxUtils.bind(this,function(ka){this.cachedGoogleFonts[Z]=ka;I.push(ka+"\n");U--;P()}),mxUtils.bind(this,function(ka){U--;I.push("@import url("+Z+");\n");P()}))):I.push(this.cachedGoogleFonts[Z]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+Z+'")}\n')})(B[T].name,
-B[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var B=document.getElementsByTagName("style"),I=0;I<B.length;I++){var U=mxUtils.getTextContent(B[I]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(B[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var I=mxUtils.getSvgDefs(k),U=B.split("\n");B=[];for(var P=[],T=0;T<U.length;T++)"@import"==
-U[T].substring(0,7)?B.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<B.length&&(mxUtils.setTextContent(k,B.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,
-B,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/B))};Editor.prototype.exportToCanvas=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa,Ba,ya,La,za,Ea,pa){try{T=null!=T?T:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;Ba=null!=Ba?Ba:0;var Ca=ka?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ka&&(Ca="dark"==za&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,Ba,ya,null,X,null,null,null,va,null,za,Ea,pa),mxUtils.bind(this,
-function(Aa){try{var wa=new Image;wa.onload=mxUtils.bind(this,function(){try{var Qa=function(){mxClient.IS_SF?window.setTimeout(function(){Ma.drawImage(wa,0,0);k(Ra,Aa)},0):(Ma.drawImage(wa,0,0),k(Ra,Aa))},Ra=document.createElement("canvas"),Sa=parseInt(Aa.getAttribute("width")),Ha=parseInt(Aa.getAttribute("height"));Z=null!=Z?Z:1;null!=B&&(Z=T?Math.min(1,Math.min(3*B/(4*Ha),B/Sa)):B/Sa);Z=this.getMaxCanvasScale(Sa,Ha,Z);Sa=Math.ceil(Z*Sa);Ha=Math.ceil(Z*Ha);Ra.setAttribute("width",Sa);Ra.setAttribute("height",
-Ha);var Ma=Ra.getContext("2d");if(null!=Ca){var y=mxUtils.getLightDarkColor(Ca);Ma.beginPath();Ma.rect(0,0,Sa,Ha);Ma.fillStyle="dark"==za&&"none"!=qa.getAdaptiveColors()?y.dark:y.light;Ma.fill()}1!=Z&&Ma.scale(Z,Z);if(La){var O=qa.view,R=O.scale;O.scale=1;var V=btoa(unescape(encodeURIComponent(O.createSvgGrid(O.gridColor))));O.scale=R;V="data:image/svg+xml;base64,"+V;var fa=qa.gridSize*O.gridSteps*Z,ia=qa.getGraphBounds(),oa=O.translate.x*R,ta=O.translate.y*R,ra=oa+(ia.x-oa)/R-Ba,xa=ta+(ia.y-ta)/
-R-Ba,Da=new Image;Da.onload=function(){try{for(var Ia=-Math.round(fa-mxUtils.mod((oa-ra)*Z,fa)),Ya=-Math.round(fa-mxUtils.mod((ta-xa)*Z,fa));Ia<Sa;Ia+=fa)for(var Za=Ya;Za<Ha;Za+=fa)Ma.drawImage(Da,Ia/Z,Za/Z);Qa()}catch($a){null!=P&&P($a)}};Da.onerror=function(Ia){null!=P&&P(Ia)};Da.src=V}else Qa()}catch(Ia){null!=P&&P(Ia)}});wa.onerror=function(Qa){null!=P&&P(Qa)};va&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&
-this.addFontCss(Aa,this.resolvedFontCss),wa.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Qa){null!=P&&P(Qa)}});this.embedExtFonts(mxUtils.bind(this,function(Qa){try{null!=Qa&&this.addFontCss(Aa,Qa),this.loadFonts(Xa)}catch(Ra){null!=P&&P(Ra)}}))}catch(Qa){null!=P&&P(Qa)}}),I,ua)}catch(Aa){null!=P&&P(Aa)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var n=v,A=0;8>A;A++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[v]=n;Editor.updateCRC=function(k,B,I,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^
-B.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var B=-1,I=0;I<k.length;I++)B=B>>>8^Editor.crcTable[(B^k.charCodeAt(I))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(k,B,I,U,P){function T(ua,qa){var Ba=ka;ka+=qa;return ua.substring(Ba,ka)}function X(ua){ua=T(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function Z(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}k=k.substring(k.indexOf(",")+
-1);k=window.atob?atob(k):Base64.decode(k,!0);var ka=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ka);do{var va=X(k);if("IDAT"==T(k,4)){P=k.substring(0,ka-8);"pHYs"==B&&"dpi"==I?(I=Math.round(U/.0254),I=Z(I)+Z(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,B,0,4);U=Editor.updateCRC(U,I,0,I.length);P+=Z(I.length)+
-B+I+Z(U^4294967295);P+=k.substring(ka-8,k.length);break}P+=k.substring(ka-8,ka-4+va);T(k,va);T(k,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,B){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,B){var I=null;null!=k.editor.graph.getModel().getParent(B)?I=B.getId():null!=k.currentPage&&(I=k.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};
-var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var B=this.editorUi,I=B.editor.graph;
-if(I.isEnabled()){var U=B.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(T){B.editor.setAutosave(T);B.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(T){this.listener=function(){T(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==
-typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(T){B.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=function(){T(I.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});k.appendChild(P);(!B.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&P.appendChild(B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};
-mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",
-dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=
-[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,
-"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",
-min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];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:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{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:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{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;var f=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));
-f.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var B=this.editorUi.getSelectionState();1==B.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=B.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=
-function(k,B,I,U){function P(Ma,y,O,R,V){if(null!=O.valueChanged)O.valueChanged(y,V);else{Ba.getModel().beginUpdate();try{V=[];var fa=[];if(null!=O.index){for(var ia=[],oa=O.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Ma;)ia.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;O.index<ia.length?null!=R?ia.splice(R,1):ia[O.index]=y:ia.push(y);null!=O.size&&ia.length>O.size&&(ia=ia.slice(0,O.size));y=ia.join(",");null!=O.countProperty&&(Ba.setCellStyles(O.countProperty,ia.length,Ba.getSelectionCells()),
-V.push(O.countProperty),fa.push(ia.length))}Ba.setCellStyles(Ma,y,Ba.getSelectionCells());V.push(Ma);fa.push(y);if(null!=O.dependentProps)for(Ma=0;Ma<O.dependentProps.length;Ma++){var ta=O.dependentPropsDefVal[Ma],ra=O.dependentPropsVals[Ma];if(ra.length>y)ra=ra.slice(0,y);else for(var xa=ra.length;xa<y;xa++)ra.push(ta);ra=ra.join(",");Ba.setCellStyles(O.dependentProps[Ma],ra,Ba.getSelectionCells());V.push(O.dependentProps[Ma]);fa.push(ra)}if("function"==typeof O.onChange)O.onChange(Ba,y);qa.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",V,"values",fa,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}}function T(Ma,y,O){var R=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Ma,!0);y.style.position="absolute";y.style.left=V.x-R.x+"px";y.style.top=V.y-R.y+"px";y.style.width=Ma.offsetWidth+"px";y.style.height=Ma.offsetHeight-(O?4:0)+"px";y.style.zIndex=5}function X(Ma,y,O){function R(fa){if(null==fa||fa==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==fa)V.style.background=
-"";else{var ia=mxUtils.getLightDarkColor(fa);mxUtils.isLightDarkColor(fa)&&ia.light!=ia.dark?V.style.background="linear-gradient(to right bottom, "+ia.cssText+" 50%, "+mxUtils.invertLightDarkColor(ia).cssText+" 50.3%)":V.style.background=fa}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";R(y);btn=mxUtils.button("",mxUtils.bind(qa,function(fa){this.editorUi.pickColor(y,function(ia){P(Ma,ia,O);
-R(ia)});mxEvent.consume(fa)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function Z(Ma,y,O,R,V,fa,ia){null!=y&&(y=y.split(","),ya.push({name:Ma,values:y,type:O,defVal:R,countProperty:V,parentRow:fa,isDeletable:!0,flipBkg:ia}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var ta=fa,ra=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==Ma)ta=ta.nextSibling,
-ra++;else break;var xa={type:O,parentRow:fa,index:ra,isDeletable:!0,defVal:R,countProperty:V};ra=ua(Ma,"",xa,0==ra%2,ia);P(Ma,R,xa);ta.parentNode.insertBefore(ra,ta.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ka(Ma,y,O,R,V,fa,ia){if(0<V){var oa=Array(V);y=null!=y?y.split(","):[];for(var ta=0;ta<V;ta++)oa[ta]=null!=y[ta]?y[ta]:null!=R?R:"";ya.push({name:Ma,values:oa,type:O,defVal:R,parentRow:fa,flipBkg:ia,size:V})}return document.createElement("div")}
-function va(Ma,y,O){var R=document.createElement("input");R.type="checkbox";R.checked="1"==y;mxEvent.addListener(R,"change",function(){P(Ma,R.checked?"1":"0",O)});return R}function ua(Ma,y,O,R,V){var fa=O.dispName,ia=O.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(R?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ma);oa.setAttribute("data-pValue",y);R=!1;null!=O.index&&(oa.setAttribute("data-index",O.index),fa=(null!=fa?fa:"")+"["+O.index+"]",R=!0);var ta=
-document.createElement("td");ta.className="gePropRowCell";fa=mxResources.get(fa,null,fa);mxUtils.write(ta,fa);ta.setAttribute("title",fa);R&&(ta.style.textAlign="right");oa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";ta.setAttribute("title",null!=y?y:mxResources.get("none"));if("color"==ia)ta.appendChild(X(Ma,y,O));else if("bool"==ia||"boolean"==ia)ta.appendChild(va(Ma,y,O));else if("enum"==ia){var ra=O.enumList;for(V=0;V<ra.length;V++)if(fa=ra[V],fa.val==y){mxUtils.write(ta,
-mxResources.get(fa.dispName,null,fa.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){var xa=document.createElement("select"),Da=null;T(ta,xa);for(var Ia=0;Ia<ra.length;Ia++){var Ya=ra[Ia],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,null,Ya.dispName));xa.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}xa.value=null==y&&null!=Da?"null":y;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var $a=
-mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Da||"null"==$a.value)$a=null;P(Ma,$a,O)});xa.focus();mxEvent.addListener(xa,"blur",function(){k.removeChild(xa)})}))}else"dynamicArr"==ia?ta.appendChild(Z(Ma,y,O.subType,O.subDefVal,O.countProperty,oa,V)):"staticArr"==ia?ta.appendChild(ka(Ma,y,O.subType,O.subDefVal,O.size,oa,V)):"readOnly"==ia?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=y,V.style.borderWidth="0px","id"==Ma?(V.style.width="190px",V.style.position=
-"relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",y),oa.firstChild.appendChild(V)):(V.style.width="96px",ta.appendChild(V))):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(y)),mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){function xa(){var Ia=Da.value;Ia=0==Ia.length&&"string"!=ia&&"numbers"!=ia?0:Ia;O.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?
-(Ia="auto",ia="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=O.min&&Ia<O.min?Ia=O.min:null!=O.max&&Ia>O.max&&(Ia=O.max);var Ya=null;try{Ya="numbers"==ia?Ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ia?parseInt(Ia):Ia)+"")}catch(Za){}P(Ma,Ya,O,null,Da)}var Da=document.createElement("input");T(ta,Da,!0);Da.value=decodeURIComponent(y);Da.className="gePropEditor";"int"!=ia&&"float"!=ia||O.allowAuto||(Da.type="number",Da.step="int"==ia?"1":"any",null!=O.min&&(Da.min=parseFloat(O.min)),
-null!=O.max&&(Da.max=parseFloat(O.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ia){13==Ia.keyCode&&xa()});Da.focus();mxEvent.addListener(Da,"blur",function(){xa()})})));O.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(xa){P(Ma,"",O,O.index);mxEvent.consume(xa)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",ta.appendChild(V));oa.appendChild(ta);return oa}var qa=this,Ba=this.editorUi.editor.graph,ya=[],La=document.createElement("table");
-La.className="geProperties geFullWidthElement";var za=document.createElement("tr");za.className="gePropHeader";var Ea=document.createElement("th");Ea.className="gePropHeaderCell";Ea.style.paddingLeft="16px";Ea.style.backgroundRepeat="no-repeat";Ea.style.backgroundPosition="-2px 50%";Ea.style.backgroundSize="20px";mxUtils.write(Ea,mxResources.get("property"));za.style.cursor="pointer";var pa=function(){var Ma=La.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ea.style.backgroundImage=
-"url('"+Editor.arrowRightImage+"')";var y="none";for(var O=k.childNodes.length-1;0<=O;O--)try{var R=k.childNodes[O],V=R.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(R)}catch(fa){}}else Ea.style.backgroundImage="url('"+Editor.arrowDownImage+"')",y="";for(O=0;O<Ma.length;O++)Ma[O].style.display=y};mxEvent.addListener(za,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;pa()});za.appendChild(Ea);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";
-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));za.appendChild(Ca);La.appendChild(za);var Aa=Ca=!1;za=null;1==I.vertices.length&&0==I.edges.length?za=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(za=I.edges[0].id);null==za||U||La.appendChild(ua("id",mxUtils.htmlEntities(za),{dispName:"id",type:"readOnly"},!0,!1));for(var wa in B)if(U=B[wa],!U.primary&&("function"!=typeof U.isVisible||U.isVisible(I,this))){var Xa=null!=U.getValue?U.getValue():null!=I.style[wa]?mxUtils.htmlEntities(I.style[wa]+
-""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Aa=!Aa;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||B[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Qa=U.dependentProps,Ra=[],Sa=[];for(za=0;za<Qa.length;za++){var Ha=I.style[Qa[za]];Sa.push(B[Qa[za]].subDefVal);Ra.push(null!=Ha?Ha.split(","):[])}U.dependentPropsDefVal=Sa;U.dependentPropsVals=Ra}La.appendChild(ua(wa,Xa,U,Ca,Aa));Ca=!Ca}}for(za=0;za<ya.length;za++)for(U=ya[za],
-B=U.parentRow,I=0;I<U.values.length;I++)wa=ua(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),B.parentNode.insertBefore(wa,B.nextSibling),B=wa;k.appendChild(La);pa();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var B=this.editorUi,I=B.editor.graph,U=document.createElement("div");U.style.padding="6px 20px 0 24px";k.appendChild(U);var P=
-document.createElement("div");P.className="geSwitcher";P.style.padding="4px 18px 6px 0px";for(var T=[],X=0;X<this.defaultColorSchemes.length;X++){var Z=document.createElement("div");Z.className="geSwitcherDot";mxUtils.bind(this,function(Ba){mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){ka(Ba)}))})(X);T.push(Z);P.appendChild(Z)}var ka=mxUtils.bind(this,function(Ba){null!=T[Ba]&&(null!=this.format.currentScheme&&null!=T[this.format.currentScheme]&&(T[this.format.currentScheme].style.background=
-"transparent"),this.format.currentScheme=Ba,va(this.defaultColorSchemes[this.format.currentScheme]),T[this.format.currentScheme].style.background="#84d7ff")}),va=mxUtils.bind(this,function(Ba){var ya=mxUtils.clone(I.defaultVertexStyle);ya[mxConstants.STYLE_STROKECOLOR]=null!=ya[mxConstants.STYLE_STROKECOLOR]?ya[mxConstants.STYLE_STROKECOLOR]:"default";ya[mxConstants.STYLE_FILLCOLOR]=null!=ya[mxConstants.STYLE_FILLCOLOR]?ya[mxConstants.STYLE_FILLCOLOR]:"default";ya[mxConstants.STYLE_FONTCOLOR]=null!=
-ya[mxConstants.STYLE_FONTCOLOR]?ya[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ya);var La=mxUtils.bind(this,function(Ea){var pa=mxUtils.button("",mxUtils.bind(this,function(wa){I.getModel().beginUpdate();try{for(var Xa=B.getSelectionState().cells,Qa=0;Qa<Xa.length;Qa++){var Ra=I.getModel().getStyle(Xa[Qa]);null!=Ea?(mxEvent.isShiftDown(wa)||(Ra=""==Ea.fill||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,
-Ea.fill),Ra=""==Ea.gradient||null==Ea.gradient?mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,Ea.gradient),mxEvent.isControlDown(wa)||mxClient.IS_MAC&&mxEvent.isMetaDown(wa)||!I.getModel().isVertex(Xa[Qa])||(Ra=""==Ea.font||null==Ea.font?mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,Ea.font))),mxEvent.isAltDown(wa)||(Ra=""==Ea.stroke||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,
-null):mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,Ea.stroke))):(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(Xa[Qa])&&(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(Xa[Qa],Ra)}}finally{I.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!=Ea){var Ca="1px solid";null!=Ea.border&&(Ca=Ea.border);if(null!=Ea.gradient)pa.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(Ea.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ea.gradient).cssText+" 100%)";else if(Ea.fill==mxConstants.NONE)pa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ea.fill||""==Ea.fill)pa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,
-"#ffffff")).cssText;else{var Aa=mxUtils.getLightDarkColor(Ea.fill);pa.style.backgroundImage="linear-gradient(to right bottom, "+Aa.cssText+" 50%, "+Aa.light+" 50.3%)"}null==Ea.stroke||Ea.stroke==mxConstants.NONE?pa.style.border=Ca+" transparent":""==Ea.stroke?pa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Aa=mxUtils.getLightDarkColor(Ea.stroke),pa.style.border=Ca+" "+Aa.cssText,pa.style.borderRightColor=Aa.light,pa.style.borderBottomColor=
-pa.style.borderRightColor);null!=Ea.title&&pa.setAttribute("title",Ea.title)}else Ca=mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Aa=mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000"),pa.style.backgroundColor=Ca,pa.style.border="1px solid "+Aa;pa.style.borderRadius="0";U.appendChild(pa);null!=Ea&&null!=Ea.gradient&&(Ca=pa.cloneNode(!1),Ca.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.fill).light+") 0px, light-dark(transparent, "+
-mxUtils.getLightDarkColor(Ea.gradient).light+") 100%)",Ca.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ca.style.backgroundColor="transparent",U.appendChild(Ca),Ca.style.marginLeft="-42px",mxEvent.addListener(Ca,"click",function(){pa.click()}))});U.innerText="";if(null!=Ba)for(var za=0;za<Ba.length;za++)0<za&&0==mxUtils.mod(za,4)&&mxUtils.br(U),La(Ba[za])});null==this.format.currentScheme?ka(Math.min(T.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):ka(this.format.currentScheme);
-X=10>=this.defaultColorSchemes.length?43:23;var ua=document.createElement("div");ua.className="geButton";ua.style.cssText="position:absolute;left:0px;bottom:"+X+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){ka(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+X+"px;width:20px;background-image:url("+
-Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(ua),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){ka(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));va(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+
-STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+
-":wght@400;500");return k};Graph.createFontElement=function(k,B){var I=Graph.fontMapping[B];null==I&&Graph.isCssFontUrl(B)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(B))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+B+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,B){};Graph.addFont=
-function(k,B,I){if(null!=k&&0<k.length&&null!=B&&0<B.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=B&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=B,"http:"==B.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(B)),P={name:k,url:B,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,B=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=
-I):I()),null!=B&&B.appendChild(P.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,B){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(B=k.url);return B};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var B=0;B<k.length;B++){var I=k[B].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[B].nodeName?k[B].getAttribute("face"):k[B].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=
-k){var B=mxUtils.getValue(k,"fontSource",null);if(null!=B){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(B))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";
-Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var t=Graph.prototype.init;Graph.prototype.init=function(){function k(P){B=P}t.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",
-function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;
-X.marginLeft=T.marginLeft||0;X.marginRight=T.marginRight||0;X.marginTop=T.marginTop||0;X.marginBottom=T.marginBottom||0;X.allowGaps=T.allowGaps||0;X.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,B){return Graph.processFontStyle(q.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;
-mxSvgCanvas2D.prototype.updateTextNodes=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa){D.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,B,I,U){function P(){for(var za=Z.getSelectionCells(),Ea=[],pa=0;pa<za.length;pa++)Z.isCellVisible(za[pa])&&Ea.push(za[pa]);Z.setSelectionCells(Ea)}function T(za){Z.setHiddenTags(za?
-[]:ka.slice());P();Z.refresh()}function X(za,Ea){ua.innerText="";if(0<za.length){var pa=document.createElement("table");pa.setAttribute("cellpadding","2");pa.style.boxSizing="border-box";pa.style.tableLayout="fixed";pa.style.width="100%";var Ca=document.createElement("tbody");if(null!=za&&0<za.length)for(var Aa=0;Aa<za.length;Aa++)(function(wa){function Xa(){var y=Z.getCellsForTags([wa],null,null,!0);Z.isEnabled()?Z.setSelectionCells(y):Z.highlightCells(y,null,null,70)}var Qa=0>mxUtils.indexOf(Z.hiddenTags,
-wa),Ra=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",Qa?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",mxResources.get(Qa?"hideIt":"show",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";Sa.appendChild(Ha);
-mxEvent.addListener(Ha,"click",function(y){mxEvent.isShiftDown(y)?T(0<=mxUtils.indexOf(Z.hiddenTags,wa)):(Z.toggleHiddenTag(wa),P(),Z.refresh());mxEvent.consume(y)});Ra.appendChild(Sa);Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.selectImage);Ha.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";
-Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){T(!0);Xa();mxEvent.consume(y)});Sa.appendChild(Ha);Ra.appendChild(Sa);Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";
-mxUtils.setOpacity(a,Qa?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(y){if(mxEvent.isShiftDown(y))T(!0),Xa();else if(Qa&&0<Z.hiddenTags.length)T(!0);else{var O=ka.slice(),R=mxUtils.indexOf(O,wa);O.splice(R,1);Z.setHiddenTags(O);P();Z.refresh()}mxEvent.consume(y)});Ra.appendChild(Sa);if(Z.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ea){Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");
-Ha.setAttribute("src",Editor.trashImage);Ha.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){var O=mxUtils.indexOf(ka,wa);0<=O&&ka.splice(O,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[wa]);Z.refresh();mxEvent.consume(y)});Sa.appendChild(Ha)}else{var Ma=
-document.createElement("input");Ma.setAttribute("type","checkbox");Ma.style.margin="0px";Ma.defaultChecked=null!=Ea&&0<=mxUtils.indexOf(Ea,wa);Ma.checked=Ma.defaultChecked;Ma.style.background="transparent";Ma.setAttribute("title",mxResources.get(Ma.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(Ma,"change",function(y){Ma.checked?Z.addTagsForCells(Z.getSelectionCells(),[wa]):Z.removeTagsForCells(Z.getSelectionCells(),[wa]);mxEvent.consume(y)});Sa.appendChild(Ma)}Ra.appendChild(Sa)}Ca.appendChild(Ra)})(za[Aa]);
-pa.appendChild(Ca);ua.appendChild(pa)}}var Z=this,ka=Z.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var ua=document.createElement("div");ua.style.position="absolute";ua.style.boxSizing="border-box";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.padding="3px";ua.style.left="0px";ua.style.right="0px";ua.style.top="0px";ua.style.bottom="0px";va.appendChild(ua);Z.addListener(mxEvent.ROOT,
-function(){ka=Z.hiddenTags.slice()});var qa=mxUtils.bind(this,function(za,Ea){if(k()){za=Z.getAllTags();for(Ea=0;Ea<za.length;Ea++)0>mxUtils.indexOf(ka,za[Ea])&&ka.push(za[Ea]);ka.sort();Z.isSelectionEmpty()?X(ka):X(ka,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,qa);Z.model.addListener(mxEvent.CHANGE,qa);Z.addListener(mxEvent.REFRESH,qa);var Ba=document.createElement("div");Ba.className="geToolbarContainer geDialogToolbar";Ba.style.position="absolute";
-Ba.style.display="flex";Ba.style.bottom="0px";Ba.style.left="0px";Ba.style.right="0px";Ba.style.height="32px";Ba.style.overflow="hidden";Ba.style.padding="3px 4px 4px 4px";Ba.style.borderWidth="1px 0px 0px 0px";Ba.style.borderStyle="solid";Ba.style.whiteSpace="nowrap";if(Z.isEnabled()){ua.style.bottom="32px";var ya=document.createElement("a");ya.className="geButton";var La=ya.cloneNode(!1);La.style.backgroundImage="url("+Editor.visibleImage+")";La.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(La,
-"click",function(za){Z.setHiddenTags([]);mxEvent.isShiftDown(za)||(ka=Z.hiddenTags.slice());P();Z.refresh();mxEvent.consume(za)});Ba.appendChild(La);null!=I&&(ya=ya.cloneNode(!1),ya.style.backgroundImage="url("+Editor.plusImage+")",ya.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ya,"click",function(za){I(ka,function(Ea){ka=Ea;qa()});mxEvent.consume(za)}),Ba.appendChild(ya));va.appendChild(Ba)}null!=U&&Ba.appendChild(U);return{div:va,refresh:qa}};Graph.prototype.getCustomFonts=
-function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var B in Graph.customFontElements){var I=Graph.customFontElements[B];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,B){Graph.addFont(k,B);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==I&&(P=!0,U[T].setAttribute("face",k),null!=B?U[T].setAttribute("data-font-src",B):U[T].removeAttribute("data-font-src"));
-P||document.execCommand("fontname",!1,k)};var N=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return N.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var B in k)this.globalVars[B]=k[B]}catch(I){null!=
-window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var B=L.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[k]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};
-Graph.prototype.isViewer=function(){return urlParams.viewer};var J=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,B,I,U,P,T,X,Z,ka,va,ua,qa,Ba,ya,La,za){var Ea=J.apply(this,arguments);if(null!=qa){var pa=Ea.getAttribute("style");null==pa&&(pa="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ea.setAttribute("style",pa+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(ua&&0<Ca.length){var Aa=Ea.ownerDocument;pa=null!=Aa.createElementNS?
-Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?pa.setAttributeNS("type","text/css"):pa.setAttribute("type","text/css");for(var wa="",Xa="",Qa=0;Qa<Ca.length;Qa++){var Ra=Ca[Qa].name,Sa=Ca[Qa].url;Graph.isCssFontUrl(Sa)?wa+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Xa+='@font-face {\nfont-family: "'+Ra+'";\nsrc: url("'+Sa+'");\n}\n'}pa.appendChild(Aa.createTextNode(wa+Xa));Ea.getElementsByTagName("defs")[0].appendChild(pa)}Editor.replaceSvgDataUris&&
-null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ea);this.mathEnabled&&(document.body.appendChild(Ea),Editor.MathJaxRender(Ea),Ea.parentNode.removeChild(Ea),pa=Ea.ownerDocument.getElementById("MJX-SVG-styles"),null!=pa&&Ea.getElementsByTagName("defs")[0].appendChild(pa.cloneNode(!0)));return Ea};var Y=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Y.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=
-null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ha=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ha.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,
-"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var B="1"==mxUtils.getValue(k.style,"enumerate",0);B&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,
-this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):B||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);B=k.secondLabel;if(null!=B){var I=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));B.bounds.equals(k)&&B.value==U&&B.scale==I||(B.bounds=k,B.value=U,B.scale=I,B.redraw())}};var aa=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();
-aa.apply(this,arguments)};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(k,B){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&
-this.executeCustomActions(k.actions,null,B))};Graph.prototype.executeCustomActions=function(k,B,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,
-function(){U&&(U=!1,this.model.endUpdate())}),ka=mxUtils.bind(this,function(){0<P&&P--;0==P&&va()}),va=mxUtils.bind(this,function(){if(T<k.length){var ua=this.stoppingCustomActions,qa=k[T++],Ba=[];if(null!=qa.open)if(Z(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ka()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=qa.wait?parseInt(qa.wait):1E3),Z());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ka,ua?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ka,ua?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,
-!0),!0)));null!=qa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var ya=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ya),1);this.setCellsVisible(ya,!0)}null!=qa.hide&&(X(),ya=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ya),0),this.setCellsVisible(ya,!1));null!=qa.toggleStyle&&null!=
-qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));ya=[];null!=qa.select&&this.isEnabled()&&(ya=this.getCellsForAction(qa.select),this.setSelectionCells(ya));null!=qa.highlight&&(ya=this.getCellsForAction(qa.highlight),this.highlightCells(ya,qa.highlight.color,
-qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(ya=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<ya.length&&this.scrollCellToVisible(ya[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var La=qa.tags.toggle;0==La.length&&(La=this.getAllTags());for(ya=0;ya<La.length;ya++)this.toggleHiddenTag(La[ya])}La=null;null!=qa.tags.hidden&&(null==La&&(La=[]),La=La.concat(qa.tags.hidden));
-if(null!=qa.tags.visible){null==La&&(La=[]);var za=this.getAllTags();for(ya=0;ya<za.length;ya++)0>mxUtils.indexOf(qa.tags.visible,za[ya])&&0>mxUtils.indexOf(La,za[ya])&&La.push(za[ya])}null!=La&&this.setHiddenTags(La);this.refresh()}0<Ba.length&&(P++,this.executeAnimations(Ba,ka,ua?1:qa.steps,ua?0:qa.delay));0==P?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=B&&B()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,B){var I=this.getLinkForCell(B);null!=
-I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(k,I));if(this.isHtmlLabel(B)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(B));for(var P=U.getElementsByTagName("a"),T=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),T=!0);T&&this.labelChanged(B,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,B){if("data:action/json,"==
-B.substring(0,17))try{var I=JSON.parse(B.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),B="data:action/json,"+JSON.stringify(I))}catch(U){}return B};Graph.prototype.updateCustomLinkActions=function(k,B){for(var I=0;I<B.length;I++){var U=B[I],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,B,I){if(null!=B&&null!=B[I]){for(var U=[],P=0;P<B[I].length;P++)if("*"==
-B[I][P])U.push(B[I][P]);else{var T=k[B[I][P]];null!=T?""!=T&&U.push(T):U.push(B[I][P])}B[I]=U}};Graph.prototype.getCellsForAction=function(k,B){B=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,B));if(null!=k.excludeCells){for(var I=[],U=0;U<B.length;U++)0>k.excludeCells.indexOf(B[U].id)&&I.push(B[U]);B=I}return B};Graph.prototype.getCellsById=function(k){var B=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(T){return T!=
-U},U))}else{var P=this.model.getCell(k[I]);null!=P&&B.push(P)}return B};var W=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return W.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var B=mxUtils.indexOf(this.hiddenTags,k);0>B?this.hiddenTags.push(k):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var B=0;B<k.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,k[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,B,I,U){var P=[];if(null!=k){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var T=0,X={},Z=0;Z<k.length;Z++)0<k[Z].length&&(X[k[Z]]=!0,T++);for(Z=0;Z<B.length;Z++)if(I&&this.model.getParent(B[Z])==
-this.model.root||this.model.isVertex(B[Z])||this.model.isEdge(B[Z])){var ka=this.getTagsForCell(B[Z]),va=!1;if(0<ka.length&&(ka=ka.split(" "),ka.length>=k.length)){for(var ua=va=0;ua<ka.length&&va<T;ua++)null!=X[ka[ua]]&&va++;va=va==T}va&&(1!=U||this.isCellVisible(B[Z]))&&P.push(B[Z])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var B=null,I=[],U=0;U<k.length;U++){var P=
-this.getTagsForCell(k[U]);I=[];if(0<P.length){P=P.split(" ");for(var T={},X=0;X<P.length;X++)if(null==B||null!=B[P[X]])T[P[X]]=!0,I.push(P[X]);B=T}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var B=[],I={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==I[P[T]]&&(I[P[T]]=!0,B.push(P[T]))}}return B};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
-function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),P=U.split(" "),T=!1,X=0;X<B.length;X++){var Z=mxUtils.trim(B[X]);""!=Z&&0>mxUtils.indexOf(P,Z)&&(U=0<U.length?U+" "+Z:Z,T=!0)}T&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);
-if(0<U.length){for(var P=U.split(" "),T=!1,X=0;X<B.length;X++){var Z=mxUtils.indexOf(P,B[X]);0<=Z&&(P.splice(Z,1),T=!0)}T&&this.setAttributeForCell(k[I],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var B=0;B<k.length;B++)this.model.setVisible(k[B],!this.model.isVisible(k[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,B){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],
-B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,B,I,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],B,I,U)};Graph.prototype.highlightCell=function(k,B,I,U,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,B,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&
-(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},1200)},I));return T};Graph.prototype.addSvgShadow=function(k,B,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");
-X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");
-X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");
-X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");T.appendChild(X);X=k.getElementsByTagName("defs");0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(T);I||(B=null!=B?B:k.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
-6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),B=k.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,k.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
-Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),B=0;do var I=this.model.getChildAt(this.model.root,B);while(B++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+
+Editor.createRoughCanvas=function(k){var B=rough.canvas({getContext:function(){return k}});B.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=K.stroke&&this._drawToContext(k,U,K);break;case "fillPath":this._drawToContext(k,U,K);break;case "fillSketch":this.fillSketch(k,U,K)}}};B.fillSketch=function(K,T,P){var U=k.state.strokeColor,Y=k.state.strokeWidth,aa=k.state.strokeAlpha,la=k.state.dashed,va=P.fillWeight;
+0>va&&(va=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(va);k.setDashed(!1);this._drawToContext(K,T,P);k.setDashed(la);k.setStrokeWidth(Y);k.setStrokeColor(U);k.setStrokeAlpha(aa)};B._drawToContext=function(K,T,P){K.begin();for(var U=0;U<T.ops.length;U++){var Y=T.ops[U],aa=Y.data;switch(Y.op){case "move":K.moveTo(aa[0],aa[1]);break;case "bcurveTo":K.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":K.lineTo(aa[0],aa[1])}}K.end();
+"fillPath"===T.type&&P.filled?K.fill():K.stroke()};return B};(function(){function k(U,Y,aa){this.canvas=U;this.rc=Y;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,Y){var aa=1;if(null!=this.shape.state){var la=this.shape.state.cell.id;if(null!=la)for(var va=0;va<la.length;va++)aa=(aa<<5)-aa+la.charCodeAt(va)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};la=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=Y)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",la.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",la.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",la.curveFitting);
+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",la.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",la.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",la.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",la.disableMultiStrokeFill);Y=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==Y?-1:Y;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Y);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Y);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Y);Y=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==Y?-1:Y;Y=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==Y&&(Y="auto");"auto"==Y&&(Y=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&Y.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&Y.push(mxUtils.hex2rgb(Editor.darkColor)),Y=
+null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(Y,mxUtils.hex2rgb(aa.fill)))?"solid":la.fillStyle);aa.fillStyle=Y;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],
+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,Y){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,Y),this.lastX=U,this.lastY=Y)};k.prototype.moveTo=function(U,Y){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,Y),this.lastX=U,this.lastY=Y,this.firstX=U,this.firstY=Y)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,Y,aa,la){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,Y,aa,la),this.lastX=aa,this.lastY=la)};k.prototype.curveTo=function(U,Y,aa,la,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,Y,aa,la,va,ua),this.lastX=va,this.lastY=ua)};k.prototype.arcTo=function(U,Y,aa,la,va,ua,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
+else{var Ba=mxUtils.arcToCurves(this.lastX,this.lastY,U,Y,aa,la,va,ua,qa);if(null!=Ba)for(var ya=0;ya<Ba.length;ya+=6)this.curveTo(Ba[ya],Ba[ya+1],Ba[ya+2],Ba[ya+3],Ba[ya+4],Ba[ya+5]);this.lastX=ua;this.lastY=qa}};k.prototype.rect=function(U,Y,aa,la){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,Y,aa,la,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,Y,aa,la){this.passThrough?this.originalEllipse.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,Y+la/2,aa,la,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,Y,aa,la,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+va,Y),this.lineTo(U+aa-va,Y),this.quadTo(U+aa,Y,U+aa,Y+ua),this.lineTo(U+aa,Y+la-ua),this.quadTo(U+aa,Y+la,U+aa-va,Y+la),this.lineTo(U+va,Y+la),this.quadTo(U,Y+la,U,Y+la-ua),this.lineTo(U,Y+ua),this.quadTo(U,Y,U+va,Y))};k.prototype.drawPath=function(U){if(0<
+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Y in U)this.nextShape.options[Y]=U[Y];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var B=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,Y,aa,la,va){null!=U.handJiggle&&U.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=
+function(U){var Y=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var la=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var Ba=U.setFillColor;U.setFillColor=function(){};aa||null==la||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,
+arguments);U.handJiggle.passThrough=!1;U.setFillColor=Ba;U.setStrokeColor=qa;this.configurePointerEvents=ua;this.stroke=va;this.fill=la;U.restore();aa&&null!=la&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=Y};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,Y,aa,la,va,ua){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,B,K){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);
+break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,K),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&
+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||B||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,K)));null==k||"mxGraphModel"==k.nodeName||B&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,B,K){Editor.validateDiagramNode(k);
+var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(B=Graph.decompress(T,null,B),null!=B&&0<B.length&&(P=mxUtils.parseXml(B).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],K&&(P=Editor.parseDiagramNode(P,B,!1)),B=mxUtils.createXmlDocument(),B.appendChild(B.importNode(P,!0)),P=B.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var B=mxUtils.getNodeValue(k),K=null;0<B.length?K=Graph.decompress(B):(k=k.getElementsByTagName("mxGraphModel"),
+null!=k&&0<k.length&&(K=mxUtils.getXml(k[0])));return K};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var B=new mxCodec,K=new mxGraphModel;k.appendChild(B.encode(K))}return k};Editor.extractGraphModelFromPdf=function(k){var B=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var K=k.indexOf("EmbeddedFile");if(-1<K){var T=k.indexOf("stream",
+K)+9;if(0<k.substring(K,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(K=k.indexOf("/ObjStm");0<K;){T=k.indexOf("stream",K)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){K=T.substring(P+14,T.indexOf(">",P));if(null!=K){B=K;K=[];for(T=0;T<B.length;T+=2)P=B.substr(T,2),"00"!=P&&K.push(String.fromCharCode(parseInt(P,
+16)));B=K.join("")}break}K=k.indexOf("/ObjStm",K+1)}}if(null==B&&"%PDF-1.4"==k.substring(0,8)){K="";P=T=0;for(var U=[],Y=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(K+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var la=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(la>P){B=k.substring(P,la);break}}10==aa&&("endobj"==K?Y=null:"obj"==K.substring(K.length-3,K.length)||"xref"==K||"trailer"==K?(Y=[],U[K.split(" ")[0]]=Y):null!=Y&&Y.push(K),K="")}}null==B&&null!=
+U&&(B=Editor.extractGraphModelFromXref(U));null!=B&&(B=decodeURIComponent(B.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return B};Editor.extractGraphModelFromXref=function(k){var B=k.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=k[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(k=k[B[1]],null!=k&&(k=k.join("\n"),K=k.substring(1,k.length-1))))));return K};Editor.extractParserError=function(k,B){var K=null;k=
+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(K=B||mxResources.get("invalidChars"),B=k[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(k,B){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=B))};Editor.mermaidToDrawio=function(k,B,K){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,B,K)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
+k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);
+null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&
+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=
+k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&
+(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var B=document.createElement("style");B.setAttribute("type","text/css");B.appendChild(document.createTextNode(k.css));var K=document.getElementsByTagName("script")[0];K.parentNode.insertBefore(B,K)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=
+k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=
+k.zoomFactor&&(B=parseFloat(k.zoomFactor),!isNaN(B)&&1<B?Graph.prototype.zoomFactor=B:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(B=parseInt(k.defaultGridSize),!isNaN(B)&&0<B?mxGraph.prototype.gridSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(B=parseInt(k.gridSteps),!isNaN(B)&&0<B?mxGraphView.prototype.gridSteps=B:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
+null!=k.pageFormat&&(B=parseInt(k.pageFormat.width),K=parseInt(k.pageFormat.height),!isNaN(B)&&0<B&&!isNaN(K)&&0<K?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,B,K),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(B=parseInt(k.sidebarTitleSize),!isNaN(B)&&0<B?Sidebar.prototype.sidebarTitleSize=B:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
+null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(B=parseInt(k.autosaveDelay),!isNaN(B)&&0<B?DrawioFile.prototype.autosaveDelay=B:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
+(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
+null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
+typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(k));B.parentNode.insertBefore(K,B);k=k.split("url(");for(K=1;K<k.length;K++){var T=k[K].indexOf(")");T=Editor.trimCssUrl(k[K].substring(0,T));var P=document.createElement("link");
+P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
+20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var B=[],K=0;K<k;K++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
+{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;
+Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var B=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==k.nodeName){B=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(K=null!=this.graph.themes?
+this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
+B=k.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(B=k.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<B.length;K++)this.graph.addExtFont(B[K].name,
+B[K].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,B){k=null!=k?k:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",
+this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?K.setAttribute("adaptiveColors",this.graph.adaptiveColors):K.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+
+"^"+P.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(k){try{var B=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=
+function(k,B,K){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
+function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var K=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=
+function(Y){try{null==T?(MathJax.typesetClear([Y]),MathJax.typeset([Y]),K()):T!=Y&&Editor.mathJaxQueue.push(Y)}catch(aa){MathJax.typesetClear([Y]),null!=aa.retry?(T=Y,aa.retry.then(function(){MathJax.typesetPromise([Y]).then(K)["catch"](function(la){console.log("Error in MathJax.typesetPromise: "+la.toString());K()})})["catch"](function(la){console.log("Error in MathJax.retry: "+la.toString());K()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=
+B?B:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var Y=0;Y<Editor.mathJaxQueue.length;Y++)Editor.doMathJaxRender(Editor.mathJaxQueue[Y])}}};Editor.MathJaxRender=function(Y){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Y):Editor.mathJaxQueue.push(Y)};Editor.onMathJaxDone=function(){};
+var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var Y=mxUtils.bind(this,function(aa,la){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Y);this.graph.addListener(mxEvent.REFRESH,Y)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var U=document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);B[0].parentNode.appendChild(U)}}};
+Editor.prototype.csvToArray=function(k){if(0<k.length){var B="",K=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===B&&(K[T]+=U),P=!P):","===U&&P?U=K[++T]="":K[T]+=U,B=U;return K}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var B=EditorUi.isVisioFilename(k);B=/\.png$/i.test(k)||/\.pdf$/i.test(k)||B;var K=
+"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+K+(B?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
+"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var B=k.convert,K=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=B.apply(this,arguments)):T=PROXY_URL+
+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,B,K,T,P){try{var U=!0,Y=window.setTimeout(mxUtils.bind(this,function(){U=!1;B(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,B,K,T,!0):B(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(va){window.clearTimeout(Y);U&&(200>va.getStatus()||
+299<va.getStatus()?aa():B(Editor.createSvgDataUri(va.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(Y);U&&aa()}));else{var la=new Image;this.crossOriginImages&&(la.crossOrigin="anonymous");la.onload=function(){window.clearTimeout(Y);if(U)try{T=null!=T&&P?T:1;var va=document.createElement("canvas"),ua=va.getContext("2d");ua.scale(T,T);va.height=la.height*T;va.width=la.width*T;ua.drawImage(la,0,0);B(va.toDataURL())}catch(qa){B(k)}};la.onerror=function(){window.clearTimeout(Y);U&&(null!=
+K?K():B(k))};la.src=k}}catch(va){null!=K?K():B(k)}};Editor.prototype.convertImages=function(k,B,K,T){function P(){0<U.length?U.shift()():B(k)}null==T&&(T=this.createImageUrlConverter());var U=[],Y=K||{};K=mxUtils.bind(this,function(aa,la){aa=k.getElementsByTagName(aa);for(var va=0;va<aa.length;va++)mxUtils.bind(this,function(ua){U.push(mxUtils.bind(this,function(){try{if(null!=ua){var qa=T.convert(ua.getAttribute(la));if(null!=qa&&"data:"!=qa.substring(0,5)){var Ba=Y[qa];null==Ba?this.convertImageToDataUri(qa,
+function(ya){null!=ya&&(Y[qa]=ya,ua.setAttribute(la,ya));P()},null,Editor.svgRasterScale):(ua.setAttribute(la,Ba),P())}else null!=qa&&ua.setAttribute(la,qa),P()}}catch(ya){P()}}))})(aa[va])});K("image","xlink:href");K("img","src");P()};Editor.base64Encode=function(k){for(var B="",K=0,T=k.length,P,U,Y;K<T;){P=k.charCodeAt(K++)&255;if(K==T){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4);B+="==";break}U=k.charCodeAt(K++);if(K==T){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);B+="=";break}Y=k.charCodeAt(K++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(Y&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Y&63)}return B};Editor.prototype.loadUrl=function(k,B,K,T,P,U,Y,aa){try{var la=!Y&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var va=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(ua){200<=ua.getStatus()&&
+299>=ua.getStatus()?null!=B&&(ua=ua.getText(),la&&(U=null!=U?U:"data:image/png;base64,",ua=U+Editor.base64Encode(ua)),B(ua)):null!=K&&(0==ua.getStatus()?K({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?K({message:mxResources.get("fileNotFound"),code:ua.getStatus()},ua):K({message:this.getErrorMessage(ua)},ua))}),function(ua){null!=K&&K({message:mxResources.get("error")+" "+ua.getStatus()})},la,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:va})},aa)});va()}catch(ua){null!=
+K&&K(ua)}};Editor.prototype.getErrorMessage=function(k){var B=mxResources.get("error")+" "+k.getStatus();try{var K=k.getText(),T=JSON.parse(K);null!=T&&null!=T.error&&null!=T.error.message&&(B=T.error.message+" ("+B+")")}catch(P){}return B};Editor.prototype.absoluteCssFonts=function(k){var B=null;if(null!=k){var K=k.split("url(");if(0<K.length){B=[K[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=
+T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<K.length;U++)if(T=K[U].indexOf(")"),0<T){var Y=Editor.trimCssUrl(K[U].substring(0,T));this.graph.isRelativeUrl(Y)&&(Y=null!=P?P+Y:window.location.protocol+"//"+window.location.hostname+("/"==Y.charAt(0)?"":k)+Y);B.push('url("'+Y+'"'+K[U].substring(T))}else B.push(K[U])}else B=[k]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(k,B,K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));
+K(k,B)};Editor.prototype.embedCssFonts=function(k,B){var K=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var la=[K[0]],va=1;va<K.length;va++){var ua=K[va].indexOf(")");la.push('url("');la.push(this.cachedFonts[Editor.trimCssUrl(K[va].substring(0,ua))]);la.push('"'+K[va].substring(ua))}B(la.join(""))}});if(0<K.length){for(k=1;k<K.length;k++){var U=K[k].indexOf(")"),Y=null,aa=K[k].indexOf("format(",U);0<aa&&(Y=Editor.trimCssUrl(K[k].substring(aa+
+7,K[k].indexOf(")",aa))));mxUtils.bind(this,function(la){if(null==this.cachedFonts[la]){this.cachedFonts[la]=la;T++;var va="application/x-font-ttf";if("svg"==Y||/(\.svg)($|\?)/i.test(la))va="image/svg+xml";else if("otf"==Y||"embedded-opentype"==Y||/(\.otf)($|\?)/i.test(la))va="application/x-font-opentype";else if("woff"==Y||/(\.woff)($|\?)/i.test(la))va="application/font-woff";else if("woff2"==Y||/(\.woff2)($|\?)/i.test(la))va="application/font-woff2";else if("eot"==Y||/(\.eot)($|\?)/i.test(la))va=
+"application/vnd.ms-fontobject";else if("sfnt"==Y||/(\.sfnt)($|\?)/i.test(la))va="application/font-sfnt";this.mapFontUrl(va,la,mxUtils.bind(this,function(ua,qa){this.loadUrl(qa,mxUtils.bind(this,function(Ba){this.cachedFonts[la]=Ba;T--;P()}),mxUtils.bind(this,function(Ba){T--;P()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[k].substring(0,U)),Y)}P()}else B(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(k[B]=Graph.fontMapping[B]);return k};Editor.prototype.embedExtFonts=function(k){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),k)}),
+U=0;U<B.length;U++)mxUtils.bind(this,function(Y,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(la){this.cachedGoogleFonts[aa]=la;K.push(la+"\n");T--;P()}),mxUtils.bind(this,function(la){T--;K.push("@import url("+aa+");\n");P()}))):K.push(this.cachedGoogleFonts[aa]+"\n"):K.push('@font-face {font-family: "'+Y+'";src: url("'+aa+'")}\n')})(B[U].name,B[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=
+k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var B=document.getElementsByTagName("style"),K=0;K<B.length;K++){var T=mxUtils.getTextContent(B[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(B[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=mxUtils.getSvgDefs(k),T=B.split("\n");B=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?B.push(T[U]):P.push(T[U]);k=k.ownerDocument;
+k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<B.length&&(mxUtils.setTextContent(k,B.join("\n")),K.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),K.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,B,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/
+k,T/B))};Editor.prototype.exportToCanvas=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa,Ba,ya,La,Aa,Ea,pa){try{U=null!=U?U:!0;Y=null!=Y?Y:!0;qa=null!=qa?qa:this.graph;Ba=null!=Ba?Ba:0;var Ca=la?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==la&&(Ca="light-dark(#ffffff,"+Editor.darkColor+")");this.convertImages(qa.getSvg(null,null,Ba,ya,null,Y,null,null,null,va,null,Aa,Ea,pa),mxUtils.bind(this,function(za){try{var wa=new Image;wa.onload=mxUtils.bind(this,function(){try{var Qa=
+function(){mxClient.IS_SF?window.setTimeout(function(){Ma.drawImage(wa,0,0);k(Ra,za)},0):(Ma.drawImage(wa,0,0),k(Ra,za))},Ra=document.createElement("canvas"),Sa=parseInt(za.getAttribute("width")),Ha=parseInt(za.getAttribute("height"));aa=null!=aa?aa:1;null!=B&&(aa=U?Math.min(1,Math.min(3*B/(4*Ha),B/Sa)):B/Sa);aa=this.getMaxCanvasScale(Sa,Ha,aa);Sa=Math.ceil(aa*Sa);Ha=Math.ceil(aa*Ha);Ra.setAttribute("width",Sa);Ra.setAttribute("height",Ha);var Ma=Ra.getContext("2d");if(null!=Ca){var y=mxUtils.getLightDarkColor(Ca);
+Ma.beginPath();Ma.rect(0,0,Sa,Ha);Ma.fillStyle="dark"==Aa&&"none"!=qa.getAdaptiveColors()?y.dark:y.light;Ma.fill()}1!=aa&&Ma.scale(aa,aa);if(La){var O=qa.view,Q=O.scale;O.scale=1;var V=btoa(unescape(encodeURIComponent(O.createSvgGrid(O.gridColor))));O.scale=Q;V="data:image/svg+xml;base64,"+V;var ha=qa.gridSize*O.gridSteps*aa,ja=qa.getGraphBounds(),oa=O.translate.x*Q,ta=O.translate.y*Q,ra=oa+(ja.x-oa)/Q-Ba,xa=ta+(ja.y-ta)/Q-Ba,Da=new Image;Da.onload=function(){try{for(var Ia=-Math.round(ha-mxUtils.mod((oa-
+ra)*aa,ha)),Ya=-Math.round(ha-mxUtils.mod((ta-xa)*aa,ha));Ia<Sa;Ia+=ha)for(var Za=Ya;Za<Ha;Za+=ha)Ma.drawImage(Da,Ia/aa,Za/aa);Qa()}catch($a){null!=P&&P($a)}};Da.onerror=function(Ia){null!=P&&P(Ia)};Da.src=V}else Qa()}catch(Ia){null!=P&&P(Ia)}});wa.onerror=function(Qa){null!=P&&P(Qa)};va&&this.graph.addSvgShadow(za);this.graph.mathEnabled&&this.addMathCss(za);var Xa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(za,this.resolvedFontCss),wa.src=Editor.createSvgDataUri(mxUtils.getXml(za))}catch(Qa){null!=
+P&&P(Qa)}});this.embedExtFonts(mxUtils.bind(this,function(Qa){try{null!=Qa&&this.addFontCss(za,Qa),this.loadFonts(Xa)}catch(Ra){null!=P&&P(Ra)}}))}catch(Qa){null!=P&&P(Qa)}}),K,ua)}catch(za){null!=P&&P(za)}};Editor.crcTable=[];for(var v=0;256>v;v++)for(var n=v,A=0;8>A;A++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[v]=n;Editor.updateCRC=function(k,B,K,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^B.charCodeAt(K+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var B=-1,K=0;K<k.length;K++)B=
+B>>>8^Editor.crcTable[(B^k.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(k,B,K,T,P){function U(ua,qa){var Ba=la;la+=qa;return ua.substring(Ba,la)}function Y(ua){ua=U(ua,4);return ua.charCodeAt(3)+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function aa(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var la=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+
+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,la);do{var va=Y(k);if("IDAT"==U(k,4)){P=k.substring(0,la-8);"pHYs"==B&&"dpi"==K?(K=Math.round(T/.0254),K=aa(K)+aa(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,B,0,4);T=Editor.updateCRC(T,K,0,K.length);P+=aa(K.length)+B+K+aa(T^4294967295);P+=k.substring(la-8,k.length);break}P+=k.substring(la-8,la-4+va);
+U(k,va);U(k,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var G=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,B){G.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()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,B){var K=null;null!=k.editor.graph.getModel().getParent(B)?K=B.getId():null!=k.currentPage&&(K=k.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var F=Format.prototype.init;Format.prototype.init=function(){F.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var J=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?J.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=c.apply(this,arguments);var B=this.editorUi,K=B.editor.graph;if(K.isEnabled()){var T=B.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
+function(){return B.editor.autosave},function(U){B.editor.setAutosave(U);B.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(U){this.listener=function(){U(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(U){B.actions.get("mathematicalTypesetting").funct()},
+{install:function(U){this.listener=function(){U(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});k.appendChild(P);(!B.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&P.appendChild(B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting"))}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
+[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
+type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,
+"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];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:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{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:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{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;var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);null!=k.customProperties&&this.container.appendChild(this.addProperties(this.createPanel(),k.customProperties,k))};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var B=
+this.editorUi.getSelectionState();1==B.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=B.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);l.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,B,K,T){function P(Ma,y,O,Q,V){if(null!=O.valueChanged)O.valueChanged(y,V);else{Ba.getModel().beginUpdate();try{V=[];var ha=[];if(null!=O.index){for(var ja=[],oa=O.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==
+Ma;)ja.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;O.index<ja.length?null!=Q?ja.splice(Q,1):ja[O.index]=y:ja.push(y);null!=O.size&&ja.length>O.size&&(ja=ja.slice(0,O.size));y=ja.join(",");null!=O.countProperty&&(Ba.setCellStyles(O.countProperty,ja.length,Ba.getSelectionCells()),V.push(O.countProperty),ha.push(ja.length))}Ba.setCellStyles(Ma,y,Ba.getSelectionCells());V.push(Ma);ha.push(y);if(null!=O.dependentProps)for(Ma=0;Ma<O.dependentProps.length;Ma++){var ta=O.dependentPropsDefVal[Ma],
+ra=O.dependentPropsVals[Ma];if(ra.length>y)ra=ra.slice(0,y);else for(var xa=ra.length;xa<y;xa++)ra.push(ta);ra=ra.join(",");Ba.setCellStyles(O.dependentProps[Ma],ra,Ba.getSelectionCells());V.push(O.dependentProps[Ma]);ha.push(ra)}if("function"==typeof O.onChange)O.onChange(Ba,y);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ha,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}}function U(Ma,y,O){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Ma,!0);
+y.style.position="absolute";y.style.left=V.x-Q.x+"px";y.style.top=V.y-Q.y+"px";y.style.width=Ma.offsetWidth+"px";y.style.height=Ma.offsetHeight-(O?4:0)+"px";y.style.zIndex=5}function Y(Ma,y,O){function Q(ha){if(null==ha||ha==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ha)V.style.background="";else{var ja=mxUtils.getLightDarkColor(ha);mxUtils.isLightDarkColor(ha)&&ja.light!=ja.dark?V.style.background="linear-gradient(to right bottom, "+ja.cssText+
+" 50%, "+mxUtils.invertLightDarkColor(ja).cssText+" 50.3%)":V.style.background=ha}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(y);btn=mxUtils.button("",mxUtils.bind(qa,function(ha){this.editorUi.pickColor(y,function(ja){P(Ma,ja,O);Q(ja)});mxEvent.consume(ha)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);
+return btn}function aa(Ma,y,O,Q,V,ha,ja){null!=y&&(y=y.split(","),ya.push({name:Ma,values:y,type:O,defVal:Q,countProperty:V,parentRow:ha,isDeletable:!0,flipBkg:ja}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var ta=ha,ra=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==Ma)ta=ta.nextSibling,ra++;else break;var xa={type:O,parentRow:ha,index:ra,isDeletable:!0,defVal:Q,countProperty:V};ra=ua(Ma,"",xa,0==ra%2,ja);P(Ma,Q,xa);ta.parentNode.insertBefore(ra,ta.nextSibling);
+mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function la(Ma,y,O,Q,V,ha,ja){if(0<V){var oa=Array(V);y=null!=y?y.split(","):[];for(var ta=0;ta<V;ta++)oa[ta]=null!=y[ta]?y[ta]:null!=Q?Q:"";ya.push({name:Ma,values:oa,type:O,defVal:Q,parentRow:ha,flipBkg:ja,size:V})}return document.createElement("div")}function va(Ma,y,O){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==y;mxEvent.addListener(Q,"change",function(){P(Ma,
+Q.checked?"1":"0",O)});return Q}function ua(Ma,y,O,Q,V){var ha=O.dispName,ja=O.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Ma);oa.setAttribute("data-pValue",y);Q=!1;null!=O.index&&(oa.setAttribute("data-index",O.index),ha=(null!=ha?ha:"")+"["+O.index+"]",Q=!0);var ta=document.createElement("td");ta.className="gePropRowCell";ha=mxResources.get(ha,null,ha);mxUtils.write(ta,ha);ta.setAttribute("title",ha);
+Q&&(ta.style.textAlign="right");oa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";ta.setAttribute("title",null!=y?y:mxResources.get("none"));if("color"==ja)ta.appendChild(Y(Ma,y,O));else if("bool"==ja||"boolean"==ja)ta.appendChild(va(Ma,y,O));else if("enum"==ja){var ra=O.enumList;for(V=0;V<ra.length;V++)if(ha=ra[V],ha.val==y){mxUtils.write(ta,mxResources.get(ha.dispName,null,ha.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){var xa=document.createElement("select"),
+Da=null;U(ta,xa);for(var Ia=0;Ia<ra.length;Ia++){var Ya=ra[Ia],Za=document.createElement("option");Za.value=mxUtils.htmlEntities(Ya.val);mxUtils.write(Za,mxResources.get(Ya.dispName,null,Ya.dispName));xa.appendChild(Za);null==Ya.val&&(Za.value="null",Da=Za)}xa.value=null==y&&null!=Da?"null":y;k.appendChild(xa);mxEvent.addListener(xa,"change",function(){var $a=mxUtils.htmlEntities(xa.value);if(xa[xa.selectedIndex]==Da||"null"==$a.value)$a=null;P(Ma,$a,O)});xa.focus();mxEvent.addListener(xa,"blur",
+function(){k.removeChild(xa)})}))}else"dynamicArr"==ja?ta.appendChild(aa(Ma,y,O.subType,O.subDefVal,O.countProperty,oa,V)):"staticArr"==ja?ta.appendChild(la(Ma,y,O.subType,O.subDefVal,O.size,oa,V)):"readOnly"==ja?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=y,V.style.borderWidth="0px","id"==Ma?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan",
+"2"),V.setAttribute("title",y),oa.firstChild.appendChild(V)):(V.style.width="96px",ta.appendChild(V))):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(y)),mxEvent.addListener(ta,"click",mxUtils.bind(qa,function(){function xa(){var Ia=Da.value;Ia=0==Ia.length&&"string"!=ja&&"numbers"!=ja?0:Ia;O.allowAuto&&(null!=Ia.trim&&"auto"==Ia.trim().toLowerCase()?(Ia="auto",ja="string"):(Ia=parseFloat(Ia),Ia=isNaN(Ia)?0:Ia));null!=O.min&&Ia<O.min?Ia=O.min:null!=O.max&&Ia>O.max&&(Ia=O.max);var Ya=null;try{Ya=
+"numbers"==ja?Ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ja?parseInt(Ia):Ia)+"")}catch(Za){}P(Ma,Ya,O,null,Da)}var Da=document.createElement("input");U(ta,Da,!0);Da.value=decodeURIComponent(y);Da.className="gePropEditor";"int"!=ja&&"float"!=ja||O.allowAuto||(Da.type="number",Da.step="int"==ja?"1":"any",null!=O.min&&(Da.min=parseFloat(O.min)),null!=O.max&&(Da.max=parseFloat(O.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ia){13==Ia.keyCode&&xa()});Da.focus();
+mxEvent.addListener(Da,"blur",function(){xa()})})));O.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(xa){P(Ma,"",O,O.index);mxEvent.consume(xa)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",ta.appendChild(V));oa.appendChild(ta);return oa}var qa=this,Ba=this.editorUi.editor.graph,ya=[],La=document.createElement("table");La.className="geProperties geFullWidthElement";var Aa=document.createElement("tr");Aa.className="gePropHeader";var Ea=document.createElement("th");
+Ea.className="gePropHeaderCell";Ea.style.paddingLeft="16px";Ea.style.backgroundRepeat="no-repeat";Ea.style.backgroundPosition="-2px 50%";Ea.style.backgroundSize="20px";mxUtils.write(Ea,mxResources.get("property"));Aa.style.cursor="pointer";var pa=function(){var Ma=La.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ea.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var y="none";for(var O=k.childNodes.length-1;0<=O;O--)try{var Q=k.childNodes[O],V=Q.nodeName.toUpperCase();
+"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ha){}}else Ea.style.backgroundImage="url('"+Editor.arrowDownImage+"')",y="";for(O=0;O<Ma.length;O++)Ma[O].style.display=y};mxEvent.addListener(Aa,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;pa()});Aa.appendChild(Ea);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Aa.appendChild(Ca);La.appendChild(Aa);var za=Ca=!1;Aa=null;
+1==K.vertices.length&&0==K.edges.length?Aa=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(Aa=K.edges[0].id);null==Aa||T||La.appendChild(ua("id",mxUtils.htmlEntities(Aa),{dispName:"id",type:"readOnly"},!0,!1));for(var wa in B)if(T=B[wa],!T.primary&&("function"!=typeof T.isVisible||T.isVisible(K,this))){var Xa=null!=T.getValue?T.getValue():null!=K.style[wa]?mxUtils.htmlEntities(K.style[wa]+""):null!=T.getDefaultValue?T.getDefaultValue(K,this):T.defVal;if("separator"==T.type)za=!za;else{if("staticArr"==
+T.type)T.size=parseInt(K.style[T.sizeProperty]||B[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Qa=T.dependentProps,Ra=[],Sa=[];for(Aa=0;Aa<Qa.length;Aa++){var Ha=K.style[Qa[Aa]];Sa.push(B[Qa[Aa]].subDefVal);Ra.push(null!=Ha?Ha.split(","):[])}T.dependentPropsDefVal=Sa;T.dependentPropsVals=Ra}La.appendChild(ua(wa,Xa,T,Ca,za));Ca=!Ca}}for(Aa=0;Aa<ya.length;Aa++)for(T=ya[Aa],B=T.parentRow,K=0;K<T.values.length;K++)wa=ua(T.name,T.values[K],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,
+index:K,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==K%2,T.flipBkg),B.parentNode.insertBefore(wa,B.nextSibling),B=wa;k.appendChild(La);pa();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var B=this.editorUi,K=B.editor.graph,T=document.createElement("div");T.style.padding="6px 20px 0 24px";k.appendChild(T);var P=document.createElement("div");P.className="geSwitcher";P.style.padding="4px 18px 6px 0px";for(var U=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=
+document.createElement("div");aa.className="geSwitcherDot";mxUtils.bind(this,function(Ba){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){la(Ba)}))})(Y);U.push(aa);P.appendChild(aa)}var la=mxUtils.bind(this,function(Ba){null!=U[Ba]&&(null!=this.format.currentScheme&&null!=U[this.format.currentScheme]&&(U[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,va(this.defaultColorSchemes[this.format.currentScheme]),U[this.format.currentScheme].style.background=
+"#84d7ff")}),va=mxUtils.bind(this,function(Ba){var ya=mxUtils.clone(K.defaultVertexStyle);ya[mxConstants.STYLE_STROKECOLOR]=null!=ya[mxConstants.STYLE_STROKECOLOR]?ya[mxConstants.STYLE_STROKECOLOR]:"default";ya[mxConstants.STYLE_FILLCOLOR]=null!=ya[mxConstants.STYLE_FILLCOLOR]?ya[mxConstants.STYLE_FILLCOLOR]:"default";ya[mxConstants.STYLE_FONTCOLOR]=null!=ya[mxConstants.STYLE_FONTCOLOR]?ya[mxConstants.STYLE_FONTCOLOR]:"default";K.replaceDefaultColors(new mxCell,ya);var La=mxUtils.bind(this,function(Ea){var pa=
+mxUtils.button("",mxUtils.bind(this,function(wa){K.getModel().beginUpdate();try{for(var Xa=B.getSelectionState().cells,Qa=0;Qa<Xa.length;Qa++){var Ra=K.getModel().getStyle(Xa[Qa]);null!=Ea?(mxEvent.isShiftDown(wa)||(Ra=""==Ea.fill||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,Ea.fill),Ra=""==Ea.gradient||null==Ea.gradient?mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,
+Ea.gradient),mxEvent.isControlDown(wa)||mxClient.IS_MAC&&mxEvent.isMetaDown(wa)||!K.getModel().isVertex(Xa[Qa])||(Ra=""==Ea.font||null==Ea.font?mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,Ea.font))),mxEvent.isAltDown(wa)||(Ra=""==Ea.stroke||null==Ea.fill?mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ra,mxConstants.STYLE_STROKECOLOR,Ea.stroke))):(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FILLCOLOR,null),Ra=mxUtils.setStyle(Ra,
+mxConstants.STYLE_STROKECOLOR,null),Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_GRADIENTCOLOR,null),K.getModel().isVertex(Xa[Qa])&&(Ra=mxUtils.setStyle(Ra,mxConstants.STYLE_FONTCOLOR,null)));K.getModel().setStyle(Xa[Qa],Ra)}}finally{K.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!=Ea){var Ca="1px solid";null!=Ea.border&&(Ca=Ea.border);if(null!=Ea.gradient)pa.style.backgroundImage=
+"linear-gradient("+mxUtils.getLightDarkColor(Ea.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(Ea.gradient).cssText+" 100%)";else if(Ea.fill==mxConstants.NONE)pa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==Ea.fill||""==Ea.fill)pa.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var za=mxUtils.getLightDarkColor(Ea.fill);pa.style.backgroundImage="linear-gradient(to right bottom, "+za.cssText+" 50%, "+
+za.light+" 50.3%)"}null==Ea.stroke||Ea.stroke==mxConstants.NONE?pa.style.border=Ca+" transparent":""==Ea.stroke?pa.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(za=mxUtils.getLightDarkColor(Ea.stroke),pa.style.border=Ca+" "+za.cssText,pa.style.borderRightColor=za.light,pa.style.borderBottomColor=pa.style.borderRightColor);null!=Ea.title&&pa.setAttribute("title",Ea.title)}else Ca=mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,
+"#ffffff"),za=mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,"#000000"),pa.style.backgroundColor=Ca,pa.style.border="1px solid "+za;pa.style.borderRadius="0";T.appendChild(pa);null!=Ea&&null!=Ea.gradient&&(Ca=pa.cloneNode(!1),Ca.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(Ea.gradient).light+") 100%)",Ca.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ca.style.backgroundColor=
+"transparent",T.appendChild(Ca),Ca.style.marginLeft="-42px",mxEvent.addListener(Ca,"click",function(){pa.click()}))});T.innerText="";if(null!=Ba)for(var Aa=0;Aa<Ba.length;Aa++)0<Aa&&0==mxUtils.mod(Aa,4)&&mxUtils.br(T),La(Ba[Aa])});null==this.format.currentScheme?la(Math.min(U.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):la(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?43:23;var ua=document.createElement("div");ua.className="geButton";ua.style.cssText="position:absolute;left:0px;bottom:"+
+Y+"px;width:20px;background-image:url("+Editor.chevronLeftImage+");";mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){la(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var qa=document.createElement("div");qa.className="geButton";qa.style.cssText="position:absolute;left:186px;bottom:"+Y+"px;width:20px;background-image:url("+Editor.chevronRightImage+");";1<this.defaultColorSchemes.length&&(k.appendChild(ua),k.appendChild(qa));mxEvent.addListener(qa,"click",mxUtils.bind(this,
+function(){la(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));va(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,
+Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(k=document.createElement("link"),
+k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(B))):(null==K&&(K='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+B+'");\n}'),k=document.createElement("style"),mxUtils.write(k,K));return k};Graph.addRecentCustomFont=function(k,B){};Graph.addFont=function(k,B,K){if(null!=k&&0<k.length&&null!=B&&0<B.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];
+null!=P&&P.url!=B&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=B,"http:"==B.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(B)),P={name:k,url:B,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,B=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=B&&B.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();return k};Graph.getFontUrl=function(k,B){k=Graph.customFontElements[k.toLowerCase()];
+null!=k&&(B=k.url);return B};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var B=0;B<k.length;B++){var K=k[B].getAttribute("data-font-src");if(null!=K){var T="FONT"==k[B].nodeName?k[B].getAttribute("face"):k[B].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(k){if(null!=k){var B=mxUtils.getValue(k,"fontSource",null);if(null!=B){var K=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=K)try{Graph.addFont(K,decodeURIComponent(B))}catch(T){}}}return k};
+Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var t=Graph.prototype.init;
+Graph.prototype.init=function(){function k(P){B=P}t.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};
+var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var Y=new mxStackLayout(this.graph,!1);Y.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Y.marginLeft=U.marginLeft||0;Y.marginRight=U.marginRight||0;Y.marginTop=U.marginTop||0;Y.marginBottom=U.marginBottom||0;Y.allowGaps=U.allowGaps||0;Y.horizontal="1"==mxUtils.getValue(U,"horizontalRack",
+"0");Y.resizeParent=!1;Y.fill=!0;return Y}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,B){return Graph.processFontStyle(q.apply(this,arguments))};var D=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa){D.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,B,K,T){function P(){for(var Aa=aa.getSelectionCells(),Ea=[],pa=0;pa<Aa.length;pa++)aa.isCellVisible(Aa[pa])&&Ea.push(Aa[pa]);aa.setSelectionCells(Ea)}function U(Aa){aa.setHiddenTags(Aa?[]:la.slice());P();aa.refresh()}function Y(Aa,Ea){ua.innerText="";if(0<Aa.length){var pa=document.createElement("table");pa.setAttribute("cellpadding","2");pa.style.boxSizing="border-box";
+pa.style.tableLayout="fixed";pa.style.width="100%";var Ca=document.createElement("tbody");if(null!=Aa&&0<Aa.length)for(var za=0;za<Aa.length;za++)(function(wa){function Xa(){var y=aa.getCellsForTags([wa],null,null,!0);aa.isEnabled()?aa.setSelectionCells(y):aa.highlightCells(y,null,null,70)}var Qa=0>mxUtils.indexOf(aa.hiddenTags,wa),Ra=document.createElement("tr"),Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",
+Qa?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",mxResources.get(Qa?"hideIt":"show",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";Sa.appendChild(Ha);mxEvent.addListener(Ha,"click",function(y){mxEvent.isShiftDown(y)?U(0<=mxUtils.indexOf(aa.hiddenTags,wa)):(aa.toggleHiddenTag(wa),P(),aa.refresh());mxEvent.consume(y)});Ra.appendChild(Sa);
+Sa=document.createElement("td");Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.selectImage);Ha.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){U(!0);Xa();mxEvent.consume(y)});Sa.appendChild(Ha);Ra.appendChild(Sa);
+Sa=document.createElement("td");Sa.style.overflow="hidden";Sa.style.whiteSpace="nowrap";Sa.style.textOverflow="ellipsis";Sa.style.verticalAlign="middle";Sa.style.cursor="pointer";Sa.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Qa?100:40);Sa.appendChild(a);mxEvent.addListener(Sa,"click",function(y){if(mxEvent.isShiftDown(y))U(!0),Xa();else if(Qa&&0<aa.hiddenTags.length)U(!0);else{var O=la.slice(),
+Q=mxUtils.indexOf(O,wa);O.splice(Q,1);aa.setHiddenTags(O);P();aa.refresh()}mxEvent.consume(y)});Ra.appendChild(Sa);if(aa.isEnabled()){Sa=document.createElement("td");Sa.style.verticalAlign="middle";Sa.style.textAlign="center";Sa.style.width="18px";if(null==Ea){Sa.style.align="center";Sa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.trashImage);Ha.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(Ha,Qa?75:25);Ha.className="geAdaptiveAsset";
+Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(B||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(y){var O=mxUtils.indexOf(la,wa);0<=O&&la.splice(O,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[wa]);aa.refresh();mxEvent.consume(y)});Sa.appendChild(Ha)}else{var Ma=document.createElement("input");Ma.setAttribute("type","checkbox");Ma.style.margin="0px";Ma.defaultChecked=null!=Ea&&0<=mxUtils.indexOf(Ea,
+wa);Ma.checked=Ma.defaultChecked;Ma.style.background="transparent";Ma.setAttribute("title",mxResources.get(Ma.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(Ma,"change",function(y){Ma.checked?aa.addTagsForCells(aa.getSelectionCells(),[wa]):aa.removeTagsForCells(aa.getSelectionCells(),[wa]);mxEvent.consume(y)});Sa.appendChild(Ma)}Ra.appendChild(Sa)}Ca.appendChild(Ra)})(Aa[za]);pa.appendChild(Ca);ua.appendChild(pa)}}var aa=this,la=aa.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect=
+"none";va.style.overflow="hidden";va.style.padding="10px";va.style.height="100%";var ua=document.createElement("div");ua.style.position="absolute";ua.style.boxSizing="border-box";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.padding="3px";ua.style.left="0px";ua.style.right="0px";ua.style.top="0px";ua.style.bottom="0px";va.appendChild(ua);aa.addListener(mxEvent.ROOT,function(){la=aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Aa,Ea){if(k()){Aa=aa.getAllTags();for(Ea=0;Ea<
+Aa.length;Ea++)0>mxUtils.indexOf(la,Aa[Ea])&&la.push(Aa[Ea]);la.sort();aa.isSelectionEmpty()?Y(la):Y(la,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var Ba=document.createElement("div");Ba.className="geToolbarContainer geDialogToolbar";Ba.style.position="absolute";Ba.style.display="flex";Ba.style.bottom="0px";Ba.style.left="0px";Ba.style.right="0px";Ba.style.height="32px";
+Ba.style.overflow="hidden";Ba.style.padding="3px 4px 4px 4px";Ba.style.borderWidth="1px 0px 0px 0px";Ba.style.borderStyle="solid";Ba.style.whiteSpace="nowrap";if(aa.isEnabled()){ua.style.bottom="32px";var ya=document.createElement("a");ya.className="geButton";var La=ya.cloneNode(!1);La.style.backgroundImage="url("+Editor.visibleImage+")";La.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(La,"click",function(Aa){aa.setHiddenTags([]);mxEvent.isShiftDown(Aa)||(la=aa.hiddenTags.slice());
+P();aa.refresh();mxEvent.consume(Aa)});Ba.appendChild(La);null!=K&&(ya=ya.cloneNode(!1),ya.style.backgroundImage="url("+Editor.plusImage+")",ya.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ya,"click",function(Aa){K(la,function(Ea){la=Ea;qa()});mxEvent.consume(Aa)}),Ba.appendChild(ya));va.appendChild(Ba)}null!=T&&Ba.appendChild(T);return{div:va,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var B in Graph.customFontElements){var K=
+Graph.customFontElements[B];k.push({name:K.name,url:K.url})}return k};Graph.prototype.setFont=function(k,B){Graph.addFont(k,B);var K=Editor.guid();document.execCommand("fontname",!1,K);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==K&&(P=!0,T[U].setAttribute("face",k),null!=B?T[U].setAttribute("data-font-src",B):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var N=Graph.prototype.isFastZoomEnabled;
+Graph.prototype.isFastZoomEnabled=function(){return N.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var B in k)this.globalVars[B]=k[B]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=
+function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var L=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var B=L.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[k]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};
+var I=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,B,K,T,P,U,Y,aa,la,va,ua,qa,Ba,ya,La,Aa){var Ea=I.apply(this,arguments);if(null!=qa){var pa=Ea.getAttribute("style");null==pa&&(pa="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;Ea.setAttribute("style",pa+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(ua&&0<Ca.length){var za=Ea.ownerDocument;pa=null!=za.createElementNS?za.createElementNS(mxConstants.NS_SVG,"style"):
+za.createElement("style");null!=za.setAttributeNS?pa.setAttributeNS("type","text/css"):pa.setAttribute("type","text/css");for(var wa="",Xa="",Qa=0;Qa<Ca.length;Qa++){var Ra=Ca[Qa].name,Sa=Ca[Qa].url;Graph.isCssFontUrl(Sa)?wa+="@import url("+Graph.rewriteGoogleFontUrl(Sa)+");\n":Xa+='@font-face {\nfont-family: "'+Ra+'";\nsrc: url("'+Sa+'");\n}\n'}pa.appendChild(za.createTextNode(wa+Xa));Ea.getElementsByTagName("defs")[0].appendChild(pa)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=
+this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(Ea);this.mathEnabled&&(document.body.appendChild(Ea),Editor.MathJaxRender(Ea),Ea.parentNode.removeChild(Ea),pa=Ea.ownerDocument.getElementById("MJX-SVG-styles"),null!=pa&&Ea.getElementsByTagName("defs")[0].appendChild(pa.cloneNode(!0)));return Ea};var Z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){Z.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=
+function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ia=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ia.apply(this,arguments);this.enumerationState=0};var fa=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return fa.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",
+""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var B="1"==mxUtils.getValue(k.style,"enumerate",0);B&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,
+k.secondLabel)):B||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);B=k.secondLabel;if(null!=B){var K=k.view.scale,T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*K,k.y+4*K,0,0):mxRectangle.fromPoint(k.view.getPoint(k));B.bounds.equals(k)&&B.value==T&&B.scale==K||(B.bounds=k,B.value=T,B.scale=K,B.redraw())}};var ba=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ba.apply(this,arguments)};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(k,B){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,B))};Graph.prototype.executeCustomActions=
+function(k,B,K){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,P=0,U=0,Y=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),la=mxUtils.bind(this,function(){0<
+P&&P--;0==P&&va()}),va=mxUtils.bind(this,function(){if(U<k.length){var ua=this.stoppingCustomActions,qa=k[U++],Ba=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,K))return}else this.openLink(qa.open);null==qa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;la()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());
+null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,la,ua?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,la,ua?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));
+null!=qa.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(Y(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){Y();var ya=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ya),1);this.setCellsVisible(ya,!0)}null!=qa.hide&&(Y(),ya=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ya),0),this.setCellsVisible(ya,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&
+(Y(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(Y(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));ya=[];null!=qa.select&&this.isEnabled()&&(ya=this.getCellsForAction(qa.select),this.setSelectionCells(ya));null!=qa.highlight&&(ya=this.getCellsForAction(qa.highlight),this.highlightCells(ya,qa.highlight.color,qa.highlight.duration,
+qa.highlight.opacity));null!=qa.scroll&&(ya=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<ya.length&&this.scrollCellToVisible(ya[0]);null!=K&&null!=qa.explore&&Graph.exploreFromCell(this,K,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var La=qa.tags.toggle;0==La.length&&(La=this.getAllTags());for(ya=0;ya<La.length;ya++)this.toggleHiddenTag(La[ya])}La=null;null!=qa.tags.hidden&&(null==La&&(La=[]),La=La.concat(qa.tags.hidden));if(null!=
+qa.tags.visible){null==La&&(La=[]);var Aa=this.getAllTags();for(ya=0;ya<Aa.length;ya++)0>mxUtils.indexOf(qa.tags.visible,Aa[ya])&&0>mxUtils.indexOf(La,Aa[ya])&&La.push(Aa[ya])}null!=La&&this.setHiddenTags(La);this.refresh()}0<Ba.length&&(P++,this.executeAnimations(Ba,la,ua?1:qa.steps,ua?0:qa.delay));0==P?va():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=B&&B()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,B){var K=this.getLinkForCell(B);null!=K&&
+"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(k,K));if(this.isHtmlLabel(B)){var T=document.createElement("div");T.innerHTML=Graph.sanitizeHtml(this.getLabel(B));for(var P=T.getElementsByTagName("a"),U=!1,Y=0;Y<P.length;Y++)K=P[Y].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(P[Y].setAttribute("href",this.updateCustomLink(k,K)),U=!0);U&&this.labelChanged(B,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,B){if("data:action/json,"==
+B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(k,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(T){}return B};Graph.prototype.updateCustomLinkActions=function(k,B){for(var K=0;K<B.length;K++){var T=B[K],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,B,K){if(null!=B&&null!=B[K]){for(var T=[],P=0;P<B[K].length;P++)if("*"==
+B[K][P])T.push(B[K][P]);else{var U=k[B[K][P]];null!=U?""!=U&&T.push(U):T.push(B[K][P])}B[K]=T}};Graph.prototype.getCellsForAction=function(k,B){B=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,B));if(null!=k.excludeCells){for(var K=[],T=0;T<B.length;T++)0>k.excludeCells.indexOf(B[T].id)&&K.push(B[T]);B=K}return B};Graph.prototype.getCellsById=function(k){var B=[];if(null!=k)for(var K=0;K<k.length;K++)if("*"==k[K]){var T=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(U){return U!=
+T},T))}else{var P=this.model.getCell(k[K]);null!=P&&B.push(P)}return B};var X=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return X.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var B=mxUtils.indexOf(this.hiddenTags,k);0>B?this.hiddenTags.push(k):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var B=0;B<k.length;B++)if(0>mxUtils.indexOf(this.hiddenTags,k[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,B,K,T){var P=[];if(null!=k){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var U=0,Y={},aa=0;aa<k.length;aa++)0<k[aa].length&&(Y[k[aa]]=!0,U++);for(aa=0;aa<B.length;aa++)if(K&&this.model.getParent(B[aa])==
+this.model.root||this.model.isVertex(B[aa])||this.model.isEdge(B[aa])){var la=this.getTagsForCell(B[aa]),va=!1;if(0<la.length&&(la=la.split(" "),la.length>=k.length)){for(var ua=va=0;ua<la.length&&va<U;ua++)null!=Y[la[ua]]&&va++;va=va==U}va&&(1!=T||this.isCellVisible(B[aa]))&&P.push(B[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var B=null,K=[],T=0;T<k.length;T++){var P=
+this.getTagsForCell(k[T]);K=[];if(0<P.length){P=P.split(" ");for(var U={},Y=0;Y<P.length;Y++)if(null==B||null!=B[P[Y]])U[P[Y]]=!0,K.push(P[Y]);B=U}else return[]}return K};Graph.prototype.getTagsForCells=function(k){for(var B=[],K={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==K[P[U]]&&(K[P[U]]=!0,B.push(P[U]))}}return B};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=
+function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<k.length;K++){for(var T=this.getTagsForCell(k[K]),P=T.split(" "),U=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.trim(B[Y]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[K],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,B){if(0<k.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<k.length;K++){var T=this.getTagsForCell(k[K]);
+if(0<T.length){for(var P=T.split(" "),U=!1,Y=0;Y<B.length;Y++){var aa=mxUtils.indexOf(P,B[Y]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var B=0;B<k.length;B++)this.model.setVisible(k[B],!this.model.isVisible(k[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,B){this.model.beginUpdate();try{for(var K=0;K<k.length;K++)this.model.setVisible(k[K],
+B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,B,K,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],B,K,T)};Graph.prototype.highlightCell=function(k,B,K,T,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,B,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&
+(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},1200)},K));return U};Graph.prototype.addSvgShadow=function(k,B,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");
+Y.setAttribute("in","SourceAlpha");Y.setAttribute("stdDeviation",this.svgShadowBlur);Y.setAttribute("result","blur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");Y.setAttribute("in","blur");Y.setAttribute("dx",this.svgShadowSize);Y.setAttribute("dy",this.svgShadowSize);Y.setAttribute("result","offsetBlur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");
+Y.setAttribute("flood-color",this.svgShadowColor);Y.setAttribute("flood-opacity",this.svgShadowOpacity);Y.setAttribute("result","offsetColor");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");Y.setAttribute("in","offsetColor");Y.setAttribute("in2","offsetBlur");Y.setAttribute("operator","in");Y.setAttribute("result","offsetBlur");U.appendChild(Y);Y=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");
+Y.setAttribute("in","SourceGraphic");Y.setAttribute("in2","offsetBlur");U.appendChild(Y);Y=k.getElementsByTagName("defs");0==Y.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=Y[0];P.appendChild(U);K||(B=null!=B?B:k.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+
+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),B=k.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=parseFloat(B[3])+6,k.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};
+Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),B=0;do var K=this.model.getChildAt(this.model.root,B);while(B++<k&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};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",STENCIL_PATH+"/kubernetes2.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+
@@ -3444,33 +3444,33 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
[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.networks2=[SHAPES_PATH+"/mxNetworks2.js",STENCIL_PATH+"/networks2.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var B=null;null!=k&&0<k.length&&("ER"==k.substring(0,
-2)?B="mxgraph.er":"sysML"==k.substring(0,5)&&(B="mxgraph.sysml"));return B};var ba=mxMarker.createMarker;mxMarker.createMarker=function(k,B,I,U,P,T,X,Z,ka,va){if(null!=I&&null==mxMarker.markers[I]){var ua=this.getPackageForType(I);null!=ua&&mxStencilRegistry.getStencil(ua)}return ba.apply(this,arguments)};var ja=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,B,I,U,P,T){"1"==mxUtils.getValue(B.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,
-this.stroke));return ja.apply(this,arguments)};PrintDialog.prototype.create=function(k,B,I,U){function P(){La.value=Math.max(1,Math.min(ua,Math.max(parseInt(La.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(ua,Math.min(parseInt(La.value),parseInt(ya.value))))}function T(Da){k.lastPrintPagesRadioChecked=Ba.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=Aa.checked;Ba.checked&&ya.value<La.value?(k.lastPrintPagesFromInput=
-ya.value,k.lastPrintPagesToInput=La.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);fa.value=Math.max(1,Math.min(1600,parseInt(fa.value)))+"%";k.lastPrintZoom=fa.value;k.lastPrintBorder=V.value;k.lastPrintGrid=ia.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=ta.checked;k.lastPrintSheetsAcross=O.value;k.lastPrintSheetsDown=R.value;var Ia={};Ia.border=parseInt(V.value);Ia.scale=parseInt(fa.value)/100;Ia.grid=ia.checked;Ia.transparent=oa.checked;Ia.includeCopy=ta.checked;
-Ia.sheetsAcross=parseInt(O.value);Ia.sheetsDown=parseInt(R.value);Ia.pagesFrom=parseInt(ya.value);Ia.pagesTo=parseInt(La.value);Ia.allPages=qa.checked;Ia.selection=Ea.checked;Ia.pageView=pa.checked;Ia.crop=Ca.checked;Ia.fit=Aa.checked;return null!=I?I(!Da,Ia):k.print(!Da,Ia)}var X=k.editor.graph,Z=document.createElement("div"),ka=document.createElement("h3");ka.style.width="100%";ka.style.textAlign="center";ka.style.marginTop="0px";mxUtils.write(ka,B||mxResources.get("print"));Z.appendChild(ka);var va=
-1,ua=1;ka=document.createElement("div");ka.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");ka.appendChild(qa);B=document.createElement("span");mxUtils.write(B,mxResources.get("allPages"));mxEvent.addListener(B,"click",function(){qa.checked=!0});ka.appendChild(B);mxUtils.br(ka);var Ba=qa.cloneNode(!0);ka.appendChild(Ba);B=document.createElement("span");
-mxUtils.write(B,mxResources.get("pages")+":");ka.appendChild(B);mxEvent.addListener(B,"click",function(){Ba.checked=!0});var ya=document.createElement("input");ya.style.margin="0 4px";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="40px";ka.appendChild(ya);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));ka.appendChild(B);var La=ya.cloneNode(!0);ka.appendChild(La);mxEvent.addListener(ya,"focus",function(){Ba.checked=!0});
-mxEvent.addListener(La,"focus",function(){Ba.checked=!0});mxEvent.addListener(ya,"change",P);mxEvent.addListener(La,"change",P);if(null!=k.pages&&(ua=k.pages.length,null!=k.currentPage))for(var za=0;za<ua;za++)if(k.currentPage==k.pages[za]){va=za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ya.value=Math.min(ua,Math.max(1,k.lastPrintPagesFromInput)),La.value=Math.min(ua,Math.max(1,k.lastPrintPagesToInput))):(ya.value=va,La.value=va);ya.setAttribute("max",ua);La.setAttribute("max",
-ua);za=mxUtils.button(mxResources.get("currentPage"),function(Da){ya.value=va;La.value=va;Ba.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";ka.appendChild(za);1<ua&&Z.appendChild(ka);ka=document.createElement("div");ka.style.borderBottom="1px solid lightGray";ka.style.paddingBottom="12px";ka.style.marginBottom="12px";ka.style.whiteSpace=
-"nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==ua?"checkbox":"radio");Ea.style.marginRight="8px";X.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");X.isEnabled()&&(ka.appendChild(Ea),B=document.createElement("span"),mxUtils.write(B,mxResources.get("selectionOnly")),ka.appendChild(B));(X.isEnabled()||1<ua)&&Z.appendChild(ka);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Ba.checked=!0:!X.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?
-Ea.checked=!0:qa.checked=!0;X.isSelectionEmpty()||mxEvent.addListener(B,"click",function(){Ea.checked=!Ea.checked});X=document.createElement("div");X.style.whiteSpace="nowrap";var pa=document.createElement("input");pa.style.marginBottom="8px";pa.style.marginRight="8px";pa.setAttribute("type","radio");pa.setAttribute("name","printSize");X.appendChild(pa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageView"));X.appendChild(B);mxEvent.addListener(X,"click",function(){pa.checked=
-!0});Z.appendChild(X);X=document.createElement("div");X.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");X.appendChild(Ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("crop"));X.appendChild(B);mxEvent.addListener(X,"click",function(){Ca.checked=!0});Z.appendChild(X);X=document.createElement("div");X.style.whiteSpace="nowrap";var Aa=document.createElement("input");
-Aa.style.marginBottom="8px";Aa.style.marginRight="8px";Aa.setAttribute("type","radio");Aa.setAttribute("name","printSize");B=document.createElement("div");B.style.display="inline-block";B.style.verticalAlign="top";B.style.paddingTop="2px";B.appendChild(Aa);X.appendChild(B);ka=document.createElement("table");ka.style.display="inline-block";ka.style.borderSpacing="0";za=document.createElement("tbody");var wa=document.createElement("tr"),Xa=wa.cloneNode(!0),Qa=document.createElement("td"),Ra=Qa.cloneNode(!0),
-Sa=Qa.cloneNode(!0),Ha=Qa.cloneNode(!0),Ma=Qa.cloneNode(!0),y=Qa.cloneNode(!0);Qa.style.textAlign="right";Ha.style.textAlign="right";mxUtils.write(Qa,mxResources.get("fitTo"));mxEvent.addListener(X,"click",function(Da){mxEvent.getSource(Da)!=Aa&&(Aa.checked=!Aa.checked)});var O=document.createElement("input");O.style.margin="0 2px";O.style.boxSizing="border-box";O.setAttribute("value",k.lastPrintSheetsAcross||"1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";Ra.appendChild(O);
-B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Sa.appendChild(B);mxUtils.write(Ha,mxResources.get("fitToBy"));var R=O.cloneNode(!0);R.setAttribute("value",k.lastPrintSheetsDown||"1");Ma.appendChild(R);mxEvent.addListener(O,"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(R,"click",function(Da){Aa.checked=!0;mxEvent.consume(Da)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?Aa.checked=!0:pa.checked=!0;B=document.createElement("span");
-mxUtils.write(B,mxResources.get("fitToSheetsDown"));y.appendChild(B);wa.appendChild(Qa);wa.appendChild(Ra);wa.appendChild(Sa);Xa.appendChild(Ha);Xa.appendChild(Ma);Xa.appendChild(y);za.appendChild(wa);za.appendChild(Xa);ka.appendChild(za);X.appendChild(ka);Z.appendChild(X);X=document.createElement("div");X.style.borderTop="1px solid lightGray";X.style.whiteSpace="nowrap";X.style.paddingTop="12px";X.style.marginTop="12px";X.style.paddingLeft="8px";mxUtils.write(X,mxResources.get("borderWidth")+":");
-var V=document.createElement("input");V.setAttribute("type","number");V.setAttribute("min","0");V.style.width="40px";V.style.marginLeft="4px";V.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;X.appendChild(V);B=document.createElement("span");B.style.marginLeft="8px";mxUtils.write(B,mxResources.get("zoom")+":");X.appendChild(B);var fa=document.createElement("input");fa.style.width="60px";fa.style.marginLeft="4px";fa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";
-X.appendChild(fa);mxUtils.br(X);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;X.appendChild(ia);B=document.createElement("span");B.style.marginLeft="4px";B.style.marginRight="8px";mxUtils.write(B,mxResources.get("grid"));X.appendChild(B);mxEvent.addListener(B,"click",function(Da){ia.checked=!0;mxEvent.consume(Da)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop=
-"10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(X.appendChild(oa),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("transparentBackground")),X.appendChild(B),mxEvent.addListener(B,"click",function(Da){oa.checked=!0;mxEvent.consume(Da)}));var ta=document.createElement("input");ta.setAttribute("type","checkbox");ta.style.marginTop="10px";ta.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==
-I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(X),X.appendChild(ta),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram")),X.appendChild(B),mxEvent.addListener(B,"click",function(Da){ta.checked=!0;mxEvent.consume(Da)}));Z.appendChild(X);B=document.createElement("div");B.style.marginTop="40px";B.style.textAlign="right";B.style.whiteSpace="nowrap";k.isOffline()||null!=I||B.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
-X=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});X.className="geBtn";k.editor.cancelFirst&&B.appendChild(X);PrintDialog.previewEnabled&&null==I&&(ka=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),T(!1)}catch(Da){k.handleError(Da)}}),ka.className="geBtn",B.appendChild(ka));U=null!=U?U:null!=I?"export":PrintDialog.previewEnabled?"print":"ok";U=mxUtils.button(mxResources.get(U),function(){try{k.hideDialog(),T(!0)}catch(Da){k.handleError(Da)}});U.className=
-"geBtn gePrimaryBtn";B.appendChild(U);k.editor.cancelFirst||B.appendChild(X);Z.appendChild(B);if(k.editor.isChromelessView()){var ra=function(){Editor.isDarkMode()?(Z.classList.add("geDarkMode"),Z.style.colorScheme="dark"):(Z.classList.remove("geDarkMode"),Z.style.colorScheme="light")};k.addListener("darkModeChanged",ra);ra();var xa=function(Da,Ia){Da=Ia.getProperty("dialog");Z.parentNode==Da.container&&(k.editor.removeListener(xa),k.removeListener(ra))};k.editor.addListener("hideDialog",xa)}this.container=
-Z};var ca=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&
-(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ca.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,
-this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Q=new Image;Q.onload=function(){try{la.getContext("2d").drawImage(Q,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&
-6<k.length}catch(B){}};Q.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();
+2)?B="mxgraph.er":"sysML"==k.substring(0,5)&&(B="mxgraph.sysml"));return B};var ca=mxMarker.createMarker;mxMarker.createMarker=function(k,B,K,T,P,U,Y,aa,la,va){if(null!=K&&null==mxMarker.markers[K]){var ua=this.getPackageForType(K);null!=ua&&mxStencilRegistry.getStencil(ua)}return ca.apply(this,arguments)};var ka=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,B,K,T,P,U){"1"==mxUtils.getValue(B.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke));return ka.apply(this,arguments)};PrintDialog.prototype.create=function(k,B,K,T){function P(){La.value=Math.max(1,Math.min(ua,Math.max(parseInt(La.value),parseInt(ya.value))));ya.value=Math.max(1,Math.min(ua,Math.min(parseInt(La.value),parseInt(ya.value))))}function U(Da){k.lastPrintPagesRadioChecked=Ba.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=Ca.checked;k.lastPrintFitRadioChecked=za.checked;Ba.checked&&ya.value<La.value?(k.lastPrintPagesFromInput=
+ya.value,k.lastPrintPagesToInput=La.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);ha.value=Math.max(1,Math.min(1600,parseInt(ha.value)))+"%";k.lastPrintZoom=ha.value;k.lastPrintBorder=V.value;k.lastPrintGrid=ja.checked;k.lastPrintTransparent=oa.checked;k.lastPrintInclude=ta.checked;k.lastPrintSheetsAcross=O.value;k.lastPrintSheetsDown=Q.value;var Ia={};Ia.border=parseInt(V.value);Ia.scale=parseInt(ha.value)/100;Ia.grid=ja.checked;Ia.transparent=oa.checked;Ia.includeCopy=ta.checked;
+Ia.sheetsAcross=parseInt(O.value);Ia.sheetsDown=parseInt(Q.value);Ia.pagesFrom=parseInt(ya.value);Ia.pagesTo=parseInt(La.value);Ia.allPages=qa.checked;Ia.selection=Ea.checked;Ia.pageView=pa.checked;Ia.crop=Ca.checked;Ia.fit=za.checked;return null!=K?K(!Da,Ia):k.print(!Da,Ia)}var Y=k.editor.graph,aa=document.createElement("div"),la=document.createElement("h3");la.style.width="100%";la.style.textAlign="center";la.style.marginTop="0px";mxUtils.write(la,B||mxResources.get("print"));aa.appendChild(la);
+var va=1,ua=1;la=document.createElement("div");la.style.whiteSpace="nowrap";var qa=document.createElement("input");qa.style.marginRight="8px";qa.style.marginBottom="8px";qa.setAttribute("type","radio");qa.setAttribute("name","pages-printdialog");la.appendChild(qa);B=document.createElement("span");mxUtils.write(B,mxResources.get("allPages"));mxEvent.addListener(B,"click",function(){qa.checked=!0});la.appendChild(B);mxUtils.br(la);var Ba=qa.cloneNode(!0);la.appendChild(Ba);B=document.createElement("span");
+mxUtils.write(B,mxResources.get("pages")+":");la.appendChild(B);mxEvent.addListener(B,"click",function(){Ba.checked=!0});var ya=document.createElement("input");ya.style.margin="0 4px";ya.setAttribute("value","1");ya.setAttribute("type","number");ya.setAttribute("min","1");ya.style.width="40px";la.appendChild(ya);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));la.appendChild(B);var La=ya.cloneNode(!0);la.appendChild(La);mxEvent.addListener(ya,"focus",function(){Ba.checked=!0});
+mxEvent.addListener(La,"focus",function(){Ba.checked=!0});mxEvent.addListener(ya,"change",P);mxEvent.addListener(La,"change",P);if(null!=k.pages&&(ua=k.pages.length,null!=k.currentPage))for(var Aa=0;Aa<ua;Aa++)if(k.currentPage==k.pages[Aa]){va=Aa+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ya.value=Math.min(ua,Math.max(1,k.lastPrintPagesFromInput)),La.value=Math.min(ua,Math.max(1,k.lastPrintPagesToInput))):(ya.value=va,La.value=va);ya.setAttribute("max",ua);La.setAttribute("max",
+ua);Aa=mxUtils.button(mxResources.get("currentPage"),function(Da){ya.value=va;La.value=va;Ba.checked=!0});Aa.setAttribute("title",mxResources.get("currentPage"));Aa.style.marginLeft="4px";Aa.style.maxWidth="100px";Aa.style.overflow="hidden";Aa.style.textOverflow="ellipsis";Aa.style.whiteSpace="nowrap";la.appendChild(Aa);1<ua&&aa.appendChild(la);la=document.createElement("div");la.style.borderBottom="1px solid lightGray";la.style.paddingBottom="12px";la.style.marginBottom="12px";la.style.whiteSpace=
+"nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==ua?"checkbox":"radio");Ea.style.marginRight="8px";Y.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");Y.isEnabled()&&(la.appendChild(Ea),B=document.createElement("span"),mxUtils.write(B,mxResources.get("selectionOnly")),la.appendChild(B));(Y.isEnabled()||1<ua)&&aa.appendChild(la);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Ba.checked=!0:!Y.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?
+Ea.checked=!0:qa.checked=!0;Y.isSelectionEmpty()||mxEvent.addListener(B,"click",function(){Ea.checked=!Ea.checked});Y=document.createElement("div");Y.style.whiteSpace="nowrap";var pa=document.createElement("input");pa.style.marginBottom="8px";pa.style.marginRight="8px";pa.setAttribute("type","radio");pa.setAttribute("name","printSize");Y.appendChild(pa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageView"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){pa.checked=
+!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");Y.appendChild(Ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("crop"));Y.appendChild(B);mxEvent.addListener(Y,"click",function(){Ca.checked=!0});aa.appendChild(Y);Y=document.createElement("div");Y.style.whiteSpace="nowrap";var za=document.createElement("input");
+za.style.marginBottom="8px";za.style.marginRight="8px";za.setAttribute("type","radio");za.setAttribute("name","printSize");B=document.createElement("div");B.style.display="inline-block";B.style.verticalAlign="top";B.style.paddingTop="2px";B.appendChild(za);Y.appendChild(B);la=document.createElement("table");la.style.display="inline-block";la.style.borderSpacing="0";Aa=document.createElement("tbody");var wa=document.createElement("tr"),Xa=wa.cloneNode(!0),Qa=document.createElement("td"),Ra=Qa.cloneNode(!0),
+Sa=Qa.cloneNode(!0),Ha=Qa.cloneNode(!0),Ma=Qa.cloneNode(!0),y=Qa.cloneNode(!0);Qa.style.textAlign="right";Ha.style.textAlign="right";mxUtils.write(Qa,mxResources.get("fitTo"));mxEvent.addListener(Y,"click",function(Da){mxEvent.getSource(Da)!=za&&(za.checked=!za.checked)});var O=document.createElement("input");O.style.margin="0 2px";O.style.boxSizing="border-box";O.setAttribute("value",k.lastPrintSheetsAcross||"1");O.setAttribute("min","1");O.setAttribute("type","number");O.style.width="40px";Ra.appendChild(O);
+B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Sa.appendChild(B);mxUtils.write(Ha,mxResources.get("fitToBy"));var Q=O.cloneNode(!0);Q.setAttribute("value",k.lastPrintSheetsDown||"1");Ma.appendChild(Q);mxEvent.addListener(O,"click",function(Da){za.checked=!0;mxEvent.consume(Da)});mxEvent.addListener(Q,"click",function(Da){za.checked=!0;mxEvent.consume(Da)});k.lastPrintCropRadioChecked?Ca.checked=!0:k.lastPrintFitRadioChecked?za.checked=!0:pa.checked=!0;B=document.createElement("span");
+mxUtils.write(B,mxResources.get("fitToSheetsDown"));y.appendChild(B);wa.appendChild(Qa);wa.appendChild(Ra);wa.appendChild(Sa);Xa.appendChild(Ha);Xa.appendChild(Ma);Xa.appendChild(y);Aa.appendChild(wa);Aa.appendChild(Xa);la.appendChild(Aa);Y.appendChild(la);aa.appendChild(Y);Y=document.createElement("div");Y.style.borderTop="1px solid lightGray";Y.style.whiteSpace="nowrap";Y.style.paddingTop="12px";Y.style.marginTop="12px";Y.style.paddingLeft="8px";mxUtils.write(Y,mxResources.get("borderWidth")+":");
+var V=document.createElement("input");V.setAttribute("type","number");V.setAttribute("min","0");V.style.width="40px";V.style.marginLeft="4px";V.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;Y.appendChild(V);B=document.createElement("span");B.style.marginLeft="8px";mxUtils.write(B,mxResources.get("zoom")+":");Y.appendChild(B);var ha=document.createElement("input");ha.style.width="60px";ha.style.marginLeft="4px";ha.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";
+Y.appendChild(ha);mxUtils.br(Y);var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.marginTop="12px";ja.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;Y.appendChild(ja);B=document.createElement("span");B.style.marginLeft="4px";B.style.marginRight="8px";mxUtils.write(B,mxResources.get("grid"));Y.appendChild(B);mxEvent.addListener(B,"click",function(Da){ja.checked=!0;mxEvent.consume(Da)});var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop=
+"10px";oa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=K&&(Y.appendChild(oa),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("transparentBackground")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Da){oa.checked=!0;mxEvent.consume(Da)}));var ta=document.createElement("input");ta.setAttribute("type","checkbox");ta.style.marginTop="10px";ta.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==
+K||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(Y),Y.appendChild(ta),B=document.createElement("span"),B.style.marginLeft="4px",mxUtils.write(B,mxResources.get("includeCopyOfMyDiagram")),Y.appendChild(B),mxEvent.addListener(B,"click",function(Da){ta.checked=!0;mxEvent.consume(Da)}));aa.appendChild(Y);B=document.createElement("div");B.style.marginTop="40px";B.style.textAlign="right";B.style.whiteSpace="nowrap";k.isOffline()||null!=K||B.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));
+Y=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});Y.className="geBtn";k.editor.cancelFirst&&B.appendChild(Y);PrintDialog.previewEnabled&&null==K&&(la=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),U(!1)}catch(Da){k.handleError(Da)}}),la.className="geBtn",B.appendChild(la));T=null!=T?T:null!=K?"export":PrintDialog.previewEnabled?"print":"ok";T=mxUtils.button(mxResources.get(T),function(){try{k.hideDialog(),U(!0)}catch(Da){k.handleError(Da)}});T.className=
+"geBtn gePrimaryBtn";B.appendChild(T);k.editor.cancelFirst||B.appendChild(Y);aa.appendChild(B);if(k.editor.isChromelessView()){var ra=function(){Editor.isDarkMode()?(aa.classList.add("geDarkMode"),aa.style.colorScheme="dark"):(aa.classList.remove("geDarkMode"),aa.style.colorScheme="light")};k.addListener("darkModeChanged",ra);ra();var xa=function(Da,Ia){Da=Ia.getProperty("dialog");aa.parentNode==Da.container&&(k.editor.removeListener(xa),k.removeListener(ra))};k.editor.addListener("hideDialog",xa)}this.container=
+aa};var da=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&
+(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else da.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,
+this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var W=document.createElement("canvas"),S=new Image;S.onload=function(){try{W.getContext("2d").drawImage(S,0,0);var k=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<
+k.length}catch(B){}};S.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.2";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="27.0.5";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -3480,7 +3480,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=
"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(q){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),
-q=document.createElement("style"),D=0;D<f.length;D++){q.textContent=f[D].textContent;t.body.appendChild(q);for(var H="",N=0;N<q.sheet.cssRules.length;N++){var L=q.sheet.cssRules[N];if(null!=L.selectorText){for(var J=L.selectorText.split(","),Y=0;Y<J.length;Y++)J[Y]="#"+l+" "+J[Y];L.selectorText=J.join(",")}H+=L.cssText+"\n"}f[D].textContent=H}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+q=document.createElement("style"),D=0;D<f.length;D++){q.textContent=f[D].textContent;t.body.appendChild(q);for(var H="",N=0;N<q.sheet.cssRules.length;N++){var L=q.sheet.cssRules[N];if(null!=L.selectorText){for(var I=L.selectorText.split(","),Z=0;Z<I.length;Z++)I[Z]="#"+l+" "+I[Z];L.selectorText=I.join(",")}H+=L.cssText+"\n"}f[D].textContent=H}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),
@@ -3490,11 +3490,11 @@ EditorUi.prototype.getLocalData=function(c,f){f(localStorage.getItem(c))};Editor
function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=
c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};
EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var q=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,
-hwaccel:!1,zIndex:2E9}),D=this.timeout,H=q.spin,N=null,L=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()}),Y=this;q.spin=function(ea,aa,na,W){W=null!=W?W:D;var ba=!1;if(!this.active){var ja=Date.now();null!=na&&(N=window.setTimeout(function(){q.stop();N=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},W));t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);ea==document.body&&"1"==urlParams.embedInline&&
-(ea=Y.diagramContainer,c=ea.scrollLeft+ea.clientWidth/2,f=ea.scrollTop+ea.clientHeight/2);H.call(this,ea);"1"==urlParams.embedInline&&null!=q.el&&(q.el.style.marginTop=ea.scrollTop+"px",q.el.style.marginLeft=ea.scrollLeft+"px");this.active=!0;null!=aa&&(ba=document.createElement("div"),ba.className="geSpinnerStatus",ba.style.position="absolute",ba.style.whiteSpace="nowrap",ba.style.background="#4B4243",ba.style.color="white",ba.style.fontFamily=Editor.defaultHtmlFont,ba.style.fontSize="9pt",ba.style.padding=
-"6px",ba.style.paddingLeft="10px",ba.style.paddingRight="10px",ba.style.zIndex=2E9,ba.style.left=Math.max(0,c)+"px",ba.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ba.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ba.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ba.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=aa.substring(aa.length-3,aa.length)&&"!"!=aa.charAt(aa.length-1)&&(aa+="..."),ba.innerText=aa,ea.appendChild(ba),q.status=ba);
-this.pause=mxUtils.bind(this,function(){var ca=J;this.active&&(W=Math.max(0,W-(Date.now()-ja)),ca=mxUtils.bind(this,function(la){this.spin(ea,aa,na,W);if(null!=la)try{la(),L=mxUtils.bind(this,function(){this.spin(ea,aa,na,W);try{la()}catch(Q){null!=na&&na(Q)}})}catch(Q){null!=na&&na(Q)}}));this.stop();return ca});ba=!0}return ba};var ha=q.stop;q.stop=function(){ha.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status),
-q.status=null)};q.pause=function(){return J};return q};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&
+hwaccel:!1,zIndex:2E9}),D=this.timeout,H=q.spin,N=null,L=null,I=mxUtils.bind(this,function(fa){null!=fa&&fa()}),Z=this;q.spin=function(fa,ba,na,X){X=null!=X?X:D;var ca=!1;if(!this.active){var ka=Date.now();null!=na&&(N=window.setTimeout(function(){q.stop();N=null;na({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:L})},X));t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2);fa==document.body&&"1"==urlParams.embedInline&&
+(fa=Z.diagramContainer,c=fa.scrollLeft+fa.clientWidth/2,f=fa.scrollTop+fa.clientHeight/2);H.call(this,fa);"1"==urlParams.embedInline&&null!=q.el&&(q.el.style.marginTop=fa.scrollTop+"px",q.el.style.marginLeft=fa.scrollLeft+"px");this.active=!0;null!=ba&&(ca=document.createElement("div"),ca.className="geSpinnerStatus",ca.style.position="absolute",ca.style.whiteSpace="nowrap",ca.style.background="#4B4243",ca.style.color="white",ca.style.fontFamily=Editor.defaultHtmlFont,ca.style.fontSize="9pt",ca.style.padding=
+"6px",ca.style.paddingLeft="10px",ca.style.paddingRight="10px",ca.style.zIndex=2E9,ca.style.left=Math.max(0,c)+"px",ca.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ca.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ca.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ca.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ba.substring(ba.length-3,ba.length)&&"!"!=ba.charAt(ba.length-1)&&(ba+="..."),ca.innerText=ba,fa.appendChild(ca),q.status=ca);
+this.pause=mxUtils.bind(this,function(){var da=I;this.active&&(X=Math.max(0,X-(Date.now()-ka)),da=mxUtils.bind(this,function(W){this.spin(fa,ba,na,X);if(null!=W)try{W(),L=mxUtils.bind(this,function(){this.spin(fa,ba,na,X);try{W()}catch(S){null!=na&&na(S)}})}catch(S){null!=na&&na(S)}}));this.stop();return da});ca=!0}return ca};var ia=q.stop;q.stop=function(){ia.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status),
+q.status=null)};q.pause=function(){return I};return q};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&
224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||
60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,q=this;f.getFunction=function(D){if(t.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var H=q.getSelectedPageIndex();if(mxEvent.isShiftDown(D)){if(37==D.keyCode)return function(){0<
H&&q.movePage(H,H-1)};if(38==D.keyCode)return function(){0<H&&q.movePage(H,0)};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,H+1)};if(40==D.keyCode)return function(){H<q.pages.length-1&&q.movePage(H,q.pages.length-1)}}else if(mxEvent.isControlDown(D)||mxClient.IS_MAC&&mxEvent.isMetaDown(D)){if(37==D.keyCode)return function(){0<H&&q.selectNextPage(!1)};if(38==D.keyCode)return function(){0<H&&q.selectPage(q.pages[0])};if(39==D.keyCode)return function(){H<q.pages.length-1&&q.selectNextPage(!0)};
@@ -3502,13 +3502,13 @@ if(40==D.keyCode)return function(){H<q.pages.length-1&&q.selectPage(q.pages[q.pa
c.lastIndexOf("&lt;/mxfile&gt;");t>l&&(f=c.substring(l,t+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(c),D=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=D?mxUtils.getXml(D):""}}catch(H){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+
c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");if(1<q.length||1==q.length&&
q[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var D=q.length-1;0<=D;D--){var H=this.updatePageRoot(new DiagramPage(q[D]));null==H.getName()&&H.setName(mxResources.get("pageWithNumber",[D+1]));l.model.execute(new ChangePage(this,H,0==D?H:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(D=0;D<t.length;D++)l.model.execute(new ChangePage(this,t[D],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){f=
-null!=f?f:this.editor.graph;q=null!=q?q:!1;L=null!=L?L:!0;Y=null!=Y?Y:!Editor.defaultCompressed;var aa=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else aa=na=t;if(null==c)return"";var W=c;if("mxfile"!=W.nodeName.toLowerCase()){if(Y){var ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());ba.appendChild(c)}else{ba=Graph.zapGremlins(mxUtils.getXml(c));W=Graph.compress(ba);
-if(Graph.decompress(W)!=ba)return ba;ba=c.ownerDocument.createElement("diagram");ba.setAttribute("name",mxResources.get("pageWithNumber",[1]));ba.setAttribute("id",Editor.guid());mxUtils.setTextContent(ba,W)}W=c.ownerDocument.createElement("mxfile");W.appendChild(ba)}J?(W=W.cloneNode(!0),W.removeAttribute("modified"),W.removeAttribute("host"),W.removeAttribute("agent"),W.removeAttribute("etag"),W.removeAttribute("userAgent"),W.removeAttribute("version"),W.removeAttribute("editor"),W.removeAttribute("type")):
-(W.removeAttribute("userAgent"),W.removeAttribute("modified"),W.removeAttribute("version"),W.removeAttribute("editor"),W.removeAttribute("pages"),W.removeAttribute("type"),W.removeAttribute("etag"),mxClient.IS_CHROMEAPP?W.setAttribute("host","Chrome"):EditorUi.isElectronApp?W.setAttribute("host","Electron"):W.setAttribute("host",window.location.hostname),W.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),W.setAttribute("version",EditorUi.VERSION),1<W.getElementsByTagName("diagram").length&&
-null!=this.pages&&W.setAttribute("pages",this.pages.length));null!=ha&&(W=W.cloneNode(!0),W.setAttribute("scale",ha));null!=ea&&(W=W.cloneNode(!0),W.setAttribute("border",ea));c=Y?mxUtils.getPrettyXml(W):mxUtils.getXml(W);if(!D&&!q&&(H||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(W),f,null!=l?l.getTitle():null,na,aa);else if(D||!q&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(W),
-c=this.getEmbeddedSvg(c,f,t,null,N,L,aa,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var q=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var J=L.getElementsByTagName("mxGraphModel"),Y=0<J.length?J[0]:null;J=L;null==Y&&l?(Y=mxUtils.getNodeValue(L),0<Y.length&&(Y=Graph.decompress(Y),null!=Y&&0<Y.length&&(J=L.cloneNode(!1),
-J.appendChild(mxUtils.parseXml(Y).documentElement)))):null==Y||l?J=L.cloneNode(!0):(J=L.cloneNode(!1),mxUtils.setTextContent(J,Graph.compressNode(Y)));q.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(q),q=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var D=this.pages[f],H=D.node;if(D!=this.currentPage)if(D.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(D.root));
+[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(D=0;D<t.length;D++)l.model.execute(new ChangePage(this,t[D],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){f=
+null!=f?f:this.editor.graph;q=null!=q?q:!1;L=null!=L?L:!0;Z=null!=Z?Z:!Editor.defaultCompressed;var ba=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var na="_blank";else ba=na=t;if(null==c)return"";var X=c;if("mxfile"!=X.nodeName.toLowerCase()){if(Z){var ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());ca.appendChild(c)}else{ca=Graph.zapGremlins(mxUtils.getXml(c));X=Graph.compress(ca);
+if(Graph.decompress(X)!=ca)return ca;ca=c.ownerDocument.createElement("diagram");ca.setAttribute("name",mxResources.get("pageWithNumber",[1]));ca.setAttribute("id",Editor.guid());mxUtils.setTextContent(ca,X)}X=c.ownerDocument.createElement("mxfile");X.appendChild(ca)}I?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):
+(X.removeAttribute("userAgent"),X.removeAttribute("modified"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),X.removeAttribute("etag"),mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),1<X.getElementsByTagName("diagram").length&&
+null!=this.pages&&X.setAttribute("pages",this.pages.length));null!=ia&&(X=X.cloneNode(!0),X.setAttribute("scale",ia));null!=fa&&(X=X.cloneNode(!0),X.setAttribute("border",fa));c=Z?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!D&&!q&&(H||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(X),f,null!=l?l.getTitle():null,na,ba);else if(D||!q&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(X),
+c=this.getEmbeddedSvg(c,f,t,null,N,L,ba,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var q=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(L){var I=L.getElementsByTagName("mxGraphModel"),Z=0<I.length?I[0]:null;I=L;null==Z&&l?(Z=mxUtils.getNodeValue(L),0<Z.length&&(Z=Graph.decompress(Z),null!=Z&&0<Z.length&&(I=L.cloneNode(!1),
+I.appendChild(mxUtils.parseXml(Z).documentElement)))):null==Z||l?I=L.cloneNode(!0):(I=L.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(Z)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(q),q=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var D=this.pages[f],H=D.node;if(D!=this.currentPage)if(D.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(D.root));
this.editor.graph.saveViewState(D.viewState,N,null,t);EditorUi.removeChildNodes(H);H.appendChild(N);delete D.needsUpdate}else t&&(this.updatePageRoot(D),null!=D.viewState.backgroundImage&&(null!=D.viewState.backgroundImage.originalSrc?D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.originalSrc,D):Graph.isPageLink(D.viewState.backgroundImage.src)&&(D.viewState.backgroundImage=this.createImageForPageLink(D.viewState.backgroundImage.src,D))),null!=D.viewState.backgroundImage&&
null!=D.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(D.root)),this.editor.graph.saveViewState(D.viewState,N,null,t),H=H.cloneNode(!1),H.appendChild(N)));c(H)}return q};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var q=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?l.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=
q?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){c=mxUtils.clone(c);if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=
@@ -3516,9 +3516,9 @@ mxUtils.getXml(l)}catch(D){c[EditorUi.DIFF_INSERT][f].data=D.message}if(null!=c[
delete H[N];mxUtils.isEmptyObject(H)&&delete q.cells[D]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,
f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+
"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){q=null!=q?q:!0;D=null!=D?D:!1;J=null!=J?J:!Editor.defaultCompressed;
-var aa=this.editor.graph;if((f||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var na=aa.getGlobalVariable;aa=this.createTemporaryGraph(aa.getStylesheet());aa.setBackgroundImage=this.editor.graph.setBackgroundImage;aa.background=this.editor.graph.background;var W=null!=this.pages?this.pages[0]:null;null==W||this.currentPage==W?aa.setBackgroundImage(this.editor.graph.backgroundImage):null!=W.viewState&&null!=W.viewState&&aa.setBackgroundImage(W.viewState.backgroundImage);
-aa.getGlobalVariable=function(ba){return"page"==ba&&null!=W?W.getName():"pagenumber"==ba?1:na.apply(this,arguments)};document.body.appendChild(aa.container);null!=W&&aa.model.setRoot(W.root)}H=null!=H?H:this.getXmlFileData(q,D,J,Y);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,aa,L,window.location.href,c,f,l,t,q,N,J,ha,ea);aa!=this.editor.graph&&aa.container.parentNode.removeChild(aa.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,q,D){D=null!=D?D:!0;var H=null,N=EditorUi.drawHost+
+(f.clearAutosave(),this.clearStatus(),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){q=null!=q?q:!0;D=null!=D?D:!1;I=null!=I?I:!Editor.defaultCompressed;
+var ba=this.editor.graph;if((f||!c&&null!=L&&/(\.svg)$/i.test(L.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var na=ba.getGlobalVariable;ba=this.createTemporaryGraph(ba.getStylesheet());ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var X=null!=this.pages?this.pages[0]:null;null==X||this.currentPage==X?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=X.viewState&&null!=X.viewState&&ba.setBackgroundImage(X.viewState.backgroundImage);
+ba.getGlobalVariable=function(ca){return"page"==ca&&null!=X?X.getName():"pagenumber"==ca?1:na.apply(this,arguments)};document.body.appendChild(ba.container);null!=X&&ba.model.setRoot(X.root)}H=null!=H?H:this.getXmlFileData(q,D,I,Z);L=null!=L?L:this.getCurrentFile();c=this.createFileData(H,ba,L,window.location.href,c,f,l,t,q,N,I,ia,fa);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,q,D){D=null!=D?D:!0;var H=null,N=EditorUi.drawHost+
"/js/embed-static.min.js";if(null!=f){H=D?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var L=f.view.scale;D=Math.floor(H.x/L-f.view.translate.x);L=Math.floor(H.y/L-f.view.translate.y);H=f.background;null==q&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",D);c.setAttribute("y0",L)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),
c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=q&&(q=q.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+
(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=H&&H!=mxConstants.NONE?' style="background-color:'+H+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+
@@ -3527,431 +3527,432 @@ EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};Edit
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",
[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),q=null;this.fileNode=f;this.pages=[];for(var D=0;D<c.length;D++){null==c[D].getAttribute("id")&&c[D].setAttribute("id",D);f=new DiagramPage(c[D]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[D+1]));this.pages.push(f);
if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=t.pageId&&f.getId()==t.pageId)q=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=q?q:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(D=0;D<H.length;D++)f[H[D]]=!0;var N=this.editor.graph.getModel(),L=N.getChildren(N.root);for(D=0;D<L.length;D++){var J=L[D];N.setVisible(J,f[J.id]||!1)}}catch(Y){}};EditorUi.prototype.getBaseFilename=
+[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var H=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(D=0;D<H.length;D++)f[H[D]]=!0;var N=this.editor.graph.getModel(),L=N.getChildren(N.root);for(D=0;D<L.length;D++){var I=L[D];N.setVisible(I,f[I.id]||!1)}}catch(Z){}};EditorUi.prototype.getBaseFilename=
function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename(!q),ja=ba+("xml"==c||"pdf"==c&&Y?".drawio":"")+"."+c;if("xml"==c){var ca=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,q,null,null,null,f);this.saveData(ja,c,ca,"text/xml")}else if("html"==c)ca=this.getHtml2(this.getFileData(!0),this.editor.graph,ba),this.saveData(ja,c,ca,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?ja=ba+".png":"jpeg"==c&&(ja=ba+".jpg"),this.saveRequest(ja,c,mxUtils.bind(this,function(I,U){try{return this.createDownloadRequest(I,c,t,U,H,q,N,L,J,Y,ha,void 0,void 0,!D,ea,aa,na,W)}catch(P){this.handleError(P)}}));else{var la=null,Q=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(ja,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(la)}))});if("svg"==c){var k=this.editor.graph.background;
-if(H||k==mxConstants.NONE)k=null;var B=this.editor.graph.getSvg(k,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();Q(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else ja=ba+".svg",la=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();Q(I)}),t)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,q,D,H,N,
-L,J,Y,ha,ea,aa,na,W,ba,ja){c=this.downloadRequestBuilder(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W,ba,ja);f="";for(var ca in c)l=c[ca],null!=l&&(f+=ca+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W,ba,ja){var ca=this.editor.graph,la=ca.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==D?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var Q=null,k=null,B=null;if(!EditorUi.isElectronApp&&
-(la.width*la.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=Y?(Q=Y.from,k=Y.to):0==D&&(B="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(D=0;D<this.pages.length;D++)if(this.pages[D]==this.currentPage){Q=D;break}D=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=D&&D!=mxConstants.NONE||(D="#ffffff"):D=mxConstants.NONE;q={globalVars:ca.getExportVariables()};
-L&&(q.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ca.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return{format:f,from:Q,to:k,allPages:B,bg:null!=D?D:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(q),scale:H,border:N,pageMargin:na,w:ha&&isFinite(ha)?ha:null,h:ea&&isFinite(ea)?ea:null,crop:null!=aa&&aa?"1":"0",fit:null!=W&&W?"1":"0",sheetsAcross:ba,
-sheetsDown:ja}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
+function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename(!q),ka=ca+("xml"==c||"pdf"==c&&Z?".drawio":"")+"."+c;if("xml"==c){var da=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,q,null,null,null,f);this.saveData(ka,c,da,"text/xml")}else if("html"==c)da=this.getHtml2(this.getFileData(!0),this.editor.graph,ca),this.saveData(ka,c,da,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?ka=ca+".png":"jpeg"==c&&(ka=ca+".jpg"),this.saveRequest(ka,c,mxUtils.bind(this,function(K,T){try{return this.createDownloadRequest(K,c,t,T,H,q,N,L,I,Z,ia,void 0,void 0,!D,fa,ba,na,X)}catch(P){this.handleError(P)}}));else{var W=null,S=mxUtils.bind(this,function(K){K.length<=MAX_REQUEST_SIZE?this.saveData(ka,"svg",K,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(W)}))});if("svg"==c){var k=this.editor.graph.background;
+if(H||k==mxConstants.NONE)k=null;var B=this.editor.graph.getSvg(k,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(B);this.editor.convertImages(B,mxUtils.bind(this,mxUtils.bind(this,function(K){this.spinner.stop();S(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(K))})))}else ka=ca+".svg",W=this.getFileData(!1,!0,null,mxUtils.bind(this,function(K){this.spinner.stop();S(K)}),t)}}catch(K){this.handleError(K)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,q,D,H,N,
+L,I,Z,ia,fa,ba,na,X,ca,ka){c=this.downloadRequestBuilder(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X,ca,ka);f="";for(var da in c)l=c[da],null!=l&&(f+=da+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X,ca,ka){var da=this.editor.graph,W=da.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==D?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var S=null,k=null,B=null;if(!EditorUi.isElectronApp&&
+(W.width*W.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=Z?(S=Z.from,k=Z.to):0==D&&(B="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(D=0;D<this.pages.length;D++)if(this.pages[D]==this.currentPage){S=D;break}D=da.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=D&&D!=mxConstants.NONE||(D="#ffffff"):D=mxConstants.NONE;q={globalVars:da.getExportVariables()};L&&
+(q.grid={size:da.gridSize,steps:da.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:da.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return{format:f,from:S,to:k,allPages:B,bg:null!=D?D:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(q),scale:H,border:N,pageMargin:na,w:ia&&isFinite(ia)?ia:null,h:fa&&isFinite(fa)?fa:null,crop:null!=ba&&ba?"1":"0",fit:null!=X&&X?"1":"0",sheetsAcross:ca,
+sheetsDown:ka}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?
-window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,q=mxUtils.bind(this,function(H){var N=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<N.length&&(N+="\n"),N+=H);H=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return t};this.fileLoaded(H);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,J=null,Y=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(aa){ea===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),ha()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),
-ha=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(Y,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ha();Y()}));ha();Y()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var D=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(D,mxUtils.bind(this,function(H){q(H)}),mxUtils.bind(this,function(H){null!=l&&l(H)}))}else q("")};EditorUi.prototype.updateDiagram=function(c){function f(la){var Q=new mxCellOverlay(la.image||q.warningImage,la.tooltip,la.align,
-la.valign,la.offset);Q.addListener(mxEvent.CLICK,function(k,B){t.alert(la.tooltip)});return Q}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var q=this.editor.graph,D=q.getModel();D.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=D.getCell(c.getAttribute("id"));if(null!=N){try{var L=c.getAttribute("value");if(null!=L){var J=mxUtils.parseXml(L).documentElement;if(null!=J)if("1"==
-J.getAttribute("replace-value"))D.setValue(N,J);else for(var Y=J.attributes,ha=0;ha<Y.length;ha++)q.setAttributeForCell(N,Y[ha].nodeName,0<Y[ha].nodeValue.length?Y[ha].nodeValue:null)}}catch(la){null!=window.console&&console.log("Error in value for "+N.id+": "+la)}try{var ea=c.getAttribute("style");null!=ea&&q.model.setStyle(N,ea)}catch(la){null!=window.console&&console.log("Error in style for "+N.id+": "+la)}try{var aa=c.getAttribute("icon");if(null!=aa){var na=0<aa.length?JSON.parse(aa):null;null!=
-na&&na.append||q.removeCellOverlays(N);null!=na&&q.addCellOverlay(N,f(na))}}catch(la){null!=window.console&&console.log("Error in icon for "+N.id+": "+la)}try{var W=c.getAttribute("geometry");if(null!=W){W=JSON.parse(W);var ba=q.getCellGeometry(N);if(null!=ba){ba=ba.clone();for(key in W){var ja=parseFloat(W[key]);"dx"==key?ba.x+=ja:"dy"==key?ba.y+=ja:"dw"==key?ba.width+=ja:"dh"==key?ba.height+=ja:ba[key]=parseFloat(W[key])}q.model.setGeometry(N,ba)}}}catch(la){null!=window.console&&console.log("Error in icon for "+
-N.id+": "+la)}}}else if("model"==c.nodeName){for(var ca=c.firstChild;null!=ca&&ca.nodeType!=mxConstants.NODETYPE_ELEMENT;)ca=ca.nextSibling;null!=ca&&(new mxCodec(c.firstChild)).decode(ca,D)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(q.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,q=mxUtils.bind(this,function(H){var N=null!=c.data?c.data:"";null!=H&&0<H.length&&(0<N.length&&(N+="\n"),N+=H);H=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);H.getHash=function(){return t};this.fileLoaded(H);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(fa){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.clearStatus()}));if(null!=c.update){var L=null!=c.interval?parseInt(c.interval):6E4,I=null,Z=mxUtils.bind(this,function(){var fa=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ba){fa===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),ia()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),
+ia=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(Z,L)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ia();Z()}));ia();Z()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var D=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(D,mxUtils.bind(this,function(H){q(H)}),mxUtils.bind(this,function(H){null!=l&&l(H)}))}else q("")};EditorUi.prototype.updateDiagram=function(c){function f(W){var S=new mxCellOverlay(W.image||q.warningImage,W.tooltip,W.align,W.valign,
+W.offset);S.addListener(mxEvent.CLICK,function(k,B){t.alert(W.tooltip)});return S}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var q=this.editor.graph,D=q.getModel();D.beginUpdate();var H=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=D.getCell(c.getAttribute("id"));if(null!=N){try{var L=c.getAttribute("value");if(null!=L){var I=mxUtils.parseXml(L).documentElement;if(null!=I)if("1"==I.getAttribute("replace-value"))D.setValue(N,
+I);else for(var Z=I.attributes,ia=0;ia<Z.length;ia++)q.setAttributeForCell(N,Z[ia].nodeName,0<Z[ia].nodeValue.length?Z[ia].nodeValue:null)}}catch(W){null!=window.console&&console.log("Error in value for "+N.id+": "+W)}try{var fa=c.getAttribute("style");null!=fa&&q.model.setStyle(N,fa)}catch(W){null!=window.console&&console.log("Error in style for "+N.id+": "+W)}try{var ba=c.getAttribute("icon");if(null!=ba){var na=0<ba.length?JSON.parse(ba):null;null!=na&&na.append||q.removeCellOverlays(N);null!=
+na&&q.addCellOverlay(N,f(na))}}catch(W){null!=window.console&&console.log("Error in icon for "+N.id+": "+W)}try{var X=c.getAttribute("geometry");if(null!=X){X=JSON.parse(X);var ca=q.getCellGeometry(N);if(null!=ca){ca=ca.clone();for(key in X){var ka=parseFloat(X[key]);"dx"==key?ca.x+=ka:"dy"==key?ca.y+=ka:"dw"==key?ca.width+=ka:"dh"==key?ca.height+=ka:ca[key]=parseFloat(X[key])}q.model.setGeometry(N,ca)}}}catch(W){null!=window.console&&console.log("Error in icon for "+N.id+": "+W)}}}else if("model"==
+c.nodeName){for(var da=c.firstChild;null!=da&&da.nodeType!=mxConstants.NODETYPE_ELEMENT;)da=da.nextSibling;null!=da&&(new mxCodec(c.firstChild)).decode(da,D)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(q.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(H=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
1);c=c.nextSibling}}finally{D.endUpdate()}null!=H&&this.chromelessResize&&this.chromelessResize(!0,H)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var q=new Date;l=q.getFullYear();t=q.getMonth()+1;var D=q.getDate(),H=q.getHours(),N=q.getMinutes();q=q.getSeconds();l=f+(" "+(l+"-"+t+"-"+D+"-"+H+"-"+N+"-"+q))}return l=mxResources.get("copyOf",
[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var q=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var D=mxUtils.bind(this,function(){this.setGraphEnabled(!1);
-this.setCurrentFile(null);null!=t&&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.fname.innerText="");this.clearStatus();this.updateUi();f||this.showSplash()});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",
-this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+
-"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||
-"min"==H)H+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(L){}c=
-mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||D():D()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,
-!0))}else D();return q};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var D=0;D<c.length;D++){this.updatePageRoot(c[D]);var H=c[D].node.cloneNode(!1);H.removeAttribute("name");t.root=c[D].root;var N=q.encode(t);this.editor.graph.saveViewState(c[D].viewState,N,!0);N.removeAttribute("pageWidth");N.removeAttribute("pageHeight");H.appendChild(N);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,
-f.nodeCount+=H.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(H,function(L,J,Y,ha){return!ha||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?ha&&"mxCell"==L.nodeName&&"previous"==J?null:Y:Math.round(Y)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,
-f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var q=0;q<c.attributes.length;q++){var D=c.attributes[q].name,H=null!=f?f(c,D,c.attributes[q].value,!0):c.attributes[q].value;null!=H&&(t^=this.hashValue(D,f,l)+this.hashValue(H,f,l))}}if(null!=c.childNodes)for(q=0;q<c.childNodes.length;q++)t=(t<<5)-t+this.hashValue(c.childNodes[q],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(q=0;q<c.length;q++)f=(f<<5)-f+c.charCodeAt(q)<<
-0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,q,D,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
-c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
-c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],
-null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};
-};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var q=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var D=0;D<this.openLibraries.length;D++)if(this.openLibraries[D].file.getHash()==
-c.getHash()){mxUtils.remove(this.openLibraries[D],this.openLibraries);break}q={file:c,images:f,title:l,expand:t};this.openLibraries.push(q)}else this.scratchpad=c;D=this.sidebar.palettes[c.getHash()];D=null!=D?D[D.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var H=null,N=mxUtils.bind(this,function(ja,ca){0==ja.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),ca.appendChild(H)):this.addLibraryEntries(ja,
-ca)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(ja){N(f,ja)}));null!=q&&(q.div=L);this.repositionLibrary(D,"L.scratchpad"!=c.getHash());t=L.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");
-J.style.backgroundColor="inherit";t.style.position="relative";var Y=document.createElement("img");Y.className="geLibraryButton";Y.setAttribute("src",Editor.crossImage);Y.setAttribute("title",mxResources.get("close"));var ha=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(Y),mxEvent.addListener(Y,"click",mxUtils.bind(this,function(ja){if(!mxEvent.isConsumed(ja)){var ca=mxUtils.bind(this,function(){null!=q&&mxUtils.remove(q,this.openLibraries);this.closeLibrary(c)});null!=ha?this.confirm(mxResources.get("allChangesLost"),
-null,ca,mxResources.get("cancel"),mxResources.get("discardChanges")):ca();mxEvent.consume(ja)}}));if(c.isEditable()){var ea=this.editor.graph,aa=null;l=mxUtils.bind(this,function(ja){this.showLibraryDialog(c.getTitle(),L,f,c,c.getMode());mxEvent.consume(ja)});var na=mxUtils.bind(this,function(ja){c.setModified(!0);c.isAutosave()?(null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa),aa=Y.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",J.insertBefore(aa,J.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=aa&&null!=aa.parentNode&&aa.parentNode.removeChild(aa)})):null==ha&&(ha=Y.cloneNode(!1),ha.setAttribute("src",Editor.saveImage),ha.setAttribute("title",mxResources.get("save")),J.insertBefore(ha,J.firstChild),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ca){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==
-LocalLibrary,!0,function(){null==ha||c.isModified()||(ha.parentNode.removeChild(ha),ha=null)});mxEvent.consume(ca)})))}),W=mxUtils.bind(this,function(ja,ca,la,Q){ja=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(ja)));for(var k=0;k<ja.length;k++){var B=ea.getCellGeometry(ja[k]);null!=B&&B.translate(-ca.x,-ca.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ja,ca.width,ca.height,Q||"",!0,null,!1));ja=mxUtils.getXml(this.editor.graph.encodeCells(ja));Editor.defaultCompressed&&(ja=
-Graph.compress(ja));ca={xml:ja,w:ca.width,h:ca.height};null!=Q&&(ca.title=Q);f.push(ca);na(la);null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)}),ba=mxUtils.bind(this,function(ja){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(ja),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ca=ea.getSelectionCells(),la=ea.view.getBounds(ca);if(null!=la&&0<la.width&&
-0<la.height){var Q=ea.view.scale;la.x/=Q;la.y/=Q;la.width/=Q;la.height/=Q;la.x-=ea.view.translate.x;la.y-=ea.view.translate.y;W(ca,la)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ja)});mxEvent.addGestureListeners(L,function(){},mxUtils.bind(this,function(ja){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),
-L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(ja))}),mxUtils.bind(this,function(ja){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ba(ja),mxEvent.consume(ja))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ja){ea.isMouseDown&&
-null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ja){L.style.backgroundColor="light-dark(#fefefe, #000000)";ja.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,
-function(ja){L.style.cursor="";L.style.backgroundColor="";0<ja.dataTransfer.files.length&&this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ca,la,Q,k,B,I,U,P,T){if(null!=ca&&"image/"==la.substring(0,6))ca="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ca),ca=[new mxCell("",new mxGeometry(0,0,B,I),ca)],ca[0].vertex=!0,W(ca,new mxRectangle(0,0,B,I),ja,mxEvent.isAltDown(ja)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g,
-" ")),null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null);else{var X=!1,Z=mxUtils.bind(this,function(ka,va){null!=ka&&"application/pdf"==va&&(va=Editor.extractGraphModelFromPdf(ka),null!=va&&0<va.length&&(ka=va));if(null!=ka)if(ka=mxUtils.parseXml(ka),"mxlibrary"==ka.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(ka.documentElement));N(ua,L);f=f.concat(ua);na(ja);this.spinner.stop();X=!0}catch(La){}else if("mxfile"==ka.documentElement.nodeName)try{var qa=
-ka.documentElement.getElementsByTagName("diagram");for(ua=0;ua<qa.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(qa[ua])),ya=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=ya&&W(Ba,new mxRectangle(0,0,ya.width,ya.height),ja)}X=!0}catch(La){null!=window.console&&console.log("error in drop handler:",La)}X||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)});null!=
-T&&null!=U&&EditorUi.isVisioFilename(U)?this.importVisio(T,function(ka){Z(ka,"text/xml")},null,U):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ca,U)&&null!=T?this.isExternalDataComms()?this.parseFile(T,mxUtils.bind(this,function(ka){4==ka.readyState&&(this.spinner.stop(),200<=ka.status&&299>=ka.status?Z(ka.responseText,"text/xml"):this.handleError({message:mxResources.get(413==ka.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Z(ca,la)}}));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ja){L.style.cursor="";L.style.backgroundColor="";ja.stopPropagation();ja.preventDefault()}));Y=Y.cloneNode(!1);Y.setAttribute("src",Editor.editImage);Y.setAttribute("title",mxResources.get("edit"));J.insertBefore(Y,J.firstChild);mxEvent.addListener(Y,"click",l);l=Y.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",
-mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ba);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ba);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=
-c[l],q=t.data;if(null!=q){q="data:"==q.substring(0,5)?this.convertDataUri(q):q;var D="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(D+="aspect=fixed;");D=D+"image="+q+";";null!=t.style&&(D+=t.style);f.appendChild(this.sidebar.createVertexTemplate(D,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var H=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==H.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";
-f.appendChild(this.sidebar.createVertexTemplateFromCells(H,t.w,t.h,N,!0,null,!0))}}catch(L){N=null!=L.message?mxResources.get("error")+": "+L.message:String(L),D=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(D)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||
-(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,q,D,H){c=new ImageDialog(this,c,f,l,t,q,D,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,q,D){var H=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(N){if(null!=
-N)try{if(null!=D&&D(N),N==H)this.hideDialog();else{if(0<N.length){var L=JSON.parse(N);localStorage.setItem(f,JSON.stringify(L))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(J){this.handleError(J)}}),null,mxResources.get("close"),null,null,null,!0,null,null,q,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(q,D,H,N){D||(q=
-new ChangePageSetup(this,t?H:null,q),q.ignoreColor=!t,null!=N&&t&&(q.shadowVisible=N),this.editor.graph.model.execute(q))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,q){c=new LibraryDialog(this,c,f,l,t,q);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;
-EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,q,D,H){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&
-null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=L||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var J=mxResources.get("ok"),Y=null;f=null!=f?f:mxResources.get("error");if(null!=L){null!=L.retry&&(J=mxResources.get("cancel"),Y=function(){N();L.retry()});if(404==L.code||404==L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,
-!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ha=null!=q?null:null!=D?D:window.location.hash;if(null!=ha&&("#G"==ha.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ha.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&
-0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ha="#U"==ha.substring(0,2)?ha.substring(45,ha.lastIndexOf("%26ex")):ha.substring(2);this.showError(f,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ha);null!=t&&t()}),Y,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ba.innerText="";for(var ja=0;ja<aa.length;ja++){var ca=document.createElement("option");
-mxUtils.write(ca,aa[ja].displayName);ca.value=ja;ba.appendChild(ca);ca=document.createElement("option");ca.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ca,"<"+aa[ja].email+">");ca.setAttribute("disabled","disabled");ba.appendChild(ca)}ca=document.createElement("option");mxUtils.write(ca,mxResources.get("addAccount"));ca.value=aa.length;ba.appendChild(ca)}var aa=this.drive.getUsersList(),na=document.createElement("div"),W=document.createElement("div");W.style.marginBottom="6px";mxUtils.write(W,mxResources.get("changeUser")+
-": ");na.appendChild(W);var ba=document.createElement("select");ba.style.width="100%";ea();mxEvent.addListener(ba,"change",mxUtils.bind(this,function(){var ja=ba.value,ca=aa.length!=ja;ca&&this.drive.setUser(aa[ja]);this.drive.authorize(ca,mxUtils.bind(this,function(){ca||(aa=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(la){this.handleError(la)}),!0)}));na.appendChild(ba);na=new CustomDialog(this,na,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,
-300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),
-!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}q=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),q=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,q=L.alternateAction.funct);
-this.showError(f,H,J,l,Y,null,null,c,q,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,q,D){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=f&&f()},function(){H();
-null!=l&&l()},t,q,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,D);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,q,D,H,N,L){D=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var J=q?500:1E3,Y=document.createElement("div");Y.className="geBtn gePrimaryBtn geBanner"+(q?" geSmallBanner":"");Y.style.zIndex=mxPopupMenu.prototype.zIndex;
-mxUtils.setPrefixedStyle(Y.style,"transform",H);mxUtils.setPrefixedStyle(Y.style,"transition","all "+J+"ms ease");null!=L&&mxUtils.setPrefixedStyle(Y.style,"transform-origin",L);if(!q){var ha=document.createElement("img");ha.setAttribute("src",IMAGE_PATH+"/logo.png");ha.setAttribute("border","0");ha.setAttribute("align","absmiddle");ha.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";Y.appendChild(ha);ha=document.createElement("img");ha.setAttribute("src",
-Dialog.prototype.closeImage);ha.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ha.setAttribute("border","0");ha.style.cssText=(q?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";Y.appendChild(ha)}mxUtils.write(Y,f);document.body.appendChild(Y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";
-var ea=document.createElement("input");ea.setAttribute("type","checkbox");ea.setAttribute("id","geDoNotShowAgainCheckbox");ea.style.marginRight="6px";if(!t){f.appendChild(ea);var aa=document.createElement("label");aa.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(aa,mxResources.get("doNotShowAgain"));f.appendChild(aa);Y.style.paddingBottom=q?"16px":"30px";Y.appendChild(f)}var na=mxUtils.bind(this,function(){null!=Y.parentNode&&(Y.parentNode.removeChild(Y),this.bannerShowing=!1,ea.checked||
-t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ha&&mxEvent.addListener(ha,"click",mxUtils.bind(this,function(ba){mxEvent.consume(ba);na()}));var W=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Y.style,"transform",H);window.setTimeout(mxUtils.bind(this,function(){na()}),J)});mxEvent.addListener(Y,"click",mxUtils.bind(this,function(ba){var ja=mxEvent.getSource(ba);ja!=ea&&ja!=aa?(null!=l&&l(),na(),
-mxEvent.consume(ba)):W()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Y.style,"transform",N)}),J/2);window.setTimeout(W,q?4E3:3E4);D=!0}return D};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+
-l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,q){var D="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+D;c=this.createImageDataUri(c,f,l,q);this.saveData(t,D,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=
-urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,
-q,D){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=D?D:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||
-null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var H=document.createElement("a");D=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);D=65==(N?parseInt(N[2],10):!1)?!1:D}if(D||this.isOffline()){H.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));D?H.download=f:H.setAttribute("target",
-"_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,f,l,t,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,q,D){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=l?"&mime="+l:"")+(null!=q?"&format="+q:"")+(null!=D?"&base64="+D:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=
-function(c,f,l,t,q,D,H,N){D=null!=D?D:!1;H=null!=H?H:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);var L=mxUtils.bind(this,function(Y,ha,ea,aa){try{if("_blank"==ha)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var na=new EmbedDialog(this,c);this.showDialog(na.container,450,240,!0,!0);na.init()}else{var W=window.open("about:blank");null==W?mxUtils.popup(c,!0):(W.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),W.document.close())}else if(ha==
-App.MODE_DEVICE||"download"==ha)this.doSaveLocalFile(c,Y,l,t,null,N);else if(null!=Y&&0<Y.length){var ba=mxUtils.bind(this,function(ja){try{this.exportFile(c,Y,l,t,ha,ja)}catch(ca){this.handleError(ca)}});null!=aa?ba(aa):this.pickFolder(ha,ba)}}catch(ja){this.handleError(ja)}});q=[];D||q.push(App.MODE_BROWSER);H||q.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(Y,ha,ea){L(Y.value,ha,Y,ea);this.hideDialog(null,null,J.container)}),q,c,l,t);this.showDialog(J.container,420,110,
-!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var q="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var D=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=D&&(q="background: "+D+";")}q='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+q+'">';"image/svg+xml"!=f||
-mxClient.IS_SVG?"image/svg+xml"!=f||l?(D=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(q+'<img style="max-width:100%;" src="data:'+f+";base64,"+D+'"/></body></html>')):t.document.write(q+c+"</body></html>"):t.document.write(q+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||
-/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),
-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,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 q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=
-q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();f.style.display=0<t.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 l=c(mxUtils.bind(this,function(t){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&
-(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var D=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
-"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=D.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";D=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=D.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",q);this.editor.exportToCanvas(mxUtils.bind(this,function(N){H.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";
-N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",L);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,q){this.isLocalFileSave()?this.saveLocalFile(l,c,t,q,f):this.saveRequest(c,f,mxUtils.bind(this,function(D,H){return this.createEchoRequest(l,D,t,q,f,H)}),l,q,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,q,D,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,
-function(J,Y,ha,ea){if("_blank"==Y||null!=J&&0<J.length){var aa=l("_blank"==Y?null:J,Y==App.MODE_DEVICE||"download"==Y||null==Y||"_blank"==Y?"0":"1");null!=aa&&(Y==App.MODE_DEVICE||"download"==Y||"_blank"==Y?aa.simulate(document,"_blank"):(ha=mxUtils.bind(this,function(na){D=null!=D?D:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,D,!0,Y,na)}catch(W){this.handleError(W)}else this.spinner.spin(document.body,mxResources.get("saving"))&&aa.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=aa.getStatus()&&299>=aa.getStatus())try{this.exportFile(aa.getText(),J,D,!0,Y,na)}catch(W){this.handleError(W)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(W){this.spinner.stop();this.handleError(W)}))}),null!=ea?ha(ea):this.pickFolder(Y,ha)))}});q=[App.MODE_BROWSER];H||q.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(J,Y,ha){N(J.value,Y,J,ha);this.hideDialog(null,null,L.container)}),q,null,"application/pdf");this.showDialog(L.container,
-420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,q,D){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,t,q,D,
-H,N,L,J,Y,ha,ea,aa){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(P){Editor.addRetryToError(P,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa)}));this.handleError(P)})))try{var na=this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var W=f?null:this.editor.graph.background;W==mxConstants.NONE&&(W=null);null==W&&0==f&&(W=this.editor.graph.shapeBackgroundColor);var ba=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var ja=mxUtils.lightDarkColorSupported,ca=mxUtils.preferDarkColor;if("light"==Y||"dark"==Y)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Y;var la=this.editor.graph.createSvgImageExport(q),Q=this.editor.graph.getSvg(W,c,H,N,null,l,null,la,"blank"==J?"_blank":"self"==J?"_top":null,null,!ea,Y,ha);mxUtils.lightDarkColorSupported=ja;mxUtils.preferDarkColor=ca;this.editor.graph.addForeignObjectWarning=ba;t&&this.editor.graph.addSvgShadow(Q);
-var k=this.getBaseFilename()+(q?".drawio":"")+".svg";aa=null!=aa?aa:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});var B=mxUtils.bind(this,function(P){this.spinner.stop();q&&P.setAttribute("content",this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,H));aa(Graph.xmlDeclaration+
-"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(Q);var I=mxUtils.bind(this,function(P){Editor.replaceSvgDataUris&&D&&EditorUi.embedSvgImages(P);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(P,Y,B):B(P)}),U=mxUtils.bind(this,function(P){D&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,I,this.thumbImageCache)):I(P)});ea?this.embedFonts(Q,
-U):(this.editor.addFontCss(Q),U(Q))}catch(P){this.handleError(P)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ha,ea,aa,na,W){var ba=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ba.setAttribute("x",ea);ba.setAttribute("y",aa+.5);ba.setAttribute("width",na.width);ba.setAttribute("height",na.height);null==ba.setAttributeNS?ba.setAttribute("xlink:href",W):ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",W);ha.replaceChild(ba,ha.lastChild);N()}function q(){if(H<
-Y.length)Y[H++](q)}var D="";f=c.getElementsByTagName("style");for(var H=0;H<f.length;H++)D+=f[H].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),L={},J={},Y=[];for(H=0;H<f.length;H++)mxUtils.bind(this,function(ha){var ea=ha.getElementsByTagName("div");if(0<ea.length)try{var aa=ea[0].cloneNode(!0),na=parseInt(aa.style.marginLeft),W=parseInt(aa.style.paddingTop),ba=aa.getElementsByTagName("div")[1],ja=ea=!1,ca=aa.style.alignItems,
-la=aa.style.justifyContent;if(null!=aa.style.writingMode){var Q=aa.style.writingMode;ja="vertical-"==Q.substring(0,9);ea="-rl"==Q.substring(Q.length-3)}var k=!ja&&"1px"==aa.style.width||ja&&"1px"==aa.style.height;if(!ja&&"1px"==aa.style.height||ja&&"1px"==aa.style.width)aa.style.alignItems=ja&&ea?"unsafe flex-end":"unsafe flex-start";k&&(aa.style.justifyContent="unsafe flex-start");aa.style.paddingTop="";aa.style.marginLeft="";var B=aa.outerHTML,I=L[B];null==I&&(aa.style.position="absolute",aa.style.visibility=
-"hidden",document.body.appendChild(aa),Q=1,Q="1px"==aa.style.width?ba.offsetWidth:parseInt(aa.style.width),k=1,k="1px"==aa.style.height?ba.offsetHeight:parseInt(aa.style.height),document.body.removeChild(aa),I=new mxRectangle(na,W,Q,k),L[B]=I);"1px"==aa.style.height&&("unsafe center"==ca?W-=I.height/2:"unsafe flex-end"==ca&&(W-=I.height));if("1px"==aa.style.width)if(!ja&&"unsafe center"==la||ja&&"unsafe center"==ca)na-=I.width/2;else if(!ja&&"unsafe flex-end"==la||ja&&(!ea&&"unsafe flex-end"==ca||
-ea&&"unsafe flex-start"==ca))na-=I.width;I=new mxRectangle(na,W,I.width,I.height+parseInt(ba.style.fontSize)/4);Y.push(mxUtils.bind(this,function(U){var P=J[B];null==P?Graph.htmlToPng(B,I.width,I.height,mxUtils.bind(this,function(T){t(ha,na,W,I,T);J[B]=T;U()}),D):(t(ha,na,W,I,P),U())}))}catch(U){N()}else N()})(f[H]);0==counter&&l(c);H=0;q()};EditorUi.prototype.addRadiobox=function(c,f,l,t,q,D,H){return this.addCheckbox(c,l,t,q,D,H,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,q,D,H,N){D=
-null!=D?D:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=N&&L.setAttribute("name",N);l&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);t&&L.setAttribute("disabled","disabled");D&&(c.appendChild(L),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",H),c.appendChild(l),q||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,
-f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),q="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var D=document.createElement("select");D.style.maxWidth="200px";D.style.width="auto";D.style.marginLeft="8px";D.style.marginRight="10px";D.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));D.appendChild(t);
-var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");D.appendChild(H);c.appendChild(D);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){if("custom"==D.value){var N=new FilenameDialog(this,q,mxResources.get("ok"),function(L){null!=L?(q=L,H.setAttribute("title",L)):(D.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){D.value="blank"});this.showDialog(N.container,300,80,!0,!1);
-N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===D.value?"_blank":q:null},getEditInput:function(){return l},getEditSelect:function(){return D}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";
-null!=D&&D!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=D):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var q=document.createElement("option");
-q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));t.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var D="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(D||"none",function(L){D=L;l()});mxEvent.consume(N)}));l();H.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);
-mxUtils.br(c);return{getColor:function(){return D},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,q,D){D=null!=D?D:[];l&&(D.push("lightbox=1"),"auto"!=c&&D.push("target="+c),null!=f&&f!=mxConstants.NONE&&D.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&D.push("edit="+encodeURIComponent(t)),q&&D.push("layers=1"),this.editor.graph.foldingEnabled&&D.push("nav=1"));return D};EditorUi.prototype.createLink=
-function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){var aa=this.getCurrentFile();L=this.createUrlParameters(c,f,t,q,D,L);c=!0;null!=H?l="#U"+encodeURIComponent(H):N||null==aa||""==aa.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+aa.getHash(),c=!1);c&&null!=aa&&null!=aa.getTitle()&&aa.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(aa.getTitle()));J&&1<l.length&&(L.push("open="+
-l.substring(1)),l="");Y&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ha&&L.push("transparent=1");null!=ea&&L.push("dark="+ea);return(t&&(null!=H||null!=aa&&aa.getMode()!=App.MODE_GITHUB&&aa.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,q,D,H,
-N,L,J,Y,ha,ea){this.getBasenames();var aa={};""!=q&&q!=mxConstants.NONE&&(aa.highlight=q);"auto"!==t&&(aa.target=t);J||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(aa.zoom=l/100);l=[];H&&(l.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),aa.resize=!0);N&&l.push("layers");L&&l.push("tags");null!=ea&&(aa["dark-mode"]=ea);0<l.length&&(J&&l.push("lightbox"),aa.toolbar=
-l.join(" "));null!=Y&&0<Y.length&&(aa.edit=Y);null!=c?aa.url=c:aa.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(D?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ha(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var q=document.createElement("div");q.style.whiteSpace="nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("html"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(D);var H=document.createElement("div");H.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");D=N.cloneNode(!0);D.setAttribute("value","copy");H.appendChild(D);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(N);L=
-document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));D.setAttribute("checked","checked");null==
-l&&N.setAttribute("disabled","disabled");q.appendChild(H);H=380;var Y=this.addLinkSection(q),ha=document.createElement("select");ha.style.maxWidth="260px";ha.style.marginLeft="8px";ha.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ha.appendChild(L);L=document.createElement("option");L.setAttribute("value",
-"auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ha.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("appearance")+":");q.appendChild(ha);mxUtils.br(q);H+=26;var ea=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");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=
-"100%";q.appendChild(aa);var na=this.addCheckbox(q,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var W=W=this.addCheckbox(q,mxResources.get("allPages"),L,!L),ba=this.addCheckbox(q,mxResources.get("layers"),!0),ja=this.addCheckbox(q,mxResources.get("tags"),!0),ca=this.addCheckbox(q,mxResources.get("lightbox"),!0),la=null;if(EditorUi.enableHtmlEditOption){la=this.addEditButton(q,ca);var Q=la.getEditInput();Q.style.marginBottom="16px";H+=50;mxEvent.addListener(ca,"change",function(){ca.checked?
-Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");Q.checked&&ca.checked?la.getEditSelect().removeAttribute("disabled"):la.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,q,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,aa.value,Y.getTarget(),Y.getColor(),na.checked,W.checked,ba.checked,ja.checked,ca.checked,null!=la?la.getLink():null,null!=ha?ha.value:null)}),null,c,f);this.showDialog(c.container,340,H,!0,!0);D.focus()};EditorUi.prototype.showPublishLinkDialog=
-function(c,f,l,t,q,D,H,N,L,J,Y){var ha=document.createElement("div");ha.style.whiteSpace="nowrap";var ea=document.createElement("h3");mxUtils.write(ea,c||mxResources.get("publish"));ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="2px";ea.style.marginBottom="20px";ha.appendChild(ea);var aa=document.createElement("select");c=30;aa.className="geBtn";aa.style.marginBottom="8px";aa.style.marginLeft="0px";aa.style.width="100%";aa.style.boxSizing="border-box";if(null==N||""==N.getHash())q=
-null!=q?q:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ea=document.createElement("option"),mxUtils.write(ea,mxResources.get("makeCopy")),ea.setAttribute("value","copy"),aa.appendChild(ea);ea=document.createElement("option");mxUtils.write(ea,mxResources.get("authorizationRequired"));ea.setAttribute("value","auth");aa.appendChild(ea);null!=N&&""!=N.getHash()||ea.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");aa.appendChild(N);null!=
-H?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",H),aa.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ha.appendChild(aa);mxUtils.br(ha);aa.focus();var na=null,W=null;if(null!=f||null!=l)c+=30,mxUtils.write(ha,mxResources.get("width")+":"),na=document.createElement("input"),na.setAttribute("type","text"),na.style.marginRight="16px",na.style.width="50px",na.style.marginLeft=
-"6px",na.style.marginRight="16px",na.style.marginBottom="10px",na.value="100%",ha.appendChild(na),mxUtils.write(ha,mxResources.get("height")+":"),W=document.createElement("input"),W.setAttribute("type","text"),W.style.width="50px",W.style.marginLeft="6px",W.style.marginBottom="10px",W.value=l+"px",ha.appendChild(W),mxUtils.br(ha);var ba=this.addLinkSection(ha,t),ja=J?this.addCheckbox(ha,mxResources.get("transparentBackground"),!1):null;null!=ja&&(c+=20);var ca=null;null!=this.pages&&null!=this.currentPage&&
-0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ca=this.addCheckbox(ha,mxResources.get("selectedPage")+": "+f));var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));la.appendChild(f);f=document.createElement("option");f.setAttribute("value",
-"1");mxUtils.write(f,mxResources.get("dark"));la.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");la.appendChild(f);Y&&(mxUtils.write(ha,mxResources.get("appearance")+":"),ha.appendChild(la),mxUtils.br(ha),c+=30);var Q=this.addCheckbox(ha,mxResources.get("lightbox"),!0,null,null,!t),k=this.addEditButton(ha,Q),B=k.getEditInput();t&&(B.style.marginLeft=Q.style.marginLeft,Q.style.display=
-"none",c-=20);var I=this.addCheckbox(ha,mxResources.get("layers"),!0);I.style.marginLeft=B.style.marginLeft;I.style.marginTop="8px";var U=this.addCheckbox(ha,mxResources.get("tags"),!0);U.style.marginLeft=B.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(Q,"change",function(){Q.checked?(I.removeAttribute("disabled"),B.removeAttribute("disabled"),U.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),U.setAttribute("disabled",
-"disabled"));B.checked&&Q.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,ha,mxUtils.bind(this,function(){L(ba.getTarget(),ba.getColor(),null==ca?!1:ca.checked,Q.checked,k.getLink(),I.checked,null!=na?na.value:null,null!=W?W.value:null,U.checked,aa.value,null!=ja?ja.checked:!1,la.value)}),null,mxResources.get("create"),q,D);this.showDialog(t.container,340,296+c,!0,!0);null!=na?(na.focus(),mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode?na.select():document.execCommand("selectAll",!1,null)):null==aa.parentNode;ba.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";D.appendChild(H);if(q){mxUtils.write(D,mxResources.get("zoom")+":");var N=document.createElement("input");
-N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";D.appendChild(N);mxUtils.write(D,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";D.appendChild(L);mxUtils.br(D)}var J=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),Y=t?null:this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ha=t?null:this.addCheckbox(D,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ha&&(ha.style.marginBottom="16px");c=new CustomDialog(this,D,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,aa=parseInt(L.value)||0;l(!J.checked,null!=Y?Y.checked:!1,null!=ha?ha.checked:!1,ea,aa)}),
-null,c,f);this.showDialog(c.container,300,(q?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,q,D,H,N,L){H=null!=H?H:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var Y=this.editor.graph,ha="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ea);mxUtils.write(J,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%";J.appendChild(aa);mxUtils.write(J,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type","text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";J.appendChild(na);mxUtils.br(J);var W=this.addCheckbox(J,mxResources.get("selectionOnly"),
-!1,Y.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 ja=document.createElement("select");ja.style.marginTop="16px";ja.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!Y.isSelectionEmpty()||"selectionOnly"!=c[ea]){var ca=document.createElement("option");mxUtils.write(ca,mxResources.get(c[ea]));ca.setAttribute("value",
-c[ea]);ja.appendChild(ca)}L?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(ja),mxUtils.br(J),ha+=26,mxEvent.addListener(ja,"change",function(){"selectionOnly"==ja.value&&(W.checked=!0)})):D&&(J.appendChild(ba),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ha+=30,mxEvent.addListener(W,"change",function(){W.checked?ba.removeAttribute("disabled"):ba.setAttribute("disabled","disabled")}));Y.isSelectionEmpty()?L&&(W.style.display="none",W.nextSibling.style.display="none",W.nextSibling.nextSibling.style.display=
-"none",ha-=30):(ja.value="diagram",ba.setAttribute("checked","checked"),ba.defaultChecked=!0,mxEvent.addListener(W,"change",function(){ja.value=W.checked?"selectionOnly":"diagram"}));var la=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),Q=document.createElement("select");Q.style.maxWidth="260px";Q.style.marginLeft="8px";Q.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));
-Q.appendChild(D);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));Q.appendChild(L);"svg"==N&&mxUtils.lightDarkColorSupported?(D=document.createElement("option"),D.setAttribute("value","auto"),mxUtils.write(D,mxResources.get("automatic")),D.setAttribute("selected","selected"),Q.appendChild(D)):Editor.isDarkMode()?L.setAttribute("selected","selected"):D.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(Q);
-mxUtils.br(J);ha+=26;var k=this.addCheckbox(J,mxResources.get("shadow"),Y.shadowVisible),B=null;if("png"==N||"jpeg"==N||"webp"==N)B=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ha+=30;var I=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",H,null,null,"jpeg"!=N&&"webp"!=N),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="28px";"png"==N||"svg"==N?(H=function(){I.checked?U.removeAttribute("disabled"):U.setAttribute("disabled",
-"disabled")},Y=document.createElement("option"),Y.setAttribute("value","allPages"),mxUtils.write(Y,mxResources.get("allPages")),U.appendChild(Y),Y=document.createElement("option"),Y.setAttribute("value","currentPage"),mxUtils.write(Y,mxResources.get("currentPage")),U.appendChild(Y),I.style.marginBottom="12px",U.style.marginBottom="16px",J.appendChild(U),mxUtils.br(J),ha+=20,null!=this.lastEmbedInclude&&(U.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",H),H()):I.style.marginBottom="16px";
-var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");f&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(P),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),T.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(T),mxUtils.write(J,mxResources.get("embedFonts")),
-mxUtils.br(J),ha+=50);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));X.appendChild(D);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));X.appendChild(H);H=document.createElement("option");H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));X.appendChild(H);
-H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(X),J.appendChild(H),mxUtils.br(J),mxUtils.br(J),ha+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=aa.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=T.checked;this.lastEmbedInclude=U.value;q(aa.value,la.checked,!W.checked,k.checked,I.checked,
-P.checked&&f,na.value,ba.checked,("png"==N||"svg"==N)&&"currentPage"==U.value,X.value,null!=B?B.checked:null,null!=Q?Q.value:null,ja.value,T.checked)}),null,l,t);this.showDialog(l.container,340,ha,!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(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=
-f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(N)}var L=this.addCheckbox(D,mxResources.get("fit"),!0),J=this.addCheckbox(D,mxResources.get("shadow"),H.shadowVisible&&t,!t),Y=this.addCheckbox(D,l),ha=this.addCheckbox(D,mxResources.get("lightbox"),!0),ea=this.addEditButton(D,ha),aa=ea.getEditInput(),na=1<H.model.getChildCount(H.model.getRoot()),W=this.addCheckbox(D,mxResources.get("layers"),na,!na);
-W.style.marginLeft=aa.style.marginLeft;W.style.marginBottom="12px";W.style.marginTop="8px";mxEvent.addListener(ha,"change",function(){ha.checked?(na&&W.removeAttribute("disabled"),aa.removeAttribute("disabled")):(W.setAttribute("disabled","disabled"),aa.setAttribute("disabled","disabled"));aa.checked&&ha.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){c(L.checked,J.checked,Y.checked,
-ha.checked,ea.getLink(),W.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,q,D,H,N){function L(aa){var na=" ",W="";t&&(na=" 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!=Y?"&page="+Y:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",W+="cursor:pointer;");c&&(W+="max-width:100%;");var ba="";l&&(ba=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');H('<img src="'+aa+'"'+ba+(""!=W?' style="'+W+'"':"")+na+"/>")}var J=this.editor.graph.getGraphBounds(),Y=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(aa){var na=t?this.getFileData(!0):
-null;aa=this.createImageDataUri(aa,na,"png");L(aa)}),null,null,null,mxUtils.bind(this,function(aa){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ha="";l&&(ha="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ha+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=
-ea.getStatus()&&299>=ea.getStatus()?L("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,q,D,H){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),L=N.getElementsByTagName("a");if(null!=L)for(var J=0;J<L.length;J++){var Y=L[J].getAttribute("href");null!=Y&&"#"==Y.charAt(0)&&"_blank"==L[J].getAttribute("target")&&L[J].removeAttribute("target")}t&&
-N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ha=" ",ea="";t&&(ha="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"+(q?"&edit=_blank":"")+(D?"&layers=1":
-"")+"');}})(this);\"",ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(aa){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(aa))+'"'+(""!=ea?' style="'+ea+'"':"")+ha+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),q=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+q),ea+="max-width:100%;max-height:"+q+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),H(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
+this.setCurrentFile(null);null!=t&&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.fname.innerText="");this.clearStatus();this.updateUi();f||("0"!=urlParams.splash?this.showSplash():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0))});if(null!=c)try{this.openingFile=!0;this.setCurrentFile(c);
+c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.clearStatus():this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus('<div class="geStatusBox" title="'+
+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>")}));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=l&&l();this.editor.fireEvent(new mxEventObject("fileLoaded"));q=!0;if(!this.isOffline()&&null!=
+c.getMode()){var H="1"==urlParams.sketch?"sketch":uiTheme;if(null==H)H="default";else if("sketch"==H||"min"==H)H+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+H})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&
+null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(L){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||D():D()});f?c():(null!=N.fallbackFileData&&(N.alternateAction=
+{label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var L=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(L)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else D();return q};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var D=0;D<c.length;D++){this.updatePageRoot(c[D]);var H=c[D].node.cloneNode(!1);
+H.removeAttribute("name");t.root=c[D].root;var N=q.encode(t);this.editor.graph.saveViewState(c[D].viewState,N,!0);N.removeAttribute("pageWidth");N.removeAttribute("pageHeight");H.appendChild(N);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(H,function(L,I,Z,ia){return!ia||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?ia&&"mxCell"==L.nodeName&&"previous"==I?null:Z:Math.round(Z)},
+f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var q=0;q<c.attributes.length;q++){var D=c.attributes[q].name,H=null!=f?f(c,D,c.attributes[q].value,!0):c.attributes[q].value;null!=H&&(t^=this.hashValue(D,f,l)+this.hashValue(H,
+f,l))}}if(null!=c.childNodes)for(q=0;q<c.childNodes.length;q++)t=(t<<5)-t+this.hashValue(c.childNodes[q],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(q=0;q<c.length;q++)f=(f<<5)-f+c.charCodeAt(q)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,q,D,H){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};
+EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));
+f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);
+delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());
+if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=
+LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var q=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var D=0;D<this.openLibraries.length;D++)if(this.openLibraries[D].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[D],this.openLibraries);break}q={file:c,images:f,title:l,expand:t};this.openLibraries.push(q)}else this.scratchpad=c;D=this.sidebar.palettes[c.getHash()];D=null!=D?D[D.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());
+var H=null,N=mxUtils.bind(this,function(ka,da){0==ka.length&&c.isEditable()?(null==H&&(H=document.createElement("div"),H.className="geDropTarget",mxUtils.write(H,mxResources.get("dragElementsHere"))),da.appendChild(H)):this.addLibraryEntries(ka,da)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var L=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(ka){N(f,ka)}));null!=
+q&&(q.div=L);this.repositionLibrary(D,"L.scratchpad"!=c.getHash());t=L.parentNode.previousSibling;l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var Z=document.createElement("img");Z.className="geLibraryButton";Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));var ia=null;if(".scratchpad"!=
+c.title||this.closableScratchpad)I.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var da=mxUtils.bind(this,function(){null!=q&&mxUtils.remove(q,this.openLibraries);this.closeLibrary(c)});null!=ia?this.confirm(mxResources.get("allChangesLost"),null,da,mxResources.get("cancel"),mxResources.get("discardChanges")):da();mxEvent.consume(ka)}}));if(c.isEditable()){var fa=this.editor.graph,ba=null;l=mxUtils.bind(this,function(ka){this.showLibraryDialog(c.getTitle(),
+L,f,c,c.getMode());mxEvent.consume(ka)});var na=mxUtils.bind(this,function(ka){c.setModified(!0);c.isAutosave()?(null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba),ba=Z.cloneNode(!1),ba.setAttribute("src",Editor.spinImage),ba.setAttribute("title",mxResources.get("saving")),ba.style.cursor="default",ba.style.marginRight="2px",ba.style.marginTop="-2px",I.insertBefore(ba,I.firstChild),this.saveLibrary(c.getTitle(),f,c,c.getMode(),!0,!0,function(){null!=ba&&null!=ba.parentNode&&ba.parentNode.removeChild(ba)})):
+null==ia&&(ia=Z.cloneNode(!1),ia.setAttribute("src",Editor.saveImage),ia.setAttribute("title",mxResources.get("save")),I.insertBefore(ia,I.firstChild),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(da){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ia||c.isModified()||(ia.parentNode.removeChild(ia),ia=null)});mxEvent.consume(da)})))}),X=mxUtils.bind(this,function(ka,da,W,S){ka=fa.cloneCells(mxUtils.sortCells(fa.model.getTopmostCells(ka)));
+for(var k=0;k<ka.length;k++){var B=fa.getCellGeometry(ka[k]);null!=B&&B.translate(-da.x,-da.y)}L.appendChild(this.sidebar.createVertexTemplateFromCells(ka,da.width,da.height,S||"",!0,null,!1));ka=mxUtils.getXml(this.editor.graph.encodeCells(ka));Editor.defaultCompressed&&(ka=Graph.compress(ka));da={xml:ka,w:da.width,h:da.height};null!=S&&(da.title=S);f.push(da);na(W);null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)}),ca=mxUtils.bind(this,function(ka){if(fa.isSelectionEmpty())fa.getRubberband().isActive()?
+(fa.getRubberband().execute(ka),fa.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var da=fa.getSelectionCells(),W=fa.view.getBounds(da);if(null!=W&&0<W.width&&0<W.height){var S=fa.view.scale;W.x/=S;W.y/=S;W.width/=S;W.height/=S;W.x-=fa.view.translate.x;W.y-=fa.view.translate.y;X(da,W)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(ka)});mxEvent.addGestureListeners(L,
+function(){},mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.panningManager&&null!=fa.graphHandler.first&&(fa.graphHandler.suspend(),null!=fa.graphHandler.hint&&(fa.graphHandler.hint.style.visibility="hidden"),L.style.backgroundColor="light-dark(#fefefe, #000000)",L.style.cursor="copy",fa.panningManager.stop(),fa.autoScroll=!1,mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.panningManager&&null!=fa.graphHandler&&(L.style.backgroundColor="",L.style.cursor="default",
+this.sidebar.showTooltips=!0,fa.panningManager.stop(),fa.graphHandler.reset(),fa.isMouseDown=!1,fa.autoScroll=!0,ca(ka),mxEvent.consume(ka))}));mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(ka){fa.isMouseDown&&null!=fa.graphHandler.first&&(fa.graphHandler.resume(),null!=fa.graphHandler.hint&&(fa.graphHandler.hint.style.visibility="visible"),L.style.backgroundColor="",L.style.cursor="",fa.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(ka){L.style.backgroundColor=
+"light-dark(#fefefe, #000000)";ka.dataTransfer.dropEffect="copy";L.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(L,"drop",mxUtils.bind(this,function(ka){L.style.cursor="";L.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(da,W,S,k,B,K,T,P,U){if(null!=da&&"image/"==W.substring(0,6))da="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(da),da=[new mxCell("",new mxGeometry(0,0,B,K),da)],da[0].vertex=!0,X(da,new mxRectangle(0,0,B,K),ka,mxEvent.isAltDown(ka)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null);else{var Y=!1,aa=mxUtils.bind(this,function(la,va){null!=la&&"application/pdf"==va&&(va=Editor.extractGraphModelFromPdf(la),null!=va&&0<va.length&&(la=va));if(null!=la)if(la=mxUtils.parseXml(la),"mxlibrary"==la.documentElement.nodeName)try{var ua=
+JSON.parse(mxUtils.getTextContent(la.documentElement));N(ua,L);f=f.concat(ua);na(ka);this.spinner.stop();Y=!0}catch(La){}else if("mxfile"==la.documentElement.nodeName)try{var qa=la.documentElement.getElementsByTagName("diagram");for(ua=0;ua<qa.length;ua++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(qa[ua])),ya=this.editor.graph.getBoundingBoxFromGeometry(Ba);null!=ya&&X(Ba,new mxRectangle(0,0,ya.width,ya.height),ka)}Y=!0}catch(La){null!=window.console&&console.log("error in drop handler:",
+La)}Y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=H&&null!=H.parentNode&&0<f.length&&(H.parentNode.removeChild(H),H=null)});null!=U&&null!=T&&EditorUi.isVisioFilename(T)?this.importVisio(U,function(la){aa(la,"text/xml")},null,T):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(da,T)&&null!=U?this.isExternalDataComms()?this.parseFile(U,mxUtils.bind(this,function(la){4==la.readyState&&(this.spinner.stop(),200<=la.status&&299>=la.status?aa(la.responseText,
+"text/xml"):this.handleError({message:mxResources.get(413==la.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):aa(da,W)}}));ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(L,"dragleave",function(ka){L.style.cursor="";L.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",
+mxResources.get("edit"));I.insertBefore(Z,I.firstChild);mxEvent.addListener(Z,"click",l);l=Z.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ca);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ca);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink,!0),l.className="geLibraryButton",I.insertBefore(l,I.firstChild))}t.appendChild(I);
+this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],q=t.data;if(null!=q){q="data:"==q.substring(0,5)?this.convertDataUri(q):q;var D="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(D+="aspect=fixed;");D=D+"image="+q+";";null!=t.style&&(D+=t.style);f.appendChild(this.sidebar.createVertexTemplate(D,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var H=
+this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==H.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(H,t.w,t.h,N,!0,null,!0))}}catch(L){N=null!=L.message?mxResources.get("error")+": "+L.message:String(L),D=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(D)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};"1"==urlParams.savesidebar&&
+(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,q,D,H){c=new ImageDialog(this,c,f,l,t,q,D,H);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,
+f,l,t,q,D){var H=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=H?JSON.stringify(JSON.parse(H),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=D&&D(N),N==H)this.hideDialog();else{if(0<N.length){var L=JSON.parse(N);localStorage.setItem(f,JSON.stringify(L))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),null,mxResources.get("close"),null,null,null,!0,null,null,q,l,t);this.showDialog(c.container,
+660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(q,D,H,N){D||(q=new ChangePageSetup(this,t?H:null,q),q.ignoreColor=!t,null!=N&&t&&(q.shadowVisible=N),this.editor.graph.model.execute(q))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,q){c=new LibraryDialog(this,c,f,l,t,q);this.showDialog(c.container,640,440,!0,!1,
+mxUtils.bind(this,function(D){D&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,q,D,H){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},
+L=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{H||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!H||null==window.console||console.error("EditorUi.handleError:",c)}catch(fa){}if(null!=L||null!=f){H=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var I=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=L){null!=
+L.retry&&(I=mxResources.get("cancel"),Z=function(){N();L.retry()});if(404==L.code||404==L.status||403==L.code){H=403==L.code?null!=L.message?mxUtils.htmlEntities(L.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ia=null!=q?null:null!=D?D:window.location.hash;if(null!=ia&&("#G"==ia.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==
+ia.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==L.code||404==L.status)){ia="#U"==ia.substring(0,2)?ia.substring(45,ia.lastIndexOf("%26ex")):ia.substring(2);this.showError(f,H,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ia);null!=t&&t()}),Z,
+mxResources.get("changeUser"),mxUtils.bind(this,function(){function fa(){ca.innerText="";for(var ka=0;ka<ba.length;ka++){var da=document.createElement("option");mxUtils.write(da,ba[ka].displayName);da.value=ka;ca.appendChild(da);da=document.createElement("option");da.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(da,"<"+ba[ka].email+">");da.setAttribute("disabled","disabled");ca.appendChild(da)}da=document.createElement("option");mxUtils.write(da,mxResources.get("addAccount"));da.value=ba.length;ca.appendChild(da)}
+var ba=this.drive.getUsersList(),na=document.createElement("div"),X=document.createElement("div");X.style.marginBottom="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");na.appendChild(X);var ca=document.createElement("select");ca.style.width="100%";fa();mxEvent.addListener(ca,"change",mxUtils.bind(this,function(){var ka=ca.value,da=ba.length!=ka;da&&this.drive.setUser(ba[ka]);this.drive.authorize(da,mxUtils.bind(this,function(){da||(ba=this.drive.getUsersList(),fa())}),mxUtils.bind(this,function(W){this.handleError(W)}),
+!0)}));na.appendChild(ca);na=new CustomDialog(this,na,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(na.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=L.message?H=""==L.message&&null!=L.name?mxUtils.htmlEntities(L.name,!1):mxUtils.htmlEntities(L.message,!1):null!=L.response&&null!=L.response.error?H=mxUtils.htmlEntities(L.response.error,!1):"undefined"!==typeof window.App&&
+(L.code==App.ERROR_TIMEOUT?H=mxUtils.htmlEntities(mxResources.get("timeout"),!1):L.code==App.ERROR_BUSY?H=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof L&&0<L.length&&(H=mxUtils.htmlEntities(L,!1)))}q=c=null;null!=L&&null!=L.helpLink?(c=mxResources.get("help"),q=mxUtils.bind(this,function(){return this.editor.graph.openLink(L.helpLink)})):null!=L&&null!=L.ownerEmail?(c=mxResources.get("contactOwner"),H+=mxUtils.htmlEntities(" ("+c+": "+L.ownerEmail+")",!1),q=mxUtils.bind(this,
+function(){return this.openLink("mailto:"+mxUtils.htmlEntities(L.ownerEmail))})):null!=L&&null!=L.alternateAction&&(c=L.alternateAction.label,q=L.alternateAction.funct);this.showError(f,H,I,l,Z,null,null,c,q,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,q,D){c=null!=c?c:"";var H=null!=this.spinner&&null!=this.spinner.pause?
+this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){H();null!=f&&f()},function(){H();null!=l&&l()},t,q,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,D);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,q,D,H,N,L){D=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){H=null!=H?H:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";
+var I=q?500:1E3,Z=document.createElement("div");Z.className="geBtn gePrimaryBtn geBanner"+(q?" geSmallBanner":"");Z.style.zIndex=mxPopupMenu.prototype.zIndex;mxUtils.setPrefixedStyle(Z.style,"transform",H);mxUtils.setPrefixedStyle(Z.style,"transition","all "+I+"ms ease");null!=L&&mxUtils.setPrefixedStyle(Z.style,"transform-origin",L);if(!q){var ia=document.createElement("img");ia.setAttribute("src",IMAGE_PATH+"/logo.png");ia.setAttribute("border","0");ia.setAttribute("align","absmiddle");ia.style.cssText=
+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";Z.appendChild(ia);ia=document.createElement("img");ia.setAttribute("src",Dialog.prototype.closeImage);ia.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ia.setAttribute("border","0");ia.style.cssText=(q?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";Z.appendChild(ia)}mxUtils.write(Z,f);document.body.appendChild(Z);this.bannerShowing=
+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var fa=document.createElement("input");fa.setAttribute("type","checkbox");fa.setAttribute("id","geDoNotShowAgainCheckbox");fa.style.marginRight="6px";if(!t){f.appendChild(fa);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
+Z.style.paddingBottom=q?"16px":"30px";Z.appendChild(f)}var na=mxUtils.bind(this,function(){null!=Z.parentNode&&(Z.parentNode.removeChild(Z),this.bannerShowing=!1,fa.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ia&&mxEvent.addListener(ia,"click",mxUtils.bind(this,function(ca){mxEvent.consume(ca);na()}));var X=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Z.style,"transform",H);window.setTimeout(mxUtils.bind(this,
+function(){na()}),I)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ca){var ka=mxEvent.getSource(ca);ka!=fa&&ka!=ba?(null!=l&&l(),na(),mxEvent.consume(ca)):X()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(Z.style,"transform",N)}),I/2);window.setTimeout(X,q?4E3:3E4);D=!0}return D};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,q){var D="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+D;c=this.createImageDataUri(c,
+f,l,q);this.saveData(t,D,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
+!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,q,D){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=D?D:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),
+l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var H=document.createElement("a");D=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof H.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);D=65==(N?parseInt(N[2],10):
+!1)?!1:D}if(D||this.isOffline()){H.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));D?H.download=f:H.setAttribute("target","_blank");document.body.appendChild(H);try{window.setTimeout(function(){URL.revokeObjectURL(H.href)},2E4),H.click(),H.parentNode.removeChild(H)}catch(L){}}else this.createEchoRequest(c,f,l,t,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,q,D){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+l?"&mime="+l:"")+(null!=q?"&format="+q:"")+(null!=D?"&base64="+D:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,q,D,H,N){D=null!=D?D:!1;H=null!=H?H:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);var L=mxUtils.bind(this,function(Z,ia,fa,ba){try{if("_blank"==ia)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var na=new EmbedDialog(this,c);this.showDialog(na.container,
+450,240,!0,!0);na.init()}else{var X=window.open("about:blank");null==X?mxUtils.popup(c,!0):(X.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),X.document.close())}else if(ia==App.MODE_DEVICE||"download"==ia)this.doSaveLocalFile(c,Z,l,t,null,N);else if(null!=Z&&0<Z.length){var ca=mxUtils.bind(this,function(ka){try{this.exportFile(c,Z,l,t,ia,ka)}catch(da){this.handleError(da)}});null!=ba?ca(ba):this.pickFolder(ia,ca)}}catch(ka){this.handleError(ka)}});q=[];D||q.push(App.MODE_BROWSER);H||
+q.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(Z,ia,fa){L(Z.value,ia,Z,fa);this.hideDialog(null,null,I.container)}),q,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var q="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var D=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+""!=D&&(q="background: "+D+";")}q='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+q+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(D=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(q+'<img style="max-width:100%;" src="data:'+f+";base64,"+D+'"/></body></html>')):t.document.write(q+c+"</body></html>"):t.document.write(q+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),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,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 q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";
+this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(t)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var t=this.editor.graph.getAllTags();
+f.style.display=0<t.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 l=c(mxUtils.bind(this,function(t){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var D=l.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
+this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=D.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";D=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=D.zIndex;var H=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});H.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",q);this.editor.exportToCanvas(mxUtils.bind(this,function(N){H.stop();this.exportDialog.style.width=
+"auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var L=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",L);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(L.substring(L.indexOf(",")+
+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){H.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,q){this.isLocalFileSave()?this.saveLocalFile(l,
+c,t,q,f):this.saveRequest(c,f,mxUtils.bind(this,function(D,H){return this.createEchoRequest(l,D,t,q,f,H)}),l,q,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,q,D,H){H=null!=H?H:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,function(I,Z,ia,fa){if("_blank"==Z||null!=I&&0<I.length){var ba=l("_blank"==Z?null:I,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ba&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ba.simulate(document,"_blank"):(ia=mxUtils.bind(this,
+function(na){D=null!=D?D:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),I,D,!0,Z,na)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(X){this.spinner.stop();this.handleError(X)}))}),
+null!=fa?ia(fa):this.pickFolder(Z,ia)))}});q=[App.MODE_BROWSER];H||q.push("_blank");var L=new SaveDialog(this,c,mxUtils.bind(this,function(I,Z,ia){N(I.value,Z,I,ia);this.hideDialog(null,null,L.container)}),q,null,"application/pdf");this.showDialog(L.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));L.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,
+f,l,t,q,D){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(P){Editor.addRetryToError(P,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba)}));this.handleError(P)})))try{var na=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:na;var X=f?null:this.editor.graph.background;X==mxConstants.NONE&&(X=null);null==X&&0==f&&(X=this.editor.graph.shapeBackgroundColor);var ca=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var ka=mxUtils.lightDarkColorSupported,da=mxUtils.preferDarkColor;if("light"==Z||"dark"==Z)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==Z;var W=this.editor.graph.createSvgImageExport(q),
+S=this.editor.graph.getSvg(X,c,H,N,null,l,null,W,"blank"==I?"_blank":"self"==I?"_top":null,null,!fa,Z,ia);mxUtils.lightDarkColorSupported=ka;mxUtils.preferDarkColor=da;this.editor.graph.addForeignObjectWarning=ca;t&&this.editor.graph.addSvgShadow(S);var k=this.getBaseFilename()+(q?".drawio":"")+".svg";ba=null!=ba?ba:mxUtils.bind(this,function(P){this.isLocalFileSave()||P.length<=MAX_REQUEST_SIZE?this.saveData(k,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(P)}))});var B=mxUtils.bind(this,function(P){this.spinner.stop();q&&P.setAttribute("content",this.getFileData(!0,null,null,null,l,L,null,null,null,null,null,c,H));ba(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(P))});this.editor.graph.mathEnabled&&this.editor.addMathCss(S);var K=mxUtils.bind(this,function(P){Editor.replaceSvgDataUris&&D&&EditorUi.embedSvgImages(P);Editor.foreignObjectImages&&
+fa?this.replaceAlternateContent(P,Z,B):B(P)}),T=mxUtils.bind(this,function(P){D&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(P,K,this.thumbImageCache)):K(P)});fa?this.embedFonts(S,T):(this.editor.addFontCss(S),T(S))}catch(P){this.handleError(P)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ia,fa,ba,na,X){var ca=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");ca.setAttribute("x",
+fa);ca.setAttribute("y",ba+.5);ca.setAttribute("width",na.width);ca.setAttribute("height",na.height);null==ca.setAttributeNS?ca.setAttribute("xlink:href",X):ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",X);ia.replaceChild(ca,ia.lastChild);N()}function q(){if(H<Z.length)Z[H++](q)}var D="";f=c.getElementsByTagName("style");for(var H=0;H<f.length;H++)D+=f[H].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),L={},I={},Z=
+[];for(H=0;H<f.length;H++)mxUtils.bind(this,function(ia){var fa=ia.getElementsByTagName("div");if(0<fa.length)try{var ba=fa[0].cloneNode(!0),na=parseInt(ba.style.marginLeft),X=parseInt(ba.style.paddingTop),ca=ba.getElementsByTagName("div")[1],ka=fa=!1,da=ba.style.alignItems,W=ba.style.justifyContent;if(null!=ba.style.writingMode){var S=ba.style.writingMode;ka="vertical-"==S.substring(0,9);fa="-rl"==S.substring(S.length-3)}var k=!ka&&"1px"==ba.style.width||ka&&"1px"==ba.style.height;if(!ka&&"1px"==
+ba.style.height||ka&&"1px"==ba.style.width)ba.style.alignItems=ka&&fa?"unsafe flex-end":"unsafe flex-start";k&&(ba.style.justifyContent="unsafe flex-start");ba.style.paddingTop="";ba.style.marginLeft="";var B=ba.outerHTML,K=L[B];null==K&&(ba.style.position="absolute",ba.style.visibility="hidden",document.body.appendChild(ba),S=1,S="1px"==ba.style.width?ca.offsetWidth:parseInt(ba.style.width),k=1,k="1px"==ba.style.height?ca.offsetHeight:parseInt(ba.style.height),document.body.removeChild(ba),K=new mxRectangle(na,
+X,S,k),L[B]=K);"1px"==ba.style.height&&("unsafe center"==da?X-=K.height/2:"unsafe flex-end"==da&&(X-=K.height));if("1px"==ba.style.width)if(!ka&&"unsafe center"==W||ka&&"unsafe center"==da)na-=K.width/2;else if(!ka&&"unsafe flex-end"==W||ka&&(!fa&&"unsafe flex-end"==da||fa&&"unsafe flex-start"==da))na-=K.width;K=new mxRectangle(na,X,K.width,K.height+parseInt(ca.style.fontSize)/4);Z.push(mxUtils.bind(this,function(T){var P=I[B];null==P?Graph.htmlToPng(B,K.width,K.height,mxUtils.bind(this,function(U){t(ia,
+na,X,K,U);I[B]=U;T()}),D):(t(ia,na,X,K,P),T())}))}catch(T){N()}else N()})(f[H]);0==counter&&l(c);H=0;q()};EditorUi.prototype.addRadiobox=function(c,f,l,t,q,D,H){return this.addCheckbox(c,l,t,q,D,H,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;var L=document.createElement("input");L.style.marginRight="8px";L.style.marginTop="16px";L.setAttribute("type",H?"radio":"checkbox");H="geCheckbox-"+Editor.guid();L.id=H;null!=N&&L.setAttribute("name",N);l&&(L.setAttribute("checked",
+"checked"),L.defaultChecked=!0);t&&L.setAttribute("disabled","disabled");D&&(c.appendChild(L),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",H),c.appendChild(l),q||mxUtils.br(c));return L};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),q="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var D=document.createElement("select");
+D.style.maxWidth="200px";D.style.width="auto";D.style.marginLeft="8px";D.style.marginRight="10px";D.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));D.appendChild(t);var H=document.createElement("option");H.setAttribute("value","custom");mxUtils.write(H,mxResources.get("custom")+"...");D.appendChild(H);c.appendChild(D);mxEvent.addListener(D,"change",mxUtils.bind(this,function(){if("custom"==D.value){var N=new FilenameDialog(this,
+q,mxResources.get("ok"),function(L){null!=L?(q=L,H.setAttribute("title",L)):(D.value="blank",H.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){D.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===D.value?"_blank":q:null},
+getEditInput:function(){return l},getEditSelect:function(){return D}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=D&&D!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=D):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");H.innerText="";H.appendChild(N)}
+mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));t.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));t.appendChild(q);q=document.createElement("option");
+q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));t.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var D="#0000ff",H=null;H=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(D||"none",function(L){D=L;l()});mxEvent.consume(N)}));l();H.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";H.style.marginLeft="4px";H.style.height="22px";H.style.width="22px";H.style.position="relative";H.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";H.className="geColorBtn";c.appendChild(H);mxUtils.br(c);return{getColor:function(){return D},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,q,D){D=null!=D?D:[];l&&(D.push("lightbox=1"),"auto"!=c&&D.push("target="+c),
+null!=f&&f!=mxConstants.NONE&&D.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&D.push("edit="+encodeURIComponent(t)),q&&D.push("layers=1"),this.editor.graph.foldingEnabled&&D.push("nav=1"));return D};EditorUi.prototype.createLink=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){var ba=this.getCurrentFile();L=this.createUrlParameters(c,f,t,q,D,L);c=!0;null!=H?l="#U"+encodeURIComponent(H):N||null==ba||""==ba.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,
+null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+ba.getHash(),c=!1);c&&null!=ba&&null!=ba.getTitle()&&ba.getTitle()!=this.defaultFilename&&L.push("title="+encodeURIComponent(ba.getTitle()));I&&1<l.length&&(L.push("open="+l.substring(1)),l="");Z&&null!=this.currentPage&&L.push("page-id="+this.currentPage.getId());ia&&L.push("transparent=1");null!=fa&&L.push("dark="+fa);return(t&&(null!=H||null!=ba&&ba.getMode()!=App.MODE_GITHUB&&ba.getMode()!=App.MODE_GITLAB)?
+EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<L.length?"?"+L.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==t&&(ba.target=t);I||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ba.zoom=l/100);l=[];H&&(l.push("pages"),
+ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ba.resize=!0);N&&l.push("layers");L&&l.push("tags");null!=fa&&(ba["dark-mode"]=fa);0<l.length&&(I&&l.push("lightbox"),ba.toolbar=l.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=c?ba.url=c:ba.xml=this.getFileData(!0,null,null,null,null,!H);f='<div class="mxgraph" style="'+(D?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+
+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ia(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var q=document.createElement("div");q.style.whiteSpace=
+"nowrap";var D=document.createElement("h3");mxUtils.write(D,mxResources.get("html"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(D);var H=document.createElement("div");H.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");
+D=N.cloneNode(!0);D.setAttribute("value","copy");H.appendChild(D);var L=document.createElement("span");mxUtils.write(L,mxResources.get("includeCopyOfMyDiagram"));H.appendChild(L);mxUtils.br(H);H.appendChild(N);L=document.createElement("span");mxUtils.write(L,mxResources.get("publicDiagramUrl"));H.appendChild(L);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(L=document.createElement("a"),L.style.paddingLeft="12px",L.style.color="gray",L.style.cursor="pointer",mxUtils.write(L,
+mxResources.get("share")),H.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));D.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");q.appendChild(H);H=380;var Z=this.addLinkSection(q),ia=document.createElement("select");ia.style.maxWidth="260px";ia.style.marginLeft="8px";ia.style.marginTop="16px";L=document.createElement("option");L.setAttribute("value","light");mxUtils.write(L,mxResources.get("light"));
+ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));ia.appendChild(L);L=document.createElement("option");L.setAttribute("value","auto");mxUtils.write(L,mxResources.get("automatic"));L.setAttribute("selected","selected");ia.appendChild(L);L.setAttribute("selected","selected");mxUtils.write(q,mxResources.get("appearance")+":");q.appendChild(ia);mxUtils.br(q);H+=26;var fa=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,
+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var na=this.addCheckbox(q,mxResources.get("fit"),!0);L=null!=this.pages&&1<this.pages.length;var X=X=this.addCheckbox(q,mxResources.get("allPages"),L,!L),ca=this.addCheckbox(q,mxResources.get("layers"),!0),ka=this.addCheckbox(q,mxResources.get("tags"),!0),da=this.addCheckbox(q,mxResources.get("lightbox"),
+!0),W=null;if(EditorUi.enableHtmlEditOption){W=this.addEditButton(q,da);var S=W.getEditInput();S.style.marginBottom="16px";H+=50;mxEvent.addListener(da,"change",function(){da.checked?S.removeAttribute("disabled"):S.setAttribute("disabled","disabled");S.checked&&da.checked?W.getEditSelect().removeAttribute("disabled"):W.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,q,mxUtils.bind(this,function(){t(N.checked?l:null,fa.checked,ba.value,Z.getTarget(),Z.getColor(),na.checked,
+X.checked,ca.checked,ka.checked,da.checked,null!=W?W.getLink():null,null!=ia?ia.value:null)}),null,c,f);this.showDialog(c.container,340,H,!0,!0);D.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,q,D,H,N,L,I,Z){var ia=document.createElement("div");ia.style.whiteSpace="nowrap";var fa=document.createElement("h3");mxUtils.write(fa,c||mxResources.get("publish"));fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="2px";fa.style.marginBottom="20px";ia.appendChild(fa);
+var ba=document.createElement("select");c=30;ba.className="geBtn";ba.style.marginBottom="8px";ba.style.marginLeft="0px";ba.style.width="100%";ba.style.boxSizing="border-box";if(null==N||""==N.getHash())q=null!=q?q:"https://www.drawio.com/doc/faq/publish-diagram-as-link",fa=document.createElement("option"),mxUtils.write(fa,mxResources.get("makeCopy")),fa.setAttribute("value","copy"),ba.appendChild(fa);fa=document.createElement("option");mxUtils.write(fa,mxResources.get("authorizationRequired"));fa.setAttribute("value",
+"auth");ba.appendChild(fa);null!=N&&""!=N.getHash()||fa.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");ba.appendChild(N);null!=H?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",H),ba.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ia.appendChild(ba);mxUtils.br(ia);ba.focus();var na=null,X=null;if(null!=f||
+null!=l)c+=30,mxUtils.write(ia,mxResources.get("width")+":"),na=document.createElement("input"),na.setAttribute("type","text"),na.style.marginRight="16px",na.style.width="50px",na.style.marginLeft="6px",na.style.marginRight="16px",na.style.marginBottom="10px",na.value="100%",ia.appendChild(na),mxUtils.write(ia,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",ia.appendChild(X),
+mxUtils.br(ia);var ca=this.addLinkSection(ia,t),ka=I?this.addCheckbox(ia,mxResources.get("transparentBackground"),!1):null;null!=ka&&(c+=20);var da=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),da=this.addCheckbox(ia,mxResources.get("selectedPage")+": "+f));var W=document.createElement("select");W.style.maxWidth="260px";W.style.marginLeft="8px";W.style.marginTop=
+"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));W.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");W.appendChild(f);Z&&(mxUtils.write(ia,mxResources.get("appearance")+":"),ia.appendChild(W),mxUtils.br(ia),
+c+=30);var S=this.addCheckbox(ia,mxResources.get("lightbox"),!0,null,null,!t),k=this.addEditButton(ia,S),B=k.getEditInput();t&&(B.style.marginLeft=S.style.marginLeft,S.style.display="none",c-=20);var K=this.addCheckbox(ia,mxResources.get("layers"),!0);K.style.marginLeft=B.style.marginLeft;K.style.marginTop="8px";var T=this.addCheckbox(ia,mxResources.get("tags"),!0);T.style.marginLeft=B.style.marginLeft;T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(S,"change",function(){S.checked?
+(K.removeAttribute("disabled"),B.removeAttribute("disabled"),T.removeAttribute("disabled")):(K.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),T.setAttribute("disabled","disabled"));B.checked&&S.checked?k.getEditSelect().removeAttribute("disabled"):k.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,ia,mxUtils.bind(this,function(){L(ca.getTarget(),ca.getColor(),null==da?!1:da.checked,S.checked,k.getLink(),K.checked,null!=na?na.value:null,null!=
+X?X.value:null,T.checked,ba.value,null!=ka?ka.checked:!1,W.value)}),null,mxResources.get("create"),q,D);this.showDialog(t.container,340,296+c,!0,!0);null!=na?(na.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?na.select():document.execCommand("selectAll",!1,null)):null==ba.parentNode;ca.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=document.createElement("h3");mxUtils.write(H,mxResources.get("image"));
+H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";D.appendChild(H);if(q){mxUtils.write(D,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";D.appendChild(N);mxUtils.write(D,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");
+L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";D.appendChild(L);mxUtils.br(D)}var I=this.addCheckbox(D,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=t?null:this.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);H=this.editor.graph;var ia=t?null:this.addCheckbox(D,mxResources.get("transparentBackground"),H.background==mxConstants.NONE||null==H.background);null!=ia&&(ia.style.marginBottom=
+"16px");c=new CustomDialog(this,D,mxUtils.bind(this,function(){var fa=parseInt(N.value)/100||1,ba=parseInt(L.value)||0;l(!I.checked,null!=Z?Z.checked:!1,null!=ia?ia.checked:!1,fa,ba)}),null,c,f);this.showDialog(c.container,300,(q?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,q,D,H,N,L){H=null!=H?H:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var Z=this.editor.graph,ia="jpeg"==N||"webp"==N?220:320,fa=document.createElement("h3");
+mxUtils.write(fa,c);fa.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(fa);mxUtils.write(I,mxResources.get("zoom")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value=this.lastExportZoom||"100%";I.appendChild(ba);mxUtils.write(I,mxResources.get("borderWidth")+":");var na=document.createElement("input");na.setAttribute("type",
+"text");na.style.marginRight="16px";na.style.width="60px";na.style.marginLeft="4px";na.value=this.lastExportBorder||"0";I.appendChild(na);mxUtils.br(I);var X=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),ca=document.createElement("input");ca.style.marginTop="16px";ca.style.marginRight="8px";ca.style.marginLeft="24px";ca.setAttribute("disabled","disabled");ca.setAttribute("type","checkbox");var ka=document.createElement("select");ka.style.marginTop="16px";ka.style.marginLeft=
+"8px";c=["selectionOnly","diagram","page"];for(fa=0;fa<c.length;fa++)if(!Z.isSelectionEmpty()||"selectionOnly"!=c[fa]){var da=document.createElement("option");mxUtils.write(da,mxResources.get(c[fa]));da.setAttribute("value",c[fa]);ka.appendChild(da)}L?(mxUtils.write(I,mxResources.get("size")+":"),I.appendChild(ka),mxUtils.br(I),ia+=26,mxEvent.addListener(ka,"change",function(){"selectionOnly"==ka.value&&(X.checked=!0)})):D&&(I.appendChild(ca),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),
+ia+=30,mxEvent.addListener(X,"change",function(){X.checked?ca.removeAttribute("disabled"):ca.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?L&&(X.style.display="none",X.nextSibling.style.display="none",X.nextSibling.nextSibling.style.display="none",ia-=30):(ka.value="diagram",ca.setAttribute("checked","checked"),ca.defaultChecked=!0,mxEvent.addListener(X,"change",function(){ka.value=X.checked?"selectionOnly":"diagram"}));var W=this.addCheckbox(I,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=N&&"webp"!=N),S=document.createElement("select");S.style.maxWidth="260px";S.style.marginLeft="8px";S.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));S.appendChild(D);L=document.createElement("option");L.setAttribute("value","dark");mxUtils.write(L,mxResources.get("dark"));S.appendChild(L);"svg"==N&&mxUtils.lightDarkColorSupported?(D=document.createElement("option"),D.setAttribute("value","auto"),
+mxUtils.write(D,mxResources.get("automatic")),D.setAttribute("selected","selected"),S.appendChild(D)):Editor.isDarkMode()?L.setAttribute("selected","selected"):D.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(S);mxUtils.br(I);ia+=26;var k=this.addCheckbox(I,mxResources.get("shadow"),Z.shadowVisible),B=null;if("png"==N||"jpeg"==N||"webp"==N)B=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ia+=30;Z=null!=
+this.pages?this.pages.length:1;var K=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+(1<Z?":":""),H,null,null,"jpeg"!=N&&"webp"!=N),T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="28px";"png"==N||"svg"==N?(H=function(){K.checked?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")},D=document.createElement("option"),D.setAttribute("value","allPages"),mxUtils.write(D,mxResources.get("allPages")),T.appendChild(D),D=document.createElement("option"),
+D.setAttribute("value","currentPage"),mxUtils.write(D,mxResources.get("currentPage")),T.appendChild(D),1<Z&&(K.style.marginBottom="12px",T.style.marginBottom="16px",I.appendChild(T),mxUtils.br(I),ia+=20),null!=this.lastEmbedInclude&&(T.value=this.lastEmbedInclude),mxEvent.addListener(K,"change",H),H()):K.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var U=document.createElement("input");U.style.marginBottom=
+"16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");f&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(P),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),U.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(U),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),ia+=50);var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";D=document.createElement("option");D.setAttribute("value",
+"auto");mxUtils.write(D,mxResources.get("automatic"));Y.appendChild(D);H=document.createElement("option");H.setAttribute("value","blank");mxUtils.write(H,mxResources.get("openInNewWindow"));Y.appendChild(H);H=document.createElement("option");H.setAttribute("value","self");mxUtils.write(H,mxResources.get("openInThisWindow"));Y.appendChild(H);H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+
+":"),I.appendChild(Y),I.appendChild(H),mxUtils.br(I),mxUtils.br(I),ia+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=na.value;this.lastExportZoom=ba.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=U.checked;this.lastEmbedInclude=T.value;q(ba.value,W.checked,!X.checked,k.checked,K.checked,P.checked&&f,na.value,ca.checked,("png"==N||"svg"==N)&&"currentPage"==T.value,Y.value,null!=B?B.checked:null,null!=S?S.value:null,ka.value,U.checked)}),null,l,t);this.showDialog(l.container,
+340,ia,!0,!0,null,null,null,null,!0);ba.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,q){var D=document.createElement("div");D.style.whiteSpace="nowrap";var H=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(N)}var L=this.addCheckbox(D,mxResources.get("fit"),
+!0),I=this.addCheckbox(D,mxResources.get("shadow"),H.shadowVisible&&t,!t),Z=this.addCheckbox(D,l),ia=this.addCheckbox(D,mxResources.get("lightbox"),!0),fa=this.addEditButton(D,ia),ba=fa.getEditInput(),na=1<H.model.getChildCount(H.model.getRoot()),X=this.addCheckbox(D,mxResources.get("layers"),na,!na);X.style.marginLeft=ba.style.marginLeft;X.style.marginBottom="12px";X.style.marginTop="8px";mxEvent.addListener(ia,"change",function(){ia.checked?(na&&X.removeAttribute("disabled"),ba.removeAttribute("disabled")):
+(X.setAttribute("disabled","disabled"),ba.setAttribute("disabled","disabled"));ba.checked&&ia.checked?fa.getEditSelect().removeAttribute("disabled"):fa.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,D,mxUtils.bind(this,function(){c(L.checked,I.checked,Z.checked,ia.checked,fa.getLink(),X.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,q,D,H,N){function L(ba){var na=" ",X="";t&&
+(na=" 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!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",X+="cursor:pointer;");c&&(X+="max-width:100%;");var ca="";l&&
+(ca=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');H('<img src="'+ba+'"'+ca+(""!=X?' style="'+X+'"':"")+na+"/>")}var I=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ba){var na=t?this.getFileData(!0):null;ba=this.createImageDataUri(ba,na,"png");L(ba)}),null,null,null,mxUtils.bind(this,function(ba){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);
+else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ia="";l&&(ia="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var fa=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ia+"&xml="+encodeURIComponent(f));fa.send(mxUtils.bind(this,function(){200<=fa.getStatus()&&299>=fa.getStatus()?L("data:image/png;base64,"+fa.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
+function(c,f,l,t,q,D,H){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),L=N.getElementsByTagName("a");if(null!=L)for(var I=0;I<L.length;I++){var Z=L[I].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==L[I].getAttribute("target")&&L[I].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ia=" ",fa="";t&&(ia="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"+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}})(this);\"",fa+="cursor:pointer;");c&&(fa+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(ba){H('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ba))+'"'+(""!=fa?' style="'+fa+'"':"")+ia+"/>")}))}else fa="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(D?"&layers=1":"")+"');}}})(this);"),fa+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),q=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+q),fa+="max-width:100%;max-height:"+q+"px;",N.removeAttribute("height")),""!=fa&&N.setAttribute("style",fa),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),H(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==
c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(D){return"page"==D?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==D?1:q.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(D){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,q){try{var D=this.editor.graph,H=null;if(null!=l&&0<l.length)D=this.createTemporaryGraph(D.getStylesheet()),document.body.appendChild(D.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),D),H=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){D=this.createTemporaryGraph(D.getStylesheet());var N=D.getGlobalVariable;D.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&D.setBackgroundImage(L.viewState.backgroundImage);D.getGlobalVariable=function(J){return"page"==J?L.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(D.container);
-D.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Y=J.toDataURL("image/png");Y=Editor.writeGraphModelToPng(Y,"tEXt","mxfile",encodeURIComponent(H));c(Y.substring(Y.lastIndexOf(",")+1));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container)}catch(ha){null!=f&&f(ha)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,D.shadowVisible,null,D,q,
-null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){N=null!=N?N:!0;Y=null!=Y?Y:0;H=null!=L?L:f.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==f.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);D=f.getSvg(H,J,Y,null,null,D,null,L,null,f.shadowVisible||ha,null,ea,"diagram");(f.shadowVisible||ha)&&f.addSvgShadow(D,null,null,0==Y);null!=c&&D.setAttribute("content",c);null!=l&&D.setAttribute("resource",
-l);var aa=mxUtils.bind(this,function(na){na=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=q&&q(na);return na});f.mathEnabled&&this.editor.addMathCss(D);if(null!=q)this.embedFonts(D,mxUtils.bind(this,function(na){N?this.editor.convertImages(na,mxUtils.bind(this,function(W){aa(W)})):aa(na)}));else return aa(D)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,q,D,H,N,L,J,Y,ha,ea)}));this.handleError(na)}))){var aa=
-this.editor.graph.isSelectionEmpty();l=null!=l?l:aa;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,q?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,D):null,L,null==this.pages||0==this.pages.length,Y)}catch(W){this.handleError(W)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,f,t,null,null,D,H,J,ha,
-ea)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,q,D,H){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();try{var J=
-mxUtils.parseXml(c);c={};var Y=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=Y&&"mxfile"==Y.nodeName&&null!=this.pages){var ha=Y.getElementsByTagName("diagram");if(1==ha.length&&!D){if(Y=Editor.parseDiagramNode(ha[0]),null!=this.currentPage&&(c[ha[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=ha[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ea))}}else if(0<ha.length){D=[];var aa=
-0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ha[0].getAttribute("id")]=this.pages[0].getId(),ea=ha[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),Y=Editor.parseDiagramNode(ha[0]),t=!1,aa=1);for(;aa<ha.length;aa++){var na=ha[aa].getAttribute("id");ha[aa].removeAttribute("id");var W=this.updatePageRoot(new DiagramPage(ha[aa]));c[na]=ha[aa].getAttribute("id");var ba=this.pages.length;null==W.getName()&&W.setName(mxResources.get("pageWithNumber",
-[ba+1]));L.model.execute(new ChangePage(this,W,W,ba,!0));D.push(W)}this.updatePageLinks(c,D)}}if(null!=Y&&"mxGraphModel"===Y.nodeName){N=L.importGraphModel(Y,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),aa=0;aa<N.length;aa++)this.updatePageLinksForCell(c,N[aa]);var ja=L.parseBackgroundImage(Y.getAttribute("backgroundImage"));if(null!=ja&&null!=ja.originalSrc){this.updateBackgroundPageLink(c,ja);var ca=new ChangePageSetup(this,null,ja);ca.ignoreColor=!0;L.model.execute(ca)}}H&&L.pasteCellStyles(L.includeDescendants(N),
-L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(la){if(q)throw la;this.handleError(la)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=
+!0),D),H=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){D=this.createTemporaryGraph(D.getStylesheet());var N=D.getGlobalVariable;D.setBackgroundImage=this.editor.graph.setBackgroundImage;var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(this.editor.graph.backgroundImage):null!=L.viewState&&null!=L.viewState&&D.setBackgroundImage(L.viewState.backgroundImage);D.getGlobalVariable=function(I){return"page"==I?L.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(D.container);
+D.model.setRoot(L.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==H&&(H=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var Z=I.toDataURL("image/png");Z=Editor.writeGraphModelToPng(Z,"tEXt","mxfile",encodeURIComponent(H));c(Z.substring(Z.lastIndexOf(",")+1));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container)}catch(ia){null!=f&&f(ia)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,D.shadowVisible,null,D,q,
+null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){N=null!=N?N:!0;Z=null!=Z?Z:0;H=null!=L?L:f.background;H==mxConstants.NONE&&(H=null);null==H&&"none"==f.getAdaptiveColors()&&(H="#ffffff");L=this.editor.graph.createSvgImageExport(null!=c);D=f.getSvg(H,I,Z,null,null,D,null,L,null,f.shadowVisible||ia,null,fa,"diagram");(f.shadowVisible||ia)&&f.addSvgShadow(D,null,null,0==Z);null!=c&&D.setAttribute("content",c);null!=l&&D.setAttribute("resource",
+l);var ba=mxUtils.bind(this,function(na){na=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(na);null!=q&&q(na);return na});f.mathEnabled&&this.editor.addMathCss(D);if(null!=q)this.embedFonts(D,mxUtils.bind(this,function(na){N?this.editor.convertImages(na,mxUtils.bind(this,function(X){ba(X)})):ba(na)}));else return ba(D)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
+this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(na){Editor.addRetryToError(na,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,q,D,H,N,L,I,Z,ia,fa)}));this.handleError(na)}))){var ba=
+this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(na){this.spinner.stop();try{this.saveCanvas(na,q?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,D):null,L,null==this.pages||0==this.pages.length,Z)}catch(X){this.handleError(X)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(na){this.spinner.stop();this.handleError(na)}),null,l,c||1,f,t,null,null,D,H,I,ia,
+fa)}catch(na){this.spinner.stop(),this.handleError(na)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,q,D,H){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var L=this.editor.graph;if(null!=c&&0<c.length){L.model.beginUpdate();try{var I=
+mxUtils.parseXml(c);c={};var Z=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ia=Z.getElementsByTagName("diagram");if(1==ia.length&&!D){if(Z=Editor.parseDiagramNode(ia[0]),null!=this.currentPage&&(c[ia[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var fa=ia[0].getAttribute("name");null!=fa&&""!=fa&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,fa))}}else if(0<ia.length){D=[];var ba=
+0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ia[0].getAttribute("id")]=this.pages[0].getId(),fa=ia[0].getAttribute("name"),null!=fa&&""!=fa&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],fa)),Z=Editor.parseDiagramNode(ia[0]),t=!1,ba=1);for(;ba<ia.length;ba++){var na=ia[ba].getAttribute("id");ia[ba].removeAttribute("id");var X=this.updatePageRoot(new DiagramPage(ia[ba]));c[na]=ia[ba].getAttribute("id");var ca=this.pages.length;null==X.getName()&&X.setName(mxResources.get("pageWithNumber",
+[ca+1]));L.model.execute(new ChangePage(this,X,X,ca,!0));D.push(X)}this.updatePageLinks(c,D)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){N=L.importGraphModel(Z,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),ba=0;ba<N.length;ba++)this.updatePageLinksForCell(c,N[ba]);var ka=L.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ka&&null!=ka.originalSrc){this.updateBackgroundPageLink(c,ka);var da=new ChangePageSetup(this,null,ka);da.ignoreColor=!0;L.model.execute(da)}}H&&L.pasteCellStyles(L.includeDescendants(N),
+L.defaultVertexStyle,L.defaultEdgeStyle)}finally{L.model.endUpdate()}}}catch(W){if(q)throw W;this.handleError(W)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=
l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,q=t.getLinkForCell(f);null!=q&&t.setLinkForCell(f,this.updatePageLink(c,q));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var D=l.getElementsByTagName("a"),H=!1,N=0;N<D.length;N++)q=D[N].getAttribute("href"),null!=q&&(D[N].setAttribute("href",this.updatePageLink(c,q)),H=!0);H&&t.labelChanged(f,l.innerHTML)}for(N=
0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var q=0;q<t.actions.length;q++){var D=t.actions[q];if(null!=D.open&&Graph.isPageLink(D.open)){var H=D.open.substring(D.open.indexOf(",")+1);l=c[H];null!=l?D.open=
-"data:page/id,"+l:null==this.getPageById(H)&&delete D.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,q){var D=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=l?l(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){t=null!=t?t:c.name;var N=mxUtils.bind(this,function(J){H.clear()&&
-D(J)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var Y=t.lastIndexOf(".");if(0<=Y&&Y<t.length)t.substring(Y+1).toUpperCase();else{var ha=t.lastIndexOf("/");0<=ha&&ha<t.length&&(t=t.substring(ha+1))}}catch(aa){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;J.append("file1",c,t);var ea=
-new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=q&&ea.setRequestHeader("x-convert-custom",q);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&H.clear())if(200<=ea.status&&299>=ea.status)try{var aa=ea.response;if("text/xml"==aa.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(W){try{f(W.target.result)}catch(ba){N({message:mxResources.get("errorLoadingFile")})}});
-na.readAsText(aa)}else this.doImportVisio(aa,f,N,t)}catch(W){N(W)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(na=new FileReader,na.onload=function(){try{N({message:JSON.parse(na.result).Message})}catch(W){N(W)}},na.readAsText(ea.response))}catch(W){N({})}});ea.send(J)}else if(H.clear())try{this.doImportVisio(c,f,N,t)}catch(aa){N(aa)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
+"data:page/id,"+l:null==this.getPageById(H)&&delete D.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,q){var D=mxUtils.bind(this,function(H){this.loadingExtensions=!1;null!=l?l(H):this.handleError(H)});this.createTimeout(null,mxUtils.bind(this,function(H){t=null!=t?t:c.name;var N=mxUtils.bind(this,function(I){H.clear()&&
+D(I)}),L=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var Z=t.lastIndexOf(".");if(0<=Z&&Z<t.length)t.substring(Z+1).toUpperCase();else{var ia=t.lastIndexOf("/");0<=ia&&ia<t.length&&(t=t.substring(ia+1))}}catch(ba){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",c,t);var fa=
+new XMLHttpRequest;fa.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));fa.responseType="blob";this.addRemoteServiceSecurityCheck(fa);null!=q&&fa.setRequestHeader("x-convert-custom",q);fa.onreadystatechange=mxUtils.bind(this,function(){if(4==fa.readyState&&H.clear())if(200<=fa.status&&299>=fa.status)try{var ba=fa.response;if("text/xml"==ba.type){var na=new FileReader;na.onload=mxUtils.bind(this,function(X){try{f(X.target.result)}catch(ca){N({message:mxResources.get("errorLoadingFile")})}});
+na.readAsText(ba)}else this.doImportVisio(ba,f,N,t)}catch(X){N(X)}else try{""==fa.responseType||"text"==fa.responseType?N({message:fa.responseText}):(na=new FileReader,na.onload=function(){try{N({message:JSON.parse(na.result).Message})}catch(X){N(X)}},na.readAsText(fa.response))}catch(X){N({})}});fa.send(I)}else if(H.clear())try{this.doImportVisio(c,f,N,t)}catch(ba){N(ba)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
L():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",L,null,null,null,N))}),D)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=l?l(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(N){q.clear()&&t(N)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){D(N)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?H():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.vsdxExportEnabled()?this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(D){l.clear()&&f(D)}),
q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(D){t(D)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(q,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,
t))}),f):f({message:mxResources.get("serviceUnavailableOrBlocked")})}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(q){this.loadingExtensions=!1;null!=l?l(q):this.handleError(q)});this.createTimeout(null,mxUtils.bind(this,function(q){var D=mxUtils.bind(this,function(N){q.clear()&&t(N)}),H=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(q.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=
-window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&L.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)L.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&L.push(N.thumb);console.log.apply(console,L)}}catch(Y){}}catch(Y){null!=window.console&&console.error(Y),D(Y)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?
+window.console&&"1"==urlParams.test){var L=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&L.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)L.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&L.push(N.thumb);console.log.apply(console,L)}}catch(Z){}}catch(Z){null!=window.console&&console.error(Z),D(Z)}else D({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?
window.setTimeout(H,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",H,null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D)},null,null,null,D):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",H,null,null,null,D))}),
t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,q,D){var H=new Graph(document.createElement("div"));l=H.insertVertex(null,null,null,0,0,t,q,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");H.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=D&&H.setAttributeForCell(l,"templatePrompt",D);c=(new mxCodec).encode(H.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,q=function(){for(var H=
-document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),N=0;N<H.length;N++)null!=H[N].parentNode&&H[N].parentNode.removeChild(H[N])},D=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var N=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(J){H.clear()&&(q(),l(J))});N.send(mxUtils.bind(this,function(J){if(H.isAlive())if(200<=J.getStatus()&&299>=J.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ha=mxUtils.trim(J.getText());
-this.generateMermaidImage(ha,null,mxUtils.bind(this,function(ea,aa,na){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ha]),q(),f(ha,ea,aa,na))}),L)}),L,mxUtils.bind(this,function(ea){3>t++?H.clear()&&D():L(ea)}))}),L);else{var Y={message:mxResources.get("error")+" "+J.getStatus()};try{Y=JSON.parse(J.getText()),Y=Y.error}catch(ha){}L(Y)}}),L)}),l)});D()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=
+document.querySelectorAll('div[id*="dgeMermaidOutput-"]'),N=0;N<H.length;N++)null!=H[N].parentNode&&H[N].parentNode.removeChild(H[N])},D=mxUtils.bind(this,function(){this.createTimeout(3E4,mxUtils.bind(this,function(H){var N=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),L=mxUtils.bind(this,function(I){H.clear()&&(q(),l(I))});N.send(mxUtils.bind(this,function(I){if(H.isAlive())if(200<=I.getStatus()&&299>=I.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ia=mxUtils.trim(I.getText());
+this.generateMermaidImage(ia,null,mxUtils.bind(this,function(fa,ba,na){this.tryAndHandle(mxUtils.bind(this,function(){H.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram",[this],"prompt",[c],"result",[ia]),q(),f(ia,fa,ba,na))}),L)}),L,mxUtils.bind(this,function(fa){3>t++?H.clear()&&D():L(fa)}))}),L);else{var Z={message:mxResources.get("error")+" "+I.getStatus()};try{Z=JSON.parse(I.getText()),Z=Z.error}catch(ia){}L(Z)}}),L)}),l)});D()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=
mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");
l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(q){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,q){var D=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),H=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel=
-"strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var J=mxUtils.parseXml(L).getElementsByTagName("svg");
-if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var Y=parseFloat(J[0].getAttribute("width")),ha=parseFloat(J[0].getAttribute("height"));if(isNaN(Y)||isNaN(ha))try{var ea=J[0].getAttribute("viewBox").split(/\s+/);Y=parseFloat(ea[2]);ha=parseFloat(ea[3])}catch(aa){Y=Y||100,ha=ha||100}l(this.convertDataUri(Editor.createSvgDataUri(L)),Y,ha)}else null!=q?q():t({message:mxResources.get("invalidInput")})}catch(aa){t(aa)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+
+"strict";f.startOnLoad=!1;f.maxTextSize=9E5;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');L=L.replace(/xlink:href/g,"href").replace(/<br>/g,"<br/>");var I=mxUtils.parseXml(L).getElementsByTagName("svg");
+if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var Z=parseFloat(I[0].getAttribute("width")),ia=parseFloat(I[0].getAttribute("height"));if(isNaN(Z)||isNaN(ia))try{var fa=I[0].getAttribute("viewBox").split(/\s+/);Z=parseFloat(fa[2]);ia=parseFloat(fa[3])}catch(ba){Z=Z||100,ia=ia||100}l(this.convertDataUri(Editor.createSvgDataUri(L)),Z,ia)}else null!=q?q():t({message:mxResources.get("invalidInput")})}catch(ba){t(ba)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+
(new Date).getTime(),c).then(function(L){N(L.svg)}).catch(function(L){null!=q?q(L):t(L)})}catch(L){t(L)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(H,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",H,null,null,null,D)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",
-H,null,null,null,D))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function q(N,L,J){c1=N>>2;c2=(N&3)<<4|L>>4;c3=(L&15)<<2|J>>6;c4=J&63;r="";r+=D(c1&63);r+=D(c2&63);r+=D(c3&63);return r+=D(c4&63)}function D(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+
-function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+q(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+q(N.charCodeAt(i),0,0):r+q(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(J){var Y=new Image;Y.onload=function(){try{var ha=
-Y.width,ea=Y.height;if(0==ha&&0==ea){var aa=L.result,na=aa.indexOf(","),W=decodeURIComponent(escape(atob(aa.substring(na+1)))),ba=mxUtils.parseXml(W).getElementsByTagName("svg");0<ba.length&&(ha=parseFloat(ba[0].getAttribute("width")),ea=parseFloat(ba[0].getAttribute("height")))}l(L.result,ha,ea)}catch(ja){t(ja)}};Y.src=L.result};L.onerror=function(J){t(J)}}else t(N)};H.onerror=function(N){t(N)};H.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,q=null;t.getModel().beginUpdate();
-try{q=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(q,!0)}finally{t.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==
-ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=J&&0<J.length)return this.importXml(J,f,l,D,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,
-f,l,D,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var Y=this.importXml(J,f,l,D,!0,N);if(0<Y.length)return Y}catch(ea){}this.loadImage(c,mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(W,ba,ja){L.setSelectionCell(L.insertVertex(null,
-null,"",L.snap(f),L.snap(l),ba,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(W)+";"))}),H,this.maxImageSize);else{var aa=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),na=Math.round(ea.width*aa);ea=Math.round(ea.height*aa);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(f),L.snap(l),na,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var ea=null;L.getModel().beginUpdate();try{ea=L.insertVertex(L.getDefaultParent(),null,c,L.snap(f),L.snap(l),1,1,"text;"+(t?"html=1;":"")),L.updateCellSize(ea),L.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{L.getModel().endUpdate()}L.setSelectionCell(ea)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,D,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,D,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{L=this.editor.graph;q=null;L.getModel().beginUpdate();try{q=L.insertVertex(L.getDefaultParent(),null,"",L.snap(f),L.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[q]));t&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");q.value=c;L.updateCellSize(q);if(0<
-this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ha=L.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ha.width;q.geometry.height=ha.height}Graph.isLink(q.value)&&L.setLinkForCell(q,q.value);q.geometry.width+=L.gridSize;q.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
+H,null,null,null,D))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function q(N,L,I){c1=N>>2;c2=(N&3)<<4|L>>4;c3=(L&15)<<2|I>>6;c4=I&63;r="";r+=D(c1&63);r+=D(c2&63);r+=D(c3&63);return r+=D(c4&63)}function D(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var H=new XMLHttpRequest;H.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+
+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+q(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+q(N.charCodeAt(i),0,0):r+q(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(H.responseType="blob");H.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(I){var Z=new Image;Z.onload=function(){try{var ia=
+Z.width,fa=Z.height;if(0==ia&&0==fa){var ba=L.result,na=ba.indexOf(","),X=decodeURIComponent(escape(atob(ba.substring(na+1)))),ca=mxUtils.parseXml(X).getElementsByTagName("svg");0<ca.length&&(ia=parseFloat(ca[0].getAttribute("width")),fa=parseFloat(ca[0].getAttribute("height")))}l(L.result,ia,fa)}catch(ka){t(ka)}};Z.src=L.result};L.onerror=function(I){t(I)}}else t(N)};H.onerror=function(N){t(N)};H.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,q=null;t.getModel().beginUpdate();
+try{q=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(q,!0)}finally{t.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(c,f,l,t,q,D,H,N){D=null!=D?D:!0;H=null!=H?H:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(fa){4==
+fa.readyState&&200<=fa.status&&299>=fa.status&&this.editor.graph.setSelectionCells(this.insertTextAt(fa.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var L=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=I&&0<I.length)return this.importXml(I,f,l,D,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,
+f,l,D,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var Z=this.importXml(I,f,l,D,!0,N);if(0<Z.length)return Z}catch(fa){}this.loadImage(c,mxUtils.bind(this,function(fa){if("data:"==c.substring(0,5))this.resizeImage(fa,c,mxUtils.bind(this,function(X,ca,ka){L.setSelectionCell(L.insertVertex(null,
+null,"",L.snap(f),L.snap(l),ca,ka,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(X)+";"))}),H,this.maxImageSize);else{var ba=Math.min(1,Math.min(this.maxImageSize/fa.width,this.maxImageSize/fa.height)),na=Math.round(fa.width*ba);fa=Math.round(fa.height*ba);L.setSelectionCell(L.insertVertex(null,null,"",L.snap(f),L.snap(l),na,fa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var fa=null;L.getModel().beginUpdate();try{fa=L.insertVertex(L.getDefaultParent(),null,c,L.snap(f),L.snap(l),1,1,"text;"+(t?"html=1;":"")),L.updateCellSize(fa),L.fireEvent(new mxEventObject("textInserted","cells",[fa]))}finally{L.getModel().endUpdate()}L.setSelectionCell(fa)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,D,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(fa){this.editor.graph.setSelectionCells(this.importXml(fa,f,l,D,null,N))}),mxUtils.bind(this,function(fa){this.handleError(fa)}));else{L=this.editor.graph;q=null;L.getModel().beginUpdate();try{q=L.insertVertex(L.getDefaultParent(),null,"",L.snap(f),L.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));L.fireEvent(new mxEventObject("textInserted","cells",[q]));t&&(c=L.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");q.value=c;L.updateCellSize(q);if(0<
+this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ia=L.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ia.width;q.geometry.height=ia.height}Graph.isLink(q.value)&&L.setLinkForCell(q,q.value);q.geometry.width+=L.gridSize;q.geometry.height+=L.gridSize}finally{L.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=
function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=
document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(H,N){StorageFile.listFiles(this,"F",H,N)});window.openBrowserFile=
mxUtils.bind(this,function(H,N,L){StorageFile.getFileContent(this,H,N,L)});window.deleteBrowserFile=mxUtils.bind(this,function(H,N,L){StorageFile.deleteFile(this,H,N,L)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(H){this.hideDialog(H)}));window.openFile.setConsumer(mxUtils.bind(this,function(H,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(H=new Blob([H],{type:"application/octet-stream"}),this.importVisio(H,
mxUtils.bind(this,function(L){this.importXml(L,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(H,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 q=this.dialog,D=q.close;this.dialog.close=mxUtils.bind(this,function(H){Editor.useLocalStorage=t;D.apply(q,arguments);H&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,f,l){var t=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(D){if(mxUtils.isEmptyObject(D.files))l();else{var H=0,N,L=!1;D.forEach(function(J,Y){J=Y.name.toLowerCase();"diagram/diagram.xml"==J?(L=!0,Y.async("string").then(function(ha){0==ha.indexOf("<mxfile ")?f(ha):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>H&&(H=J,N=Y))});0<H?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,
-c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?f(Y.responseText):l())}),c.name):l()}):L||l()}},function(D){l(D)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,q,D,H,
-N,L,J,Y,ha){J=null!=J?J:!0;var ea=!1,aa=null,na=mxUtils.bind(this,function(W){var ba=null;null!=W&&"<mxlibrary"==W.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,W,H)),this.showSidebar()):ba=this.importXml(W,l,t,J,null,null!=ha?mxEvent.isControlDown(ha):null);null!=N&&N(ba)});"image"==f.substring(0,5)?(L=!1,"image/png"==f.substring(0,9)&&(Y=Y?null:this.extractGraphModelFromPng(c),null!=Y&&0<Y.length&&(aa=this.importXml(Y,l,t,J,null,null!=ha?mxEvent.isControlDown(ha):null),L=!0)),L||(L=this.editor.graph,
-Y=c.indexOf(";"),0<Y&&(c=c.substring(0,Y)+c.substring(c.indexOf(",",Y+1))),J&&L.isGridEnabled()&&(l=L.snap(l),t=L.snap(t)),Y="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Y+="editableCssRules=.*;"),aa=[L.insertVertex(null,null,"",l,t,q,D,Y+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,na)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(ea=!0,this.importVisio(L,na)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(W){4==W.readyState&&(200<=W.status&&299>=W.status?na(W.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==W.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,H):this.parseFile(L,f,H)):0==c.indexOf("PK")&&null!=L?(ea=!0,this.importZipFile(L,na,mxUtils.bind(this,
-function(){aa=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(aa)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(aa=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ha?mxEvent.isControlDown(ha):null));ea||null==N||N(aa);return aa};EditorUi.prototype.importFiles=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var aa=null!=f&&null!=l,na=!0;f=null!=f?f:0;l=null!=l?l:0;var W=!1;if(!mxClient.IS_CHROMEAPP&&
-null!=c)for(var ba=Y||this.resampleThreshold,ja=0;ja<c.length;ja++)if("image/svg"!==c[ja].type.substring(0,9)&&"image/"===c[ja].type.substring(0,6)&&c[ja].size>ba){W=!0;break}var ca=mxUtils.bind(this,function(){var la=this.editor.graph,Q=la.gridSize;q=null!=q?q:mxUtils.bind(this,function(T,X,Z,ka,va,ua,qa,Ba,ya){try{if(null!=T&&"<mxlibrary"==T.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,T,qa)),this.showSidebar(),null;this.isCompatibleString(T)&&1==c.length&&null!=
-ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(aa=!1,ka=Z=0);return this.importFile(T,X,Z,ka,va,ua,qa,Ba,ya,aa,ha,ea)}catch(La){return this.handleError(La),null}});D=null!=D?D:mxUtils.bind(this,function(T){la.setSelectionCells(T)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=c.length,B=k,I=[],U=mxUtils.bind(this,function(T,X){I[T]=X;if(0==--B){this.spinner.stop();if(null!=N)N(I);else{var Z=[];la.getModel().beginUpdate();try{for(T=0;T<I.length;T++){var ka=I[T]();
-null!=ka&&(Z=Z.concat(ka))}}finally{la.getModel().endUpdate()}}D(Z)}}),P=0;P<k;P++)mxUtils.bind(this,function(T){var X=c[T];if(null!=X){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(ka){if(null==H||H(X))try{if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var va=Graph.clipSvgDataUri(ka.target.result),ua=va.indexOf(","),qa=decodeURIComponent(escape(atob(va.substring(ua+1)))),Ba=mxUtils.parseXml(qa),ya=Ba.getElementsByTagName("svg");if(0<ya.length){var La=ya[0],za=
-ha?null:La.getAttribute("content");null!=za&&"<"!=za.charAt(0)&&"%"!=za.charAt(0)&&(za=unescape(window.atob?atob(za):Base64.decode(za,!0)));null!=za&&"%"==za.charAt(0)&&(za=decodeURIComponent(za));null==za||"<mxfile "!==za.substring(0,8)&&"<mxGraphModel "!==za.substring(0,14)?U(T,mxUtils.bind(this,function(){try{if(null!=Ba){var Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var Aa=Ca[0],wa=Aa.getAttribute("width"),Xa=Aa.getAttribute("height");wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):
-NaN;Xa=null!=Xa&&"%"!=Xa.charAt(Xa.length-1)?parseFloat(Xa):NaN;var Qa=Aa.getAttribute("viewBox");if(null==Qa||0==Qa.length)Aa.setAttribute("viewBox","0 0 "+wa+" "+Xa);else if(isNaN(wa)||isNaN(Xa)){var Ra=Qa.split(" ");3<Ra.length&&(wa=parseFloat(Ra[2]),Xa=parseFloat(Ra[3]))}va=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Sa=Math.min(1,Math.min(t/Math.max(1,wa)),t/Math.max(1,Xa)),Ha=q(va,X.type,f+T*Q,l+T*Q,Math.max(1,Math.round(wa*Sa)),Math.max(1,Math.round(Xa*Sa)),X.name);if(null!=Ha&&(isNaN(wa)||
-isNaN(Xa))){var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){wa=Math.max(1,Ma.width);Xa=Math.max(1,Ma.height);Ha[0].geometry.width=wa;Ha[0].geometry.height=Xa;Aa.setAttribute("viewBox","0 0 "+wa+" "+Xa);va=Editor.createSvgDataUri(mxUtils.getXml(Aa));var y=va.indexOf(";");0<y&&(va=va.substring(0,y)+va.substring(va.indexOf(",",y+1)));la.setCellStyles("image",va,[Ha[0]])});Ma.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Ha}}}catch(y){}return null})):U(T,mxUtils.bind(this,function(){return q(za,
-"text/xml",f+T*Q,l+T*Q,0,0,X.name)}))}else U(T,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==X.type){var Ea=ha?null:this.extractGraphModelFromPng(ka.target.result);if(null!=Ea&&0<Ea.length){var pa=new Image;pa.src=ka.target.result;U(T,mxUtils.bind(this,function(){return q(Ea,"text/xml",f+T*Q,l+T*Q,pa.width,pa.height,X.name)}));ua=!0}}ua||(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(ka.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,ka.target.result,mxUtils.bind(this,function(Aa,wa,Xa){U(T,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<J){var Qa=na&&this.isResampleImageSize(X.size,Y)?Math.min(1,Math.min(t/wa,t/Xa)):1;return q(Aa,X.type,f+T*Q,l+T*Q,Math.round(wa*Qa),Math.round(Xa*Qa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),na,t,Y,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else va=ka.target.result,q(va,X.type,f+T*Q,l+T*Q,240,160,X.name,function(Ca){U(T,function(){return Ca})},X)}catch(Ca){U(T,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,X)}else U(T,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(X.name)?q(null,X.type,f+T*Q,l+T*Q,240,160,X.name,function(ka){U(T,function(){return ka})},
-X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?Z.readAsDataURL(X):Z.readAsText(X)}})(P)});if(W){W=[];for(ja=0;ja<c.length;ja++)W.push(c[ja]);c=W;this.confirmImageResize(function(la){na=la;ca()},L)}else ca()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?
+function(c,f,l){var t=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(D){if(mxUtils.isEmptyObject(D.files))l();else{var H=0,N,L=!1;D.forEach(function(I,Z){I=Z.name.toLowerCase();"diagram/diagram.xml"==I?(L=!0,Z.async("string").then(function(ia){0==ia.indexOf("<mxfile ")?f(ia):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>H&&(H=I,N=Z))});0<H?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,
+c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):l())}),c.name):l()}):L||l()}},function(D){l(D)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",q,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,q,D,H,
+N,L,I,Z,ia){I=null!=I?I:!0;var fa=!1,ba=null,na=mxUtils.bind(this,function(X){var ca=null;null!=X&&"<mxlibrary"==X.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,X,H)),this.showSidebar()):ca=this.importXml(X,l,t,I,null,null!=ia?mxEvent.isControlDown(ia):null);null!=N&&N(ca)});"image"==f.substring(0,5)?(L=!1,"image/png"==f.substring(0,9)&&(Z=Z?null:this.extractGraphModelFromPng(c),null!=Z&&0<Z.length&&(ba=this.importXml(Z,l,t,I,null,null!=ia?mxEvent.isControlDown(ia):null),L=!0)),L||(L=this.editor.graph,
+Z=c.indexOf(";"),0<Z&&(c=c.substring(0,Z)+c.substring(c.indexOf(",",Z+1))),I&&L.isGridEnabled()&&(l=L.snap(l),t=L.snap(t)),Z="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(Z+="editableCssRules=.*;"),ba=[L.insertVertex(null,null,"",l,t,q,D,Z+"image="+c+";")])):/(\.*<graphml )/.test(c)?(fa=!0,this.importGraphML(c,na)):null!=L&&null!=H&&EditorUi.isVisioFilename(H)?(fa=!0,this.importVisio(L,na)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,H)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(fa=!0,f=mxUtils.bind(this,function(X){4==X.readyState&&(200<=X.status&&299>=X.status?na(X.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),413==X.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,H):this.parseFile(L,f,H)):0==c.indexOf("PK")&&null!=L?(fa=!0,this.importZipFile(L,na,mxUtils.bind(this,
+function(){ba=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(ba)}))):/(\.v(sd|dx))($|\?)/i.test(H)||/(\.vs(s|x))($|\?)/i.test(H)||(ba=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=ia?mxEvent.isControlDown(ia):null));fa||null==N||N(ba);return ba};EditorUi.prototype.importFiles=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var ba=null!=f&&null!=l,na=!0;f=null!=f?f:0;l=null!=l?l:0;var X=!1;if(!mxClient.IS_CHROMEAPP&&
+null!=c)for(var ca=Z||this.resampleThreshold,ka=0;ka<c.length;ka++)if("image/svg"!==c[ka].type.substring(0,9)&&"image/"===c[ka].type.substring(0,6)&&c[ka].size>ca){X=!0;break}var da=mxUtils.bind(this,function(){var W=this.editor.graph,S=W.gridSize;q=null!=q?q:mxUtils.bind(this,function(U,Y,aa,la,va,ua,qa,Ba,ya){try{if(null!=U&&"<mxlibrary"==U.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,qa)),this.showSidebar(),null;this.isCompatibleString(U)&&1==c.length&&null!=
+fa&&"drop"==fa.type&&this.isBlankFile()&&!this.canUndo()&&(ba=!1,la=aa=0);return this.importFile(U,Y,aa,la,va,ua,qa,Ba,ya,ba,ia,fa)}catch(La){return this.handleError(La),null}});D=null!=D?D:mxUtils.bind(this,function(U){W.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=c.length,B=k,K=[],T=mxUtils.bind(this,function(U,Y){K[U]=Y;if(0==--B){this.spinner.stop();if(null!=N)N(K);else{var aa=[];W.getModel().beginUpdate();try{for(U=0;U<K.length;U++){var la=
+K[U]();null!=la&&(aa=aa.concat(la))}}finally{W.getModel().endUpdate()}}D(aa)}}),P=0;P<k;P++)mxUtils.bind(this,function(U){var Y=c[U];if(null!=Y){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(la){if(null==H||H(Y))try{if("image/"==Y.type.substring(0,6))if("image/svg"==Y.type.substring(0,9)){var va=Graph.clipSvgDataUri(la.target.result),ua=va.indexOf(","),qa=decodeURIComponent(escape(atob(va.substring(ua+1)))),Ba=mxUtils.parseXml(qa),ya=Ba.getElementsByTagName("svg");if(0<ya.length){var La=
+ya[0],Aa=ia?null:La.getAttribute("content");null!=Aa&&"<"!=Aa.charAt(0)&&"%"!=Aa.charAt(0)&&(Aa=unescape(window.atob?atob(Aa):Base64.decode(Aa,!0)));null!=Aa&&"%"==Aa.charAt(0)&&(Aa=decodeURIComponent(Aa));null==Aa||"<mxfile "!==Aa.substring(0,8)&&"<mxGraphModel "!==Aa.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=Ba){var Ca=Ba.getElementsByTagName("svg");if(0<Ca.length){var za=Ca[0],wa=za.getAttribute("width"),Xa=za.getAttribute("height");wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?
+parseFloat(wa):NaN;Xa=null!=Xa&&"%"!=Xa.charAt(Xa.length-1)?parseFloat(Xa):NaN;var Qa=za.getAttribute("viewBox");if(null==Qa||0==Qa.length)za.setAttribute("viewBox","0 0 "+wa+" "+Xa);else if(isNaN(wa)||isNaN(Xa)){var Ra=Qa.split(" ");3<Ra.length&&(wa=parseFloat(Ra[2]),Xa=parseFloat(Ra[3]))}va=Editor.createSvgDataUri(mxUtils.getXml(za));var Sa=Math.min(1,Math.min(t/Math.max(1,wa)),t/Math.max(1,Xa)),Ha=q(va,Y.type,f+U*S,l+U*S,Math.max(1,Math.round(wa*Sa)),Math.max(1,Math.round(Xa*Sa)),Y.name);if(null!=
+Ha&&(isNaN(wa)||isNaN(Xa))){var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){wa=Math.max(1,Ma.width);Xa=Math.max(1,Ma.height);Ha[0].geometry.width=wa;Ha[0].geometry.height=Xa;za.setAttribute("viewBox","0 0 "+wa+" "+Xa);va=Editor.createSvgDataUri(mxUtils.getXml(za));var y=va.indexOf(";");0<y&&(va=va.substring(0,y)+va.substring(va.indexOf(",",y+1)));W.setCellStyles("image",va,[Ha[0]])});Ma.src=Editor.createSvgDataUri(mxUtils.getXml(za))}return Ha}}}catch(y){}return null})):T(U,mxUtils.bind(this,
+function(){return q(Aa,"text/xml",f+U*S,l+U*S,0,0,Y.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{ua=!1;if("image/png"==Y.type){var Ea=ia?null:this.extractGraphModelFromPng(la.target.result);if(null!=Ea&&0<Ea.length){var pa=new Image;pa.src=la.target.result;T(U,mxUtils.bind(this,function(){return q(Ea,"text/xml",f+U*S,l+U*S,pa.width,pa.height,Y.name)}));ua=!0}}ua||(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(la.target.result,mxUtils.bind(this,function(Ca){this.resizeImage(Ca,la.target.result,mxUtils.bind(this,function(za,wa,Xa){T(U,mxUtils.bind(this,function(){if(null!=za&&za.length<I){var Qa=na&&this.isResampleImageSize(Y.size,Z)?Math.min(1,Math.min(t/wa,t/Xa)):1;return q(za,Y.type,f+U*S,l+U*S,Math.round(wa*Qa),Math.round(Xa*Qa),Y.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),na,t,Z,Y.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else va=la.target.result,q(va,Y.type,f+U*S,l+U*S,240,160,Y.name,function(Ca){T(U,function(){return Ca})},Y)}catch(Ca){T(U,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(Ca,Y)}else T(U,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(Y.name)?q(null,Y.type,f+U*S,l+U*S,240,160,Y.name,function(la){T(U,function(){return la})},
+Y):"image"==Y.type.substring(0,5)||"application/pdf"==Y.type?aa.readAsDataURL(Y):aa.readAsText(Y)}})(P)});if(X){X=[];for(ka=0;ka<c.length;ka++)X.push(c[ka]);c=X;this.confirmImageResize(function(W){na=W;da()},L)}else da()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?
this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(D,H){if(D||f)mxSettings.setResizeImages(D?H:null),mxSettings.save();l();c(H)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(D){q(D,!0)},function(D){q(D,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',
isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):q(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+
-encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,q,D,H){q=null!=q?q:this.maxImageSize;var N=Math.max(1,c.width),L=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=H?H:f.length,D))try{var Y=Math.max(N/q,L/q);if(1<Y){var ha=Math.round(N/Y),ea=Math.round(L/
-Y),aa=document.createElement("canvas");aa.width=ha;aa.height=ea;aa.getContext("2d").drawImage(c,0,0,ha,ea);var na=aa.toDataURL();if(na.length<f.length){var W=document.createElement("canvas");W.width=ha;W.height=ea;var ba=W.toDataURL();na!==ba&&(f=na,N=ha,L=ea)}}}catch(ja){}t&&J!=f&&q>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,q/1.5,D,H):l(f,N,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=
+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,q,D,H){q=null!=q?q:this.maxImageSize;var N=Math.max(1,c.width),L=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=H?H:f.length,D))try{var Z=Math.max(N/q,L/q);if(1<Z){var ia=Math.round(N/Z),fa=Math.round(L/
+Z),ba=document.createElement("canvas");ba.width=ia;ba.height=fa;ba.getContext("2d").drawImage(c,0,0,ia,fa);var na=ba.toDataURL();if(na.length<f.length){var X=document.createElement("canvas");X.width=ia;X.height=fa;var ca=X.toDataURL();na!==ca&&(f=na,N=ia,L=fa)}}}catch(ka){}t&&I!=f&&q>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,q/1.5,D,H):l(f,N,L)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=
function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(q){if(null!=l)l(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var v=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());v.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,
-arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(Q){var k=Q.getEvent();return null==Q.getState()&&!mxEvent.isMouseEvent(k)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(k)&&(null==Q.getState()||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k))});f.cellEditor.editPlantUmlData=function(Q,k,B){var I=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(U){null!=U&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(U,
-I.format,function(P,T,X){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==I.format)f.labelChanged(Q,"<pre>"+P+"</pre>"),f.updateCellSize(Q,!0);else{f.setCellStyles("image",c.convertDataUri(P),[Q]);var Z=f.model.getGeometry(Q);null!=Z&&(Z=Z.clone(),Z.width=T,Z.height=X,f.cellsResized([Q],[Z],!1))}f.setAttributeForCell(Q,"plantUmlData",JSON.stringify({data:U,format:I.format}))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,
-300,!0,!0);k.init()};f.cellEditor.editMermaidData=function(Q,k,B){var I=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,function(U){null!=U&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(U,I.config,function(P,T,X){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[Q]);var Z=f.model.getGeometry(Q);null!=Z&&(Z=Z.clone(),Z.width=Math.max(Z.width,T),Z.height=Math.max(Z.height,X),f.cellsResized([Q],[Z],!1));f.setAttributeForCell(Q,
-"mermaidData",JSON.stringify({data:U,config:I.config},null,2))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(Q,k){try{var B=this.graph.getAttributeForCell(Q,"plantUmlData");if(null!=B)this.editPlantUmlData(Q,k,B);else if(B=this.graph.getAttributeForCell(Q,"mermaidData"),null!=B&&window.isMermaidEnabled)this.editMermaidData(Q,k,B);else{var I=f.getCellStyle(Q);
-"1"==mxUtils.getValue(I,"metaEdit","0")?c.showDataDialog(Q):t.apply(this,arguments)}}catch(U){c.handleError(U)}};f.getLinkTitle=function(Q){return c.getLinkTitle(Q)};f.customLinkClicked=function(Q,k){var B=!1;try{var I=this.getGraphBounds();c.handleCustomLink(Q,k);B=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(k))}catch(U){c.handleError(U)}return B};var q=f.parseBackgroundImage;f.parseBackgroundImage=function(Q){var k=q.apply(this,arguments);
-null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});return k};var D=f.setBackgroundImage;f.setBackgroundImage=function(Q){null!=Q&&null!=Q.originalSrc&&(Q=c.createImageForPageLink(Q.originalSrc,c.currentPage,this));D.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(Q,k){Q=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=Q){var B=Q.indexOf(",");if(0<B)for(Q=Q.substring(B+1),k=k.getProperty("patches"),B=0;B<k.length;B++)if(null!=k[B][EditorUi.DIFF_UPDATE]&&null!=k[B][EditorUi.DIFF_UPDATE][Q]||null!=k[B][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(k[B][EditorUi.DIFF_REMOVE],Q)){f.refreshBackgroundImage();break}}}));var H=f.getBackgroundImageObject;f.getBackgroundImageObject=function(Q,k){var B=H.apply(this,arguments);null!=B&&null!=B.originalSrc&&
-(B=k?c.createImageForPageLink(B.originalSrc,null,null,!0):{src:B.originalSrc});return B};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(Q){Q=null!=Q?Q:"";"1"==
-urlParams.dev&&(Q+=(0<Q.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(Q,k,B){var I=k;k=function(U,P,T){if(null==P){var X=mxEvent.getSource(U);"a"==X.nodeName.toLowerCase()&&(P=X.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(P,T)&&mxEvent.consume(U);null!=I&&I(U,P,T)};L.call(this,Q,k,B)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,
-null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(Q,k,B){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(Q,["zoomIn","zoomOut","-"],null,B);J.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(Q,["-","addToScratchpad"],null,B);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(Q,["-","exitGroup","home"],null,B)};var Y=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=
-function(Q,k,B){if(c.editor.graph.isSelectionEmpty())Y.apply(this,arguments),c.menus.addMenuItems(Q,["copyAsImage"],null,B);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(Q,k,B):this.addPopupMenuArrangeItems(Q,k,B),this.addMenuItems(Q,"- cut copy copyAsImage duplicate -".split(" "),null,B),this.isShowCellEditItems()||this.addPopupDeleteItem(Q,k,B),this.addMenuItems(Q,["lockUnlock","-"],null,B),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(k)&&f.isCellEditable(k)&&
-(this.addSubmenu("editCell",Q,null,mxResources.get("edit")),Q.addSeparator(),f.getModel().isEdge(k))){this.addSubmenu("line",Q);var I=f.getModel().getGeometry(k);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(Q,["clearWaypoints"],null,B)}1==f.getSelectionCount()&&this.addMenuItems(Q,["enterGroup"],null,B);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(Q,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(Q,"unmergeCells")}};this.menus.isShowStyleItems=
-function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));var ha=f.getExportVariables;f.getExportVariables=
-function(){var Q=ha.apply(this,arguments),k=c.getCurrentFile();null!=k&&(Q.filename=k.getTitle());Q.pagecount=null!=c.pages?c.pages.length:1;Q.page=null!=c.currentPage?c.currentPage.getName():"";Q.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return Q};var ea=f.getGlobalVariable;f.getGlobalVariable=function(Q){var k=c.getCurrentFile();return"filename"==Q&&null!=k?k.getTitle():"page"==Q&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==Q?null!=c.currentPage&&
-null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==Q?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var aa=null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var Q=this.getCurrentFile(),k=null!=Q&&null!=Q.getTitle()?Q.getTitle():this.defaultFilename;aa!=k&&Q==na&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());aa=k;na=Q}));var W=f.labelLinkClicked;f.labelLinkClicked=function(Q,k,B){var I=k.getAttribute("href");
-if(null==I||!f.isCustomLink(I)||!mxEvent.isTouchEvent(B)&&mxEvent.isPopupTrigger(B))W.apply(this,arguments);else{if(!f.isEnabled()||null!=Q&&f.isCellLocked(Q.cell))f.customLinkClicked(I),f.getRubberband().reset();mxEvent.consume(B)}};this.editor.getOrCreateFilename=function(){var Q=c.defaultFilename,k=c.getCurrentFile();null!=k&&(Q=null!=k.getTitle()?k.getTitle():Q);return Q};var ba=this.actions.get("print");ba.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ba.visible=ba.isEnabled();if(!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),
-this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(Q,k){null!=k&&f.isEnabled()&&!f.isEditing()&&null!=k.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),
-this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(Q){var k=f.cellEditor.text2,B=null;null!=k&&(mxEvent.addListener(k,"dragleave",function(I){null!=B&&(B.parentNode.removeChild(B),B=null);I.stopPropagation();I.preventDefault()}),mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(I){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(k));
-I.stopPropagation();I.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(I){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(P,T,X,Z,ka,va){f.insertImage(P,ka,va)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var T=0;T<P.length;T++)P[T]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var U=I.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(P){var T=Math.max(1,P.width);P=Math.max(1,P.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,T)),X/Math.max(1,P));f.insertImage(decodeURIComponent(U),T*X,P*X)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){ba=this.editor.graph.view;var ja=mxSettings.getUnit();ba.setUnit(ja);Editor.pageSizeUnit=ja==mxConstants.METERS?mxConstants.MILLIMETERS:ja;ba.addListener("unitChanged",function(Q,k){Q=k.getProperty("unit");mxSettings.setUnit(Q);mxSettings.save();Editor.pageSizeUnit=Q==mxConstants.METERS?mxConstants.MILLIMETERS:Q});this.ruler=!this.canvasSupported||
-9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ba.unit);this.refresh()}if("1"==urlParams.styledev){ba=document.getElementById("geFooter");null!=ba&&(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)})),ba.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(Q,k){0<this.editor.graph.getSelectionCount()?(Q=this.editor.graph.getSelectionCell(),Q=this.editor.graph.getModel().getStyle(Q),this.styleInput.value=Q||"",this.styleInput.style.visibility=
-"visible"):this.styleInput.style.visibility="hidden"})));var ca=this.isSelectionAllowed;this.isSelectionAllowed=function(Q){return mxEvent.getSource(Q)==this.styleInput?!0:ca.apply(this,arguments)}}ba=document.getElementById("geInfo");null!=ba&&ba.parentNode.removeChild(ba);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var la=null;mxEvent.addListener(f.container,"dragleave",function(Q){f.isEnabled()&&(null!=la&&(la.parentNode.removeChild(la),la=null),Q.stopPropagation(),Q.preventDefault())});
-mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(Q){null==la&&(!mxClient.IS_IE||10<document.documentMode)&&(la=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(Q){null!=la&&(la.parentNode.removeChild(la),la=null);if(f.isEnabled()){var k=mxUtils.convertPoint(f.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q)),B=Q.dataTransfer.files,
-I=f.view.translate,U=f.view.scale,P=k.x/U-I.x,T=k.y/U-I.y;if(0<B.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(Q)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(B,!0)):(mxEvent.isAltDown(Q)&&(T=P=null),this.importFiles(B,P,T,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(Q),null,null,mxEvent.isShiftDown(Q),Q));else{mxEvent.isAltDown(Q)&&(T=P=0);var X=0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")?Q.dataTransfer.getData("text/uri-list"):
-null;k=this.extractGraphModelFromEvent(Q,null!=this.pages);if(null!=k)f.setSelectionCells(this.importXml(k,P,T,!0));else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/html")){var Z=Q.dataTransfer.getData("text/html");k=document.createElement("div");k.innerHTML=Graph.sanitizeHtml(Z);var ka=null;B=k.getElementsByTagName("img");null!=B&&1==B.length?(Z=B[0].getAttribute("src"),null==Z&&(Z=B[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)||(ka=!0)):(B=k.getElementsByTagName("a"),
-null!=B&&1==B.length?Z=B[0].getAttribute("href"):(k=k.getElementsByTagName("pre"),null!=k&&1==k.length&&(Z=mxUtils.getTextContent(k[0]))));var va=!0,ua=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(Z,P,T,!0,ka,null,va,mxEvent.isControlDown(Q)))});ka&&null!=Z&&Z.length>this.resampleThreshold?this.confirmImageResize(function(qa){va=qa;ua()},mxEvent.isControlDown(Q)):ua()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,
-function(qa){var Ba=Math.max(1,qa.width);qa=Math.max(1,qa.height);var ya=this.maxImageSize;ya=Math.min(1,Math.min(ya/Math.max(1,Ba)),ya/Math.max(1,qa));f.setSelectionCell(f.insertVertex(null,null,"",P,T,Ba*ya,qa*ya,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+X+";"))}),mxUtils.bind(this,function(qa){f.setSelectionCells(this.insertTextAt(X,P,T,!0))})):0<=mxUtils.indexOf(Q.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(Q.dataTransfer.getData("text/plain"),
-P,T,!0))}}Q.stopPropagation();Q.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});
-f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var Q=parseInt(this.div.offsetLeft),k=parseInt(this.div.offsetWidth),B=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),U=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(Q,
-B-k))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,P-U))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ba=Editor.currentTheme,"simple"==ba||"sketch"==ba)this.doSetCurrentTheme(ba,!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ba=!1;if(null!=urlParams.dark)ba=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ba="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ba&&"auto"!=mxSettings.settings.darkMode||(ba=mxSettings.settings.darkMode);"auto"==ba&&this.isAutoDarkModeSupported()&&(ba=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===
-typeof ba?"1"==ba:ba);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(Q){this.isAutoDarkMode()&&this.setDarkMode(Q.matches)}))}catch(Q){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&
-(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(Q,k){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&
-c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||
-this.toggleFormatPanel(!0));this.lastWindowWidth=c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));
-document.body.style.cursor="text";var q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var D=null,H=null,N=null,L=null;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();
-mxEvent.consume(J)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);D=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var Y=!1;null!=D&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-D)+"px",Y=!0);null!=
-H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(J)-H)+"px",Y=!0);Y&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==D&&null==H||mxEvent.consume(J);H=D=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";
-this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";
-this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,q=0;q<l.types.length;q++)if("text/"===l.types[q].substring(0,
-5)){t=!0;break}if(!t){var D=l.items;for(index in D){var H=D[index];if("file"===H.kind){if(c.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(L,J,Y,ha,ea,aa){c.insertImage(L,ea,aa)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var J=0;J<L.length;J++)L[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(L){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position=
-"absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(D){var H=mxEvent.getSource(D);
-null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=D.keyCode&&(mxClient.IS_MAC||17!=D.keyCode)&&(!mxClient.IS_MAC||91!=D.keyCode&&93!=D.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",D=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=
-D,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(D){var H=D.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=H&&17!=H&&91!=H&&93!=H||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l),c()}catch(H){this.handleError(H)}}));
-mxEvent.addListener(l,"cut",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(D){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=D.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!0,!0)),!mxEvent.isConsumed(D)){var H=f.container.scrollLeft,N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,
-function(){try{f.container.scrollLeft=H,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==l?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=
-function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),this.editor.fireEvent(new mxEventObject("statusChanged")),
-this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,t=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,t-=this.embedViewport.y):(l+=this.embedViewport.x,t+=this.embedViewport.y));f={x:l,y:t,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};EditorUi.prototype.restoreScrollState=function(c){var f=
-this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var t=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-t.x;c.y-=c.boundingRect.y-t.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&
-(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");if(!f&&null!=t){t=t.getAttribute("title");var q=this.getCurrentFile();
-q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?(this.statusContainer.style.display="",this.statusContainer.style.display=
-0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),this.createShapesWindow())};EditorUi.prototype.getWindows=
-function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),f=0;f<
-c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),
-this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=
-120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=function(c){};EditorUi.prototype.getNetworkStatus=
-function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+": "+(null!=c&&null!=c.message?c.message:
-mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity="");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);
-null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geButton";var q=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),q.funct,null,t);t.className=l;t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(q,t,l);null!=f&&(t.style.backgroundImage="url("+f+")",t.innerText="");return t};EditorUi.prototype.addButton=function(c,f,
-l,t){c=this.createToolbarButton(c,f,l);t=null!=t?t:this.container;t.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var t=document.createElement("a");t.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(t.style.backgroundImage="url("+c+")");null!=f&&t.setAttribute("title",f);null!=l&&mxEvent.addListener(t,"click",function(q){"disabled"!=t.getAttribute("disabled")&&l(q);mxEvent.consume(q)});mxEvent.preventDefault(t);return t};EditorUi.prototype.createMenuItem=
-function(c,f,l){var t=this.actions.get(c),q=null!=t?t.funct:null,D=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),q);null==t||l||(c=function(){t.isEnabled()?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return D};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-
-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);
-this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(q){mxEvent.getSource(q)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));
-this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>q||690>D)&&this.formatWindow.window.toggleMinimized()}),0)):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;
-EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=q;this.refresh();this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),q=c?f:0,D=Editor.transitionDelay;
-mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(0)":"translateX(-100%)");0!=q&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+D+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,
-"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==q&&t()}),1E3*D)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var S=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():S.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=
-mxUtils.bind(this,function(H,N){var L=this.menus.get(H);H=this.createMenuElement(N,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",N);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),
-f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=
-f("newLibrary","");l.style.left="0px";l.style.right="50%";var t=document.createElement("span");l.appendChild(t);var q=f("openLibraryFrom","");q.style.borderLeftWidth="1px";q.style.left="50%";q.style.right="0px";var D=document.createElement("span");q.appendChild(D);this.dependsOnLanguage(mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,mxResources.get("newLibrary"));l.setAttribute("title",mxResources.get("newLibrary"));D.innerHTML="";mxUtils.write(D,mxResources.get("openLibraryFrom"));q.setAttribute("title",
-mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?
-66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=
-c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&
-(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=
-function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=
-window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,
-this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=
-function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};
-EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=
-function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",
-l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left="0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width=
-"",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");var q=t.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=q[0];this.diagramContainer.style.left=q[1];var D=parseInt(q[2]);q=parseInt(q[3]);D=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,D):D,t.width-80);q=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,q):q,t.height-80);this.diagramContainer.style.width=
-D+"px";this.diagramContainer.style.height=q+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+
-"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-
-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=
-function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,
-c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize="8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize=
-"auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=
-Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=
-Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+
-1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||
-"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),
-!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());
-mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,
-l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),
-this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||
-0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,q){try{this.spinner.stop();var D=this.createImageDataUri(t,f,"png"),H=parseInt(q.getAttribute("width")),
-N=parseInt(q.getAttribute("height"));this.writeImageToClipboard(D,H,N,mxUtils.bind(this,function(L){this.handleError(L)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText=
-"";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),q=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(q));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=q,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,q){q=null!=q?q:!0;var D=this.editor.graph,H=null;D.lastPasteXml==c?D.pasteCounter++:(D.lastPasteXml=c,D.pasteCounter=0);var N=D.pasteCounter*D.gridSize;if(l||this.isCompatibleString(c))H=this.importXml(c,N,N),D.setSelectionCells(H);else if(f&&1==D.getSelectionCount()){q=D.getStartEditingCell(D.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==D.getCurrentCellStyle(q)[mxConstants.STYLE_SHAPE])D.setCellStyles(mxConstants.STYLE_IMAGE,
-c,[q]);else{D.model.beginUpdate();try{D.labelChanged(q,c),Graph.isLink(c)&&D.setLinkForCell(q,c)}finally{D.model.endUpdate()}}D.setSelectionCell(q)}else H=D.getInsertPoint(),D.isMouseInsertPoint()&&(N=0,D.lastPasteXml==c&&0<D.pasteCounter&&D.pasteCounter--),H=this.insertTextAt(c,H.x+N,H.y+N,q),D.setSelectionCells(H);D.isSelectionEmpty()||(D.scrollCellToVisible(D.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(D.view.getState(D.getSelectionCell())));return H};EditorUi.prototype.pasteCells=
-function(c,f,l,t){if(!mxEvent.isConsumed(c)){var q=f,D=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var H=c.clipboardData.getData("text/plain"),N=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var L=decodeURIComponent(H);this.isCompatibleString(L)&&(N=!0,H=L)}catch(na){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(q=this.parseHtmlData(N),D="text/plain"!=q.getAttribute("data-type")):null!=H&&0<H.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
-N))}H=q.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(na){var W=this.editor.graph;W.lastPasteXml==na?W.pasteCounter++:(W.lastPasteXml=na,W.pasteCounter=0);var ba=W.pasteCounter*W.gridSize;W.setSelectionCells(this.importXml(na,ba,ba));W.scrollCellToVisible(W.getSelectionCell())}),mxUtils.bind(this,function(na){this.handleError(na)})),
-mxEvent.consume(c));else{var J=!1,Y="";Y=D?null!=q.textContent&&"<mxfile"==q.textContent.substring(0,7)&&"</mxfile>"==q.textContent.substring(q.textContent.length-9)||"<mxGraphModel"==q.textContent.substring(0,13)&&"</mxGraphModel>"==q.textContent.substring(q.textContent.length-15)?q.textContent.replace(/\u00a0/g," "):q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var ha=Y.lastIndexOf("%3E");0<=ha&&ha<Y.length-3&&(Y=Y.substring(0,ha+3))}catch(na){}try{H=q.getElementsByTagName("span"),
-(L=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(Y))&&(this.isCompatibleString(L)||0==L.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,Y=L)}catch(na){}try{if(null!=Y&&0<Y.length){if(0==Y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{Y=(new MiroImporter).importMiroJson(JSON.parse(Y)),this.pasteXml(Y,t,J,c)}catch(na){console.log("Miro import error:",na)}});"undefined"===typeof MiroImporter?
-mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(Y,t,J,c,D);try{mxEvent.consume(c)}catch(na){}}else if(!l){var aa=this.editor.graph;aa.lastPasteXml=null;aa.pasteCounter=0}}catch(na){this.handleError(na)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||
-(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,q=this.getPageIndex(this.currentPage),D=null!=q?q+1:1,H=mxUtils.bind(this,function(ba,ja,ca,la){var Q=ba.useCssTransforms,k=ba.currentTranslate,B=ba.currentScale,I=ba.view.translate,U=ba.view.scale;ba.useCssTransforms&&(ba.useCssTransforms=!1,ba.currentTranslate=new mxPoint(0,0),ba.currentScale=1,ba.view.translate=new mxPoint(0,0),ba.view.scale=1);var P=
-ba.getGraphBounds(),T=0,X=0,Z=mxRectangle.fromRectangle(ba.pageFormat),ka=f.fit||f.crop||!ba.pageVisible,va=f.scale;Z.width=Math.ceil(Z.width*ba.pageScale);Z.height=Math.ceil(Z.height*ba.pageScale);var ua=1;if(f.fit){ua=f.sheetsAcross;var qa=f.sheetsDown;isNaN(va)||(Z.width=Math.ceil(Z.width*va),Z.height=Math.ceil(Z.height*va));ua=Math.min(Z.height*qa/(P.height/ba.view.scale),Z.width*ua/(P.width/ba.view.scale))}else ua=isNaN(va)?1:va;ua*=1;!ka&&ba.pageVisible?(va=ba.getPageLayout(),T-=va.x*Z.width,
-X-=va.y*Z.height):ka=!0;f.crop&&(f.selection&&(P=t.getBoundingBox(t.getSelectionCells())),Z.width=(P.width+1)*ua/ba.view.scale,Z.height=(P.height+1)*ua/ba.view.scale);Z.width=Math.ceil(1*Z.width);Z.height=Math.ceil(1*Z.height);la=null!=la?"page/id,"+la:null;if(null==ja){ja=PrintDialog.createPrintPreview(ba,ua,null,0,T,X,ka);ja.title=this.getBaseFilename(!0);ja.pageSelector=!1;ja.mathEnabled=!1;T=f.border;isNaN(T)||(ja.pageMargin=T);f.selection&&(ja.isCellVisible=function(za){return ba.isCellSelected(za)});
-var Ba=ja.writeHead;ja.writeHead=function(za){Ba.apply(this,arguments);mxClient.IS_GC&&(za.writeln('<style type="text/css">'),za.writeln("@media print {"),za.writeln(".MathJax svg { shape-rendering: crispEdges; }"),za.writeln("}"),za.writeln("</style>"));null!=l.fontCss&&(za.writeln('<style type="text/css">'),za.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),za.writeln("</style>"));for(var Ea=ba.getCustomFonts(),pa=0;pa<Ea.length;pa++){var Ca=Ea[pa].name,Aa=Ea[pa].url;Graph.isCssFontUrl(Aa)?za.writeln('<link rel="stylesheet" href="'+
-mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Aa))+'" charset="UTF-8" type="text/css">'):(za.writeln('<style type="text/css">'),za.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ca)+'";\nsrc: url("'+mxUtils.htmlEntities(Aa)+'");\n}'),za.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ya=ja.drawBackgroundImage;ja.drawBackgroundImage=function(za){ya.apply(this,arguments);null!=za.node&&(EditorUi.embedSvgImages(za.node),t.disableSvgLinks(za.node,function(Ea){Ea.setAttribute("href",
-"javascript:void(0)")}))}}var La=ja.addGraphFragment;ja.addGraphFragment=function(za,Ea,pa,Ca,Aa,wa){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Aa.classList.add("geDisableMathJax")};f.grid&&(ja.gridSize=ba.gridSize,ja.gridSteps=ba.view.gridSteps,ja.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ja.open(null,null,ca,!0,la,Z,f.selection?ba.getSelectionCells():null)}else{P=ba.background;if(null==P||""==P||P==mxConstants.NONE)P=
-"#ffffff";ja.backgroundColor=P;ja.autoOrigin=ka;f.grid&&(ja.gridSize=ba.gridSize,ja.gridSteps=ba.view.gridSteps,ja.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ba.view.gridColor);ja.appendGraph(ba,ua,T,X,ca,!0,la,Z,f.selection?ba.getSelectionCells():null);ca=ba.getCustomFonts();if(null!=ja.wnd)for(Z=0;Z<ca.length;Z++)T=ca[Z].name,X=ca[Z].url,Graph.isCssFontUrl(X)?ja.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(X)+'" charset="UTF-8" type="text/css">'):
-(ja.wnd.document.writeln('<style type="text/css">'),ja.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(T)+'";\nsrc: url("'+mxUtils.htmlEntities(X)+'");\n}'),ja.wnd.document.writeln("</style>"))}Q&&(ba.useCssTransforms=Q,ba.currentTranslate=k,ba.currentScale=B,ba.view.translate=I,ba.view.scale=U);return ja}),N=f.pagesFrom,L=f.pagesTo,J=!f.allPages;q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==D&&L==D);if(!J&&null!=this.pages&&
-this.pages.length){J=0;D=this.pages.length-1;f.allPages||(J=parseInt(N)-1,D=parseInt(L)-1);for(var Y=J;Y<=D;Y++){var ha=this.pages[Y];N=ha==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;L=!0;J=!1;var ea=null,aa=null;null==ha.viewState&&null==ha.root&&this.updatePageRoot(ha);null!=ha.viewState&&(L=ha.viewState.pageVisible,J=ha.viewState.mathEnabled,ea=ha.viewState.background,
-aa=ha.viewState.backgroundImage,N.pageFormat=ha.viewState.pageFormat,N.gridSize=ha.viewState.gridSize);null!=aa&&null!=aa.originalSrc&&(aa=this.createImageForPageLink(aa.originalSrc,ha));N.background=ea;N.backgroundImage=null!=aa?new mxImage(aa.src,aa.width,aa.height,aa.x,aa.y):null;N.pageVisible=L;N.mathEnabled=J;var na=N.getGraphBounds;N.getGraphBounds=function(){var ba=na.apply(this,arguments),ja=this.backgroundImage;if(null!=ja&&null!=ja.width&&null!=ja.height){var ca=this.view.translate,la=this.view.scale;
-ba=mxRectangle.fromRectangle(ba);ba.add(new mxRectangle((ca.x+ja.x)*la,(ca.y+ja.y)*la,ja.width*la,ja.height*la))}return ba};var W=N.getGlobalVariable;N.getGlobalVariable=function(ba){return"page"==ba?ha.getName():"pagenumber"==ba?Y+1:"pagecount"==ba?null!=this.pages?this.pages.length:1:W.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ha);N.model.setRoot(ha.root)}q=H(N,q,Y!=D,ha.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else q=H(t);null==q||
-null==q.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(H=q.wnd.document,c||(q.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),q.closeDocument(),Graph.rewritePageLinks(q.wnd.document,!0),q.mathEnabled||c||PrintDialog.printPreview(q));return q}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=
-f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
-t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(t);if(null==q){var D=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=D&&(10==document.documentMode||11==document.documentMode?q=D.getData("Text"):(q=null,q=0<=mxUtils.indexOf(D.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):
-0<=mxUtils.indexOf(D.types,"text/html")?D.getData("text/html"):null,null!=q&&0<q.length?(D=document.createElement("div"),D.innerHTML=Graph.sanitizeHtml(q),D=D.getElementsByTagName("img"),0<D.length&&(q=D[0].getAttribute("src"))):0<=mxUtils.indexOf(D.types,"text/plain")&&(q=D.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+
-"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;var q=document.documentElement;var D=(t.clientWidth||q.clientWidth)-3;t=Math.max(t.clientHeight||0,q.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,D=c.clientWidth,t=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+
-2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=l+"px";q.style.width=Math.max(0,D-3)+"px";q.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),
-t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,q,D){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var H=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==
-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,L,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,
-f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,t)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(q=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,q,null!=q?l:null,D)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=
-0;l<c.length;l++)mxUtils.bind(this,function(t){var q=new FileReader;q.onload=mxUtils.bind(this,function(D){try{this.openFileHandle(D.target.result,t.name,t,f)}catch(H){this.handleError(H)}});q.onerror=mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?q.readAsText(t):q.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,q,D){var H=this.getCurrentFile(),
-N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,f||this.defaultFilename,l,t,q,D))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=function(c,f){function l(H){if(null!=H){var N=H.lastIndexOf(".");0<N&&(H=H.substring(N+1,H.length));null==f[H]&&(f[H]=!0)}}var t=this.editor.graph,q=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&
-(l(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=t.model.getChildCount(c);for(var D=0;D<q;D++)this.addBasenamesForCell(t.model.getChildAt(c,D),f)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;
-this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,q){c||(c=!0,this.spinner.stop(),
-this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var D=this.editor.graph;D.setGridEnabled(!1);D.pageVisible=!1;var H=D.model.cells,N;for(N in H){var L=H[N];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,
-page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,
-exit:null!=c?!c:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(q){c||this.handleError(q)}};
-EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,q=null,D=mxUtils.bind(this,function(L,J){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,D);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var J=
-L.data,Y=null,ha=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.trim()?pa=null:"%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Ca){}return pa});if("json"==urlParams.proto){var ea=
-!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[J])}catch(pa){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));
-return}if("prompt"==J.action){this.spinner.stop();var aa=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(pa){null!=pa?H.postMessage(JSON.stringify({event:"prompt",value:pa,message:J}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(aa.container,300,80,!0,
-!1);aa.init();return}if("draft"==J.action){var na=ha(J.xml);this.spinner.stop();aa=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):
-null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):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){H.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var W=1==J.enableRecent,ba=1==J.enableSearch,ja=1==J.enableCustomTemp;aa=new NewDialog(this,
-!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(pa,Ca,Aa,wa){pa=pa||this.emptyDiagramXml;null!=J.callback?H.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Ca,tempUrl:Aa,libs:wa,builtIn:!0,message:J}),"*"):(c(pa,L,pa!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,W?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):
-null,ba?mxUtils.bind(this,function(pa,Ca){this.remoteInvoke("searchDiagrams",[pa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Ca,Aa){H.postMessage(JSON.stringify({event:"template",docUrl:pa,info:Ca,name:Aa}),"*")}),null,null,ja?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==J.withoutType);this.showDialog(aa.container,620,460,!0,!1,mxUtils.bind(this,function(pa){null!=this.sidebar&&this.sidebar.hideTooltip();
-pa&&this.actions.get("exit").funct()}));aa.init();return}if("textContent"==J.action){var ca=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:ca,message:J}),"*");return}if("status"==J.action){this.updateStatus(mxUtils.bind(this,function(){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message))}));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==
-J.action){var la=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){if(null!=J.viewport){var Q=this.editor.graph,k=Q.view.translate.x,B=Q.view.translate.y;this.embedViewport=J.viewport;Q.refresh();this.diagramContainer.scrollTop-=(B-Q.view.translate.y)*Q.view.scale;this.diagramContainer.scrollLeft-=(k-Q.view.translate.x)*
-Q.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==J.action){aa=null;try{var I=this.diagramContainer.getAttribute("data-scrollState");null!=I&&(this.diagramContainer.removeAttribute("data-scrollState"),aa=JSON.parse(I))}catch(pa){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=aa&&this.restoreScrollState(aa);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);return}if("export"==J.action){if("png"==
-J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var U=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);Q=this.editor.graph;var P=mxUtils.bind(this,function(pa,Ca){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(U,this.editor.graph,null,!0,function(wa){P(pa,wa)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,"auto");else{this.editor.graph.setEnabled(!0);
-this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=J.format;Aa.message=J;Aa.data=pa;Aa.svg=Ca;Aa.xml=U;H.postMessage(JSON.stringify(Aa),"*")}}),T=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==J.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(U)));Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);P(pa)}),X=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Z=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=X){var pa=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());for(var Ca,Aa=0;Aa<this.pages.length;Aa++)if(this.pages[Aa].getId()==X){Ca=this.updatePageRoot(this.pages[Aa]);break}null==Ca&&(Ca=this.currentPage);Q.getGlobalVariable=function(Ra){return"page"==Ra?Ca.getName():"pagenumber"==Ra?1:pa.apply(this,arguments)};document.body.appendChild(Q.container);Q.model.setRoot(Ca.root)}if(null!=J.layerIds){var wa=
-Q.model,Xa=wa.getChildCells(wa.getRoot()),Qa={};for(Aa=0;Aa<J.layerIds.length;Aa++)Qa[J.layerIds[Aa]]=!0;for(Aa=0;Aa<Xa.length;Aa++)wa.setVisible(Xa[Aa],Qa[Xa[Aa].id]||!1)}Aa=null;J.keepTheme&&(Aa=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){T(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){T(null)}),null,null,J.scale,J.transparent,J.shadow,null,Q,J.border,null,J.grid,Aa)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(U),
-l=!1);Z()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=X?"&pageId="+X:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(U))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?P("data:image/png;base64,"+pa.getText()):T(null)}),mxUtils.bind(this,function(){T(null)}))}}else if(Z=mxUtils.bind(this,
-function(){var pa=this.createLoadMessage("export");pa.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();pa.xml=mxUtils.getXml(Ca);pa.data=this.getFileData(null,null,!0,null,null,null,Ca);pa.format=J.format}else if("html"==J.format)Ca=this.editor.getGraphXml(),pa.data=this.getHtml(Ca,this.editor.graph),pa.xml=mxUtils.getXml(Ca),pa.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=J.background?
-J.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);pa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var Aa=mxUtils.bind(this,function(Xa){this.editor.graph.setEnabled(!0);this.spinner.stop();pa.data=J.asText?Xa:Editor.createSvgDataUri(Xa);H.postMessage(JSON.stringify(pa),"*")}),wa="auto";J.keepTheme&&(wa=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(wa=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,
-null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){wa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())wa="auto";null!=J.theme&&(wa=J.theme);this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,Aa,null,null,J.embedImages,Ca,J.scale,J.border,J.shadow,wa)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||
-J.shadow,null,wa),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Xa){J.embedImages||null==J.embedImages?this.editor.convertImages(Xa,mxUtils.bind(this,function(Qa){Aa(mxUtils.getXml(Qa))})):Aa(mxUtils.getXml(Xa))}));return}H.postMessage(JSON.stringify(pa),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var ka=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){ka.apply(this,arguments);Z()}}l=!0;this.setFileData(J.xml);
-l=!1;this.editor.graph.mathEnabled||Z()}else Z();return}if("load"==J.action){ea=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&
-(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var va=Editor.sketchMode;this.doSetSketchMode(J.rough);va!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=
-J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var ua=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var qa=J.maxFitScale,Ba=J.rect.width+2*ua,ya=J.rect.height+
-2*ua;Y=mxUtils.bind(this,function(){var pa=mxUtils.getDocumentSize();Ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ba):Ba,pa.width-80);pa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ya):ya,pa.height-80);this.diagramContainer.style.width=Ba+"px";this.diagramContainer.style.height=pa+"px";var Ca=this.editor.graph;pa=Ca.maxFitScale;Ca.maxFitScale=qa;Ca.fit(2*ua,null,null,null,null,null,ya);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<
-this.minInlineWidth){var Aa=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=Aa}Ca.maxFitScale=pa;Ca.container.scrollTop-=ua;Ca.container.scrollLeft-=ua;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var wa=Ca.getGraphBounds();Ca.container.clientWidth>
-wa.width+2*ua&&(Ca.container.scrollLeft=wa.x+(wa.width+ua-Ca.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&this.setEmbedTitle(J.title);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(pa){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var La=this.getCurrentFile();null!=La&&(na=ha(J.xml),null!=na&&""!=na&&La.mergeFile(new LocalFile(this,
-na),function(){H.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(pa){H.postMessage(JSON.stringify({event:"merge",message:J,error:pa}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,L.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(pa){this.handleError(pa)}}var za=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(pa,Ca){l=!0;try{c(pa,Ca,null,ea)}catch(Aa){this.handleError(Aa)}l=!1;null!=urlParams.modified&&this.clearStatus();q=za();t&&null==f&&(f=mxUtils.bind(this,function(Aa,wa){Aa=za();Aa==q||l||(wa=this.createLoadMessage("autosave"),wa.xml=Aa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=Aa}),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)Ca=this.createLoadMessage("load"),Ca.xml=pa,H.postMessage(JSON.stringify(Ca),"*");null!=Y&&Y()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==J.substring(0,34)?(ha="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(pa){Ea(pa,L)},mxUtils.bind(this,function(pa){this.handleError(pa)}),ha)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,
-"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(pa){4==pa.readyState&&(200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)?Ea(pa.responseText,L):this.handleError({message:413==pa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(pa){Ea(pa)}),
-mxUtils.bind(this,function(pa){this.handleError(pa)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ha(J),Ea(J,L)):this.loadDescriptor(J,mxUtils.bind(this,function(pa){Ea(za(),L)}),mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;D="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(D,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;
-this.editor.graph.openLink=function(L,J,Y){N.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",href:L,target:J,allowOpener:Y}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var q=document.createElement("button");q.className="geEmbedBtn geBtn";q.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(q,c);t&&q.classList.add("gePrimaryBtn");mxEvent.addListener(q,"click",f);return q};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=
-this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);
-this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),
-"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==
-this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(q){this.handleError(q)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var q=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var D=t.value;t.value=JSON.stringify(JSON.parse(D));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=D}catch(H){this.handleError(H)}}));q.setAttribute("title","copy");q.className="geBtn";l.appendChild(q)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(q){this.loadingOrgChart=!1;f.clear()&&this.handleError(q)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],q=[],D=[],H={};if(0<l.length){var N={},L=this.editor.graph,J=null,Y=null,ha=null,ea=null,
-aa=null,na=null,W=null,ba="whiteSpace=wrap;html=1;",ja=null,ca=null,la="",Q="auto",k="auto",B=!1,I=null,U=null,P=40,T=40,X=100,Z=0,ka=mxUtils.bind(this,function(){null!=f?f(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),va=L.getFreeInsertPoint(),ua=va.x,qa=va.y;va=qa;var Ba=null,ya="auto";ca=null;for(var La=[],za=null,Ea=null,pa=0;pa<l.length&&"#"==l[pa].charAt(0);){c=
-l[pa].replace(/\r$/,"");for(pa++;pa<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[pa].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var Aa=mxUtils.trim(c.substring(1,Ca)),wa=mxUtils.trim(c.substring(Ca+1));"label"==Aa?Ba=Graph.sanitizeHtml(wa):"labelname"==Aa&&0<wa.length&&"-"!=wa?aa=wa:"labels"==Aa&&0<wa.length&&"-"!=wa?W=JSON.parse(wa):"style"==Aa?Y=wa:"parentstyle"==Aa?ba=wa:"unknownStyle"==Aa&&"-"!=wa?na=wa:"stylename"==
-Aa&&0<wa.length&&"-"!=wa?ea=wa:"styles"==Aa&&0<wa.length&&"-"!=wa?ha=JSON.parse(wa):"vars"==Aa&&0<wa.length&&"-"!=wa?J=JSON.parse(wa):"identity"==Aa&&0<wa.length&&"-"!=wa?ja=wa:"parent"==Aa&&0<wa.length&&"-"!=wa?ca=wa:"namespace"==Aa&&0<wa.length&&"-"!=wa?la=wa:"width"==Aa?Q=wa:"height"==Aa?k=wa:"collapsed"==Aa&&"-"!=wa?B="true"==wa:"left"==Aa&&0<wa.length?I=wa:"top"==Aa&&0<wa.length?U=wa:"ignore"==Aa?Ea=wa.split(","):"connect"==Aa?La.push(JSON.parse(wa)):"link"==Aa?za=wa:"padding"==Aa?Z=parseFloat(wa):
-"edgespacing"==Aa?P=parseFloat(wa):"nodespacing"==Aa?T=parseFloat(wa):"levelspacing"==Aa?X=parseFloat(wa):"layout"==Aa&&(ya=wa)}}}if(null==l[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Xa=this.editor.csvToArray(l[pa].replace(/\r$/,""));Ca=c=null;Aa=[];for(wa=0;wa<Xa.length;wa++)ja==Xa[wa]&&(c=wa),ca==Xa[wa]&&(Ca=wa),Aa.push(mxUtils.trim(Xa[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Aa[0]+"%");if(null!=La)for(var Qa=0;Qa<La.length;Qa++)null==
-N[La[Qa].to]&&(N[La[Qa].to]={});ja=[];for(wa=pa+1;wa<l.length;wa++){var Ra=this.editor.csvToArray(l[wa].replace(/\r$/,""));if(null==Ra){var Sa=40<l[wa].length?l[wa].substring(0,40)+"...":l[wa];throw Error(Sa+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ja.push(Ra)}L.model.beginUpdate();try{for(wa=0;wa<ja.length;wa++){Ra=ja[wa];var Ha=null,Ma=null!=c?la+Ra[c]:null;l=!1;null!=Ma&&(Ha=L.model.getCell(Ma),l=null==Ha||0<=mxUtils.indexOf(t,Ha));var y=new mxCell(Ba,new mxGeometry(ua,
-va,0,0),Y||"whiteSpace=wrap;html=1;");y.collapsed=B;y.vertex=!0;y.id=Ma;null==Ha||l||L.model.setCollapsed(Ha,B);for(var O=0;O<Ra.length;O++)L.setAttributeForCell(y,Aa[O],Ra[O]),null==Ha||l||L.setAttributeForCell(Ha,Aa[O],Ra[O]);if(null!=aa&&null!=W){var R=W[y.getAttribute(aa)];null!=R&&(L.labelChanged(y,R),null==Ha||l||L.cellLabelChanged(Ha,R))}if(null!=ea&&null!=ha){var V=ha[y.getAttribute(ea)];null!=V&&(y.style=V)}L.setAttributeForCell(y,"placeholders","1");y.style=L.replacePlaceholders(y,y.style,
-J);null==Ha||l?L.fireEvent(new mxEventObject("cellsInserted","cells",[y])):(L.model.setStyle(Ha,y.style),0>mxUtils.indexOf(D,Ha)&&D.push(Ha),L.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));l=null!=Ha;Ha=y;if(!l)for(Qa=0;Qa<La.length;Qa++)N[La[Qa].to][Ha.getAttribute(La[Qa].to)]=Ha;null!=za&&"link"!=za&&(L.setLinkForCell(Ha,Ha.getAttribute(za)),L.setAttributeForCell(Ha,za,null));var fa=this.editor.graph.getPreferredSizeForCell(Ha);ca=null!=Ca?L.model.getCell(la+Ra[Ca]):null;if(Ha.vertex){Sa=
-null!=ca?0:ua;pa=null!=ca?0:qa;null!=I&&null!=Ha.getAttribute(I)&&(Ha.geometry.x=Sa+parseFloat(Ha.getAttribute(I)));null!=U&&null!=Ha.getAttribute(U)&&(Ha.geometry.y=pa+parseFloat(Ha.getAttribute(U)));var ia="@"==Q.charAt(0)?Ha.getAttribute(Q.substring(1)):null;Ha.geometry.width=null!=ia&&"auto"!=ia?parseFloat(Ha.getAttribute(Q.substring(1))):"auto"==Q||"auto"==ia?fa.width+Z:parseFloat(Q);var oa="@"==k.charAt(0)?Ha.getAttribute(k.substring(1)):null;Ha.geometry.height=null!=oa&&"auto"!=oa&&"width"!=
-k?parseFloat(oa):"auto"==k||"auto"==oa?fa.height+Z:"width"==k?Ha.geometry.width:parseFloat(k);va+=Ha.geometry.height+T}l?(null==H[Ma]&&(H[Ma]=[]),H[Ma].push(Ha)):(t.push(Ha),null!=ca?(ca.style=L.replacePlaceholders(ca,ba,J),L.addCell(Ha,ca),q.push(ca)):D.push(L.addCell(Ha)))}for(wa=0;wa<q.length;wa++)ia="@"==Q.charAt(0)?q[wa].getAttribute(Q.substring(1)):null,oa="@"==k.charAt(0)?q[wa].getAttribute(k.substring(1)):null,"auto"!=Q&&"auto"!=ia||"auto"!=k&&"auto"!=oa||L.updateGroupBounds([q[wa]],Z,!0);
-var ta=D.slice(),ra=D.slice();for(Qa=0;Qa<La.length;Qa++){var xa=La[Qa];for(wa=0;wa<t.length;wa++){Ha=t[wa];var Da=mxUtils.bind(this,function(kb,pb,fb){var ob=pb.getAttribute(fb.from);if(null!=ob&&""!=ob){ob=ob.split(",");for(var tb=0;tb<ob.length;tb++){var eb=N[fb.to][ob[tb]];if(null==eb&&null!=na){eb=new mxCell(ob[tb],new mxGeometry(ua,qa,0,0),na);eb.style=L.replacePlaceholders(pb,eb.style,J);var nb=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=nb.width+Z;eb.geometry.height=nb.height+
-Z;N[fb.to][ob[tb]]=eb;eb.vertex=!0;eb.id=ob[tb];D.push(L.addCell(eb))}if(null!=eb){nb=fb.label;null!=fb.fromlabel&&(nb=(pb.getAttribute(fb.fromlabel)||"")+(nb||""));null!=fb.sourcelabel&&(nb=L.replacePlaceholders(pb,fb.sourcelabel,J)+(nb||""));null!=fb.tolabel&&(nb=(nb||"")+(eb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(eb,fb.targetlabel,J));var mb="target"==fb.placeholders==!fb.invert?eb:kb;mb=null!=fb.style?L.replacePlaceholders(mb,fb.style,J):L.createCurrentEdgeStyle();
-nb=L.insertEdge(null,null,nb||"",fb.invert?eb:kb,fb.invert?kb:eb,mb);if(null!=fb.labels)for(mb=0;mb<fb.labels.length;mb++){var qb=fb.labels[mb],ub=new mxCell(qb.label||mb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!fb.invert?eb:kb,ub.value,J));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=
-qb.dy?qb.dy:0);nb.insert(ub)}if(null!=fb.data)for(var zb in fb.data)L.setAttributeForCell(nb,zb,fb.data[zb]);ra.push(nb);mxUtils.remove(fb.invert?kb:eb,ta)}}}});Da(Ha,Ha,xa);if(null!=H[Ha.id])for(O=0;O<H[Ha.id].length;O++)Da(Ha,H[Ha.id][O],xa)}}if(null!=Ea)for(wa=0;wa<t.length;wa++)for(Ha=t[wa],O=0;O<Ea.length;O++)L.setAttributeForCell(Ha,mxUtils.trim(Ea[O]),null);if(0<D.length){var Ia=new mxParallelEdgeLayout(L);Ia.spacing=P;Ia.checkOverlap=!0;var Ya=function(){0<Ia.spacing&&Ia.execute(L.getDefaultParent());
-for(var kb=0;kb<D.length;kb++){var pb=L.getCellGeometry(D[kb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==Q&&(pb.width=Math.round(L.snap(pb.width)));"auto"==k&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==ya.charAt(0)){var Za=ka;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(ya)),function(){Ya();Za()});ka=null}else if("circle"==ya){var $a=new mxCircleLayout(L);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var Pa=$a.isVertexIgnored;$a.isVertexIgnored=function(kb){return Pa.apply(this,
-arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){$a.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}else if("horizontaltree"==ya||"verticaltree"==ya||"auto"==ya&&ra.length==2*D.length-1&&1==ta.length){L.view.validate();var Na=new mxCompactTreeLayout(L,"horizontaltree"==ya);Na.levelDistance=T;Na.edgeRouting=!1;Na.resetEdges=!1;Na.sortEdges=!0;this.executeLayout(function(){Na.execute(L.getDefaultParent(),0<ta.length?ta[0]:null)},!0,ka);ka=null}else if("horizontalflow"==ya||"verticalflow"==
-ya||"auto"==ya&&1==ta.length){L.view.validate();var jb=new mxHierarchicalLayout(L,"horizontalflow"==ya?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);jb.intraCellSpacing=T;jb.parallelEdgeSpacing=P;jb.interRankCellSpacing=X;jb.disableEdgeStyle=!1;this.executeLayout(function(){jb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ua,qa)},!0,ka);ka=null}else if("orgchart"==ya){L.view.validate();var cb=new mxOrgChartLayout(L,2,X,T),ab=cb.isVertexIgnored;cb.isVertexIgnored=function(kb){return ab.apply(this,
-arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){cb.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}else if("organic"==ya||"auto"==ya&&ra.length>D.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*T;db.disableEdgeStyle=!1;db.resetEdges=!1;var lb=db.isVertexIgnored;db.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Ya()},!0,ka);ka=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=
-ka&&ka()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(S){var k=S.getEvent();return null==S.getState()&&!mxEvent.isMouseEvent(k)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(k)&&(null==S.getState()||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k))});f.cellEditor.editPlantUmlData=function(S,k,B){var K=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("plantUml")+":",K.data,function(T){null!=T&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(T,
+K.format,function(P,U,Y){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==K.format)f.labelChanged(S,"<pre>"+P+"</pre>"),f.updateCellSize(S,!0);else{f.setCellStyles("image",c.convertDataUri(P),[S]);var aa=f.model.getGeometry(S);null!=aa&&(aa=aa.clone(),aa.width=U,aa.height=Y,f.cellsResized([S],[aa],!1))}f.setAttributeForCell(S,"plantUmlData",JSON.stringify({data:T,format:K.format}))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,
+420,300,!0,!0);k.init()};f.cellEditor.editMermaidData=function(S,k,B){var K=JSON.parse(B);k=new TextareaDialog(c,mxResources.get("mermaid")+":",K.data,function(T){null!=T&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(T,K.config,function(P,U,Y){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",P,[S]);var aa=f.model.getGeometry(S);null!=aa&&(aa=aa.clone(),aa.width=Math.max(aa.width,U),aa.height=Math.max(aa.height,Y),f.cellsResized([S],[aa],
+!1));f.setAttributeForCell(S,"mermaidData",JSON.stringify({data:T,config:K.config},null,2))}finally{f.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(k.container,420,300,!0,!0);k.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=function(S,k){try{var B=this.graph.getAttributeForCell(S,"plantUmlData");if(null!=B)this.editPlantUmlData(S,k,B);else if(B=this.graph.getAttributeForCell(S,"mermaidData"),null!=B&&window.isMermaidEnabled)this.editMermaidData(S,
+k,B);else{var K=f.getCellStyle(S);"1"==mxUtils.getValue(K,"metaEdit","0")?c.showDataDialog(S):t.apply(this,arguments)}}catch(T){c.handleError(T)}};f.getLinkTitle=function(S){return c.getLinkTitle(S)};f.customLinkClicked=function(S,k){var B=!1;try{var K=this.getGraphBounds();c.handleCustomLink(S,k);B=!0;c.chromelessResize&&!K.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(k))}catch(T){c.handleError(T)}return B};var q=f.parseBackgroundImage;f.parseBackgroundImage=function(S){var k=
+q.apply(this,arguments);null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});return k};var D=f.setBackgroundImage;f.setBackgroundImage=function(S){null!=S&&null!=S.originalSrc&&(S=c.createImageForPageLink(S.originalSrc,c.currentPage,this));D.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(S,k){S=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=S){var B=S.indexOf(",");if(0<B)for(S=S.substring(B+1),k=k.getProperty("patches"),B=0;B<k.length;B++)if(null!=k[B][EditorUi.DIFF_UPDATE]&&null!=k[B][EditorUi.DIFF_UPDATE][S]||null!=k[B][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(k[B][EditorUi.DIFF_REMOVE],S)){f.refreshBackgroundImage();break}}}));var H=f.getBackgroundImageObject;f.getBackgroundImageObject=function(S,k){var B=H.apply(this,arguments);
+null!=B&&null!=B.originalSrc&&(B=k?c.createImageForPageLink(B.originalSrc,null,null,!0):{src:B.originalSrc});return B};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=
+function(S){S=null!=S?S:"";"1"==urlParams.dev&&(S+=(0<S.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var L=f.addClickHandler;f.addClickHandler=function(S,k,B){var K=k;k=function(T,P,U){if(null==P){var Y=mxEvent.getSource(T);"a"==Y.nodeName.toLowerCase()&&(P=Y.getAttribute("href"))}null!=P&&f.isCustomLink(P)&&(mxEvent.isTouchEvent(T)||!mxEvent.isPopupTrigger(T))&&f.customLinkClicked(P,U)&&mxEvent.consume(T);null!=K&&K(T,P,U)};L.call(this,S,k,B)};n.apply(this,arguments);mxClient.IS_SVG&&
+this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(S,k,B){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(S,["zoomIn","zoomOut","-"],null,B);I.apply(this,arguments);f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(S,["-","addToScratchpad"],null,B);f.isSelectionEmpty()&&!this.isShowStyleItems()&&this.addMenuItems(S,["-","exitGroup","home"],
+null,B)};var Z=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(S,k,B){if(c.editor.graph.isSelectionEmpty())Z.apply(this,arguments),c.menus.addMenuItems(S,["copyAsImage"],null,B);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(S,k,B):this.addPopupMenuArrangeItems(S,k,B),this.addMenuItems(S,"- cut copy copyAsImage duplicate -".split(" "),null,B),this.isShowCellEditItems()||this.addPopupDeleteItem(S,k,B),this.addMenuItems(S,["lockUnlock","-"],null,B),!this.isShowStyleItems()){if(1==
+f.getSelectionCount()&&!f.isCellLocked(k)&&f.isCellEditable(k)&&(this.addSubmenu("editCell",S,null,mxResources.get("edit")),S.addSeparator(),f.getModel().isEdge(k))){this.addSubmenu("line",S);var K=f.getModel().getGeometry(k);null!=K&&null!=K.points&&0<K.points.length&&this.addMenuItems(S,["clearWaypoints"],null,B)}1==f.getSelectionCount()&&this.addMenuItems(S,["enterGroup"],null,B);K=c.getSelectionState();null!=K.mergeCell?this.addMenuItem(S,"mergeCells"):(1<K.style.colspan||1<K.style.rowspan)&&
+this.addMenuItem(S,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.dependsOnLanguage(mxUtils.bind(this,function(){this.defaultFilename=mxResources.get("untitledDiagram");this.defaultLibraryName=mxResources.get("untitledLibrary")}));
+var ia=f.getExportVariables;f.getExportVariables=function(){var S=ia.apply(this,arguments),k=c.getCurrentFile();null!=k&&(S.filename=k.getTitle());S.pagecount=null!=c.pages?c.pages.length:1;S.page=null!=c.currentPage?c.currentPage.getName():"";S.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return S};var fa=f.getGlobalVariable;f.getGlobalVariable=function(S){var k=c.getCurrentFile();return"filename"==S&&null!=k?k.getTitle():"page"==S&&null!=c.currentPage?
+c.currentPage.getName():"pagenumber"==S?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==S?null!=c.pages?c.pages.length:1:fa.apply(this,arguments)};var ba=null,na=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var S=this.getCurrentFile(),k=null!=S&&null!=S.getTitle()?S.getTitle():this.defaultFilename;ba!=k&&S==na&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),f.view.validate());ba=k;na=S}));var X=f.labelLinkClicked;
+f.labelLinkClicked=function(S,k,B){var K=k.getAttribute("href");if(null==K||!f.isCustomLink(K)||!mxEvent.isTouchEvent(B)&&mxEvent.isPopupTrigger(B))X.apply(this,arguments);else{if(!f.isEnabled()||null!=S&&f.isCellLocked(S.cell))f.customLinkClicked(K),f.getRubberband().reset();mxEvent.consume(B)}};this.editor.getOrCreateFilename=function(){var S=c.defaultFilename,k=c.getCurrentFile();null!=k&&(S=null!=k.getTitle()?k.getTitle():S);return S};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||
+!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,
+!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&(document.body.classList.add("geEmbedInline"),f.addListener(mxEvent.ESCAPE,function(S,k){null!=k&&f.isEnabled()&&!f.isEditing()&&null!=
+k.getProperty("event")&&c.actions.get("exit").funct()})),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=null!=this.spinner?this.spinner:this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(S){var k=f.cellEditor.text2,B=null;null!=k&&(mxEvent.addListener(k,"dragleave",function(K){null!=B&&(B.parentNode.removeChild(B),B=null);K.stopPropagation();K.preventDefault()}),mxEvent.addListener(k,"dragover",mxUtils.bind(this,
+function(K){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(k));K.stopPropagation();K.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(K){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<K.dataTransfer.files.length)this.importFiles(K.dataTransfer.files,0,0,this.maxImageSize,function(P,U,Y,aa,la,va){f.insertImage(P,la,va)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var U=0;U<P.length;U++)P[U]()},mxEvent.isControlDown(K));
+else if(0<=mxUtils.indexOf(K.dataTransfer.types,"text/uri-list")){var T=K.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)?this.loadImage(decodeURIComponent(T),mxUtils.bind(this,function(P){var U=Math.max(1,P.width);P=Math.max(1,P.height);var Y=this.maxImageSize;Y=Math.min(1,Math.min(Y/Math.max(1,U)),Y/Math.max(1,P));f.insertImage(decodeURIComponent(T),U*Y,P*Y)})):document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(K.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(K.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,K.dataTransfer.getData("text/plain"));K.stopPropagation();K.preventDefault()})))}));if(Editor.isSettingsEnabled()){ca=this.editor.graph.view;var ka=mxSettings.getUnit();ca.setUnit(ka);Editor.pageSizeUnit=ka==mxConstants.METERS?mxConstants.MILLIMETERS:ka;ca.addListener("unitChanged",function(S,k){S=k.getProperty("unit");mxSettings.setUnit(S);
+mxSettings.save();Editor.pageSizeUnit=S==mxConstants.METERS?mxConstants.MILLIMETERS:S});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit);this.refresh()}if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",
+this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,k){0<this.editor.graph.getSelectionCount()?
+(S=this.editor.graph.getSelectionCell(),S=this.editor.graph.getModel().getStyle(S),this.styleInput.value=S||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var da=this.isSelectionAllowed;this.isSelectionAllowed=function(S){return mxEvent.getSource(S)==this.styleInput?!0:da.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var W=null;
+mxEvent.addListener(f.container,"dragleave",function(S){f.isEnabled()&&(null!=W&&(W.parentNode.removeChild(W),W=null),S.stopPropagation(),S.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(S){null==W&&(!mxClient.IS_IE||10<document.documentMode)&&(W=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();S.stopPropagation();S.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(S){null!=W&&(W.parentNode.removeChild(W),
+W=null);if(f.isEnabled()){var k=mxUtils.convertPoint(f.container,mxEvent.getClientX(S),mxEvent.getClientY(S)),B=S.dataTransfer.files,K=f.view.translate,T=f.view.scale,P=k.x/T-K.x,U=k.y/T-K.y;if(0<B.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(S)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(B,!0)):(mxEvent.isAltDown(S)&&(U=P=null),this.importFiles(B,P,U,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(S),null,null,mxEvent.isShiftDown(S),
+S));else{mxEvent.isAltDown(S)&&(U=P=0);var Y=0<=mxUtils.indexOf(S.dataTransfer.types,"text/uri-list")?S.dataTransfer.getData("text/uri-list"):null;k=this.extractGraphModelFromEvent(S,null!=this.pages);if(null!=k)f.setSelectionCells(this.importXml(k,P,U,!0));else if(0<=mxUtils.indexOf(S.dataTransfer.types,"text/html")){var aa=S.dataTransfer.getData("text/html");k=document.createElement("div");k.innerHTML=Graph.sanitizeHtml(aa);var la=null;B=k.getElementsByTagName("img");null!=B&&1==B.length?(aa=B[0].getAttribute("src"),
+null==aa&&(aa=B[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)||(la=!0)):(B=k.getElementsByTagName("a"),null!=B&&1==B.length?aa=B[0].getAttribute("href"):(k=k.getElementsByTagName("pre"),null!=k&&1==k.length&&(aa=mxUtils.getTextContent(k[0]))));var va=!0,ua=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(aa,P,U,!0,la,null,va,mxEvent.isControlDown(S)))});la&&null!=aa&&aa.length>this.resampleThreshold?this.confirmImageResize(function(qa){va=qa;ua()},mxEvent.isControlDown(S)):
+ua()}else null!=Y&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Y)?this.loadImage(decodeURIComponent(Y),mxUtils.bind(this,function(qa){var Ba=Math.max(1,qa.width);qa=Math.max(1,qa.height);var ya=this.maxImageSize;ya=Math.min(1,Math.min(ya/Math.max(1,Ba)),ya/Math.max(1,qa));f.setSelectionCell(f.insertVertex(null,null,"",P,U,Ba*ya,qa*ya,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+Y+";"))}),mxUtils.bind(this,function(qa){f.setSelectionCells(this.insertTextAt(Y,
+P,U,!0))})):0<=mxUtils.indexOf(S.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(S.dataTransfer.getData("text/plain"),P,U,!0))}}S.stopPropagation();S.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh(!0)}));this.addListener("realtimeStateChanged",mxUtils.bind(this,
+function(){this.updateButtonContainer()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker();this.refresh()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var S=parseInt(this.div.offsetLeft),k=parseInt(this.div.offsetWidth),B=c.embedViewport.x+c.embedViewport.width,K=parseInt(this.div.offsetTop),
+T=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(S,B-k))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(K,P-T))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ca=Editor.currentTheme,"simple"==ca||"sketch"==ca)this.doSetCurrentTheme(ca,
+!0),"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1),this.fireEvent(new mxEventObject("themeInitialized"));ca=!1;if(null!=urlParams.dark)ca=urlParams.dark;else if(!this.editor.chromeless||this.editor.editable)ca="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ca&&"auto"!=mxSettings.settings.darkMode||(ca=mxSettings.settings.darkMode);
+"auto"==ca&&this.isAutoDarkModeSupported()&&(ca=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ca?"1"==ca:ca);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(S){this.isAutoDarkMode()&&this.setDarkMode(S.matches)}))}catch(S){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&
+null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);Editor.isSettingsEnabled()&&(null!=mxSettings.settings.pages&&this.setTabContainerVisible(mxSettings.settings.pages),null!=mxSettings.settings.compactMode&&this.isDefaultTheme(Editor.currentTheme)&&this.setCompactMode(mxSettings.settings.compactMode));this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(S,k){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));
+f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts();"atlas"==Editor.currentTheme&&document.body.classList.add("geAtlas")};var A=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=
+f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}A.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==
+this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var q=document.createElement("div");q.style.position="absolute";q.style.width="10px";q.style.height="10px";q.style.borderRadius="5px";q.style.border="1px solid gray";q.style.background="#ffffff";q.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(q);this.bottomResizer=q;var D=null,H=null,N=null,L=null;
+mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){L=parseInt(this.diagramContainer.style.height);H=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));q=q.cloneNode(!1);q.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(q);this.rightResizer=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);D=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,
+null,mxUtils.bind(this,function(I){var Z=!1;null!=D&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-D)+"px",Z=!0);null!=H&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(I)-H)+"px",Z=!0);Z&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==D&&null==H||mxEvent.consume(I);H=D=null});
+document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width=
+"10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=
+f.clipboardData||f.originalEvent.clipboardData,t=!1,q=0;q<l.types.length;q++)if("text/"===l.types[q].substring(0,5)){t=!0;break}if(!t){var D=l.items;for(index in D){var H=D[index];if("file"===H.kind){if(c.isEditing())this.importFiles([H.getAsFile()],0,0,this.maxImageSize,function(L,I,Z,ia,fa,ba){c.insertImage(L,fa,ba)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var I=0;I<L.length;I++)L[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([H.getAsFile()],
+N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(L){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily=
+"monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(D){var H=mxEvent.getSource(D);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==H.nodeName||"TEXTAREA"==H.nodeName||"true"==H.contentEditable||224!=D.keyCode&&(mxClient.IS_MAC||17!=D.keyCode)&&(!mxClient.IS_MAC||91!=D.keyCode&&93!=D.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",D=f.container.scrollLeft,H=f.container.scrollTop,f.container.appendChild(l),
+t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=D,f.container.scrollTop=H)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(D){var H=D.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||224!=H&&17!=H&&91!=H&&93!=H||(t=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),l.parentNode.removeChild(l),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(l,"copy",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(l),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"cut",mxUtils.bind(this,function(D){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(l,!0),c()}catch(H){this.handleError(H)}}));mxEvent.addListener(l,"paste",mxUtils.bind(this,function(D){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent()))try{if(l.innerHTML="&nbsp;",l.focus(),null!=D.clipboardData&&(Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!0,!0)),!mxEvent.isConsumed(D)){var H=f.container.scrollLeft,
+N=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{f.container.scrollLeft=H,f.container.scrollTop=N,Graph.removePasteFormatting(l.firstChild),this.pasteCells(D,l,!1,!0)}catch(L){this.handleError(L)}}),0)}}catch(L){this.handleError(L)}}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==l?!0:q.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,f){mxSettings.setUi(c);(f=this.doSetCurrentTheme(c)||f)||this.alert(mxResources.get("restartForChangeRequired"))};
+EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,f){if(null==c||""==c)c=App.isSimpleThemePreferred()?"simple":"kennedy";var l="simple"==Editor.currentTheme&&this.isDefaultTheme(c)||this.isDefaultTheme(Editor.currentTheme)&&"simple"==c||c==Editor.currentTheme;if(l||f)f=this.saveScrollState(),this.editor.graph.stopEditing(!1),Editor.currentTheme=c,this.switchTheme(c),this.fireEvent(new mxEventObject("currentThemeChanged")),
+this.editor.fireEvent(new mxEventObject("statusChanged")),this.restoreScrollState(f);return l};EditorUi.prototype.saveScrollState=function(c){var f=this.editor.graph.view.translate,l=this.diagramContainer.scrollLeft,t=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(l-=this.embedViewport.x,t-=this.embedViewport.y):(l+=this.embedViewport.x,t+=this.embedViewport.y));f={x:l,y:t,tx:f.x,ty:f.y};c&&(f.boundingRect=this.diagramContainer.getBoundingClientRect());return f};
+EditorUi.prototype.restoreScrollState=function(c){var f=this.editor.graph.view.scale,l=this.editor.graph.view.translate;if(null!=c.boundingRect){var t=this.diagramContainer.getBoundingClientRect();c.x-=c.boundingRect.x-t.x;c.y-=c.boundingRect.y-t.y}this.diagramContainer.scrollLeft=c.x+(l.x-c.tx)*f;this.diagramContainer.scrollTop=c.y+(l.y-c.ty)*f};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,
+function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="")}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(){"sketch"!=Editor.currentTheme||f||(this.statusContainer.style.display="none")}));var l=mxUtils.bind(this,function(){if("sketch"==Editor.currentTheme){var t=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=t&&null!=t.getAttribute("class");
+if(!f&&null!=t){t=t.getAttribute("title");var q=this.getCurrentFile();q=null!=q?q.savingStatusKey:DrawioFile.prototype.savingStatusKey;t==mxResources.get(q)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(q))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";t=32>=c.clientWidth;c.style.visibility=t&&""==this.editor.getStatus()?"hidden":"";if(t||f)this.statusContainer.style.display="",f=!0}else"simple"==Editor.currentTheme?
+(this.statusContainer.style.display="",this.statusContainer.style.display=0==this.statusContainer.clientWidth?"none":""):this.statusContainer.style.display=""});this.editor.addListener("statusChanged",l);l()};EditorUi.prototype.switchTheme=function(c){this.destroyWindows(!0);this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);"sketch"==c&&(this.createFormatWindow(),
+this.createShapesWindow())};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.fit()};EditorUi.prototype.hideWindows=
+function(){for(var c=this.getWindows(),f=0;f<c.length;f++)null!=c[f]&&c[f].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(c){null==this.sidebarWindow||c||(this.sidebarWindow.destroy(),this.sidebarWindow=null);null==this.formatWindow||c||(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=
+this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.chatWindow&&(this.menus.chatWindow.destroy(),this.menus.chatWindow=null),null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=
+this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=function(c){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=c&&"sketch"!=c);if("simple"==c||"sketch"==c){Editor.fitWindowBorders=new mxRectangle(60,30,30,30);if(null==Editor.config||
+null==Editor.config.defaultEdgeLength)f.defaultEdgeLength=120;null==urlParams.grid&&(f.defaultGridEnabled=!1);null==urlParams.pv&&(f.defaultPageVisible=!1)}else Editor.fitWindowBorders=null};EditorUi.prototype.isPageMenuVisible=function(){return null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)};EditorUi.prototype.switchCssForTheme=function(c){};EditorUi.prototype.createMainMenuForTheme=function(c){};EditorUi.prototype.createFooterMenuForTheme=function(c){};EditorUi.prototype.createPickerMenuForTheme=
+function(c){};EditorUi.prototype.getNetworkStatus=function(){var c=null;if(this.isOffline(!0))c=mxResources.get("offline");else{var f=this.getCurrentFile();null!=f&&(f.invalidChecksum?c=mxResources.get("error")+": "+mxResources.get("checksum"):null==f.sync||f.sync.enabled&&f.sync.isRealtimeActive()||"atlassian"==this.getServiceName()?null==f.sync||f.sync.isConnected()?f.isRealtimeEnabled()&&f.isRealtimeSupported()&&1<f.getRealtimeState()&&(c=f.getRealtimeError(),c=mxResources.get("realtimeCollaboration")+
+": "+(null!=c&&null!=c.message?c.message:mxResources.get("error"))):c=mxResources.get("notConnected"):c=mxResources.get("realtimeCollaboration")+": "+mxResources.get("disabled"))}return c};EditorUi.prototype.createMenubarForTheme=function(c){null!=this.statusContainer&&(this.statusContainer.style.flexGrow="",this.statusContainer.style.flexShrink="",this.statusContainer.style.width="",this.statusContainer.style.marginTop="",this.statusContainer.style.justifyContent="",this.statusContainer.style.opacity=
+"");null!=this.userElement&&this.menubarContainer.appendChild(this.userElement);null!=this.buttonContainer&&null!=this.menubar&&(this.buttonContainer.style.display="",this.menubar.container.appendChild(this.buttonContainer))};EditorUi.prototype.createMenu=function(c,f,l,t){l=null!=l?l:"geButton";var q=this.menus.get(c);t=this.menubar.addMenu(mxResources.get(c),q.funct,null,t);t.className=l;t.setAttribute("title",mxResources.get(c));this.menus.menuCreated(q,t,l);null!=f&&(t.style.backgroundImage="url("+
+f+")",t.innerText="");return t};EditorUi.prototype.addButton=function(c,f,l,t){c=this.createToolbarButton(c,f,l);t=null!=t?t:this.container;t.appendChild(c);return c};EditorUi.prototype.createToolbarButton=function(c,f,l){var t=document.createElement("a");t.className="geButton";null!=c&&"data:"==c.substring(0,5)&&(t.style.backgroundImage="url("+c+")");null!=f&&t.setAttribute("title",f);null!=l&&mxEvent.addListener(t,"click",function(q){"disabled"!=t.getAttribute("disabled")&&l(q);mxEvent.consume(q)});
+mxEvent.preventDefault(t);return t};EditorUi.prototype.createMenuItem=function(c,f,l){var t=this.actions.get(c),q=null!=t?t.funct:null,D=this.createToolbarButton(f,mxResources.get(c)+(null!=t&&null!=t.shortcut?" ("+t.shortcut+")":""),q);null==t||l||(c=function(){t.isEnabled()?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")},this.editor.graph.addListener("enabledChanged",c),t.addListener("stateChanged",c),c());return D};EditorUi.prototype.createFormatWindow=function(){if(null==
+this.formatWindow){var c=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),c,60,240,f,mxUtils.bind(this,function(q){q.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));var l=this.formatWindow.window.toggleMinimized,
+t=240;this.formatWindow.window.toggleMinimized=function(){l.apply(this,arguments);this.minimized?(t=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+t-140+"px"):(this.div.style.width=t+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-t+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(q){mxEvent.getSource(q)==
+this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?window.setTimeout(mxUtils.bind(this,mxUtils.bind(this,function(){var q=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,D=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;this.formatWindow.window.setVisible(!0);(1E3>q||690>D)&&this.formatWindow.window.toggleMinimized()}),
+0)):this.formatWindow.window.setVisible(!1)}};var G=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var f=this.formatWindow;null!=f?f.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):G.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){if(this.isShapesPanelVisible()!=c){var f=EditorUi.prototype.hsplitPosition;0==f&&(f=this.defaultSidebarWidth);var l=this.hsplitPosition,t=mxUtils.bind(this,function(){this.hsplitPosition=q;this.refresh();
+this.diagramContainer.scrollLeft-=l-this.hsplitPosition}),q=c?f:0,D=Editor.transitionDelay;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(0)":"translateX(-100%)");0!=q&&t();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==q?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform "+D+"s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,
+"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==q&&t()}),1E3*D)}),0)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var R=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=
+this.formatWindow;return null!=c?c.window.isVisible():R.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var f=mxUtils.bind(this,function(H,N){var L=this.menus.get(H);H=this.createMenuElement(N,mxUtils.bind(this,function(){L.funct.apply(this,arguments)}));H.setAttribute("title",N);H.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;";H.className="geButton";c.parentNode.appendChild(H);return H});if(Editor.enableCustomLibraries&&
+("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=this.actions.get("newLibrary"))f=document.createElement("div"),f.style.cssText="position:absolute;border-style:solid;bottom:0px;margin:0;border-radius:0;border-width:1px 0 0 0;",f.className="geButton",f.style.left="0px",f.style.right="50%",mxUtils.write(f,mxResources.get("newLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.right="0px",mxUtils.write(f,
+mxResources.get("openLibrary")),c.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct);else{var l=f("newLibrary","");l.style.left="0px";l.style.right="50%";var t=document.createElement("span");l.appendChild(t);var q=f("openLibraryFrom","");q.style.borderLeftWidth="1px";q.style.left="50%";q.style.right="0px";var D=document.createElement("span");q.appendChild(D);this.dependsOnLanguage(mxUtils.bind(this,function(){t.innerHTML="";mxUtils.write(t,mxResources.get("newLibrary"));
+l.setAttribute("title",mxResources.get("newLibrary"));D.innerHTML="";mxUtils.write(D,mxResources.get("openLibraryFrom"));q.setAttribute("title",mxResources.get("openLibraryFrom"))}))}c.appendChild(this.sidebar.container);c.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var c=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650),l="simple"==Editor.currentTheme||
+"sketch"==Editor.currentTheme;this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),l&&"1"!=urlParams.embedInline?66:10,l&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,c-6,f-6,mxUtils.bind(this,function(t){this.createShapesPanel(t)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};
+EditorUi.prototype.setSketchMode=function(c){this.doSetSketchMode(c);null==urlParams.rough&&(mxSettings.settings.sketchMode=c,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))};EditorUi.prototype.setAndPersistDarkMode=function(c){var f=c;"auto"==c&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode(f);mxSettings.settings.darkMode=c;mxSettings.save();c=mxSettings.getUi();null==urlParams.ui&&"dark"==c&&this.setCurrentTheme("kennedy",
+!0)};EditorUi.prototype.setAndPersistLanguage=function(c){this.spinner.spin(document.body,mxResources.get("working"))&&(mxSettings.setLanguage(c),mxSettings.save(),mxClient.language=c,mxResources.loadDefaultBundle=!1,mxResources.add(RESOURCE_BASE,null,mxUtils.bind(this,function(){this.spinner.stop();this.fireEvent(new mxEventObject("languageChanged"))})))};EditorUi.prototype.setElementTitle=function(c,f){this.dependsOnLanguage(mxUtils.bind(this,function(){c.setAttribute("title",mxResources.get(f))}))};
+EditorUi.prototype.dependsOnLanguage=function(c){c();this.addListener("languageChanged",c)};EditorUi.prototype.setAndPersistHighContrast=function(c){this.setHighContrast(c);Editor.isSettingsEnabled()&&(mxSettings.settings.highContrast=c,mxSettings.save())};EditorUi.prototype.isHighContrast=function(){var c=document.getElementById("high-contrast-stylesheet");return null!=c&&window.matchMedia?(c=c.getAttribute("media"),"all"==c||"not all"!=c&&window.matchMedia("(forced-colors: active)").matches):!1};
+EditorUi.prototype.setHighContrast=function(c){var f=document.getElementById("high-contrast-stylesheet");if(null!=f&&window.matchMedia){var l=window.matchMedia("(forced-colors: active)").matches,t=f.getAttribute("media");(t="all"==t||"not all"!=t&&l)&&!c?f.setAttribute("media",l?"not all":"(forced-colors: active)"):!t&&c&&f.setAttribute("media",l?"(forced-colors: active)":"all")}};EditorUi.prototype.isRulerVisible=function(){return null!=this.ruler};EditorUi.prototype.setRulerVisible=function(c){var f=
+this.getDiagramContainerOffset();mxSettings.setRulerOn(c);mxSettings.save();c||null==this.ruler?c&&null==this.ruler&&(this.ruler=new mxDualRuler(this,this.editor.graph.view.unit)):(this.ruler.destroy(),this.ruler=null);this.fireEvent(new mxEventObject("rulerVisibleChanged"));c=this.getDiagramContainerOffset();this.diagramContainer.scrollLeft+=c.x-f.x;this.diagramContainer.scrollTop+=c.x-f.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=
+function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&"auto"==mxSettings.settings.darkMode};EditorUi.prototype.setDarkMode=function(c){mxUtils.lightDarkColorSupported&&(Editor.darkMode=c,c=mxUtils.isAncestorNode(document.body,this.container)||null==this.editor?this.container:this.editor.graph.container,mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000ff",null!=c&&(Editor.isDarkMode()?(c.classList.add("geDarkMode"),c.style.colorScheme="dark"):(c.classList.remove("geDarkMode"),
+c.style.colorScheme="light")),null!=this.ruler&&this.ruler.updateStyle(),this.fireEvent(new mxEventObject("darkModeChanged")))};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,f){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,Editor.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=
+c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(c){Editor.inlineFullscreen!=c&&(this.diagramContainer.setAttribute("data-scrollState",JSON.stringify(this.saveScrollState(!0))),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:c,rect:this.diagramContainer.getBoundingClientRect()}),"*"))};EditorUi.prototype.inlineSizeChanged=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,
+l=this.sketchPickerMenuElt;if(Editor.inlineFullscreen)f.style.left="10px",f.style.top="10px",l.style.left="10px",l.style.top="60px",c.style.top="10px",c.style.right="12px",c.style.left="",null==this.diagramContainer.getAttribute("data-bounds")&&(this.diagramContainer.setAttribute("data-bounds",this.diagramContainer.style.top+" "+this.diagramContainer.style.left+" "+this.diagramContainer.style.width+" "+this.diagramContainer.style.height),this.diagramContainer.style.top="0px",this.diagramContainer.style.left=
+"0px",this.diagramContainer.style.bottom="0px",this.diagramContainer.style.right="0px",this.diagramContainer.style.width="",this.diagramContainer.style.height="");else{var t=this.diagramContainer.getAttribute("data-bounds");if(null!=t){this.diagramContainer.removeAttribute("data-bounds");var q=t.split(" ");t=mxUtils.getDocumentSize();this.diagramContainer.style.top=q[0];this.diagramContainer.style.left=q[1];var D=parseInt(q[2]);q=parseInt(q[3]);D=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,
+D):D,t.width-80);q=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,q):q,t.height-80);this.diagramContainer.style.width=D+"px";this.diagramContainer.style.height=q+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:this.diagramContainer.getBoundingClientRect()}),"*")}f.style.left=this.diagramContainer.offsetLeft+"px";f.style.top=this.diagramContainer.offsetTop-f.offsetHeight-
+4+"px";l.style.display="";l.style.left=this.diagramContainer.offsetLeft-l.offsetWidth-4+"px";l.style.top=this.diagramContainer.offsetTop+"px";c.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-c.offsetWidth+"px";c.style.top=f.style.top;c.style.right="";this.bottomResizer.style.left=this.diagramContainer.offsetLeft+(this.diagramContainer.offsetWidth-this.bottomResizer.offsetWidth)/2+"px";this.bottomResizer.style.top=this.diagramContainer.offsetTop+this.diagramContainer.offsetHeight-
+this.bottomResizer.offsetHeight/2-1+"px";this.rightResizer.style.left=this.diagramContainer.offsetLeft+this.diagramContainer.offsetWidth-this.rightResizer.offsetWidth/2-1+"px";this.rightResizer.style.top=this.diagramContainer.offsetTop+(this.diagramContainer.offsetHeight-this.bottomResizer.offsetHeight)/2+"px"}this.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";this.rightResizer.style.visibility=this.bottomResizer.style.visibility;f.style.visibility="";c.style.visibility=""};EditorUi.prototype.doSetSketchMode=
+function(c){Editor.sketchMode!=c&&(Editor.sketchMode=c,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var c=this.editor.graph;c.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);c.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);if(null==Editor.config||null==Editor.config.defaultVertexStyle&&null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.vertexFontSize=16,c.edgeFontSize=c.vertexFontSize-
+4):"sketch"==Editor.currentTheme?(c.vertexFontSize=20,c.edgeFontSize=c.vertexFontSize-4):(c.vertexFontSize=Graph.prototype.vertexFontSize,c.edgeFontSize=Graph.prototype.edgeFontSize),c.defaultEdgeStyle.fontSize=c.edgeFontSize;if(null==Editor.config||null==Editor.config.defaultEdgeStyle)"simple"==Editor.currentTheme||"1"==urlParams.embedInline?(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.endSize="8",c.defaultEdgeStyle.startSize=
+"8"):"sketch"==Editor.currentTheme&&(c.defaultEdgeStyle.edgeStyle="none",c.defaultEdgeStyle.curved="1",c.defaultEdgeStyle.rounded="0",c.defaultEdgeStyle.jettySize="auto",c.defaultEdgeStyle.orthogonalLoop="1",c.defaultEdgeStyle.endArrow="open",c.defaultEdgeStyle.endSize="14",c.defaultEdgeStyle.startSize="14",c.defaultEdgeStyle.sourcePerimeterSpacing="8",c.defaultEdgeStyle.targetPerimeterSpacing="8");if(null==Editor.config||null==Editor.config.defaultFonts){if(null==Editor.config||null==Editor.config.defaultVertexStyle&&
+null==Editor.config.defaultEdgeStyle){if("sketch"==Editor.currentTheme&&"1"!=urlParams.embedInline||Editor.sketchMode)c.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,c.defaultVertexStyle.fontSource=Editor.sketchFontSource,c.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,c.defaultEdgeStyle.fontSource=Editor.sketchFontSource;Editor.sketchMode&&(c.defaultVertexStyle.sketch="1",c.defaultVertexStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultVertexStyle.jiggle=Editor.sketchDefaultJiggle,
+c.defaultVertexStyle.hachureGap="4",c.defaultEdgeStyle.sketch="1",c.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,c.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,c.defaultEdgeStyle.hachureGap="4")}this.menus.defaultFonts="sketch"==Editor.currentTheme?Menus.prototype.defaultFonts.concat(Editor.sketchFonts):Menus.prototype.defaultFonts}c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=
+function(c){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(c)){var l=c.indexOf(",");0<l&&(f=this.getPageById(c.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==c.substring(0,5)&&(f=this.getCustomLinkTitle(c));return f};EditorUi.prototype.getCustomLinkTitle=function(c){var f=mxResources.get("action");if("data:action/json,"==c.substring(0,17))try{var l=JSON.parse(c.substring(17));null!=l&&null!=l.title&&(f=l.title)}catch(t){}return f};
+EditorUi.prototype.handleCustomLink=function(c,f){if(Graph.isPageLink(c))if(f=c.indexOf(","),c=this.getPageById(c.substring(f+1)))this.selectPage(c);else throw Error(mxResources.get("pageNotFound")||"Page not found");else this.editor.graph.handleCustomLink(c,f)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){var c=this.editor.graph;Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",
+mxUtils.bind(this,function(f){f.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(f){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(f,l){mxSettings.setCustomFonts(this.menus.customFonts);mxSettings.save()}));c.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(f,l){mxSettings.setCreateTarget(c.connectionHandler.isCreateTarget());mxSettings.save()}));c.pageFormat=null!=c.defaultPageFormat?c.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(f,l){mxSettings.setPageFormat(c.pageFormat);mxSettings.save()}));c.view.defaultDarkGridColor=mxSettings.getGridColor(!0);c.view.defaultGridColor=
+mxSettings.getGridColor(!1);c.view.gridColor="light-dark("+c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(f,l){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(f,l){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),
+this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(f,l){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,f,l){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,
+mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(t,q){try{this.spinner.stop();var D=this.createImageDataUri(t,f,"png"),H=parseInt(q.getAttribute("width")),N=parseInt(q.getAttribute("height"));this.writeImageToClipboard(D,H,N,mxUtils.bind(this,function(L){this.handleError(L)}))}catch(L){this.handleError(L)}}),null,null,null,mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t)}),null,null,null!=l?l:4,null==this.editor.graph.background||this.editor.graph.background==
+mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(t){this.handleError(t)}};EditorUi.prototype.copyCells=function(c,f){var l=this.editor.graph;if(l.isSelectionEmpty())c.innerText="";else{var t=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),q=mxUtils.getXml(l.encodeCells(t));mxUtils.setTextContent(c,encodeURIComponent(q));f?(l.removeCells(t,!1),l.lastPasteXml=null):(l.lastPasteXml=q,l.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};
+EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(c)),navigator.clipboard.writeText(f))}return c};EditorUi.prototype.pasteXml=function(c,f,l,t,q){q=null!=q?q:!0;var D=this.editor.graph,H=null;D.lastPasteXml==c?D.pasteCounter++:(D.lastPasteXml=c,D.pasteCounter=0);var N=D.pasteCounter*D.gridSize;if(l||this.isCompatibleString(c))H=
+this.importXml(c,N,N),D.setSelectionCells(H);else if(f&&1==D.getSelectionCount()){q=D.getStartEditingCell(D.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==D.getCurrentCellStyle(q)[mxConstants.STYLE_SHAPE])D.setCellStyles(mxConstants.STYLE_IMAGE,c,[q]);else{D.model.beginUpdate();try{D.labelChanged(q,c),Graph.isLink(c)&&D.setLinkForCell(q,c)}finally{D.model.endUpdate()}}D.setSelectionCell(q)}else H=D.getInsertPoint(),D.isMouseInsertPoint()&&(N=0,D.lastPasteXml==c&&0<D.pasteCounter&&
+D.pasteCounter--),H=this.insertTextAt(c,H.x+N,H.y+N,q),D.setSelectionCells(H);D.isSelectionEmpty()||(D.scrollCellToVisible(D.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(D.view.getState(D.getSelectionCell())));return H};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var q=f,D=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var H=c.clipboardData.getData("text/plain"),N=!1;if(null!=H&&0<H.length&&"%3CmxGraphModel%3E"==H.substring(0,18))try{var L=
+decodeURIComponent(H);this.isCompatibleString(L)&&(N=!0,H=L)}catch(na){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(q=this.parseHtmlData(N),D="text/plain"!=q.getAttribute("data-type")):null!=H&&0<H.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,N))}H=q.getElementsByTagName("span");if(null!=H&&0<H.length&&"application/vnd.lucid.chart.objects"===H[0].getAttribute("data-lucid-type"))l=H[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,
+mxUtils.bind(this,function(na){var X=this.editor.graph;X.lastPasteXml==na?X.pasteCounter++:(X.lastPasteXml=na,X.pasteCounter=0);var ca=X.pasteCounter*X.gridSize;X.setSelectionCells(this.importXml(na,ca,ca));X.scrollCellToVisible(X.getSelectionCell())}),mxUtils.bind(this,function(na){this.handleError(na)})),mxEvent.consume(c));else{var I=!1,Z="";Z=D?null!=q.textContent&&"<mxfile"==q.textContent.substring(0,7)&&"</mxfile>"==q.textContent.substring(q.textContent.length-9)||"<mxGraphModel"==q.textContent.substring(0,
+13)&&"</mxGraphModel>"==q.textContent.substring(q.textContent.length-15)?q.textContent.replace(/\u00a0/g," "):q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);try{var ia=Z.lastIndexOf("%3E");0<=ia&&ia<Z.length-3&&(Z=Z.substring(0,ia+3))}catch(na){}try{H=q.getElementsByTagName("span"),(L=null!=H&&0<H.length?mxUtils.trim(decodeURIComponent(H[0].textContent)):decodeURIComponent(Z))&&(this.isCompatibleString(L)||0==L.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&
+(I=!0,Z=L)}catch(na){}try{if(null!=Z&&0<Z.length){if(0==Z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var fa=mxUtils.bind(this,function(){try{Z=(new MiroImporter).importMiroJson(JSON.parse(Z)),this.pasteXml(Z,t,I,c)}catch(na){console.log("Miro import error:",na)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",fa):fa()}else this.pasteXml(Z,t,I,c,D);try{mxEvent.consume(c)}catch(na){}}else if(!l){var ba=this.editor.graph;ba.lastPasteXml=null;ba.pasteCounter=
+0}}catch(na){this.handleError(na)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f,l){var t=320;this.editor.graph.isEnabled()&&(t+=40);null!=this.pages&&1<this.pages.length&&(t+=40,this.editor.graph.isEnabled()||(t+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(t+=20);this.showDialog((new PrintDialog(this,c,f,l)).container,320,t,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,q=this.getPageIndex(this.currentPage),D=null!=
+q?q+1:1,H=mxUtils.bind(this,function(ca,ka,da,W){var S=ca.useCssTransforms,k=ca.currentTranslate,B=ca.currentScale,K=ca.view.translate,T=ca.view.scale;ca.useCssTransforms&&(ca.useCssTransforms=!1,ca.currentTranslate=new mxPoint(0,0),ca.currentScale=1,ca.view.translate=new mxPoint(0,0),ca.view.scale=1);var P=ca.getGraphBounds(),U=0,Y=0,aa=mxRectangle.fromRectangle(ca.pageFormat),la=f.fit||f.crop||!ca.pageVisible,va=f.scale;aa.width=Math.ceil(aa.width*ca.pageScale);aa.height=Math.ceil(aa.height*ca.pageScale);
+var ua=1;if(f.fit){ua=f.sheetsAcross;var qa=f.sheetsDown;isNaN(va)||(aa.width=Math.ceil(aa.width*va),aa.height=Math.ceil(aa.height*va));ua=Math.min(aa.height*qa/(P.height/ca.view.scale),aa.width*ua/(P.width/ca.view.scale))}else ua=isNaN(va)?1:va;ua*=1;!la&&ca.pageVisible?(va=ca.getPageLayout(),U-=va.x*aa.width,Y-=va.y*aa.height):la=!0;f.crop&&(f.selection&&(P=t.getBoundingBox(t.getSelectionCells())),aa.width=(P.width+1)*ua/ca.view.scale,aa.height=(P.height+1)*ua/ca.view.scale);aa.width=Math.ceil(1*
+aa.width);aa.height=Math.ceil(1*aa.height);W=null!=W?"page/id,"+W:null;if(null==ka){ka=PrintDialog.createPrintPreview(ca,ua,null,0,U,Y,la);ka.title=this.getBaseFilename(!0);ka.pageSelector=!1;ka.mathEnabled=!1;U=f.border;isNaN(U)||(ka.pageMargin=U);f.selection&&(ka.isCellVisible=function(Aa){return ca.isCellSelected(Aa)});var Ba=ka.writeHead;ka.writeHead=function(Aa){Ba.apply(this,arguments);mxClient.IS_GC&&(Aa.writeln('<style type="text/css">'),Aa.writeln("@media print {"),Aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
+Aa.writeln("}"),Aa.writeln("</style>"));null!=l.fontCss&&(Aa.writeln('<style type="text/css">'),Aa.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),Aa.writeln("</style>"));for(var Ea=ca.getCustomFonts(),pa=0;pa<Ea.length;pa++){var Ca=Ea[pa].name,za=Ea[pa].url;Graph.isCssFontUrl(za)?Aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(za))+'" charset="UTF-8" type="text/css">'):(Aa.writeln('<style type="text/css">'),Aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ca)+
+'";\nsrc: url("'+mxUtils.htmlEntities(za)+'");\n}'),Aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ya=ka.drawBackgroundImage;ka.drawBackgroundImage=function(Aa){ya.apply(this,arguments);null!=Aa.node&&(EditorUi.embedSvgImages(Aa.node),t.disableSvgLinks(Aa.node,function(Ea){Ea.setAttribute("href","javascript:void(0)")}))}}var La=ka.addGraphFragment;ka.addGraphFragment=function(Aa,Ea,pa,Ca,za,wa){La.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:za.classList.add("geDisableMathJax")};
+f.grid&&(ka.gridSize=ca.gridSize,ka.gridSteps=ca.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ca.view.gridColor);ka.open(null,null,da,!0,W,aa,f.selection?ca.getSelectionCells():null)}else{P=ca.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";ka.backgroundColor=P;ka.autoOrigin=la;f.grid&&(ka.gridSize=ca.gridSize,ka.gridSteps=ca.view.gridSteps,ka.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ca.view.gridColor);ka.appendGraph(ca,
+ua,U,Y,da,!0,W,aa,f.selection?ca.getSelectionCells():null);da=ca.getCustomFonts();if(null!=ka.wnd)for(aa=0;aa<da.length;aa++)U=da[aa].name,Y=da[aa].url,Graph.isCssFontUrl(Y)?ka.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Y)+'" charset="UTF-8" type="text/css">'):(ka.wnd.document.writeln('<style type="text/css">'),ka.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(U)+'";\nsrc: url("'+mxUtils.htmlEntities(Y)+'");\n}'),ka.wnd.document.writeln("</style>"))}S&&
+(ca.useCssTransforms=S,ca.currentTranslate=k,ca.currentScale=B,ca.view.translate=K,ca.view.scale=T);return ka}),N=f.pagesFrom,L=f.pagesTo,I=!f.allPages;q=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==D&&L==D);if(!I&&null!=this.pages&&this.pages.length){I=0;D=this.pages.length-1;f.allPages||(I=parseInt(N)-1,D=parseInt(L)-1);for(var Z=I;Z<=D;Z++){var ia=this.pages[Z];N=ia==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);N.shapeForegroundColor=
+t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;L=!0;I=!1;var fa=null,ba=null;null==ia.viewState&&null==ia.root&&this.updatePageRoot(ia);null!=ia.viewState&&(L=ia.viewState.pageVisible,I=ia.viewState.mathEnabled,fa=ia.viewState.background,ba=ia.viewState.backgroundImage,N.pageFormat=ia.viewState.pageFormat,N.gridSize=ia.viewState.gridSize);null!=ba&&null!=ba.originalSrc&&(ba=this.createImageForPageLink(ba.originalSrc,ia));N.background=fa;N.backgroundImage=null!=ba?new mxImage(ba.src,
+ba.width,ba.height,ba.x,ba.y):null;N.pageVisible=L;N.mathEnabled=I;var na=N.getGraphBounds;N.getGraphBounds=function(){var ca=na.apply(this,arguments),ka=this.backgroundImage;if(null!=ka&&null!=ka.width&&null!=ka.height){var da=this.view.translate,W=this.view.scale;ca=mxRectangle.fromRectangle(ca);ca.add(new mxRectangle((da.x+ka.x)*W,(da.y+ka.y)*W,ka.width*W,ka.height*W))}return ca};var X=N.getGlobalVariable;N.getGlobalVariable=function(ca){return"page"==ca?ia.getName():"pagenumber"==ca?Z+1:"pagecount"==
+ca?null!=this.pages?this.pages.length:1:X.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ia);N.model.setRoot(ia.root)}q=H(N,q,Z!=D,ia.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else q=H(t);null==q||null==q.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(H=q.wnd.document,c||(q.wnd.IMMEDIATE_PRINT=!0),H.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),q.closeDocument(),Graph.rewritePageLinks(q.wnd.document,
+!0),q.mathEnabled||c||PrintDialog.printPreview(q));return q}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&
+(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(t);
+if(null==q){var D=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=D&&(10==document.documentMode||11==document.documentMode?q=D.getData("Text"):(q=null,q=0<=mxUtils.indexOf(D.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(D.types,"text/html")?D.getData("text/html"):null,null!=q&&0<q.length?(D=document.createElement("div"),D.innerHTML=Graph.sanitizeHtml(q),D=D.getElementsByTagName("img"),0<D.length&&(q=D[0].getAttribute("src"))):0<=mxUtils.indexOf(D.types,
+"text/plain")&&(q=D.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(H){200<=H.getStatus()&&299>=H.getStatus()?this.openLocalFile(H.getText(),null,!0):this.showError(mxResources.get("error"),
+413==H.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;
+var q=document.documentElement;var D=(t.clientWidth||q.clientWidth)-3;t=Math.max(t.clientHeight||0,q.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,D=c.clientWidth,t=c.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=l+"px";q.style.width=Math.max(0,D-3)+"px";q.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,q,D){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||
+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var H=mxUtils.bind(this,function(L){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==L.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,L,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(L,
+f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(L){4==L.readyState&&(this.spinner.stop(),
+200<=L.status&&299>=L.status?H(L.responseText):this.handleError({message:mxResources.get(413==L.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(L){this.spinner.stop();this.openLocalFile(L,f,t)}),mxUtils.bind(this,function(L){this.spinner.stop();this.handleError(L)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(L){this.handleError(L,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(L){this.spinner.stop();H(L)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);
+else if("application/pdf"==l.type){var N=Editor.extractGraphModelFromPdf(c);null!=N&&(q=null,t=!0,c=N)}this.spinner.stop();this.openLocalFile(c,f,t,q,null!=q?l:null,D)}}};EditorUi.prototype.openFiles=function(c,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<c.length;l++)mxUtils.bind(this,function(t){var q=new FileReader;q.onload=mxUtils.bind(this,function(D){try{this.openFileHandle(D.target.result,t.name,t,f)}catch(H){this.handleError(H)}});q.onerror=mxUtils.bind(this,
+function(D){this.spinner.stop();this.handleError(D);window.openFile=null});"image"!==t.type.substring(0,5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?q.readAsText(t):q.readAsDataURL(t)})(c[l])};EditorUi.prototype.openLocalFile=function(c,f,l,t,q,D){var H=this.getCurrentFile(),N=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var L=mxUtils.parseXml(c);null!=L&&(this.editor.setGraphXml(L.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+c,f||this.defaultFilename,l,t,q,D))});if(null!=c&&0<c.length)null==H||!H.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)?N():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=t)&&null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,f),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);f=[];for(var l in c)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=
+function(c,f){function l(H){if(null!=H){var N=H.lastIndexOf(".");0<N&&(H=H.substring(N+1,H.length));null==f[H]&&(f[H]=!0)}}var t=this.editor.graph,q=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=t.model.getChildCount(c);for(var D=0;D<q;D++)this.addBasenamesForCell(t.model.getChildAt(c,D),f)};EditorUi.prototype.setGraphEnabled=
+function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=this.diagramContainer.style.visibility;this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=this.sidebarContainer.style.display;this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=this.diagramContainer.style.visibility);c||this.hideWindows();this.editor.graph.sizeDidChange();this.resetScrollbars()};EditorUi.prototype.initializeEmbedMode=
+function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,q){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var D=this.editor.graph;D.setGridEnabled(!1);
+D.pageVisible=!1;var H=D.model.cells,N;for(N in H){var L=H[N];null!=L&&null!=L.style&&(L.style+=";sketch=1;"+(-1==L.style.indexOf("fontFamily=")||-1<L.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
+this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&
+c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||
+window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),
+"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(q){c||this.handleError(q)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,q=null,D=mxUtils.bind(this,function(L,I){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.updateStatus(mxUtils.bind(this,
+function(){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified)))})):this.clearStatus()});this.editor.graph.model.addListener(mxEvent.CHANGE,D);mxEvent.addListener(window,"message",mxUtils.bind(this,function(L){if(L.source==(window.opener||window.parent)){var I=L.data,Z=null,ia=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.trim()?pa=null:"%"==pa.charAt(0)?pa=decodeURIComponent(pa):"<"!=pa.charAt(0)&&(pa=Graph.decompress(pa)))}catch(Ca){}return pa});if("json"==urlParams.proto){var fa=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[L],"data",[I])}catch(pa){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=I.titleKey?mxResources.get(I.titleKey):
+I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var ba=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(pa){null!=pa?H.postMessage(JSON.stringify({event:"prompt",
+value:pa,message:I}),"*"):H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){H.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(ba.container,300,80,!0,!1);ba.init();return}if("draft"==I.action){var na=ia(I.xml);this.spinner.stop();ba=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),na,mxUtils.bind(this,function(){this.hideDialog();
+H.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();H.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(ba.container,640,480,!0,!1,mxUtils.bind(this,function(pa){pa&&
+this.actions.get("exit").funct()}));try{ba.init()}catch(pa){H.postMessage(JSON.stringify({event:"draft",error:pa.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var X=1==I.enableRecent,ca=1==I.enableSearch,ka=1==I.enableCustomTemp;ba=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(pa,Ca,za,wa){pa=pa||this.emptyDiagramXml;null!=I.callback?H.postMessage(JSON.stringify({event:"template",xml:pa,blank:pa==this.emptyDiagramXml,name:Ca,
+tempUrl:za,libs:wa,builtIn:!0,message:I}),"*"):(c(pa,L,pa!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.clearStatus())}),null,null,null,null,null,null,null,X?mxUtils.bind(this,function(pa){this.remoteInvoke("getRecentDiagrams",[null],null,pa,function(){pa(null,"Network Error!")})}):null,ca?mxUtils.bind(this,function(pa,Ca){this.remoteInvoke("searchDiagrams",[pa,null],null,Ca,function(){Ca(null,"Network Error!")})}):null,mxUtils.bind(this,function(pa,Ca,za){H.postMessage(JSON.stringify({event:"template",
+docUrl:pa,info:Ca,name:za}),"*")}),null,null,ka?mxUtils.bind(this,function(pa){this.remoteInvoke("getCustomTemplates",null,null,pa,function(){pa({},0)})}):null,1==I.withoutType);this.showDialog(ba.container,620,460,!0,!1,mxUtils.bind(this,function(pa){null!=this.sidebar&&this.sidebar.hideTooltip();pa&&this.actions.get("exit").funct()}));ba.init();return}if("textContent"==I.action){var da=this.getDiagramTextContent();H.postMessage(JSON.stringify({event:"textContent",data:da,message:I}),"*");return}if("status"==
+I.action){this.updateStatus(mxUtils.bind(this,function(){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message))}));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var W=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,W):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();
+return}if("viewport"==I.action){if(null!=I.viewport){var S=this.editor.graph,k=S.view.translate.x,B=S.view.translate.y;this.embedViewport=I.viewport;S.refresh();this.diagramContainer.scrollTop-=(B-S.view.translate.y)*S.view.scale;this.diagramContainer.scrollLeft-=(k-S.view.translate.x)*S.view.scale;this.fireEvent(new mxEventObject("embedViewportChanged"))}return}if("fullscreenChanged"==I.action){ba=null;try{var K=this.diagramContainer.getAttribute("data-scrollState");null!=K&&(this.diagramContainer.removeAttribute("data-scrollState"),
+ba=JSON.parse(K))}catch(pa){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=ba&&this.restoreScrollState(ba);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var T=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);S=this.editor.graph;
+var P=mxUtils.bind(this,function(pa,Ca){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(T,this.editor.graph,null,!0,function(wa){P(pa,wa)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var za=this.createLoadMessage("export");za.format=I.format;za.message=I;za.data=pa;za.svg=Ca;za.xml=T;H.postMessage(JSON.stringify(za),"*")}}),U=mxUtils.bind(this,function(pa){null==pa&&(pa=Editor.blankImage);"xmlpng"==
+I.format&&(pa=Editor.writeGraphModelToPng(pa,"tEXt","mxfile",encodeURIComponent(T)));S!=this.editor.graph&&S.container.parentNode.removeChild(S.container);P(pa)}),Y=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var aa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=Y){var pa=S.getGlobalVariable;S=this.createTemporaryGraph(S.getStylesheet());for(var Ca,za=0;za<this.pages.length;za++)if(this.pages[za].getId()==
+Y){Ca=this.updatePageRoot(this.pages[za]);break}null==Ca&&(Ca=this.currentPage);S.getGlobalVariable=function(Ra){return"page"==Ra?Ca.getName():"pagenumber"==Ra?1:pa.apply(this,arguments)};document.body.appendChild(S.container);S.model.setRoot(Ca.root)}if(null!=I.layerIds){var wa=S.model,Xa=wa.getChildCells(wa.getRoot()),Qa={};for(za=0;za<I.layerIds.length;za++)Qa[I.layerIds[za]]=!0;for(za=0;za<Xa.length;za++)wa.setVisible(Xa[za],Qa[Xa[za].id]||!1)}za=null;I.keepTheme&&(za=Editor.isDarkMode()?"dark":
+"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){U(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){U(null)}),null,null,I.scale,I.transparent,I.shadow,null,S,I.border,null,I.grid,za)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(T),l=!1);aa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=Y?"&pageId="+Y:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):
+"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(T))).send(mxUtils.bind(this,function(pa){200<=pa.getStatus()&&299>=pa.getStatus()?P("data:image/png;base64,"+pa.getText()):U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(aa=mxUtils.bind(this,function(){var pa=this.createLoadMessage("export");pa.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Ca=this.getXmlFileData();pa.xml=mxUtils.getXml(Ca);
+pa.data=this.getFileData(null,null,!0,null,null,null,Ca);pa.format=I.format}else if("html"==I.format)Ca=this.editor.getGraphXml(),pa.data=this.getHtml(Ca,this.editor.graph),pa.xml=mxUtils.getXml(Ca),pa.format=I.format;else{mxSvgCanvas2D.prototype.foAltText=null;Ca=null!=I.background?I.background:this.editor.graph.background;Ca==mxConstants.NONE&&(Ca=null);pa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);pa.format="svg";var za=mxUtils.bind(this,function(Xa){this.editor.graph.setEnabled(!0);
+this.spinner.stop();pa.data=I.asText?Xa:Editor.createSvgDataUri(Xa);H.postMessage(JSON.stringify(pa),"*")}),wa="auto";I.keepTheme&&(wa=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(wa=I.theme);if("xmlsvg"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){wa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())wa="auto";null!=I.theme&&(wa=I.theme);this.getEmbeddedSvg(pa.xml,this.editor.graph,null,!0,za,null,null,I.embedImages,
+Ca,I.scale,I.border,I.shadow,wa)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),Ca=this.editor.graph.getSvg(Ca,I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,wa),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(Ca),this.embedFonts(Ca,mxUtils.bind(this,function(Xa){I.embedImages||null==I.embedImages?this.editor.convertImages(Xa,
+mxUtils.bind(this,function(Qa){za(mxUtils.getXml(Qa))})):za(mxUtils.getXml(Xa))}));return}H.postMessage(JSON.stringify(pa),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var la=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){la.apply(this,arguments);aa()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||aa()}else aa();return}if("load"==I.action){fa=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=
+I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);
+if(null!=I.rough){var va=Editor.sketchMode;this.doSetSketchMode(I.rough);va!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var ua=this.embedExportBorder;this.diagramContainer.style.left=
+Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var qa=I.maxFitScale,Ba=I.rect.width+2*ua,ya=I.rect.height+2*ua;Z=mxUtils.bind(this,function(){var pa=mxUtils.getDocumentSize();Ba=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Ba):Ba,pa.width-80);pa=
+Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ya):ya,pa.height-80);this.diagramContainer.style.width=Ba+"px";this.diagramContainer.style.height=pa+"px";var Ca=this.editor.graph;pa=Ca.maxFitScale;Ca.maxFitScale=qa;Ca.fit(2*ua,null,null,null,null,null,ya);this.setPageVisible(!1);if(null!=this.minInlineWidth&&Ca.getGraphBounds().width<this.minInlineWidth){var za=Ca.container.scrollTop;this.resetScrollbars();Ca.container.scrollTop=za}Ca.maxFitScale=pa;Ca.container.scrollTop-=ua;Ca.container.scrollLeft-=
+ua;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));Ca.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=Ca.container.style.top);var wa=Ca.getGraphBounds();Ca.container.clientWidth>wa.width+2*ua&&(Ca.container.scrollLeft=wa.x+(wa.width+ua-Ca.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
+I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&this.setEmbedTitle(I.title);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(pa){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var La=this.getCurrentFile();null!=La&&(na=ia(I.xml),null!=na&&""!=na&&La.mergeFile(new LocalFile(this,na),function(){H.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(pa){H.postMessage(JSON.stringify({event:"merge",message:I,
+error:pa}),"*")}))}else"remoteInvokeReady"==I.action?this.handleRemoteInvokeReady(H):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,L.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):H.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(pa){this.handleError(pa)}}var Aa=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),
+Ea=mxUtils.bind(this,function(pa,Ca){l=!0;try{c(pa,Ca,null,fa)}catch(za){this.handleError(za)}l=!1;null!=urlParams.modified&&this.clearStatus();q=Aa();t&&null==f&&(f=mxUtils.bind(this,function(za,wa){za=Aa();za==q||l||(wa=this.createLoadMessage("autosave"),wa.xml=za,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=za}),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)Ca=this.createLoadMessage("load"),Ca.xml=pa,H.postMessage(JSON.stringify(Ca),
+"*");null!=Z&&Z()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==I.substring(0,34)?(ia="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(pa){Ea(pa,L)},mxUtils.bind(this,function(pa){this.handleError(pa)}),ia)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
+this.parseFileData(I,mxUtils.bind(this,function(pa){4==pa.readyState&&(200<=pa.status&&299>=pa.status&&"<mxGraphModel"==pa.responseText.substring(0,13)?Ea(pa.responseText,L):this.handleError({message:413==pa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(pa){Ea(pa)}),mxUtils.bind(this,function(pa){this.handleError(pa)})):null==I||"object"!==typeof I||
+null==I.format||null==I.data&&null==I.url?(I=ia(I),Ea(I,L)):this.loadDescriptor(I,mxUtils.bind(this,function(pa){Ea(Aa(),L)}),mxUtils.bind(this,function(pa){this.handleError(pa,mxResources.get("errorLoadingFile"))}))}}));var H=window.opener||window.parent;D="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";H.postMessage(D,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(L,I,Z){N.apply(this,arguments);H.postMessage(JSON.stringify({event:"openLink",
+href:L,target:I,allowOpener:Z}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var q=document.createElement("button");q.className="geEmbedBtn geBtn";q.setAttribute("title",c+(null!=l?" ("+l+")":""));mxUtils.write(q,c);t&&q.classList.add("gePrimaryBtn");mxEvent.addListener(q,"click",f);return q};EditorUi.prototype.setEmbedTitle=function(c){c=this.createStatusDiv(c);null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan);"kennedy"==Editor.currentTheme||
+"atlas"==Editor.currentTheme?this.menubarContainer.appendChild(c):this.buttonContainer.appendChild(c);this.embedFilenameSpan=c};EditorUi.prototype.addEmbedButtons=function(){this.dependsOnLanguage(mxUtils.bind(this,function(){var c=null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode==this.buttonContainer;this.buttonContainer.innerText="";c&&this.buttonContainer.appendChild(this.embedFilenameSpan);this.commentsSupported()&&null!=this.commentButton&&this.buttonContainer.appendChild(this.commentButton);
+"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&
+this.buttonContainer.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&this.buttonContainer.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct))}))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,
+mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=
+JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(q){this.handleError(q)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var q=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var D=t.value;t.value=JSON.stringify(JSON.parse(D));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));
+t.value=D}catch(H){this.handleError(H)}}));q.setAttribute("title","copy");q.className="geBtn";l.appendChild(q)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(q){this.loadingOrgChart=
+!1;f.clear()&&this.handleError(q)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,
+null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],q=[],D=[],H={};if(0<l.length){var N={},L=this.editor.graph,I=null,Z=null,ia=null,fa=null,ba=null,na=null,X=null,ca="whiteSpace=wrap;html=1;",ka=null,da=null,W="",S="auto",k="auto",B=!1,K=null,T=null,P=40,U=40,
+Y=100,aa=0,la=mxUtils.bind(this,function(){null!=f?f(ra):(L.setSelectionCells(ra),L.scrollCellToVisible(L.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),va=L.getFreeInsertPoint(),ua=va.x,qa=va.y;va=qa;var Ba=null,ya="auto";da=null;for(var La=[],Aa=null,Ea=null,pa=0;pa<l.length&&"#"==l[pa].charAt(0);){c=l[pa].replace(/\r$/,"");for(pa++;pa<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[pa].charAt(0);)c=c.substring(0,c.length-
+1)+mxUtils.trim(l[pa].substring(1)),pa++;if("#"!=c.charAt(1)){var Ca=c.indexOf(":");if(0<Ca){var za=mxUtils.trim(c.substring(1,Ca)),wa=mxUtils.trim(c.substring(Ca+1));"label"==za?Ba=Graph.sanitizeHtml(wa):"labelname"==za&&0<wa.length&&"-"!=wa?ba=wa:"labels"==za&&0<wa.length&&"-"!=wa?X=JSON.parse(wa):"style"==za?Z=wa:"parentstyle"==za?ca=wa:"unknownStyle"==za&&"-"!=wa?na=wa:"stylename"==za&&0<wa.length&&"-"!=wa?fa=wa:"styles"==za&&0<wa.length&&"-"!=wa?ia=JSON.parse(wa):"vars"==za&&0<wa.length&&"-"!=
+wa?I=JSON.parse(wa):"identity"==za&&0<wa.length&&"-"!=wa?ka=wa:"parent"==za&&0<wa.length&&"-"!=wa?da=wa:"namespace"==za&&0<wa.length&&"-"!=wa?W=wa:"width"==za?S=wa:"height"==za?k=wa:"collapsed"==za&&"-"!=wa?B="true"==wa:"left"==za&&0<wa.length?K=wa:"top"==za&&0<wa.length?T=wa:"ignore"==za?Ea=wa.split(","):"connect"==za?La.push(JSON.parse(wa)):"link"==za?Aa=wa:"padding"==za?aa=parseFloat(wa):"edgespacing"==za?P=parseFloat(wa):"nodespacing"==za?U=parseFloat(wa):"levelspacing"==za?Y=parseFloat(wa):"layout"==
+za&&(ya=wa)}}}if(null==l[pa])throw Error(mxResources.get("invalidOrMissingFile"));var Xa=this.editor.csvToArray(l[pa].replace(/\r$/,""));Ca=c=null;za=[];for(wa=0;wa<Xa.length;wa++)ka==Xa[wa]&&(c=wa),da==Xa[wa]&&(Ca=wa),za.push(mxUtils.trim(Xa[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+za[0]+"%");if(null!=La)for(var Qa=0;Qa<La.length;Qa++)null==N[La[Qa].to]&&(N[La[Qa].to]={});ka=[];for(wa=pa+1;wa<l.length;wa++){var Ra=this.editor.csvToArray(l[wa].replace(/\r$/,
+""));if(null==Ra){var Sa=40<l[wa].length?l[wa].substring(0,40)+"...":l[wa];throw Error(Sa+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ka.push(Ra)}L.model.beginUpdate();try{for(wa=0;wa<ka.length;wa++){Ra=ka[wa];var Ha=null,Ma=null!=c?W+Ra[c]:null;l=!1;null!=Ma&&(Ha=L.model.getCell(Ma),l=null==Ha||0<=mxUtils.indexOf(t,Ha));var y=new mxCell(Ba,new mxGeometry(ua,va,0,0),Z||"whiteSpace=wrap;html=1;");y.collapsed=B;y.vertex=!0;y.id=Ma;null==Ha||l||L.model.setCollapsed(Ha,B);
+for(var O=0;O<Ra.length;O++)L.setAttributeForCell(y,za[O],Ra[O]),null==Ha||l||L.setAttributeForCell(Ha,za[O],Ra[O]);if(null!=ba&&null!=X){var Q=X[y.getAttribute(ba)];null!=Q&&(L.labelChanged(y,Q),null==Ha||l||L.cellLabelChanged(Ha,Q))}if(null!=fa&&null!=ia){var V=ia[y.getAttribute(fa)];null!=V&&(y.style=V)}L.setAttributeForCell(y,"placeholders","1");y.style=L.replacePlaceholders(y,y.style,I);null==Ha||l?L.fireEvent(new mxEventObject("cellsInserted","cells",[y])):(L.model.setStyle(Ha,y.style),0>mxUtils.indexOf(D,
+Ha)&&D.push(Ha),L.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));l=null!=Ha;Ha=y;if(!l)for(Qa=0;Qa<La.length;Qa++)N[La[Qa].to][Ha.getAttribute(La[Qa].to)]=Ha;null!=Aa&&"link"!=Aa&&(L.setLinkForCell(Ha,Ha.getAttribute(Aa)),L.setAttributeForCell(Ha,Aa,null));var ha=this.editor.graph.getPreferredSizeForCell(Ha);da=null!=Ca?L.model.getCell(W+Ra[Ca]):null;if(Ha.vertex){Sa=null!=da?0:ua;pa=null!=da?0:qa;null!=K&&null!=Ha.getAttribute(K)&&(Ha.geometry.x=Sa+parseFloat(Ha.getAttribute(K)));null!=
+T&&null!=Ha.getAttribute(T)&&(Ha.geometry.y=pa+parseFloat(Ha.getAttribute(T)));var ja="@"==S.charAt(0)?Ha.getAttribute(S.substring(1)):null;Ha.geometry.width=null!=ja&&"auto"!=ja?parseFloat(Ha.getAttribute(S.substring(1))):"auto"==S||"auto"==ja?ha.width+aa:parseFloat(S);var oa="@"==k.charAt(0)?Ha.getAttribute(k.substring(1)):null;Ha.geometry.height=null!=oa&&"auto"!=oa&&"width"!=k?parseFloat(oa):"auto"==k||"auto"==oa?ha.height+aa:"width"==k?Ha.geometry.width:parseFloat(k);va+=Ha.geometry.height+U}l?
+(null==H[Ma]&&(H[Ma]=[]),H[Ma].push(Ha)):(t.push(Ha),null!=da?(da.style=L.replacePlaceholders(da,ca,I),L.addCell(Ha,da),q.push(da)):D.push(L.addCell(Ha)))}for(wa=0;wa<q.length;wa++)ja="@"==S.charAt(0)?q[wa].getAttribute(S.substring(1)):null,oa="@"==k.charAt(0)?q[wa].getAttribute(k.substring(1)):null,"auto"!=S&&"auto"!=ja||"auto"!=k&&"auto"!=oa||L.updateGroupBounds([q[wa]],aa,!0);var ta=D.slice(),ra=D.slice();for(Qa=0;Qa<La.length;Qa++){var xa=La[Qa];for(wa=0;wa<t.length;wa++){Ha=t[wa];var Da=mxUtils.bind(this,
+function(kb,pb,fb){var ob=pb.getAttribute(fb.from);if(null!=ob&&""!=ob){ob=ob.split(",");for(var tb=0;tb<ob.length;tb++){var eb=N[fb.to][ob[tb]];if(null==eb&&null!=na){eb=new mxCell(ob[tb],new mxGeometry(ua,qa,0,0),na);eb.style=L.replacePlaceholders(pb,eb.style,I);var nb=this.editor.graph.getPreferredSizeForCell(eb);eb.geometry.width=nb.width+aa;eb.geometry.height=nb.height+aa;N[fb.to][ob[tb]]=eb;eb.vertex=!0;eb.id=ob[tb];D.push(L.addCell(eb))}if(null!=eb){nb=fb.label;null!=fb.fromlabel&&(nb=(pb.getAttribute(fb.fromlabel)||
+"")+(nb||""));null!=fb.sourcelabel&&(nb=L.replacePlaceholders(pb,fb.sourcelabel,I)+(nb||""));null!=fb.tolabel&&(nb=(nb||"")+(eb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(nb=(nb||"")+L.replacePlaceholders(eb,fb.targetlabel,I));var mb="target"==fb.placeholders==!fb.invert?eb:kb;mb=null!=fb.style?L.replacePlaceholders(mb,fb.style,I):L.createCurrentEdgeStyle();nb=L.insertEdge(null,null,nb||"",fb.invert?eb:kb,fb.invert?kb:eb,mb);if(null!=fb.labels)for(mb=0;mb<fb.labels.length;mb++){var qb=
+fb.labels[mb],ub=new mxCell(qb.label||mb,new mxGeometry(null!=qb.x?qb.x:0,null!=qb.y?qb.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=qb.placeholders&&(ub.value=L.replacePlaceholders("target"==qb.placeholders==!fb.invert?eb:kb,ub.value,I));if(null!=qb.dx||null!=qb.dy)ub.geometry.offset=new mxPoint(null!=qb.dx?qb.dx:0,null!=qb.dy?qb.dy:0);nb.insert(ub)}if(null!=fb.data)for(var zb in fb.data)L.setAttributeForCell(nb,zb,fb.data[zb]);ra.push(nb);mxUtils.remove(fb.invert?
+kb:eb,ta)}}}});Da(Ha,Ha,xa);if(null!=H[Ha.id])for(O=0;O<H[Ha.id].length;O++)Da(Ha,H[Ha.id][O],xa)}}if(null!=Ea)for(wa=0;wa<t.length;wa++)for(Ha=t[wa],O=0;O<Ea.length;O++)L.setAttributeForCell(Ha,mxUtils.trim(Ea[O]),null);if(0<D.length){var Ia=new mxParallelEdgeLayout(L);Ia.spacing=P;Ia.checkOverlap=!0;var Ya=function(){0<Ia.spacing&&Ia.execute(L.getDefaultParent());for(var kb=0;kb<D.length;kb++){var pb=L.getCellGeometry(D[kb]);pb.x=Math.round(L.snap(pb.x));pb.y=Math.round(L.snap(pb.y));"auto"==S&&
+(pb.width=Math.round(L.snap(pb.width)));"auto"==k&&(pb.height=Math.round(L.snap(pb.height)))}};if("["==ya.charAt(0)){var Za=la;L.view.validate();this.executeLayouts(L.createLayouts(JSON.parse(ya)),function(){Ya();Za()});la=null}else if("circle"==ya){var $a=new mxCircleLayout(L);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var Pa=$a.isVertexIgnored;$a.isVertexIgnored=function(kb){return Pa.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){$a.execute(L.getDefaultParent());Ya()},
+!0,la);la=null}else if("horizontaltree"==ya||"verticaltree"==ya||"auto"==ya&&ra.length==2*D.length-1&&1==ta.length){L.view.validate();var Na=new mxCompactTreeLayout(L,"horizontaltree"==ya);Na.levelDistance=U;Na.edgeRouting=!1;Na.resetEdges=!1;Na.sortEdges=!0;this.executeLayout(function(){Na.execute(L.getDefaultParent(),0<ta.length?ta[0]:null)},!0,la);la=null}else if("horizontalflow"==ya||"verticalflow"==ya||"auto"==ya&&1==ta.length){L.view.validate();var jb=new mxHierarchicalLayout(L,"horizontalflow"==
+ya?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);jb.intraCellSpacing=U;jb.parallelEdgeSpacing=P;jb.interRankCellSpacing=Y;jb.disableEdgeStyle=!1;this.executeLayout(function(){jb.execute(L.getDefaultParent(),ra);L.moveCells(ra,ua,qa)},!0,la);la=null}else if("orgchart"==ya){L.view.validate();var cb=new mxOrgChartLayout(L,2,Y,U),ab=cb.isVertexIgnored;cb.isVertexIgnored=function(kb){return ab.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){cb.execute(L.getDefaultParent());
+Ya()},!0,la);la=null}else if("organic"==ya||"auto"==ya&&ra.length>D.length){L.view.validate();var db=new mxFastOrganicLayout(L);db.forceConstant=3*U;db.disableEdgeStyle=!1;db.resetEdges=!1;var lb=db.isVertexIgnored;db.isVertexIgnored=function(kb){return lb.apply(this,arguments)||0>mxUtils.indexOf(D,kb)};this.executeLayout(function(){db.execute(L.getDefaultParent());Ya()},!0,la);la=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=la&&la()}}catch(kb){this.handleError(kb)}};EditorUi.prototype.getSearch=
+function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,q){c=new LinkDialog(this,c,f,l,!0,t,q);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
@@ -3961,25 +3962,25 @@ EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var c=t
this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=
this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&
!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("layers").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("outline").setEnabled("none"!=this.diagramContainer.style.display);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=
-f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,q,D,H,N){var L=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(L.getSvg(t,q,D)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),Y=L.getGraphBounds(),ha=Math.floor(Y.width*q/L.view.scale),ea=
-Math.floor(Y.height*q/L.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ha*ea<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var aa={globalVars:L.getExportVariables()};N&&(aa.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(f,l,function(na,W){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(W||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(aa))+(0<H?"&dpi="+H:"")+"&bg="+(null!=
-t?t:"none")+"&w="+ha+"&h="+ea+"&border="+D+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(q,null==t||"none"==t,!0,!1,!1,D,!0,!1,null,N,H):c.exportImage(q,!1,!0,!1,!1,D,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),
+f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("none"!=this.diagramContainer.style.display);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var J=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
+null);J.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,q,D,H,N){var L=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(L.getSvg(t,q,D)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),Z=L.getGraphBounds(),ia=Math.floor(Z.width*q/L.view.scale),fa=
+Math.floor(Z.height*q/L.view.scale);if(I.length<=MAX_REQUEST_SIZE&&ia*fa<MAX_AREA)if(c.hideDialog(),"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var ba={globalVars:L.getExportVariables()};N&&(ba.grid={size:L.gridSize,steps:L.view.gridSteps,color:L.view.gridColor});c.saveRequest(f,l,function(na,X){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(X||"0")+(null!=na?"&filename="+encodeURIComponent(na):"")+"&extras="+encodeURIComponent(JSON.stringify(ba))+(0<H?"&dpi="+H:"")+"&bg="+(null!=
+t?t:"none")+"&w="+ia+"&h="+fa+"&border="+D+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(q,null==t||"none"==t,!0,!1,!1,D,!0,!1,null,N,H):c.exportImage(q,!1,!0,!1,!1,D,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),
this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var q=
-document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var D={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var N=H[c];if("R"==N.substring(0,1)){var L=JSON.parse(decodeURIComponent(N.substring(1)));D[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){q.innerText="";
-if(0==J.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Y=0;Y<J.length;Y++){var ha=J[Y];D[ha.id]&&(f[ha.id]=ha);var ea=this.addCheckbox(q,ha.title,D[ha.id]);(function(aa,na){mxEvent.addListener(na,"change",function(){this.checked?f[aa.id]=aa:delete f[aa.id]})})(ha,ea)}},mxUtils.bind(this,function(J){q.innerText="";var Y=document.createElement("div");Y.style.padding="8px";Y.style.textAlign=
-"center";mxUtils.write(Y,mxResources.get("error")+": ");mxUtils.write(Y,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));q.appendChild(Y)}));l.appendChild(q);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,Y;for(Y in f)null==D[Y]&&(J++,mxUtils.bind(this,function(ha){this.remoteInvoke("getFileContent",[ha.downloadUrl],null,mxUtils.bind(this,function(ea){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-ea,ha)),this.showSidebar()}catch(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Y]));for(Y in D)f[Y]||this.closeLibrary(new RemoteLibrary(this,null,D[Y]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns=
+document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var D={};try{var H=mxSettings.getCustomLibraries();for(c=0;c<H.length;c++){var N=H[c];if("R"==N.substring(0,1)){var L=JSON.parse(decodeURIComponent(N.substring(1)));D[L[0]]={id:L[0],title:L[1],downloadUrl:L[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){q.innerText="";
+if(0==I.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<I.length;Z++){var ia=I[Z];D[ia.id]&&(f[ia.id]=ia);var fa=this.addCheckbox(q,ia.title,D[ia.id]);(function(ba,na){mxEvent.addListener(na,"change",function(){this.checked?f[ba.id]=ba:delete f[ba.id]})})(ia,fa)}},mxUtils.bind(this,function(I){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign=
+"center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));q.appendChild(Z)}));l.appendChild(q);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,Z;for(Z in f)null==D[Z]&&(I++,mxUtils.bind(this,function(ia){this.remoteInvoke("getFileContent",[ia.downloadUrl],null,mxUtils.bind(this,function(fa){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+fa,ia)),this.showSidebar()}catch(ba){this.handleError(ba,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));for(Z in D)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,D[Z]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns=
{getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=
[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,q){var D=!0,H=window.setTimeout(mxUtils.bind(this,function(){D=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(H);D&&t.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(H);D&&q.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:L});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
-f){var l=mxUtils.bind(this,function(J,Y){var ha={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Y?ha.error={errResp:Y}:null!=J&&(ha.resp=J);this.remoteWin.postMessage(JSON.stringify(ha),"*")});try{var t=c.funtionName,q=this.remoteInvokableFns[t];if(null!=q&&"function"===typeof this[t]){if(q.allowedDomains){for(var D=!1,H=0;H<q.allowedDomains.length;H++)if(f=="https://"+q.allowedDomains[H]){D=!0;break}if(!D){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||
-(N=[]);if(q.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var L=this[t].apply(this,N);l([L])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=
+f){var l=mxUtils.bind(this,function(I,Z){var ia={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=Z?ia.error={errResp:Z}:null!=I&&(ia.resp=I);this.remoteWin.postMessage(JSON.stringify(ia),"*")});try{var t=c.funtionName,q=this.remoteInvokableFns[t];if(null!=q&&"function"===typeof this[t]){if(q.allowedDomains){for(var D=!1,H=0;H<q.allowedDomains.length;H++)if(f=="https://"+q.allowedDomains[H]){D=!0;break}if(!D){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||
+(N=[]);if(q.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),this[t].apply(this,N);else{var L=this[t].apply(this,N);l([L])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=
function(q){try{var D=t.result;1>q.oldVersion&&D.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(D.createObjectStore("files",{keyPath:"title"}),D.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(H){null!=f&&f(H)}};t.onsuccess=mxUtils.bind(this,function(q){try{var D=t.result;this.database=D;EditorUi.migrateStorageFiles&&(StorageFile.migrate(D),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
-(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var N=document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var L=!0,J=!1,Y,ha=0,ea=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),aa=mxUtils.bind(this,function(){ha++;na()}),na=mxUtils.bind(this,function(){try{if(ha>=Y.length)ea();else{var ba=Y[ha];StorageFile.getFileContent(this,ba,mxUtils.bind(this,function(ja){null==ja||".scratchpad"==ba&&ja==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ba]}),"*"):aa()}),aa)}}catch(ja){console.log(ja)}}),W=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}],aa,aa,["filesInfo","files"])}catch(ja){console.log(ja)}});H=mxUtils.bind(this,function(ba){try{if(ba.source==N.contentWindow){var ja={};try{ja=JSON.parse(ba.data)}catch(ca){}"init"==ja.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=
-ja.event||J||(L?null!=ja.resp&&0<ja.resp.length&&null!=ja.resp[0]?(Y=ja.resp[0],L=!1,na()):ea():null!=ja.resp&&0<ja.resp.length&&null!=ja.resp[0]?W(ja.resp[0]):aa())}}catch(ca){console.log(ca)}});window.addEventListener("message",H)}})));c(D);D.onversionchange=function(){D.close()}}catch(H){null!=f?f(H):null!=window.console&&console.warn(H)}});t.onerror=f;t.onblocked=function(){}}catch(q){null!=f?f(q):null!=window.console&&console.error(q)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};
+(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(H){if((!H||"1"==urlParams.forceMigration)&&"1"==urlParams.forceMigration){var N=document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var L=!0,I=!1,Z,ia=0,fa=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"setMigratedFlag"}),"*")}),ba=mxUtils.bind(this,function(){ia++;na()}),na=mxUtils.bind(this,function(){try{if(ia>=Z.length)fa();else{var ca=Z[ia];StorageFile.getFileContent(this,ca,mxUtils.bind(this,function(ka){null==ka||".scratchpad"==ca&&ka==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ca]}),"*"):ba()}),ba)}}catch(ka){console.log(ka)}}),X=mxUtils.bind(this,function(ca){try{this.setDatabaseItem(null,
+[{title:ca.title,size:ca.data.length,lastModified:Date.now(),type:ca.isLib?"L":"F"},{title:ca.title,data:ca.data}],ba,ba,["filesInfo","files"])}catch(ka){console.log(ka)}});H=mxUtils.bind(this,function(ca){try{if(ca.source==N.contentWindow){var ka={};try{ka=JSON.parse(ca.data)}catch(da){}"init"==ka.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=
+ka.event||I||(L?null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?(Z=ka.resp[0],L=!1,na()):fa():null!=ka.resp&&0<ka.resp.length&&null!=ka.resp[0]?X(ka.resp[0]):ba())}}catch(da){console.log(da)}});window.addEventListener("message",H)}})));c(D);D.onversionchange=function(){D.close()}}catch(H){null!=f?f(H):null!=window.console&&console.warn(H)}});t.onerror=f;t.onblocked=function(){}}catch(q){null!=f?f(q):null!=window.console&&console.error(q)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};
EditorUi.prototype.setDatabaseItem=function(c,f,l,t,q){this.openDatabase(mxUtils.bind(this,function(D){try{q=q||"objects";Array.isArray(q)||(q=[q],c=[c],f=[f]);var H=D.transaction(q,"readwrite");H.oncomplete=l;H.onerror=t;for(D=0;D<q.length;D++)H.objectStore(q[D]).put(null!=c&&null!=c[D]?{key:c[D],data:f[D]}:f[D])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);
var D=q.transaction(t,"readwrite");D.oncomplete=f;D.onerror=l;for(q=0;q<t.length;q++)D.objectStore(t[q]).delete(c[q])}catch(H){null!=l&&l(H)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(q){try{t=t||"objects";var D=q.transaction([t],"readonly").objectStore(t).get(c);D.onsuccess=function(){f(D.result)};D.onerror=l}catch(H){null!=l&&l(H)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=
l||"objects";var q=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),D=[];q.onsuccess=function(H){null==H.target.result?c(D):(D.push(H.target.result.value),H.target.result.continue())};q.onerror=f}catch(H){null!=f&&f(H)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var q=t.transaction([l],"readonly").objectStore(l).getAllKeys();q.onsuccess=function(){c(q.result)};q.onerror=f}catch(D){null!=
@@ -3987,34 +3988,34 @@ f&&f(D)}}),f)};EditorUi.prototype.commentsSupported=function(){var c=this.getCur
function(c,f,l){var t=this.getCurrentFile();null!=t?t.addComment(c,f,l):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=
function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.vsdxExportEnabled=
function(){return"atlassian"==this.getServiceName()};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,q,D,H,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,q,D,H,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");
-return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,q,D,H,N,L,J,Y,ha,ea,aa,na,W){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,q,D,
-H,N,L,J,Y,ha,ea,aa,na,W)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,
+return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,q,D,H,N,L,I,Z,ia,fa,ba,na,X){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,q,D,
+H,N,L,I,Z,ia,fa,ba,na,X)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,
f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(c,f,l,t,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var q="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(q||
t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,g,m,v,n){function A(){for(var W=N.getElementsByTagName("div"),ba=0,ja=0;ja<W.length;ja++)"none"!=W[ja].style.display&&W[ja].parentNode==N&&ba++;L.style.display=0==ba?"block":"none"}function G(W,ba,ja,ca){function la(){ba.removeChild(B);ba.removeChild(I);k.style.display="block";Q.style.display="block"}q={div:ba,comment:W,saveCallback:ja,deleteOnCancel:ca};var Q=ba.querySelector(".geCommentTxt"),k=ba.querySelector(".geCommentActionsList"),B=document.createElement("textarea");
-B.className="geCommentEditTxtArea";B.style.minHeight=Q.offsetHeight+"px";B.value=W.content;ba.insertBefore(B,Q);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){ca?(ba.parentNode.removeChild(ba),A()):la();q=null});U.className="geCommentEditBtn";I.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Q.innerText="";W.content=B.value;mxUtils.write(Q,W.content);la();ja(W);q=null});mxEvent.addListener(B,"keydown",
-mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ba.insertBefore(I,Q);k.style.display="none";Q.style.display="none";B.focus()}function S(W,ba){ba.innerText="";W=new Date(W.modifiedDate);var ja=b.timeSince(W);null==ja&&(ja=mxResources.get("lessThanAMinute"));mxUtils.write(ba,
-mxResources.get("timeAgo",[ja],"{1} ago"));ba.setAttribute("title",W.toLocaleDateString()+" "+W.toLocaleTimeString())}function F(W){var ba=document.createElement("img");ba.className="geCommentBusyImg";ba.src=IMAGE_PATH+"/spin.gif";W.appendChild(ba);W.busyImg=ba}function K(W){W.style.border="1px solid red";W.busyImg.parentNode==W&&W.removeChild(W.busyImg)}function c(W){W.style.border="";W.busyImg.parentNode==W&&W.removeChild(W.busyImg)}function f(W,ba,ja,ca,la){function Q(Z,ka,va){var ua=document.createElement("li");
-ua.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,Z);ua.appendChild(qa);mxEvent.addListener(qa,"click",function(Ba){ka(Ba,W);Ba.preventDefault();mxEvent.consume(Ba)});X.appendChild(ua);va&&(ua.style.display="none")}function k(){function Z(ua){ka.push(va);if(null!=ua.replies)for(var qa=0;qa<ua.replies.length;qa++)va=va.nextSibling,Z(ua.replies[qa])}var ka=[],va=I;Z(W);return{pdiv:va,replies:ka}}function B(Z,ka,va,ua,qa){function Ba(){F(Ea);
-W.addReply(za,function(pa){za.id=pa;W.replies.push(za);c(Ea);va&&va()},function(pa){ya();K(Ea);b.handleError(pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ua,qa)}function ya(){G(za,Ea,function(pa){Ba()},!0)}var La=k().pdiv,za=b.newComment(Z,b.getCurrentUser());za.pCommentId=W.id;null==W.replies&&(W.replies=[]);var Ea=f(za,W.replies,La,ca+1);ka?ya():Ba()}if(la||!W.isResolved){L.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",
-W.id);I.style.marginLeft=20*ca+5+"px";W.isResolved&&(D.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=W.user&&null!=W.user.pictureUrl?W.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,null!=W.user?W.user.displayName:
-mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",W.id);S(W,T);P.appendChild(T);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,W.content||"");I.appendChild(U);W.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");X.className="geCommentActionsList";U.appendChild(X);l||W.isLocked||0!=ca&&
-!t||Q(mxResources.get("reply"),function(){B("",!0)},W.isResolved);P=b.getCurrentUser();null==P||null==W.user||P.id!=W.user.id||l||W.isLocked||(Q(mxResources.get("edit"),function(){function Z(){G(W,I,function(){F(I);W.editComment(W.content,function(){c(I)},function(ka){K(I);Z();b.handleError(ka,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Z()},W.isResolved),Q(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(I);W.deleteComment(function(Z){if(!0===
-Z){Z=I.querySelector(".geCommentTxt");Z.innerText="";mxUtils.write(Z,mxResources.get("msgDeleted"));var ka=I.querySelectorAll(".geCommentAction");for(Z=0;Z<ka.length;Z++)ka[Z].parentNode.removeChild(ka[Z]);c(I);I.style.opacity="0.5"}else{ka=k(W).replies;for(Z=0;Z<ka.length;Z++)N.removeChild(ka[Z]);for(Z=0;Z<ba.length;Z++)if(ba[Z]==W){ba.splice(Z,1);break}L.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Z){K(I);b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-W.isResolved));l||W.isLocked||0!=ca||Q(W.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Z){function ka(){var va=Z.target;va.innerText="";W.isResolved=!W.isResolved;mxUtils.write(va,W.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ua=W.isResolved?"none":"",qa=k(W).replies,Ba="light-dark("+(W.isResolved?"ghostWhite":"white")+", transparent)",ya=0;ya<qa.length;ya++){qa[ya].style.backgroundColor=Ba;for(var La=qa[ya].querySelectorAll(".geCommentAction"),
-za=0;za<La.length;za++)La[za]!=va.parentNode&&(La[za].style.display=ua);ea||(qa[ya].style.display="none")}A()}W.isResolved?B(mxResources.get("reOpened")+": ",!0,ka,!1,!0):B(mxResources.get("markedAsResolved"),!1,ka,!0)});I.appendChild(U);null!=ja?N.insertBefore(I,ja.nextSibling):N.appendChild(I);for(ja=0;null!=W.replies&&ja<W.replies.length;ja++)U=W.replies[ja],U.isResolved=W.isResolved,f(U,W.replies,null,ca+1,la);null!=q&&(q.comment.id==W.id?(la=W.content,W.content=q.comment.content,G(W,I,q.saveCallback,
-q.deleteOnCancel),W.content=la):null==q.comment.id&&q.comment.pCommentId==W.id&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return I}}var l=!b.canComment(),t=b.canReplyToReplies(),q=null,D=document.createElement("div");D.className="geCommentsWin";var H=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.bottom=parseInt(H)+7+"px";D.appendChild(N);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(L,mxResources.get("noCommentsFound"));var J=document.createElement("div");J.className="geToolbarContainer geCommentsToolbar";J.style.height=H;J.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!l){var Y=H.cloneNode();Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Y,"click",function(W){function ba(){G(ja,ca,function(la){F(ca);b.addComment(la,function(Q){la.id=Q;aa.push(la);
-c(ca)},function(Q){K(ca);ba();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ja=b.newComment("",b.getCurrentUser()),ca=f(ja,aa,null,0);ba();W.preventDefault();mxEvent.consume(W)});J.appendChild(Y)}var ha=H.cloneNode();ha.style.backgroundImage="url("+Editor.checkImage+")";ha.setAttribute("title",mxResources.get("showResolved"));var ea=!1;mxEvent.addListener(ha,"click",function(W){(ea=!ea)?ha.classList.add("geActiveItem"):ha.classList.remove("geActiveItem");
-na();W.preventDefault();mxEvent.consume(W)});J.appendChild(ha);b.commentsRefreshNeeded()&&(Y=H.cloneNode(),Y.style.backgroundImage="url("+Editor.refreshImage+")",Y.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Y,"click",function(W){na();W.preventDefault();mxEvent.consume(W)}),J.appendChild(Y));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className=
-"geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(W){n();W.preventDefault();mxEvent.consume(W)}),J.appendChild(H));D.appendChild(J);var aa=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var W=q.div.querySelector(".geCommentEditTxtArea"),ba=q.div.querySelector(".geCommentEditBtns");q.comment.content=W.value;W.parentNode.removeChild(W);ba.parentNode.removeChild(ba)}catch(ja){b.handleError(ja)}N.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(ja){function ca(la){if(null!=la){la.sort(function(k,B){return new Date(k.modifiedDate)-new Date(B.modifiedDate)});for(var Q=0;Q<la.length;Q++)ca(la[Q].replies)}}ja.sort(function(la,Q){return new Date(la.modifiedDate)-new Date(Q.modifiedDate)});N.innerText="";N.appendChild(L);L.style.display="block";aa=ja;for(ja=0;ja<aa.length;ja++)ca(aa[ja].replies),
-f(aa[ja],aa,null,0,ea);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(ja){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ja&&ja.message?": "+ja.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;J=mxUtils.bind(this,function(){function W(Q){var k=ja[Q.id];if(null!=k)for(S(Q,k),k=0;null!=Q.replies&&k<Q.replies.length;k++)W(Q.replies[k])}
-if(this.window.isVisible()){for(var ba=N.querySelectorAll(".geCommentDate"),ja={},ca=0;ca<ba.length;ca++){var la=ba[ca];ja[la.getAttribute("data-commentId")]=la}for(ca=0;ca<aa.length;ca++)W(aa[ca])}});setInterval(J,6E4);this.refreshCommentsTime=J;this.window=new mxWindow(mxResources.get("comments"),D,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
-this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,n,A,G,S,F,K){var c=document.createElement("div");c.style.textAlign="center";K=null!=K?K:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=K+"px";f.style.lineHeight="1.2em";mxUtils.write(f,e);c.appendChild(f);null!=F&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",e=document.createElement("img"),
+var CommentsWindow=function(b,e,g,m,v,n){function A(){for(var X=N.getElementsByTagName("div"),ca=0,ka=0;ka<X.length;ka++)"none"!=X[ka].style.display&&X[ka].parentNode==N&&ca++;L.style.display=0==ca?"block":"none"}function G(X,ca,ka,da){function W(){ca.removeChild(B);ca.removeChild(K);k.style.display="block";S.style.display="block"}q={div:ca,comment:X,saveCallback:ka,deleteOnCancel:da};var S=ca.querySelector(".geCommentTxt"),k=ca.querySelector(".geCommentActionsList"),B=document.createElement("textarea");
+B.className="geCommentEditTxtArea";B.style.minHeight=S.offsetHeight+"px";B.value=X.content;ca.insertBefore(B,S);var K=document.createElement("div");K.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){da?(ca.parentNode.removeChild(ca),A()):W();q=null});T.className="geCommentEditBtn";K.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){S.innerText="";X.content=B.value;mxUtils.write(S,X.content);W();ka(X);q=null});mxEvent.addListener(B,"keydown",
+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";K.appendChild(P);ca.insertBefore(K,S);k.style.display="none";S.style.display="none";B.focus()}function R(X,ca){ca.innerText="";X=new Date(X.modifiedDate);var ka=b.timeSince(X);null==ka&&(ka=mxResources.get("lessThanAMinute"));mxUtils.write(ca,
+mxResources.get("timeAgo",[ka],"{1} ago"));ca.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function F(X){var ca=document.createElement("img");ca.className="geCommentBusyImg";ca.src=IMAGE_PATH+"/spin.gif";X.appendChild(ca);X.busyImg=ca}function J(X){X.style.border="1px solid red";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function c(X){X.style.border="";X.busyImg.parentNode==X&&X.removeChild(X.busyImg)}function f(X,ca,ka,da,W){function S(aa,la,va){var ua=document.createElement("li");
+ua.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);ua.appendChild(qa);mxEvent.addListener(qa,"click",function(Ba){la(Ba,X);Ba.preventDefault();mxEvent.consume(Ba)});Y.appendChild(ua);va&&(ua.style.display="none")}function k(){function aa(ua){la.push(va);if(null!=ua.replies)for(var qa=0;qa<ua.replies.length;qa++)va=va.nextSibling,aa(ua.replies[qa])}var la=[],va=K;aa(X);return{pdiv:va,replies:la}}function B(aa,la,va,ua,qa){function Ba(){F(Ea);
+X.addReply(Aa,function(pa){Aa.id=pa;X.replies.push(Aa);c(Ea);va&&va()},function(pa){ya();J(Ea);b.handleError(pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ua,qa)}function ya(){G(Aa,Ea,function(pa){Ba()},!0)}var La=k().pdiv,Aa=b.newComment(aa,b.getCurrentUser());Aa.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Ea=f(Aa,X.replies,La,da+1);la?ya():Ba()}if(W||!X.isResolved){L.style.display="none";var K=document.createElement("div");K.className="geCommentContainer";K.setAttribute("data-commentId",
+X.id);K.style.marginLeft=20*da+5+"px";X.isResolved&&(D.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=X.user&&null!=X.user.pictureUrl?X.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");U.className="geCommentUsername";mxUtils.write(U,null!=X.user?X.user.displayName:
+mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",X.id);R(X,U);P.appendChild(U);K.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,X.content||"");K.appendChild(T);X.isLocked&&(K.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var Y=document.createElement("ul");Y.className="geCommentActionsList";T.appendChild(Y);l||X.isLocked||0!=da&&
+!t||S(mxResources.get("reply"),function(){B("",!0)},X.isResolved);P=b.getCurrentUser();null==P||null==X.user||P.id!=X.user.id||l||X.isLocked||(S(mxResources.get("edit"),function(){function aa(){G(X,K,function(){F(K);X.editComment(X.content,function(){c(K)},function(la){J(K);aa();b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},X.isResolved),S(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){F(K);X.deleteComment(function(aa){if(!0===
+aa){aa=K.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var la=K.querySelectorAll(".geCommentAction");for(aa=0;aa<la.length;aa++)la[aa].parentNode.removeChild(la[aa]);c(K);K.style.opacity="0.5"}else{la=k(X).replies;for(aa=0;aa<la.length;aa++)N.removeChild(la[aa]);for(aa=0;aa<ca.length;aa++)if(ca[aa]==X){ca.splice(aa,1);break}L.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(aa){J(K);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+X.isResolved));l||X.isLocked||0!=da||S(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function la(){var va=aa.target;va.innerText="";X.isResolved=!X.isResolved;mxUtils.write(va,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ua=X.isResolved?"none":"",qa=k(X).replies,Ba="light-dark("+(X.isResolved?"ghostWhite":"white")+", transparent)",ya=0;ya<qa.length;ya++){qa[ya].style.backgroundColor=Ba;for(var La=qa[ya].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<La.length;Aa++)La[Aa]!=va.parentNode&&(La[Aa].style.display=ua);fa||(qa[ya].style.display="none")}A()}X.isResolved?B(mxResources.get("reOpened")+": ",!0,la,!1,!0):B(mxResources.get("markedAsResolved"),!1,la,!0)});K.appendChild(T);null!=ka?N.insertBefore(K,ka.nextSibling):N.appendChild(K);for(ka=0;null!=X.replies&&ka<X.replies.length;ka++)T=X.replies[ka],T.isResolved=X.isResolved,f(T,X.replies,null,da+1,W);null!=q&&(q.comment.id==X.id?(W=X.content,X.content=q.comment.content,G(X,K,q.saveCallback,
+q.deleteOnCancel),X.content=W):null==q.comment.id&&q.comment.pCommentId==X.id&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel)));return K}}var l=!b.canComment(),t=b.canReplyToReplies(),q=null,D=document.createElement("div");D.className="geCommentsWin";var H=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.bottom=parseInt(H)+7+"px";D.appendChild(N);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(L,mxResources.get("noCommentsFound"));var I=document.createElement("div");I.className="geToolbarContainer geCommentsToolbar";I.style.height=H;I.style.padding="3px 4px 4px 4px";H=document.createElement("a");H.className="geButton";if(!l){var Z=H.cloneNode();Z.style.backgroundImage="url("+Editor.plusImage+")";Z.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(Z,"click",function(X){function ca(){G(ka,da,function(W){F(da);b.addComment(W,function(S){W.id=S;ba.push(W);
+c(da)},function(S){J(da);ca();b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ka=b.newComment("",b.getCurrentUser()),da=f(ka,ba,null,0);ca();X.preventDefault();mxEvent.consume(X)});I.appendChild(Z)}var ia=H.cloneNode();ia.style.backgroundImage="url("+Editor.checkImage+")";ia.setAttribute("title",mxResources.get("showResolved"));var fa=!1;mxEvent.addListener(ia,"click",function(X){(fa=!fa)?ia.classList.add("geActiveItem"):ia.classList.remove("geActiveItem");
+na();X.preventDefault();mxEvent.consume(X)});I.appendChild(ia);b.commentsRefreshNeeded()&&(Z=H.cloneNode(),Z.style.backgroundImage="url("+Editor.refreshImage+")",Z.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(Z,"click",function(X){na();X.preventDefault();mxEvent.consume(X)}),I.appendChild(Z));b.commentsSaveNeeded()&&(H=H.cloneNode(),H.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',H.setAttribute("title",mxResources.get("save")),H.className=
+"geButton geAdaptiveAsset",mxEvent.addListener(H,"click",function(X){n();X.preventDefault();mxEvent.consume(X)}),I.appendChild(H));D.appendChild(I);var ba=[],na=mxUtils.bind(this,function(){this.hasError=!1;if(null!=q)try{q.div=q.div.cloneNode(!0);var X=q.div.querySelector(".geCommentEditTxtArea"),ca=q.div.querySelector(".geCommentEditBtns");q.comment.content=X.value;X.parentNode.removeChild(X);ca.parentNode.removeChild(ca)}catch(ka){b.handleError(ka)}N.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(ka){function da(W){if(null!=W){W.sort(function(k,B){return new Date(k.modifiedDate)-new Date(B.modifiedDate)});for(var S=0;S<W.length;S++)da(W[S].replies)}}ka.sort(function(W,S){return new Date(W.modifiedDate)-new Date(S.modifiedDate)});N.innerText="";N.appendChild(L);L.style.display="block";ba=ka;for(ka=0;ka<ba.length;ka++)da(ba[ka].replies),
+f(ba[ka],ba,null,0,fa);null!=q&&null==q.comment.id&&null==q.comment.pCommentId&&(N.appendChild(q.div),G(q.comment,q.div,q.saveCallback,q.deleteOnCancel))},mxUtils.bind(this,function(ka){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ka&&ka.message?": "+ka.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});na();this.refreshComments=na;I=mxUtils.bind(this,function(){function X(S){var k=ka[S.id];if(null!=k)for(R(S,k),k=0;null!=S.replies&&k<S.replies.length;k++)X(S.replies[k])}
+if(this.window.isVisible()){for(var ca=N.querySelectorAll(".geCommentDate"),ka={},da=0;da<ca.length;da++){var W=ca[da];ka[W.getAttribute("data-commentId")]=W}for(da=0;da<ba.length;da++)X(ba[da])}});setInterval(I,6E4);this.refreshCommentsTime=I;this.window=new mxWindow(mxResources.get("comments"),D,e,g,m,v,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,v,n,A,G,R,F,J){var c=document.createElement("div");c.style.textAlign="center";J=null!=J?J:44;var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight=J+"px";f.style.lineHeight="1.2em";mxUtils.write(f,e);c.appendChild(f);null!=F&&(f=document.createElement("div"),f.style.padding="6px 0 6px 0",e=document.createElement("img"),
e.setAttribute("src",F),f.appendChild(e),c.appendChild(f));F=document.createElement("div");F.style.textAlign="center";F.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(l.checked)});n.className="geBtn";null!=G&&(n.innerHTML=G+"<br>"+n.innerHTML,n.style.display="inline-block",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");
-b.editor.cancelFirst&&F.appendChild(n);var t=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});F.appendChild(t);null!=A?(t.innerHTML=A+"<br>"+t.innerHTML+"<br>",t.style.display="inline-block",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||F.appendChild(n);c.appendChild(F);S?(F.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop=
+b.editor.cancelFirst&&F.appendChild(n);var t=mxUtils.button(v||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(l.checked)});F.appendChild(t);null!=A?(t.innerHTML=A+"<br>"+t.innerHTML+"<br>",t.style.display="inline-block",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||F.appendChild(n);c.appendChild(F);R?(F.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop=
"20px",f.style.marginBottom="0px",f.appendChild(l),v=document.createElement("span"),mxUtils.write(v," "+mxResources.get("rememberThisSetting")),f.appendChild(v),c.appendChild(f),mxEvent.addListener(v,"click",function(q){l.checked=!l.checked;mxEvent.consume(q)})):F.style.marginTop="12px";this.init=function(){t.focus()};this.container=c},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);
HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,g){this.ui=b;this.page=e;this.previous=this.name=g}
@@ -4036,7 +4037,7 @@ function(){var A=g.apply(this,arguments);null!=v.currentPage&&m!=v.currentPage&&
this.editor.addListener("pageSelected",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(A,G){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}));this.addListener("languageChanged",mxUtils.bind(this,function(){this.updateTabContainer()}))}};
EditorUi.prototype.scrollToPage=function(b,e){var g=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),m=null!=b?b:this.currentPage;null!=g&&null!=this.tabScroller&&this.tabScroller.children.length>g&&null!=this.tabScroller.children[g]&&(m!=this.lastScrollPage||e)&&(this.tabScroller.children[g].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[g].className="geTab gePageTab geActivePage",this.lastScrollPage=m)};
EditorUi.prototype.restoreViewState=function(b,e,g){b=null!=b?this.getPageById(b.getId()):null;var m=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(m.setViewState(e),this.editor.updateGraphComponents(),m.view.revalidate(),m.sizeDidChange()),m.container.scrollLeft=m.view.translate.x*m.view.scale+e.scrollLeft,m.container.scrollTop=m.view.translate.y*m.view.scale+e.scrollTop,m.restoreSelection(g))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),g=parseFloat(b.getAttribute("pageScale")),m=parseFloat(b.getAttribute("pageWidth")),v=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),A=this.parseBackgroundImage(b.getAttribute("backgroundImage")),G=b.getAttribute("extFonts");if(G)try{G=G.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!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:A,pageScale:isNaN(g)?mxGraph.prototype.pageScale:g,pageFormat:isNaN(m)||isNaN(v)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,m,v),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:G||[]}};
Graph.prototype.saveViewState=function(b,e,g,m){g||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
@@ -4060,7 +4061,7 @@ EditorUi.prototype.insertPage=function(b,e,g){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,e,g){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,g);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var g=this.pages[e].getName();null!=g&&0<g.length&&(b[g]=g)}e=this.pages.length;do g=mxResources.get("pageWithNumber",[++e]);while(null!=b[g]);return g};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,g=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=g){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var m=this.currentPage;m==b&&1<this.pages.length?(g==this.pages.length-1?g--:g++,m=this.pages[g]):1>=this.pages.length&&(m=this.insertPage(),e.model.execute(new RenamePage(this,m,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,m))}finally{e.model.endUpdate()}}}catch(v){this.handleError(v)}return b};
EditorUi.prototype.duplicatePage=function(b,e){var g=null;try{var m=this.editor.graph;if(m.isEnabled()){m.isEditing()&&m.stopEditing();var v=b.node.cloneNode(!1);v.removeAttribute("id");var n={},A=m.createCellLookup([m.model.root]);g=new DiagramPage(v);g.root=m.cloneCell(m.model.root,null,n);var G=new mxGraphModel;G.prefix=Editor.guid()+"-";G.setRoot(g.root);m.updateCustomLinks(m.createCellMapping(n,A),[g.root]);g.viewState=b==this.currentPage?m.getViewState():b.viewState;this.initDiagramNode(g);
-g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
+g.viewState.scale=1;delete g.viewState.scrollLeft;delete g.viewState.scrollTop;delete g.viewState.currentRoot;delete g.viewState.defaultParent;g.setName(e);g=this.insertPage(g,mxUtils.indexOf(this.pages,b)+1)}}catch(R){this.handleError(R)}return g};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
EditorUi.prototype.clonePages=function(b){for(var e=[],g=[],m=0;m<b.length;m++)try{g.push(this.clonePage(b[m]))}catch(v){e.push(mxResources.get("pageWithNumber",[m+1])+": "+v.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<g.length&&(b.fallbackFileData=this.getXmlForPages(g))}catch(v){}throw b;}return g};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),g=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(g,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(g){null!=g&&0<g.length&&this.editor.graph.model.execute(new RenamePage(this,b,g))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -4077,88 +4078,87 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.chevronRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.menuImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(v,n){this.menus.get("pages").funct(v,n)}));e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var g=mxEvent.getClientX(b),m=mxEvent.getClientY(b);e.popup(g,
m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),v=b.getId();g.setAttribute("title",m+(null!=v?" ("+v+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.style.backgroundImage="url("+Editor.thinExpandImage+")";m.className="geButton";e.appendChild(m);var v=!1,n=!1,A=mxUtils.bind(this,function(S){v=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||n||this.selectPage(b)}),G=mxUtils.bind(this,
-function(S){if(!g.isMouseDown&&(n&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));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 K=mxEvent.getClientX(S),c=mxEvent.getClientY(S);F.popup(K,c,null,S);
-this.setCurrentMenu(F,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(R){this.renamePage(b);mxEvent.consume(R)}));var m=document.createElement("div");m.style.backgroundImage="url("+Editor.thinExpandImage+")";m.className="geButton";e.appendChild(m);var v=!1,n=!1,A=mxUtils.bind(this,function(R){v=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||n||this.selectPage(b)}),G=mxUtils.bind(this,
+function(R){if(!g.isMouseDown&&(n&&(mxEvent.isTouchEvent(R)||mxEvent.getSource(R)==m)||mxEvent.isPopupTrigger(R))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(R)||!v)){var F=new mxPopupMenu(this.createPageMenu(b));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 J=mxEvent.getClientX(R),c=mxEvent.getClientY(R);F.popup(J,c,null,R);
+this.setCurrentMenu(F,e)}mxEvent.consume(R)});mxEvent.addGestureListeners(m,A,null,G);mxEvent.addGestureListeners(e,A,null,G)};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));this.editor.graph.isEnabled()&&(g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),
m),g.addSeparator(m),this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move")),g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m),g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m))})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,g,m){m.setAttribute("relatedPage",g.relatedPage.getId());null==g.index&&(m.setAttribute("name",g.relatedPage.getName()),null!=g.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(g.relatedPage.viewState,function(v,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,v)?n:void 0})),null!=g.relatedPage.root&&e.encodeCell(g.relatedPage.root,m));return m};
b.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var v=g.ownerDocument.createElement("diagram");v.setAttribute("id",g.getAttribute("relatedPage"));v.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(v);v=g.getAttribute("viewState");null!=v&&(m.relatedPage.viewState=JSON.parse(v),g.removeAttribute("viewState"));g=g.cloneNode(!0);v=g.firstChild;if(null!=v)for(m.relatedPage.root=e.decodeCell(v,!1),m=
-v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var n=v.getAttribute("id");null==e.lookup(n)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,n,A,G){v=null!=v?v:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=n.slice(),F=0;F<n.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[F]),"treeFolding","0")&&this.foldTreeCell(m,n[F]);n=S;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var n=
-[];this.traverse(v,!0,mxUtils.bind(this,function(G,S){var F=null!=S&&this.isTreeEdge(S);F&&n.push(S);G==v||null!=S&&!F||n.push(G);return(null==S||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<n.length;A++)this.model.setVisible(n[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,n,A,G,S){return this.model.filterCells(this.getEdges(m,v,n,A,G,S),mxUtils.bind(this,
-function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!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(ca){return q.isVertex(ca)&&n(ca)}function v(ca){var la=!1;null!=ca&&
-(la="1"==t.getCurrentCellStyle(ca).treeMoving);return la}function n(ca){var la=!1;null!=ca&&(ca=q.getParent(ca),la=t.view.getState(ca),la="tree"==(null!=la?la.style:t.getCellStyle(ca)).containerType);return la}function A(ca){var la=!1;null!=ca&&(ca=q.getParent(ca),la=t.view.getState(ca),t.view.getState(ca),la=null!=(null!=la?la.style:t.getCellStyle(ca)).childLayout);return la}function G(ca){ca=t.view.getState(ca);if(null!=ca){var la=t.getIncomingTreeEdges(ca.cell);if(0<la.length&&(la=t.view.getState(la[0]),
-null!=la&&(la=la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==ca.y&&Math.abs(la.x-ca.getCenterX())<ca.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==ca.y+ca.height&&Math.abs(la.x-ca.getCenterX())<ca.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>ca.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(ca,la){la=null!=la?la:!0;t.model.beginUpdate();try{var Q=t.model.getParent(ca),k=t.getIncomingTreeEdges(ca),B=t.cloneCells([k[0],
-ca]);t.model.setTerminal(B[0],t.model.getTerminal(k[0],!0),!0);var I=G(ca),U=Q.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?B[1].geometry.x+=la?ca.geometry.width+10:-B[1].geometry.width-10:B[1].geometry.y+=la?ca.geometry.height+10:-B[1].geometry.height-10;t.view.currentRoot!=Q&&(B[1].geometry.x-=U.x,B[1].geometry.y-=U.y);var P=t.view.getState(ca),T=t.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?
-X.x+=(la?ca.geometry.width+10:-B[1].geometry.width-10)*T:X.y+=(la?ca.geometry.height+10:-B[1].geometry.height-10)*T;var Z=t.getOutgoingTreeEdges(t.model.getTerminal(k[0],!0));if(null!=Z){for(var ka=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,va=U=k=0;va<Z.length;va++){var ua=t.model.getTerminal(Z[va],!1);if(I==G(ua)){var qa=t.view.getState(ua);ua!=ca&&null!=qa&&(ka&&la!=qa.getCenterX()<P.getCenterX()||!ka&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,
-(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,qa.x))/T),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/T))}}ka?U=0:k=0;for(va=0;va<Z.length;va++)if(ua=t.model.getTerminal(Z[va],!1),I==G(ua)&&(qa=t.view.getState(ua),ua!=ca&&null!=qa&&(ka&&la!=qa.getCenterX()<P.getCenterX()||!ka&&la!=qa.getCenterY()<P.getCenterY()))){var Ba=[];t.traverse(qa.cell,!0,function(ya,La){var za=null!=La&&t.isTreeEdge(La);za&&Ba.push(La);(null==La||za)&&Ba.push(ya);return null==La||za});t.moveCells(Ba,
-(la?1:-1)*k,(la?1:-1)*U)}}}return t.addCells(B,Q)}finally{t.model.endUpdate()}}function F(ca){t.model.beginUpdate();try{var la=G(ca),Q=t.getIncomingTreeEdges(ca),k=t.cloneCells([Q[0],ca]);t.model.setTerminal(Q[0],k[1],!1);t.model.setTerminal(k[0],k[1],!0);t.model.setTerminal(k[0],ca,!1);var B=t.model.getParent(ca),I=B.geometry,U=[];t.view.currentRoot!=B&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);t.traverse(ca,!0,function(X,Z){var ka=null!=Z&&t.isTreeEdge(Z);ka&&U.push(Z);(null==Z||ka)&&U.push(X);
-return null==Z||ka});var P=ca.geometry.width+40,T=ca.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);t.moveCells(U,P,T);return t.addCells(k,B)}finally{t.model.endUpdate()}}function K(ca,la){t.model.beginUpdate();try{var Q=t.model.getParent(ca),k=t.getIncomingTreeEdges(ca),B=G(ca);0==k.length&&(k=[t.createEdge(Q,null,"",null,null,t.createCurrentEdgeStyle())],B=la);var I=
-t.cloneCells([k[0],ca]);t.model.setTerminal(I[0],ca,!0);null==t.model.getTerminal(I[0],!1)&&(t.model.setTerminal(I[0],I[1],!1),t.applyNewEdgeStyle(I[1],[I[0]],B));k=t.getOutgoingTreeEdges(ca);var U=Q.geometry;la=[];t.view.currentRoot==Q&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=t.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var X=t.view.getBounds(la),Z=t.view.translate,ka=t.view.scale;B==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?ca.geometry.x+(ca.geometry.width-I[1].geometry.width)/
-2:(X.x+X.width)/ka-Z.x-U.x+10,I[1].geometry.y+=I[1].geometry.height-U.y+40):B==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?ca.geometry.x+(ca.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ka-Z.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=B==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?ca.geometry.y+(ca.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ka-Z.y+
--U.y+10);return t.addCells(I,Q)}finally{t.model.endUpdate()}}function c(ca,la,Q){ca=t.getOutgoingTreeEdges(ca);Q=t.view.getState(Q);var k=[];if(null!=Q&&null!=ca){for(var B=0;B<ca.length;B++){var I=t.view.getState(t.model.getTerminal(ca[B],!1));null!=I&&(!la&&Math.min(I.x+I.width,Q.x+Q.width)>=Math.max(I.x,Q.x)||la&&Math.min(I.y+I.height,Q.y+Q.height)>=Math.max(I.y,Q.y))&&k.push(I)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function f(ca,la){var Q=
-G(ca),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==k&&Q!=la?l.actions.get("selectParent").funct():Q==la?(la=t.getOutgoingTreeEdges(ca),null!=la&&0<la.length&&t.setSelectionCell(t.model.getTerminal(la[0],!1))):(Q=t.getIncomingTreeEdges(ca),null!=Q&&0<Q.length&&(k=c(t.model.getTerminal(Q[0],!0),k,ca),ca=t.view.getState(ca),null!=ca&&(ca=mxUtils.indexOf(k,ca),0<=ca&&(ca+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?
--1:1,0<=ca&&ca<=k.length-1&&t.setSelectionCell(k[ca].cell)))))}var l=this,t=l.editor.graph,q=t.getModel(),D=l.menus.createPopupMenu;l.menus.createPopupMenu=function(ca,la,Q){D.apply(this,arguments);if(1==t.getSelectionCount()){la=t.getSelectionCell();var k=t.getOutgoingTreeEdges(la);ca.addSeparator();0<k.length&&(m(t.getSelectionCell())&&this.addMenuItems(ca,["selectChildren"],null,Q),this.addMenuItems(ca,["selectDescendants"],null,Q));m(t.getSelectionCell())?(ca.addSeparator(),0<t.getIncomingTreeEdges(la).length&&
-this.addMenuItems(ca,["selectSiblings","selectParent"],null,Q)):0<t.model.getEdgeCount(la)&&this.addMenuItems(ca,["selectConnections"],null,Q)}};l.actions.addAction("selectChildren",function(ca){if(t.isEnabled()&&1==t.getSelectionCount()){var la=t.getSelectionCell();ca=mxEvent.isControlDown(ca)?null:t.getOutgoingTreeEdges(la);if(null!=ca&&0<ca.length){la=[];for(var Q=0;Q<ca.length;Q++)la.push(t.model.getTerminal(ca[Q],!1));t.setSelectionCells(la)}else t.setSelectionCells(t.model.getChildren(la))}},
-null,null,"Alt+Shift+C");l.actions.addAction("selectDescendants",function(ca){var la=t.getSelectionCell();if(t.isEnabled()&&null!=la){var Q=[];mxEvent.isControlDown(ca)||t.traverse(la,!0,function(k,B){var I=null!=B&&t.isTreeEdge(B);I&&mxEvent.isControlDown(ca)&&Q.push(B);(null==B||I)&&Q.push(k);return null==B||I});if(0==Q.length||1==Q.length&&Q[0]==la)Q=t.model.getDescendants(la);t.setSelectionCells(Q)}},null,null,"Alt+Shift+X");l.actions.addAction("selectParent",function(ca){var la=t.getSelectionCell();
-t.isEnabled()&&null!=la&&(ca=mxEvent.isControlDown(ca)?null:t.getIncomingTreeEdges(la),null!=ca&&0<ca.length?t.setSelectionCell(t.model.getTerminal(ca[0],!0)):t.selectParentCell())},null,null,"Alt+Shift+P");l.actions.addAction("selectSiblings",function(ca){if(t.isEnabled()&&1==t.getSelectionCount()){var la=t.getSelectionCell(),Q=mxEvent.isControlDown(ca)?null:t.getIncomingTreeEdges(la);ca=[];if(null!=Q&&0<Q.length&&(Q=t.getOutgoingTreeEdges(t.model.getTerminal(Q[0],!0)),null!=Q))for(var k=0;k<Q.length;k++)ca.push(t.model.getTerminal(Q[k],
-!1));0==ca.length&&(ca=t.model.getChildren(t.model.getParent(la)));t.setSelectionCells(ca)}},null,null,"Alt+Shift+S");var H=t.removeCells;t.removeCells=function(ca,la){la=null!=la?la:!0;null==ca&&(ca=this.getDeletableCells(this.getSelectionCells()));la&&(ca=this.getDeletableCells(this.addAllEdges(ca)));for(var Q=[],k=0;k<ca.length;k++){var B=ca[k];q.isEdge(B)&&n(B)&&(Q.push(B),B=q.getTerminal(B,!1));if(m(B)){var I=[];t.traverse(B,!0,function(U,P){var T=null!=P&&t.isTreeEdge(P);T&&I.push(P);(null==
-P||T)&&I.push(U);return null==P||T});0<I.length&&(Q=Q.concat(I),B=t.getIncomingTreeEdges(ca[k]),ca=ca.concat(B))}else null!=B&&Q.push(ca[k])}ca=Q;return H.apply(this,arguments)};l.hoverIcons.getStateAt=function(ca,la,Q){return m(ca.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Q))};var N=t.duplicateCells;t.duplicateCells=function(ca,la){ca=null!=ca?ca:this.getSelectionCells();for(var Q=ca.slice(0),k=0;k<Q.length;k++){var B=t.view.getState(Q[k]);if(null!=B&&m(B.cell)){var I=t.getIncomingTreeEdges(B.cell);
-for(B=0;B<I.length;B++)mxUtils.remove(I[B],ca)}}this.model.beginUpdate();try{var U=N.call(this,ca,la);if(U.length==ca.length)for(k=0;k<ca.length;k++)if(m(ca[k])){var P=t.getIncomingTreeEdges(U[k]);I=t.getIncomingTreeEdges(ca[k]);if(0==P.length&&0<I.length){var T=this.cloneCell(I[0]);this.addEdge(T,t.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var L=t.moveCells;t.moveCells=function(ca,la,Q,k,B,I,U){for(var P=null,T=[],X=0;X<ca.length;X++)(v(ca[X])||
-m(ca[X]))&&!A(ca[X])&&this.isCellCollapsed(ca[X])?T=T.concat(this.getSubtree(ca[X])):T.push(ca[X]);ca=mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=B;var Z=this.getCurrentCellStyle(B);if(null!=ca&&m(B)&&"1"==mxUtils.getValue(Z,"treeFolding","0")){for(X=0;X<ca.length;X++)if(m(ca[X])||t.model.isEdge(ca[X])&&null==t.model.getTerminal(ca[X],!0)){B=t.model.getParent(ca[X]);break}if(null!=T&&B!=T&&null!=this.view.getState(ca[0])){var ka=t.getIncomingTreeEdges(ca[0]);if(0<ka.length){var va=
-t.view.getState(t.model.getTerminal(ka[0],!0));if(null!=va){var ua=t.view.getState(T);null!=ua&&(la=(ua.getCenterX()-va.getCenterX())/t.view.scale,Q=(ua.getCenterY()-va.getCenterY())/t.view.scale)}}}}P=L.apply(this,arguments);if(null!=P&&null!=ca&&P.length==ca.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],T,!0);else if(m(ca[X])&&(ka=t.getIncomingTreeEdges(ca[X]),0<ka.length))if(!k)m(T)&&0>mxUtils.indexOf(ca,
-this.model.getTerminal(ka[0],!0))&&this.model.setTerminal(ka[0],T,!0);else if(0==t.getIncomingTreeEdges(P[X]).length){Z=T;if(null==Z||Z==t.model.getParent(ca[X]))Z=t.model.getTerminal(ka[0],!0);k=this.cloneCell(ka[0]);this.addEdge(k,t.getDefaultParent(),Z,P[X])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var J=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(ca,la,Q,k){var B=t.model,I=null;B.beginUpdate();try{if(I=J.apply(this,arguments),m(ca))for(var U=0;U<I.length;U++)if(B.isEdge(I[U])&&
-null==B.getTerminal(I[U],!0)){B.setTerminal(I[U],ca,!0);var P=t.getCellGeometry(I[U]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{B.endUpdate()}return I}}var Y={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ha={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},ea=l.onKeyDown;l.onKeyDown=function(ca){try{var la=t.getSelectionCell();if(t.isEnabled()&&!t.isEditing()&&
-null!=la){var Q=mxEvent.isAltDown(ca)&&mxEvent.isShiftDown(ca)?Y[ca.keyCode]:mxEvent.isAltDown(ca)?ha[ca.keyCode]:null;null!=Q?(Q.funct(ca),mxEvent.consume(ca)):m(la)&&(Q=null,0<t.getIncomingTreeEdges(la).length&&(9==ca.which?Q=mxEvent.isShiftDown(ca)?F(la):K(la):13==ca.which&&(Q=S(la,!mxEvent.isShiftDown(ca)))),null!=Q&&0<Q.length?(1==Q.length&&t.model.isEdge(Q[0])?t.setSelectionCell(t.model.getTerminal(Q[0],!1)):t.setSelectionCell(Q[Q.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(t.view.getState(la)),
-t.startEditingAtCell(la),mxEvent.consume(ca)):37==ca.keyCode?(f(la,mxConstants.DIRECTION_WEST),mxEvent.consume(ca)):38==ca.keyCode?(f(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(ca)):39==ca.keyCode?(f(la,mxConstants.DIRECTION_EAST),mxEvent.consume(ca)):40==ca.keyCode&&(f(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(ca)))}}catch(k){l.handleError(k)}mxEvent.isConsumed(ca)||ea.apply(this,arguments)};var aa=t.connectVertex;t.connectVertex=function(ca,la,Q,k,B,I,U){var P=t.getIncomingTreeEdges(ca);
-if(m(ca)){var T=G(ca),X=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,Z=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;return T==la||0==P.length?K(ca,la):X==Z?F(ca):S(ca,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};t.getSubtree=function(ca){var la=[ca];!v(ca)&&!m(ca)||A(ca)||t.traverse(ca,!0,function(Q,k){var B=null!=k&&t.isTreeEdge(k);B&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||B)&&0>mxUtils.indexOf(la,Q)&&la.push(Q);
-return null==k||B});return la};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){na.apply(this,arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor=
-"pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(ca){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca);this.graph.isMouseDown=!0;l.hoverIcons.reset();
-mxEvent.consume(ca)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var W=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){W.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>
-this.state.height?10:0)+2+"px")};var ba=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(ca){ba.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=ca?"":"none")};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(ca,la){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;
-Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,n=this;return m.concat([this.addEntry("tree container",function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var S=
-new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(S);return n.createVertexTemplateFromCells([A],
-A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-G.vertex=!0;var S=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var K=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-K.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);K.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+v.nextSibling,v.parentNode.removeChild(v),v=m;null!=v;){m=v.nextSibling;if(v.nodeType==mxConstants.NODETYPE_ELEMENT){var n=v.getAttribute("id");null==e.lookup(n)&&e.decodeCell(v)}v.parentNode.removeChild(v);v=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,v,n,A,G){v=null!=v?v:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var R=n.slice(),F=0;F<n.length;F++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[F]),"treeFolding","0")&&this.foldTreeCell(m,n[F]);n=R;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(m,v){this.model.beginUpdate();try{var n=
+[];this.traverse(v,!0,mxUtils.bind(this,function(G,R){var F=null!=R&&this.isTreeEdge(R);F&&n.push(R);G==v||null!=R&&!F||n.push(G);return(null==R||F)&&(G==v||!this.model.isCollapsed(G))}));this.model.setCollapsed(v,m);for(var A=0;A<n.length;A++)this.model.setVisible(n[A],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,v,n,A,G,R){return this.model.filterCells(this.getEdges(m,v,n,A,G,R),mxUtils.bind(this,
+function(F){return this.isTreeEdge(F)}))};Graph.prototype.getIncomingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,v){return this.getTreeEdges(m,v,!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(da){return q.isVertex(da)&&n(da)}function v(da){var W=!1;null!=da&&
+(W="1"==t.getCurrentCellStyle(da).treeMoving);return W}function n(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),W="tree"==(null!=W?W.style:t.getCellStyle(da)).containerType);return W}function A(da){var W=!1;null!=da&&(da=q.getParent(da),W=t.view.getState(da),t.view.getState(da),W=null!=(null!=W?W.style:t.getCellStyle(da)).childLayout);return W}function G(da){da=t.view.getState(da);if(null!=da){var W=t.getIncomingTreeEdges(da.cell);if(0<W.length&&(W=t.view.getState(W[0]),null!=W&&
+(W=W.absolutePoints,null!=W&&0<W.length&&(W=W[W.length-1],null!=W)))){if(W.y==da.y&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_SOUTH;if(W.y==da.y+da.height&&Math.abs(W.x-da.getCenterX())<da.width/2)return mxConstants.DIRECTION_NORTH;if(W.x>da.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function R(da,W){W=null!=W?W:!0;t.model.beginUpdate();try{var S=t.model.getParent(da),k=t.getIncomingTreeEdges(da),B=t.cloneCells([k[0],da]);t.model.setTerminal(B[0],
+t.model.getTerminal(k[0],!0),!0);var K=G(da),T=S.geometry;K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?B[1].geometry.x+=W?da.geometry.width+10:-B[1].geometry.width-10:B[1].geometry.y+=W?da.geometry.height+10:-B[1].geometry.height-10;t.view.currentRoot!=S&&(B[1].geometry.x-=T.x,B[1].geometry.y-=T.y);var P=t.view.getState(da),U=t.view.scale;if(null!=P){var Y=mxRectangle.fromRectangle(P);K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH?Y.x+=(W?da.geometry.width+10:-B[1].geometry.width-
+10)*U:Y.y+=(W?da.geometry.height+10:-B[1].geometry.height-10)*U;var aa=t.getOutgoingTreeEdges(t.model.getTerminal(k[0],!0));if(null!=aa){for(var la=K==mxConstants.DIRECTION_SOUTH||K==mxConstants.DIRECTION_NORTH,va=T=k=0;va<aa.length;va++){var ua=t.model.getTerminal(aa[va],!1);if(K==G(ua)){var qa=t.view.getState(ua);ua!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(Y,qa)&&(k=10+Math.max(k,(Math.min(Y.x+Y.width,qa.x+qa.width)-Math.max(Y.x,
+qa.x))/U),T=10+Math.max(T,(Math.min(Y.y+Y.height,qa.y+qa.height)-Math.max(Y.y,qa.y))/U))}}la?T=0:k=0;for(va=0;va<aa.length;va++)if(ua=t.model.getTerminal(aa[va],!1),K==G(ua)&&(qa=t.view.getState(ua),ua!=da&&null!=qa&&(la&&W!=qa.getCenterX()<P.getCenterX()||!la&&W!=qa.getCenterY()<P.getCenterY()))){var Ba=[];t.traverse(qa.cell,!0,function(ya,La){var Aa=null!=La&&t.isTreeEdge(La);Aa&&Ba.push(La);(null==La||Aa)&&Ba.push(ya);return null==La||Aa});t.moveCells(Ba,(W?1:-1)*k,(W?1:-1)*T)}}}return t.addCells(B,
+S)}finally{t.model.endUpdate()}}function F(da){t.model.beginUpdate();try{var W=G(da),S=t.getIncomingTreeEdges(da),k=t.cloneCells([S[0],da]);t.model.setTerminal(S[0],k[1],!1);t.model.setTerminal(k[0],k[1],!0);t.model.setTerminal(k[0],da,!1);var B=t.model.getParent(da),K=B.geometry,T=[];t.view.currentRoot!=B&&(k[1].geometry.x-=K.x,k[1].geometry.y-=K.y);t.traverse(da,!0,function(Y,aa){var la=null!=aa&&t.isTreeEdge(aa);la&&T.push(aa);(null==aa||la)&&T.push(Y);return null==aa||la});var P=da.geometry.width+
+40,U=da.geometry.height+40;W==mxConstants.DIRECTION_SOUTH?P=0:W==mxConstants.DIRECTION_NORTH?(P=0,U=-U):W==mxConstants.DIRECTION_WEST?(P=-P,U=0):W==mxConstants.DIRECTION_EAST&&(U=0);t.moveCells(T,P,U);return t.addCells(k,B)}finally{t.model.endUpdate()}}function J(da,W){t.model.beginUpdate();try{var S=t.model.getParent(da),k=t.getIncomingTreeEdges(da),B=G(da);0==k.length&&(k=[t.createEdge(S,null,"",null,null,t.createCurrentEdgeStyle())],B=W);var K=t.cloneCells([k[0],da]);t.model.setTerminal(K[0],da,
+!0);null==t.model.getTerminal(K[0],!1)&&(t.model.setTerminal(K[0],K[1],!1),t.applyNewEdgeStyle(K[1],[K[0]],B));k=t.getOutgoingTreeEdges(da);var T=S.geometry;W=[];t.view.currentRoot==S&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=t.model.getTerminal(k[P],!1);null!=U&&W.push(U)}var Y=t.view.getBounds(W),aa=t.view.translate,la=t.view.scale;B==mxConstants.DIRECTION_SOUTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x-T.x+10,K[1].geometry.y+=
+K[1].geometry.height-T.y+40):B==mxConstants.DIRECTION_NORTH?(K[1].geometry.x=null==Y?da.geometry.x+(da.geometry.width-K[1].geometry.width)/2:(Y.x+Y.width)/la-aa.x+-T.x+10,K[1].geometry.y-=K[1].geometry.height+T.y+40):(K[1].geometry.x=B==mxConstants.DIRECTION_WEST?K[1].geometry.x-(K[1].geometry.width+T.x+40):K[1].geometry.x+(K[1].geometry.width-T.x+40),K[1].geometry.y=null==Y?da.geometry.y+(da.geometry.height-K[1].geometry.height)/2:(Y.y+Y.height)/la-aa.y+-T.y+10);return t.addCells(K,S)}finally{t.model.endUpdate()}}
+function c(da,W,S){da=t.getOutgoingTreeEdges(da);S=t.view.getState(S);var k=[];if(null!=S&&null!=da){for(var B=0;B<da.length;B++){var K=t.view.getState(t.model.getTerminal(da[B],!1));null!=K&&(!W&&Math.min(K.x+K.width,S.x+S.width)>=Math.max(K.x,S.x)||W&&Math.min(K.y+K.height,S.y+S.height)>=Math.max(K.y,S.y))&&k.push(K)}k.sort(function(T,P){return W?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function f(da,W){var S=G(da),k=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;
+(S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST)==k&&S!=W?l.actions.get("selectParent").funct():S==W?(W=t.getOutgoingTreeEdges(da),null!=W&&0<W.length&&t.setSelectionCell(t.model.getTerminal(W[0],!1))):(S=t.getIncomingTreeEdges(da),null!=S&&0<S.length&&(k=c(t.model.getTerminal(S[0],!0),k,da),da=t.view.getState(da),null!=da&&(da=mxUtils.indexOf(k,da),0<=da&&(da+=W==mxConstants.DIRECTION_NORTH||W==mxConstants.DIRECTION_WEST?-1:1,0<=da&&da<=k.length-1&&t.setSelectionCell(k[da].cell)))))}
+var l=this,t=l.editor.graph,q=t.getModel(),D=l.menus.createPopupMenu;l.menus.createPopupMenu=function(da,W,S){D.apply(this,arguments);if(1==t.getSelectionCount()){W=t.getSelectionCell();var k=t.getOutgoingTreeEdges(W);da.addSeparator();0<k.length&&(m(t.getSelectionCell())&&this.addMenuItems(da,["selectChildren"],null,S),this.addMenuItems(da,["selectDescendants"],null,S));m(t.getSelectionCell())?(da.addSeparator(),0<t.getIncomingTreeEdges(W).length&&this.addMenuItems(da,["selectSiblings","selectParent"],
+null,S)):0<t.model.getEdgeCount(W)&&this.addMenuItems(da,["selectConnections"],null,S)}};l.actions.addAction("selectChildren",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell();da=mxEvent.isControlDown(da)?null:t.getOutgoingTreeEdges(W);if(null!=da&&0<da.length){W=[];for(var S=0;S<da.length;S++)W.push(t.model.getTerminal(da[S],!1));t.setSelectionCells(W)}else t.setSelectionCells(t.model.getChildren(W))}},null,null,"Alt+Shift+C");l.actions.addAction("selectDescendants",
+function(da){var W=t.getSelectionCell();if(t.isEnabled()&&null!=W){var S=[];mxEvent.isControlDown(da)||t.traverse(W,!0,function(k,B){var K=null!=B&&t.isTreeEdge(B);K&&mxEvent.isControlDown(da)&&S.push(B);(null==B||K)&&S.push(k);return null==B||K});if(0==S.length||1==S.length&&S[0]==W)S=t.model.getDescendants(W);t.setSelectionCells(S)}},null,null,"Alt+Shift+X");l.actions.addAction("selectParent",function(da){var W=t.getSelectionCell();t.isEnabled()&&null!=W&&(da=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W),
+null!=da&&0<da.length?t.setSelectionCell(t.model.getTerminal(da[0],!0)):t.selectParentCell())},null,null,"Alt+Shift+P");l.actions.addAction("selectSiblings",function(da){if(t.isEnabled()&&1==t.getSelectionCount()){var W=t.getSelectionCell(),S=mxEvent.isControlDown(da)?null:t.getIncomingTreeEdges(W);da=[];if(null!=S&&0<S.length&&(S=t.getOutgoingTreeEdges(t.model.getTerminal(S[0],!0)),null!=S))for(var k=0;k<S.length;k++)da.push(t.model.getTerminal(S[k],!1));0==da.length&&(da=t.model.getChildren(t.model.getParent(W)));
+t.setSelectionCells(da)}},null,null,"Alt+Shift+S");var H=t.removeCells;t.removeCells=function(da,W){W=null!=W?W:!0;null==da&&(da=this.getDeletableCells(this.getSelectionCells()));W&&(da=this.getDeletableCells(this.addAllEdges(da)));for(var S=[],k=0;k<da.length;k++){var B=da[k];q.isEdge(B)&&n(B)&&(S.push(B),B=q.getTerminal(B,!1));if(m(B)){var K=[];t.traverse(B,!0,function(T,P){var U=null!=P&&t.isTreeEdge(P);U&&K.push(P);(null==P||U)&&K.push(T);return null==P||U});0<K.length&&(S=S.concat(K),B=t.getIncomingTreeEdges(da[k]),
+da=da.concat(B))}else null!=B&&S.push(da[k])}da=S;return H.apply(this,arguments)};l.hoverIcons.getStateAt=function(da,W,S){return m(da.cell)?null:this.graph.view.getState(this.graph.getCellAt(W,S))};var N=t.duplicateCells;t.duplicateCells=function(da,W){da=null!=da?da:this.getSelectionCells();for(var S=da.slice(0),k=0;k<S.length;k++){var B=t.view.getState(S[k]);if(null!=B&&m(B.cell)){var K=t.getIncomingTreeEdges(B.cell);for(B=0;B<K.length;B++)mxUtils.remove(K[B],da)}}this.model.beginUpdate();try{var T=
+N.call(this,da,W);if(T.length==da.length)for(k=0;k<da.length;k++)if(m(da[k])){var P=t.getIncomingTreeEdges(T[k]);K=t.getIncomingTreeEdges(da[k]);if(0==P.length&&0<K.length){var U=this.cloneCell(K[0]);this.addEdge(U,t.getDefaultParent(),this.model.getTerminal(K[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var L=t.moveCells;t.moveCells=function(da,W,S,k,B,K,T){for(var P=null,U=[],Y=0;Y<da.length;Y++)(v(da[Y])||m(da[Y]))&&!A(da[Y])&&this.isCellCollapsed(da[Y])?U=U.concat(this.getSubtree(da[Y])):
+U.push(da[Y]);da=mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=B;var aa=this.getCurrentCellStyle(B);if(null!=da&&m(B)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(Y=0;Y<da.length;Y++)if(m(da[Y])||t.model.isEdge(da[Y])&&null==t.model.getTerminal(da[Y],!0)){B=t.model.getParent(da[Y]);break}if(null!=U&&B!=U&&null!=this.view.getState(da[0])){var la=t.getIncomingTreeEdges(da[0]);if(0<la.length){var va=t.view.getState(t.model.getTerminal(la[0],!0));if(null!=va){var ua=t.view.getState(U);
+null!=ua&&(W=(ua.getCenterX()-va.getCenterX())/t.view.scale,S=(ua.getCenterY()-va.getCenterY())/t.view.scale)}}}}P=L.apply(this,arguments);if(null!=P&&null!=da&&P.length==da.length)for(Y=0;Y<P.length;Y++)if(this.model.isEdge(P[Y]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[Y],!0))&&this.model.setTerminal(P[Y],U,!0);else if(m(da[Y])&&(la=t.getIncomingTreeEdges(da[Y]),0<la.length))if(!k)m(U)&&0>mxUtils.indexOf(da,this.model.getTerminal(la[0],!0))&&this.model.setTerminal(la[0],U,!0);else if(0==
+t.getIncomingTreeEdges(P[Y]).length){aa=U;if(null==aa||aa==t.model.getParent(da[Y]))aa=t.model.getTerminal(la[0],!0);k=this.cloneCell(la[0]);this.addEdge(k,t.getDefaultParent(),aa,P[Y])}}finally{this.model.endUpdate()}return P};if(null!=l.sidebar){var I=l.sidebar.dropAndConnect;l.sidebar.dropAndConnect=function(da,W,S,k){var B=t.model,K=null;B.beginUpdate();try{if(K=I.apply(this,arguments),m(da))for(var T=0;T<K.length;T++)if(B.isEdge(K[T])&&null==B.getTerminal(K[T],!0)){B.setTerminal(K[T],da,!0);
+var P=t.getCellGeometry(K[T]);P.points=null;null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{B.endUpdate()}return K}}var Z={67:l.actions.get("selectChildren"),88:l.actions.get("selectDescendants"),80:l.actions.get("selectParent"),83:l.actions.get("selectSiblings")},ia={67:l.actions.get("copyStyle"),86:l.actions.get("pasteStyle")},fa=l.onKeyDown;l.onKeyDown=function(da){try{var W=t.getSelectionCell();if(t.isEnabled()&&!t.isEditing()&&null!=W){var S=mxEvent.isAltDown(da)&&mxEvent.isShiftDown(da)?
+Z[da.keyCode]:mxEvent.isAltDown(da)?ia[da.keyCode]:null;null!=S?(S.funct(da),mxEvent.consume(da)):m(W)&&(S=null,0<t.getIncomingTreeEdges(W).length&&(9==da.which?S=mxEvent.isShiftDown(da)?F(W):J(W):13==da.which&&(S=R(W,!mxEvent.isShiftDown(da)))),null!=S&&0<S.length?(1==S.length&&t.model.isEdge(S[0])?t.setSelectionCell(t.model.getTerminal(S[0],!1)):t.setSelectionCell(S[S.length-1]),null!=l.hoverIcons&&l.hoverIcons.update(t.view.getState(W)),t.startEditingAtCell(W),mxEvent.consume(da)):37==da.keyCode?
+(f(W,mxConstants.DIRECTION_WEST),mxEvent.consume(da)):38==da.keyCode?(f(W,mxConstants.DIRECTION_NORTH),mxEvent.consume(da)):39==da.keyCode?(f(W,mxConstants.DIRECTION_EAST),mxEvent.consume(da)):40==da.keyCode&&(f(W,mxConstants.DIRECTION_SOUTH),mxEvent.consume(da)))}}catch(k){l.handleError(k)}mxEvent.isConsumed(da)||fa.apply(this,arguments)};var ba=t.connectVertex;t.connectVertex=function(da,W,S,k,B,K,T){var P=t.getIncomingTreeEdges(da);if(m(da)){var U=G(da),Y=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,
+aa=W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST;return U==W||0==P.length?J(da,W):Y==aa?F(da):R(da,W!=mxConstants.DIRECTION_NORTH&&W!=mxConstants.DIRECTION_WEST)}return ba.apply(this,arguments)};t.getSubtree=function(da){var W=[da];!v(da)&&!m(da)||A(da)||t.traverse(da,!0,function(S,k){var B=null!=k&&t.isTreeEdge(k);B&&0>mxUtils.indexOf(W,k)&&W.push(k);(null==k||B)&&0>mxUtils.indexOf(W,S)&&W.push(S);return null==k||B});return W};var na=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=
+function(){na.apply(this,arguments);(v(this.state.cell)||m(this.state.cell))&&!A(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
+this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(da){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(da),mxEvent.getClientY(da),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(da);this.graph.isMouseDown=!0;l.hoverIcons.reset();mxEvent.consume(da)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var X=
+mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){X.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ca=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(da){ca.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=da?"":"none")};var ka=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(da,W){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),v=this.graph,n=this;return m.concat([this.addEntry("tree container",
+function(){var A=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var R=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);A.insert(F);A.insert(G);A.insert(R);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var A=new mxCell("Mindmap",new mxGeometry(0,
+0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");A.vertex=!0;var G=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var R=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);var J=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+J.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),F.style);c.geometry.relative=!0;c.edge=!0;G.insertEdge(c,!0);J.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),F.style);l.geometry.relative=!0;l.edge=!0;G.insertEdge(l,!0);f.insertEdge(l,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),F.style);q.geometry.relative=!0;q.edge=!0;G.insertEdge(q,!0);t.insertEdge(q,!1);A.insert(F);A.insert(c);A.insert(l);A.insert(q);A.insert(G);A.insert(S);A.insert(K);A.insert(f);A.insert(t);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),F.style);q.geometry.relative=!0;q.edge=!0;G.insertEdge(q,!0);t.insertEdge(q,!1);A.insert(F);A.insert(c);A.insert(l);A.insert(q);A.insert(G);A.insert(R);A.insert(J);A.insert(f);A.insert(t);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var A=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
A.vertex=!0;return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var A=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var A=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
G.geometry.setTerminalPoint(new mxPoint(-40,40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree orgchart organization division",function(){var A=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');A.vertex=!0;var G=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"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);S.insertEdge(F,!1);var K=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"};');K.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
-!0;c.edge=!0;G.insertEdge(c,!0);K.insertEdge(c,!1);A.insert(F);A.insert(c);A.insert(G);A.insert(S);A.insert(K);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=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"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return n.createVertexTemplateFromCells([A],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.setAttributeForCell(G,"treeRoot","1");G.vertex=!0;var R=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"};');R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+F.geometry.relative=!0;F.edge=!0;G.insertEdge(F,!0);R.insertEdge(F,!1);var J=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"};');J.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");c.geometry.relative=
+!0;c.edge=!0;G.insertEdge(c,!0);J.insertEdge(c,!1);A.insert(F);A.insert(c);A.insert(G);A.insert(R);A.insert(J);return n.createVertexTemplateFromCells([A],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree root",function(){var A=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"};');v.setAttributeForCell(A,"treeRoot","1");A.vertex=!0;return n.createVertexTemplateFromCells([A],
A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree division",function(){var A=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"};');A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
G.geometry.setTerminalPoint(new mxPoint(0,0),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);return n.createVertexTemplateFromCells([A,G],A.geometry.width,A.geometry.height,A.value)}),this.addEntry("tree sub sections",function(){var A=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");A.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;S.insertEdge(F,!1);return n.createVertexTemplateFromCells([G,F,A,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(K,c){if(EditorUi.windowed){var f=K.editor.graph;f.popupMenuHandler.hideMenu();null==K.formatWindow?(K.formatWindow=new WrapperWindow(K,"",Math.max(10,K.diagramContainer.clientWidth-248),60,240,Math.min(566,f.container.clientHeight-10),function(l){l.className="geSidebarContainer geFormatContainer";K.createFormat(l).init()}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.formatWindow.window.setTitle(mxResources.get("format"))})),K.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){K.formatWindow.window.fit()})),K.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):K.formatWindow.window.setVisible(null!=c?c:!K.formatWindow.window.isVisible())}else null==K.formatElt&&(K.formatElt=K.createSidebarContainer(),K.createFormat(K.formatElt).init(),K.formatElt.style.border="none",K.formatElt.style.width="240px",K.formatElt.style.borderLeftWidth="1px",K.formatElt.style.borderLeftStyle="solid",K.formatElt.style.right="0px"),c=K.diagramContainer.parentNode,
-null!=K.formatElt.parentNode?(K.formatElt.parentNode.removeChild(K.formatElt),c.style.right="0px"):(c.parentNode.appendChild(K.formatElt),c.style.right=K.formatElt.style.width)}function e(K,c){if(EditorUi.windowed){var f=K.editor.graph;f.popupMenuHandler.hideMenu();null==K.sidebarWindow?(K.sidebarWindow=new WrapperWindow(K,"",10,56,Math.min(f.container.clientWidth-10,218)-6,Math.min(f.container.clientHeight-40,650)-6,function(l){K.createShapesPanel(l)}),K.dependsOnLanguage(mxUtils.bind(this,function(){K.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
-K.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){K.sidebarWindow.window.fit()})),K.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),K.sidebarWindow.window.setVisible(!0),isLocalStorage&&K.getLocalData("sidebar",function(l){K.sidebar.showEntries(l,null,!0)}),K.restoreLibraries()):K.sidebarWindow.window.setVisible(null!=c?c:!K.sidebarWindow.window.isVisible())}else null==K.sidebarElt&&(K.sidebarElt=K.createSidebarContainer(),K.createShapesPanel(K.sidebarElt),K.sidebarElt.style.border=
-"none",K.sidebarElt.style.width="210px",K.sidebarElt.style.borderRight="1px solid gray"),c=K.diagramContainer.parentNode,null!=K.sidebarElt.parentNode?(K.sidebarElt.parentNode.removeChild(K.sidebarElt),c.style.left="0px"):(c.parentNode.appendChild(K.sidebarElt),c.style.left=K.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth}catch(K){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
+G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;A.insertEdge(G,!1);var R=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");R.vertex=!0;var F=new mxCell("",new mxGeometry(0,0,0,0),G.style);F.geometry.setTerminalPoint(new mxPoint(110,-40),!0);F.geometry.relative=!0;F.edge=!0;R.insertEdge(F,!1);return n.createVertexTemplateFromCells([G,F,A,R],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(J,c){if(EditorUi.windowed){var f=J.editor.graph;f.popupMenuHandler.hideMenu();null==J.formatWindow?(J.formatWindow=new WrapperWindow(J,"",Math.max(10,J.diagramContainer.clientWidth-248),60,240,Math.min(566,f.container.clientHeight-10),function(l){l.className="geSidebarContainer geFormatContainer";J.createFormat(l).init()}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.formatWindow.window.setTitle(mxResources.get("format"))})),J.formatWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){J.formatWindow.window.fit()})),J.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)):J.formatWindow.window.setVisible(null!=c?c:!J.formatWindow.window.isVisible())}else null==J.formatElt&&(J.formatElt=J.createSidebarContainer(),J.createFormat(J.formatElt).init(),J.formatElt.style.border="none",J.formatElt.style.width="240px",J.formatElt.style.borderLeftWidth="1px",J.formatElt.style.borderLeftStyle="solid",J.formatElt.style.right="0px"),c=J.diagramContainer.parentNode,
+null!=J.formatElt.parentNode?(J.formatElt.parentNode.removeChild(J.formatElt),c.style.right="0px"):(c.parentNode.appendChild(J.formatElt),c.style.right=J.formatElt.style.width)}function e(J,c){if(EditorUi.windowed){var f=J.editor.graph;f.popupMenuHandler.hideMenu();null==J.sidebarWindow?(J.sidebarWindow=new WrapperWindow(J,"",10,56,Math.min(f.container.clientWidth-10,218)-6,Math.min(f.container.clientHeight-40,650)-6,function(l){J.createShapesPanel(l)}),J.dependsOnLanguage(mxUtils.bind(this,function(){J.sidebarWindow.window.setTitle(mxResources.get("shapes"))})),
+J.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){J.sidebarWindow.window.fit()})),J.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),J.sidebarWindow.window.setVisible(!0),isLocalStorage&&J.getLocalData("sidebar",function(l){J.sidebar.showEntries(l,null,!0)}),J.restoreLibraries()):J.sidebarWindow.window.setVisible(null!=c?c:!J.sidebarWindow.window.isVisible())}else null==J.sidebarElt&&(J.sidebarElt=J.createSidebarContainer(),J.createShapesPanel(J.sidebarElt),J.sidebarElt.style.border=
+"none",J.sidebarElt.style.width="210px",J.sidebarElt.style.borderRight="1px solid gray"),c=J.diagramContainer.parentNode,null!=J.sidebarElt.parentNode?(J.sidebarElt.parentNode.removeChild(J.sidebarElt),c.style.left="0px"):(c.parentNode.appendChild(J.sidebarElt),c.style.left=J.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var g=0;try{g=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth}catch(J){}Menus.prototype.autoPopup=!1;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR=
"#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;EditorUi.prototype.closableScratchpad=!1;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=
-function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(K,c){null!=c.shortcut&&900>g&&!mxClient.IS_IOS?K.firstChild.nextSibling.setAttribute("title",c.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
-function(K){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=K?K:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();n.apply(this,arguments)};var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(K){A.apply(this,
-arguments);if(K){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,
-arguments);var K=this.editorUi;EditorUi.enablePlantUml&&!K.isOffline()&&K.actions.put("plantUml",new Action("plantUml...",function(){var l=new ParseDialog(K,mxResources.get("plantUml")+"...","plantUml");K.showDialog(l.container,620,420,!0,!1);l.init()}));K.actions.put("mermaid",new Action("mermaid...",function(){var l=new ParseDialog(K,mxResources.get("mermaid")+"...","mermaid");K.showDialog(l.container,620,420,!0,!1);l.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-f=function(l,t,q,D){l.addItem(q,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(K,q,D);K.showDialog(H.container,620,420,!0,!1);H.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,t){for(var q=0;q<c.length;q++)"-"==c[q]?l.addSeparator(t):f(l,t,mxResources.get(c[q])+"...",c[q])})))};EditorUi.prototype.installFormatToolbar=function(K){var c=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,t){0<c.getSelectionCount()?(K.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var S=!1;EditorUi.prototype.initFormatWindow=function(){if(!S&&null!=this.formatWindow){S=!0;var K=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){K.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
+function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){m.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var v=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,c){null!=c.shortcut&&900>g&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title",c.shortcut):v.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=
+function(J){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=J?J:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var n=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();n.apply(this,arguments)};var A=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(J){A.apply(this,
+arguments);if(J){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=c&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=c&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,
+arguments);var J=this.editorUi;EditorUi.enablePlantUml&&!J.isOffline()&&J.actions.put("plantUml",new Action("plantUml...",function(){var l=new ParseDialog(J,mxResources.get("plantUml")+"...","plantUml");J.showDialog(l.container,620,420,!0,!1);l.init()}));J.actions.put("mermaid",new Action("mermaid...",function(){var l=new ParseDialog(J,mxResources.get("mermaid")+"...","mermaid");J.showDialog(l.container,620,420,!0,!1);l.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+f=function(l,t,q,D){l.addItem(q,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(J,q,D);J.showDialog(H.container,620,420,!0,!1);H.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(l,t){for(var q=0;q<c.length;q++)"-"==c[q]?l.addSeparator(t):f(l,t,mxResources.get(c[q])+"...",c[q])})))};EditorUi.prototype.installFormatToolbar=function(J){var c=this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(l,t){0<c.getSelectionCount()?(J.appendChild(f),f.innerHTML="Selected: "+c.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var R=!1;EditorUi.prototype.initFormatWindow=function(){if(!R&&null!=this.formatWindow){R=!0;var J=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){J.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width=
"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var F=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function K(B,I,U){var P=q.menus.get(B);I=N.addMenu(mxResources.get(B),mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));I.className="geButton";I.setAttribute("title",mxResources.get(B));q.menus.menuCreated(P,I,"geButton");null!=U&&(I.style.backgroundImage="url("+U+")",I.innerText="");return I}function c(B,I,U,P,T,X){var Z=document.createElement("a");Z.className="geButton";H.appendChild(Z);null!=X?Z.style.backgroundImage="url("+X+")":mxUtils.write(Z,B);mxEvent.addListener(Z,
-"click",function(ka){"disabled"!=Z.getAttribute("disabled")&&I(ka);mxEvent.consume(ka)});mxEvent.preventDefault(Z);null!=P&&Z.setAttribute("title",P);null!=T&&(B=function(){T.isEnabled()?Z.removeAttribute("disabled"):Z.setAttribute("disabled","disabled")},T.addListener("stateChanged",B),D.addListener("enabledChanged",B),B());return Z}function f(B,I,U){I=document.createElement("div");I.className="geButtonGroup";for(U=0;U<B.length;U++)null!=B[U]&&I.appendChild(B[U]);H.appendChild(I);return I}function l(){g=
-window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;H.innerHTML="";var B=1E3>g,I=K("diagram",null,B?Editor.menuImage:null);f([I,c(mxResources.get("shapes"),q.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),q.actions.get("image"),B?Editor.shapesImage:null),c(mxResources.get("format"),q.actions.get("format").funct,null,mxResources.get("format")+" ("+q.actions.get("format").shortcut+")",q.actions.get("image"),B?Editor.formatImage:null)]);I=K("insert",!0,
-B?ea:null);f([I,c(mxResources.get("delete"),q.actions.get("delete").funct,null,mxResources.get("delete"),q.actions.get("delete"),B?Editor.trashImage:null)]);D.isEnabled()||I.setAttribute("disabled","disabled");la.setAttribute("title",mxResources.get("undo")+" ("+ja.shortcut+")");Q.setAttribute("title",mxResources.get("redo")+" ("+ca.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(f([la,Q]),520<=g&&f([k,640<=g?c("",W.funct,!0,mxResources.get("zoomIn")+
-" ("+Editor.ctrlKey+" +)",W,Editor.zoomInImage):null,640<=g?c("",ba.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ba,Editor.zoomOutImage):null]));H.appendChild(q.statusContainer);H.appendChild(q.buttonContainer)}F.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"),t.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
+function(){function J(B,K,T){var P=q.menus.get(B);K=N.addMenu(mxResources.get(B),mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));K.className="geButton";K.setAttribute("title",mxResources.get(B));q.menus.menuCreated(P,K,"geButton");null!=T&&(K.style.backgroundImage="url("+T+")",K.innerText="");return K}function c(B,K,T,P,U,Y){var aa=document.createElement("a");aa.className="geButton";H.appendChild(aa);null!=Y?aa.style.backgroundImage="url("+Y+")":mxUtils.write(aa,B);mxEvent.addListener(aa,
+"click",function(la){"disabled"!=aa.getAttribute("disabled")&&K(la);mxEvent.consume(la)});mxEvent.preventDefault(aa);null!=P&&aa.setAttribute("title",P);null!=U&&(B=function(){U.isEnabled()?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")},U.addListener("stateChanged",B),D.addListener("enabledChanged",B),B());return aa}function f(B,K,T){K=document.createElement("div");K.className="geButtonGroup";for(T=0;T<B.length;T++)null!=B[T]&&K.appendChild(B[T]);H.appendChild(K);return K}
+function l(){g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;H.innerHTML="";var B=1E3>g,K=J("diagram",null,B?Editor.menuImage:null);f([K,c(mxResources.get("shapes"),q.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),q.actions.get("image"),B?Editor.shapesImage:null),c(mxResources.get("format"),q.actions.get("format").funct,null,mxResources.get("format")+" ("+q.actions.get("format").shortcut+")",q.actions.get("image"),B?Editor.formatImage:null)]);
+K=J("insert",!0,B?fa:null);f([K,c(mxResources.get("delete"),q.actions.get("delete").funct,null,mxResources.get("delete"),q.actions.get("delete"),B?Editor.trashImage:null)]);D.isEnabled()||K.setAttribute("disabled","disabled");W.setAttribute("title",mxResources.get("undo")+" ("+ka.shortcut+")");S.setAttribute("title",mxResources.get("redo")+" ("+da.shortcut+")");k.setAttribute("title",mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)");411<=g&&(f([W,S]),520<=g&&f([k,640<=g?c("",X.funct,!0,mxResources.get("zoomIn")+
+" ("+Editor.ctrlKey+" +)",X,Editor.zoomInImage):null,640<=g?c("",ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ca,Editor.zoomOutImage):null]));H.appendChild(q.statusContainer);H.appendChild(q.buttonContainer)}F.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"),t.classList.remove("geClassic"));this.sidebar=this.createSidebar(this.sidebarContainer);
if(1E3<=g||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])e(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=g&&(b(this,!0),this.formatWindow.window.setVisible(!0));var q=this,D=q.editor.graph;q.toolbar=this.createToolbar(q.createDiv("geToolbar"));var H=document.createElement("div");H.className="geMenubarContainer";
-var N=new Menubar(q,H),L=q.hideCurrentMenu;q.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var J=q.descriptorChanged;q.descriptorChanged=function(){J.apply(this,arguments);var B=q.getCurrentFile();if(null!=B&&null!=B.getTitle()){var I=B.getMode();"google"==I?I="googleDrive":"github"==I?I="gitHub":"gitlab"==I?I="gitLab":"onedrive"==I&&(I="oneDrive");I=mxResources.get(I);H.setAttribute("title",B.getTitle()+(null!=I?" ("+I+")":""))}else H.removeAttribute("title")};
-q.setStatusText(q.editor.getStatus());H.appendChild(q.statusContainer);q.buttonContainer=this.createButtonContainer();H.appendChild(q.buttonContainer);q.menubarContainer=q.buttonContainer;q.tabContainer=this.createTabContainer();var Y=this.createZoomInput(!0),ha=q.updateTabContainer;q.updateTabContainer=function(){ha.apply(this,arguments);q.tabContainer.appendChild(Y)};var ea=Editor.addBoxImage;if(null!=q.hoverIcons){var aa=q.hoverIcons.update;q.hoverIcons.update=function(){D.freehand.isDrawing()||
-aa.apply(this,arguments)}}if(null!=D.freehand){var na=D.freehand.createStyle;D.freehand.createStyle=function(B){return na.apply(this,arguments)+"sketch=0;"}}q.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.setStatusText(q.editor.getStatus())}));q.setStatusText(q.editor.getStatus());var W=q.actions.get("zoomIn"),ba=q.actions.get("zoomOut");t=q.actions.get("resetView");var ja=q.actions.get("undo"),ca=q.actions.get("redo"),la=c("",ja.funct,null,"",ja,Editor.undoImage),Q=c("",ca.funct,
-null,"",ca,Editor.redoImage),k=c("",function(B){mxEvent.isAltDown(B)?(q.hideCurrentMenu(),q.actions.get("customZoom").funct()):(q.hideCurrentMenu(),q.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",t,Editor.zoomFitImage);q.container.appendChild(q.tabContainer);q.container.appendChild(H);q.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);l();q.addListener("lockedChanged",l);q.addListener("languageChanged",l);q.editor.graph.addListener("enabledChanged",l);mxEvent.addListener(window,
+var N=new Menubar(q,H),L=q.hideCurrentMenu;q.hideCurrentMenu=function(){L.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var I=q.descriptorChanged;q.descriptorChanged=function(){I.apply(this,arguments);var B=q.getCurrentFile();if(null!=B&&null!=B.getTitle()){var K=B.getMode();"google"==K?K="googleDrive":"github"==K?K="gitHub":"gitlab"==K?K="gitLab":"onedrive"==K&&(K="oneDrive");K=mxResources.get(K);H.setAttribute("title",B.getTitle()+(null!=K?" ("+K+")":""))}else H.removeAttribute("title")};
+q.setStatusText(q.editor.getStatus());H.appendChild(q.statusContainer);q.buttonContainer=this.createButtonContainer();H.appendChild(q.buttonContainer);q.menubarContainer=q.buttonContainer;q.tabContainer=this.createTabContainer();var Z=this.createZoomInput(!0),ia=q.updateTabContainer;q.updateTabContainer=function(){ia.apply(this,arguments);q.tabContainer.appendChild(Z)};var fa=Editor.addBoxImage;if(null!=q.hoverIcons){var ba=q.hoverIcons.update;q.hoverIcons.update=function(){D.freehand.isDrawing()||
+ba.apply(this,arguments)}}if(null!=D.freehand){var na=D.freehand.createStyle;D.freehand.createStyle=function(B){return na.apply(this,arguments)+"sketch=0;"}}q.editor.addListener("statusChanged",mxUtils.bind(this,function(){q.setStatusText(q.editor.getStatus())}));q.setStatusText(q.editor.getStatus());var X=q.actions.get("zoomIn"),ca=q.actions.get("zoomOut");t=q.actions.get("resetView");var ka=q.actions.get("undo"),da=q.actions.get("redo"),W=c("",ka.funct,null,"",ka,Editor.undoImage),S=c("",da.funct,
+null,"",da,Editor.redoImage),k=c("",function(B){mxEvent.isAltDown(B)?(q.hideCurrentMenu(),q.actions.get("customZoom").funct()):(q.hideCurrentMenu(),q.actions.get("smartFit").funct());mxEvent.consume(B)},!0,"",t,Editor.zoomFitImage);q.container.appendChild(q.tabContainer);q.container.appendChild(H);q.updateTabContainer();!EditorUi.windowed&&1E3<=g&&b(this,!0);l();q.addListener("lockedChanged",l);q.addListener("languageChanged",l);q.editor.graph.addListener("enabledChanged",l);mxEvent.addListener(window,
"resize",function(){l();null!=q.sidebarWindow&&q.sidebarWindow.window.fit();null!=q.formatWindow&&q.formatWindow.window.fit();null!=q.actions.outlineWindow&&q.actions.outlineWindow.window.fit();null!=q.actions.layersWindow&&q.actions.layersWindow.window.fit();null!=q.menus.chatWindow&&q.menus.chatWindow.window.fit();null!=q.menus.tagsWindow&&q.menus.tagsWindow.window.fit();null!=q.menus.findWindow&&q.menus.findWindow.window.fit();null!=q.menus.findReplaceWindow&&q.menus.findReplaceWindow.window.fit()})}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,v,n,A){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=v;this.isResolved=n;this.user=A;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,v){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,v){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=v};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\nconfConfigSpacePerm=Note: If you recently migrated from DC app, please check draw.io Configuration space permissions such that all users can read and only admins can write. In addition, remove the page restrictions on "Configuration" and "Libraries" pages. You may need admin keys to access them. Also, please check the file "configuration.json" in the "Configuration" page is downloadable.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;
@@ -4169,13 +4169,13 @@ this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(
null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;var m=this;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),null!=b)){var v=
mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var G=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?G.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(G.style.padding="8px");G.style.forcedColorAdjust="none";G.style.boxSizing="border-box";G.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var q=
this.view.graphBounds,D=this.view.translate;G.setAttribute("viewBox",q.x+D.x-this.panDx+" "+(q.y+D.y-this.panDy)+" "+(q.width+1)+" "+(q.height+1));this.container.style.backgroundColor=G.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",q))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(q){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=
-!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(q){}this.graph.getImageFromBundles=function(q){return m.getImageUrl(q)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);
-if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(S=0;S<F.length;S++)if(this.pageId==F[S].getAttribute("id")){this.currentPage=S;break}var K=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(q){var D=F[m.currentPage];return"page"==q?D.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==q?m.currentPage+1:"pagecount"==q?F.length:K.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=
-function(q){this.handlingResize||(this.currentPage=mxUtils.mod(q,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(q){q=this.getIndexById(q);var D=0<=q;D&&this.selectPage(q);return D};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var f=this.graph.setBackgroundImage;this.graph.setBackgroundImage=
+!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");var R=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=R&&R!=e)try{this.xml=mxUtils.getXml(R),this.xmlNode=R,this.xmlDocument=R.ownerDocument}catch(q){}this.graph.getImageFromBundles=function(q){return m.getImageUrl(q)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);
+if("mxfile"==this.xmlNode.nodeName){var F=this.xmlNode.getElementsByTagName("diagram");if(0<F.length){if(null!=this.pageId)for(R=0;R<F.length;R++)if(this.pageId==F[R].getAttribute("id")){this.currentPage=R;break}var J=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(q){var D=F[m.currentPage];return"page"==q?D.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==q?m.currentPage+1:"pagecount"==q?F.length:J.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=
+function(q){this.handlingResize||(this.currentPage=mxUtils.mod(q,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(q){q=this.getIndexById(q);var D=0<=q;D&&this.selectPage(q);return D};R=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});var f=this.graph.setBackgroundImage;this.graph.setBackgroundImage=
function(q){if(null!=q&&Graph.isPageLink(q.src)){var D=q.src,H=D.indexOf(",");0<H&&(H=m.getIndexById(D.substring(H+1)),0<=H&&(q=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[H])),q.originalSrc=D))}f.apply(this,arguments)};var l=this.graph.getGraphBounds;this.graph.getGraphBounds=function(q){var D=l.apply(this,arguments);q=this.backgroundImage;if(null!=q){var H=this.view.translate,N=this.view.scale;D=mxRectangle.fromRectangle(D);D.add(new mxRectangle((H.x+q.x)*N,(H.y+q.y)*N,q.width*N,
-q.height*N))}return D};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
+q.height*N))}return D};this.addListener("xmlNodeChanged",R);R();urlParams.page=m.currentPage;R=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,R=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||
(this.graph.panningHandler.isForcePanningEvent=function(q){return!mxEvent.isPopupTrigger(q.getEvent())&&"auto"==this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.titleTooltip||
-this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=S&&this.setLayersVisible(S);this.graph.customLinkClicked=function(q,D){try{if(Graph.isPageLink(q)){var H=q.indexOf(",");m.selectPageById(q.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var N=
+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.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=R&&this.setLayersVisible(R);this.graph.customLinkClicked=function(q,D){try{if(Graph.isPageLink(q)){var H=q.indexOf(",");m.selectPageById(q.substring(H+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else{var N=
this.getGraphBounds();this.handleCustomLink(q,D);N.equals(this.getGraphBounds())||m.crop()}}catch(L){alert(L.message)}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"))});g=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&null==this.getAncestorDetails(b)&&"undefined"!==typeof g){var n=
this.getObservableParent(b),A=new g(mxUtils.bind(this,function(G){0<b.offsetWidth&&(A.disconnect(),v())}));A.observe(n,{attributes:!0})}else v()}};
GraphViewer.prototype.installBackgroundColorHandler=function(){var b=this.graph;if(null!=b){null!=GraphViewer.shapeBackgroundColor&&(b.shapeBackgroundColor=GraphViewer.shapeBackgroundColor);b.defaultPageBackgroundColor="transparent";b.diagramBackgroundColor="transparent";b.transparentBackground=!1;var e=b.background,g=mxUtils.bind(this,function(m){"none"==b.getAdaptiveColors()&&null==e&&(this.isDarkMode()?b.background="#ffffff":b.background=null,m&&b.view.validateBackground())});this.addListener("graphChanged",
@@ -4188,37 +4188,37 @@ GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocum
GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var g=[],m=this.graph.getModel();m.beginUpdate();try{for(var v=0;v<m.getChildCount(m.root);v++){var n=m.getChildAt(m.root,v);e=e&&m.isVisible(n);g.push(m.isVisible(n));m.setVisible(n,null!=b?b[v]:!0)}}finally{m.endUpdate()}}return e?null:g};
GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};GraphViewer.prototype.isDarkMode=function(){return"dark"==this.darkMode||"auto"==this.darkMode&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
-S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};G={left:G.left-S.left,top:G.top-S.top,bottom:G.bottom-S.top,right:G.right-S.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.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}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var S=b.offsetWidth;S==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G: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},v=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),g=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var m=mxUtils.bind(this,function(){if(!g){g=!0;var G=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?G.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){G=b.getBoundingClientRect();var R=mxUtils.getScrollOrigin(document.body);
+R="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-R.x,top:-R.y};G={left:G.left-R.left,top:G.top-R.top,bottom:G.bottom-R.top,right:G.right-R.left};this.toolbar.style.left=G.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=G.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=G.top+1+"px"):this.toolbar.style.top=G.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}}),v=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(G){var R=b.offsetWidth;R==v||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=G?G: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},v=R,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 n=v=null;m=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=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 A=mxUtils.bind(this,function(G){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||
-null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};
+m);var A=mxUtils.bind(this,function(G){var R=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var F=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==G&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>F)?(G=null,null!=F&&e.height+2*this.graph.border>F-2&&(G=(F-2*this.graph.border-2)/e.height),this.fitGraph(G)):this.widthIsEmpty||
+null!=G||0!=this.graphConfig.resize||""==b.style.height?(G=null!=G?G:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+G.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+G.y),v=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=R});8==document.documentMode?window.setTimeout(A,0):A();this.positionGraph=function(G){e=this.graph.getGraphBounds();v=null;A(G)}};
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),g=b.border,m=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/m+g):g,null!=e.y?Math.floor(b.view.translate.y-e.y/m+g):g)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
-GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,n=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;n={};if(v)for(var G=0;G<m.length;G++){var S=b.getCell(m[G]);null!=S&&(e=!0,n[S.id]=!0)}else for(G=0;G<g.length;G++)S=b.getChildAt(b.root,parseInt(g[G])),null!=S&&(e=!0,n[S.id]=!0);for(G=0;e&&
-G<A;G++)S=b.getChildAt(b.root,G),b.setVisible(S,n[S.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}n=!0}return n};
+GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=null!=g&&0<g.length?g.split(" "):[];var m=this.graphConfig.layerIds,v=null!=m&&0<m.length,n=!1;if(0<g.length||v||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var A=b.getChildCount(b.root);if(null==e){e=!1;n={};if(v)for(var G=0;G<m.length;G++){var R=b.getCell(m[G]);null!=R&&(e=!0,n[R.id]=!0)}else for(G=0;G<g.length;G++)R=b.getChildAt(b.root,parseInt(g[G])),null!=R&&(e=!0,n[R.id]=!0);for(G=0;e&&
+G<A;G++)R=b.getChildAt(b.root,G),b.setVisible(R,n[R.id]||!1)}else for(G=0;G<A;G++)b.setVisible(b.getChildAt(b.root,G),e.isVisible(e.getChildAt(e.root,G)))}finally{b.endUpdate()}n=!0}return n};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=
this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(e,30);var m=null,v=null,n=mxUtils.bind(this,function(aa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),aa||200)}),A=mxUtils.bind(this,function(aa){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=
-"";mxUtils.setOpacity(e,aa||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||(A(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(aa){mxEvent.consume(aa)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(aa){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(aa){A(100);mxEvent.consume(aa)}));mxEvent.addListener(e,"mouseleave",
-mxUtils.bind(this,function(aa){mxEvent.isTouchEvent(aa)||A(30)}));var G=this.graph,S=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(aa,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(aa,na){},mouseUp:function(aa,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<S&&Math.abs(this.scrollTop-G.container.scrollTop)<
-S&&Math.abs(this.startX-na.getGraphX())<S&&Math.abs(this.startY-na.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?n():A(30))}})}g=this.toolbarItems;for(var F=0,K=mxUtils.bind(this,function(aa,na,W,ba){aa=this.createToolbarButton(aa,na,W,ba);e.appendChild(aa);F++;return aa}),c=this.graph.getModel(),f=null,l=null,t=null,q=null,D=0;D<g.length;D++){var H=g[D];if("pages"==H){q=b.ownerDocument.createElement("div");q.style.display="inline-flex";q.style.position="relative";q.style.alignItems="center";
-q.style.padding="4px";q.style.fontFamily=GraphViewer.cssFontFamily;q.style.fontSize="12px";q.style.cursor="default";q.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(q,70);var N=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");N.style.borderRightStyle="none";N.style.paddingLeft="0px";N.style.paddingRight="0px";e.appendChild(q);var L=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-flex":"none";N.style.display=q.style.display;L.style.display=q.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==H){if(this.layersEnabled){var J=K(mxUtils.bind(this,function(aa){if(null!=f)f.parentNode.removeChild(f),
-f=null;else{f=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var W=this.graph.getGraphBounds(),ba=this.graph.view;0>W.x||0>W.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale}):null!=this.graph.originalViewState&&0<W.x/ba.scale+this.graph.originalViewState.translate.x-ba.translate.x&&0<W.y/ba.scale+this.graph.originalViewState.translate.y-
-ba.translate.y&&(ba.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ba.translate.clone(),scale:ba.scale})}}));mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});aa=J.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily=GraphViewer.cssFontFamily;
-f.style.fontSize="11px";f.style.overflowY="auto";f.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";f.style.zIndex=this.toolbarZIndex+1;f.style.color="#000";mxUtils.setOpacity(f,85);var na=mxUtils.getDocumentScrollOrigin(document);f.style.left=na.x+aa.left-1+"px";f.style.top=na.y+aa.bottom-2+"px";this.isDarkMode()&&(f.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
-function(){J.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});J.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Y=K(mxUtils.bind(this,function(aa){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
+mxUtils.setOpacity(e,30);var m=null,v=null,n=mxUtils.bind(this,function(ba){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;v=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";v=null}),100)}),ba||200)}),A=mxUtils.bind(this,function(ba){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=v&&(window.clearTimeout(v),fadeThead2=null);e.style.display=
+"";mxUtils.setOpacity(e,ba||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||(A(30),n())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ba){mxEvent.consume(ba)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ba){A(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ba){A(100);mxEvent.consume(ba)}));mxEvent.addListener(e,"mouseleave",
+mxUtils.bind(this,function(ba){mxEvent.isTouchEvent(ba)||A(30)}));var G=this.graph,R=G.getTolerance();G.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ba,na){this.startX=na.getGraphX();this.startY=na.getGraphY();this.scrollLeft=G.container.scrollLeft;this.scrollTop=G.container.scrollTop},mouseMove:function(ba,na){},mouseUp:function(ba,na){mxEvent.isTouchEvent(na.getEvent())&&Math.abs(this.scrollLeft-G.container.scrollLeft)<R&&Math.abs(this.scrollTop-G.container.scrollTop)<
+R&&Math.abs(this.startX-na.getGraphX())<R&&Math.abs(this.startY-na.getGraphY())<R&&(0<parseFloat(e.style.opacity||0)?n():A(30))}})}g=this.toolbarItems;for(var F=0,J=mxUtils.bind(this,function(ba,na,X,ca){ba=this.createToolbarButton(ba,na,X,ca);e.appendChild(ba);F++;return ba}),c=this.graph.getModel(),f=null,l=null,t=null,q=null,D=0;D<g.length;D++){var H=g[D];if("pages"==H){q=b.ownerDocument.createElement("div");q.style.display="inline-flex";q.style.position="relative";q.style.alignItems="center";
+q.style.padding="4px";q.style.fontFamily=GraphViewer.cssFontFamily;q.style.fontSize="12px";q.style.cursor="default";q.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(q,70);var N=J(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.chevronLeftImage,mxResources.get("previousPage")||"Previous Page");N.style.borderRightStyle="none";N.style.paddingLeft="0px";N.style.paddingRight="0px";e.appendChild(q);var L=J(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.chevronRightImage,mxResources.get("nextPage")||"Next Page");L.style.paddingLeft="0px";L.style.paddingRight="0px";H=mxUtils.bind(this,function(){q.innerText="";mxUtils.write(q,this.currentPage+1+" / "+this.diagrams.length);q.style.display=1<this.diagrams.length?"inline-flex":"none";N.style.display=q.style.display;L.style.display=q.style.display});this.addListener("graphChanged",H);H()}else if("zoom"==H)this.zoomEnabled&&(J(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),J(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),J(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"==H){if(this.layersEnabled){var I=J(mxUtils.bind(this,function(ba){if(null!=f)f.parentNode.removeChild(f),
+f=null;else{f=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var X=this.graph.getGraphBounds(),ca=this.graph.view;0>X.x||0>X.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale}):null!=this.graph.originalViewState&&0<X.x/ca.scale+this.graph.originalViewState.translate.x-ca.translate.x&&0<X.y/ca.scale+this.graph.originalViewState.translate.y-
+ca.translate.y&&(ca.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ca.translate.clone(),scale:ca.scale})}}));mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ba=I.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily=GraphViewer.cssFontFamily;
+f.style.fontSize="11px";f.style.overflowY="auto";f.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";f.style.zIndex=this.toolbarZIndex+1;f.style.color="#000";mxUtils.setOpacity(f,85);var na=mxUtils.getDocumentScrollOrigin(document);f.style.left=na.x+ba.left-1+"px";f.style.top=na.y+ba.bottom-2+"px";this.isDarkMode()&&(f.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");c.addListener(mxEvent.CHANGE,
+function(){I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"});I.style.display=1<c.getChildCount(c.root)?"inline-flex":"none"}}else if("tags"==H){if(this.tagsEnabled){var Z=J(mxUtils.bind(this,function(ba){null==l&&(l=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),l.div.getElementsByTagName("div")[0].style.position="",l.div.style.maxHeight="160px",l.div.style.maxWidth="120px",l.div.style.padding="2px",l.div.style.overflow="auto",l.div.style.height="auto",l.div.style.position=
"fixed",l.div.style.fontFamily=GraphViewer.cssFontFamily,l.div.style.fontSize="11px",l.div.style.backgroundColor="#eee",l.div.style.color="#000",l.div.style.border="1px solid #d0d0d0",l.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(l.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(l.div,85));if(null!=t)t.parentNode.removeChild(t),t=null;else{t=l.div;t.style.position="absolute";mxEvent.addListener(t,"mouseleave",function(){null!=t&&(t.parentNode.removeChild(t),t=null)});
-aa=Y.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);t.style.left=na.x+aa.left-1+"px";t.style.top=na.y+aa.bottom-2+"px";document.body.appendChild(t);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Y.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=t&&0==this.graph.getAllTags().length&&(t.parentNode.removeChild(t),t=null)}));Y.style.display=0<this.graph.getAllTags().length?"inline-flex":
-"none"}}else"lightbox"==H?this.lightboxEnabled&&K(mxUtils.bind(this,function(){try{this.showLightbox()}catch(aa){alert(aa.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=K(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=
-b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var ha=b.style.border,
-ea=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var aa=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};aa={left:aa.left-na.left,top:aa.top-na.top,bottom:aa.bottom-na.top,right:aa.right-na.left};e.style.left=
-aa.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=aa.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=aa.top+1+"px"):e.style.top=aa.top+"px";"1px solid transparent"==ha&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var W=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=t&&(t.parentNode.removeChild(t),t=null);null!=f&&(f.parentNode.removeChild(f),f=null);
-b.style.border=ha});mxEvent.addListener(document,"mousemove",function(ba){for(ba=mxEvent.getSource(ba);null!=ba;){if(ba==b||ba==e||ba==f||ba==t)return;ba=ba.parentNode}W()});mxEvent.addListener(document.body,"mouseleave",function(ba){W()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};
+ba=Z.getBoundingClientRect();var na=mxUtils.getDocumentScrollOrigin(document);t.style.left=na.x+ba.left-1+"px";t.style.top=na.y+ba.bottom-2+"px";document.body.appendChild(t);l.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");c.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){Z.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=t&&0==this.graph.getAllTags().length&&(t.parentNode.removeChild(t),t=null)}));Z.style.display=0<this.graph.getAllTags().length?"inline-flex":
+"none"}}else"lightbox"==H?this.lightboxEnabled&&J(mxUtils.bind(this,function(){try{this.showLightbox()}catch(ba){alert(ba.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(H=this.graphConfig["toolbar-buttons"][H],null!=H&&(H.elem=J(null==H.enabled||H.enabled?H.handler:function(){},H.image,H.title,H.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*F);null!=this.graphConfig.title&&(g=
+b.ownerDocument.createElement("div"),g.style.display="inline-flex",g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*F;var ia=b.style.border,
+fa=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 ba=b.getBoundingClientRect(),na=mxUtils.getScrollOrigin(document.body);na="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-na.x,top:-na.y};ba={left:ba.left-na.left,top:ba.top-na.top,bottom:ba.bottom-na.top,right:ba.right-na.left};e.style.left=
+ba.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ba.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ba.top+1+"px"):e.style.top=ba.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var X=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=t&&(t.parentNode.removeChild(t),t=null);null!=f&&(f.parentNode.removeChild(f),f=null);
+b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ca){for(ca=mxEvent.getSource(ca);null!=ca;){if(ca==b||ca==e||ca==f||ca==t)return;ca=ca.parentNode}X()});mxEvent.addListener(document.body,"mouseleave",function(ca){X()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",fa):fa();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&fa()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var v=document.createElement("div");v.style.borderRight="1px solid #d0d0d0";v.style.display="inline-flex";v.style.alignItems="center";v.style.padding="6px";mxEvent.addListener(v,"click",b);null!=g&&v.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(v,"mouseenter",function(){v.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(v,"mouseleave",function(){v.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),v.style.cursor="pointer"):mxUtils.setOpacity(v,30);v.appendChild(b);return v};
GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};
@@ -4231,9 +4231,9 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElement
g.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){n.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);n.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=
this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var v=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));v.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(v))}catch(l){}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(){};v=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=v;n.refresh=function(){};var A=mxUtils.bind(this,function(l){27==l.keyCode&&n.destroy()}),G=this.initialOverflow,
-S=n.destroy;n.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var F=n.editor.graph,K=F.container;K.style.overflow="hidden";K.style.inset="0";this.lightboxChrome&&null==b?(K.style.border="1px solid #c0c0c0",K.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",
-g.style.display="none");var c=this;F.getImageFromBundles=function(l){return c.getImageUrl(l)};var f=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=f.apply(this,arguments);l.getImageFromBundles=function(t){return c.getImageUrl(t)};return l};this.graphConfig.move&&(F.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(K.style,"border-radius","4px");K.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,n);
-window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){n.destroy()}),K.style.outline="none",K.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(K)):(document.body.appendChild(K),document.body.appendChild(g)),n.setFileData(this.xml),mxUtils.setPrefixedStyle(K.style,"transform","rotateY(0deg)"),n.chromelessToolbar.style.bottom="60px",n.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(n.chromelessToolbar),
+R=n.destroy;n.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",A),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=G,GraphViewer.resizeSensorEnabled=!0,R.apply(this,arguments))};var F=n.editor.graph,J=F.container;J.style.overflow="hidden";J.style.inset="0";this.lightboxChrome&&null==b?(J.style.border="1px solid #c0c0c0",J.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",A)):(e.style.display="none",
+g.style.display="none");var c=this;F.getImageFromBundles=function(l){return c.getImageUrl(l)};var f=n.createTemporaryGraph;n.createTemporaryGraph=function(){var l=f.apply(this,arguments);l.getImageFromBundles=function(t){return c.getImageUrl(t)};return l};this.graphConfig.move&&(F.isMoveCellsEvent=function(l){return!0});mxUtils.setPrefixedStyle(J.style,"border-radius","4px");J.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(F,n);
+window.setTimeout(mxUtils.bind(this,function(){try{mxEvent.addListener(e,"click",function(){n.destroy()}),J.style.outline="none",J.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(J)):(document.body.appendChild(J),document.body.appendChild(g)),n.setFileData(this.xml),mxUtils.setPrefixedStyle(J.style,"transform","rotateY(0deg)"),n.chromelessToolbar.style.bottom="60px",n.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(n.chromelessToolbar),
n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(F,this.graph),n.lightboxFit(),n.chromelessResize()}catch(l){n.handleError(l,null,function(){n.destroy()})}}),0);return n};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};
GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};
@@ -4250,7 +4250,7 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n filter: invert(1);\
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function v(){this.q=[];this.add=function(q){this.q.push(q)};var l,t;this.call=function(){l=0;for(t=this.q.length;l<t;l++)this.q[l].call()}}function n(l,t){return l.currentStyle?l.currentStyle[t]:window.getComputedStyle?window.getComputedStyle(l,null).getPropertyValue(t):l.style[t]}function A(l,t){if(!l.resizedAttached)l.resizedAttached=
new v,l.resizedAttached.add(t);else if(l.resizedAttached){l.resizedAttached.add(t);return}l.resizeSensor=document.createElement("div");l.resizeSensor.className="resize-sensor";l.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";l.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>';
-l.appendChild(l.resizeSensor);"static"==n(l,"position")&&(l.style.position="relative");var q=l.resizeSensor.childNodes[0],D=q.childNodes[0],H=l.resizeSensor.childNodes[1],N=function(){D.style.width="100000px";D.style.height="100000px";q.scrollLeft=1E5;q.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};N();var L=!1,J=function(){l.resizedAttached&&(L&&(l.resizedAttached.call(),L=!1),b(J))};b(J);var Y,ha,ea,aa;t=function(){if((ea=l.offsetWidth)!=Y||(aa=l.offsetHeight)!=ha)L=!0,Y=ea,ha=aa;N()};var na=
-function(W,ba,ja){W.attachEvent?W.attachEvent("on"+ba,ja):W.addEventListener(ba,ja)};na(q,"scroll",t);na(H,"scroll",t)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,F=!1;(new ResizeObserver(function(){F||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){F=!0;G();S=null;F=!1},200))})).observe(g)}else{var K=Object.prototype.toString.call(g),c="[object Array]"===K||"[object NodeList]"===K||"[object HTMLCollection]"===
-K||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(c){K=0;for(var f=g.length;K<f;K++)A(g[K],G)}else A(g,G);this.detach=function(){if(c)for(var l=0,t=g.length;l<t;l++)e.detach(g[l]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
+l.appendChild(l.resizeSensor);"static"==n(l,"position")&&(l.style.position="relative");var q=l.resizeSensor.childNodes[0],D=q.childNodes[0],H=l.resizeSensor.childNodes[1],N=function(){D.style.width="100000px";D.style.height="100000px";q.scrollLeft=1E5;q.scrollTop=1E5;H.scrollLeft=1E5;H.scrollTop=1E5};N();var L=!1,I=function(){l.resizedAttached&&(L&&(l.resizedAttached.call(),L=!1),b(I))};b(I);var Z,ia,fa,ba;t=function(){if((fa=l.offsetWidth)!=Z||(ba=l.offsetHeight)!=ia)L=!0,Z=fa,ia=ba;N()};var na=
+function(X,ca,ka){X.attachEvent?X.attachEvent("on"+ca,ka):X.addEventListener(ca,ka)};na(q,"scroll",t);na(H,"scroll",t)}var G=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var R=null,F=!1;(new ResizeObserver(function(){F||(null!=R&&window.clearTimeout(R),R=window.setTimeout(function(){F=!0;G();R=null;F=!1},200))})).observe(g)}else{var J=Object.prototype.toString.call(g),c="[object Array]"===J||"[object NodeList]"===J||"[object HTMLCollection]"===
+J||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(c){J=0;for(var f=g.length;J<f;J++)A(g[J],G)}else A(g,G);this.detach=function(){if(c)for(var l=0,t=g.length;l<t;l++)e.detach(g[l]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 3ad097efe..5925e97a9 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"5e2806a0e07ba1122576c915e3938066"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"eb1d6a46e715a127ea72dd6460c2184b"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"7f0094a1758e6c55ab5392910a13d13d"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"715e1d208fef6f7ccaf34485f9a201ae"},{url:"styles/high-contrast.css",revision:"c8095fb62f147b591c84b8d290d6703b"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"a14da21436f87c96057ac57c1881ad81"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"e3bb1453579008ea5e42fbddd5f33c54"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"07bcf4e4c26f5674f48130448e77fcc0"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ddb4d1f6d316a187e55bb3fd89fc6165"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b44638cfed6404ac07cb82d0ee7d0437"},{url:"resources/dia_am.txt",revision:"0b1eb26b186aacfd5b6d67f88d144d0b"},{url:"resources/dia_ar.txt",revision:"bed70fa15f59b312c168b9ef9528d578"},{url:"resources/dia_bg.txt",revision:"1c846465cb20bf155acc937ba8cbc446"},{url:"resources/dia_bn.txt",revision:"0a7cc401f17390b415417153d8b87b84"},{url:"resources/dia_bs.txt",revision:"b5908edbf7e697b23a2bf90adcbb49c7"},{url:"resources/dia_ca.txt",revision:"c745e8f057b24e85f3f0eecba7af19eb"},{url:"resources/dia_cs.txt",revision:"5e0cf43a649bfdcd56bbebfba6db00ca"},{url:"resources/dia_da.txt",revision:"4766eaa4150ecbe04b89f767835b9406"},{url:"resources/dia_de.txt",revision:"4f0596f7aedfbb808095762f0bd63306"},{url:"resources/dia_el.txt",revision:"a8fa799c3eda7ed001ef011a1e5806dd"},{url:"resources/dia_eo.txt",revision:"6bd806494299f0ac942d1ca21c065478"},{url:"resources/dia_es.txt",revision:"5ea8d76e6966383bcc92bbc4752db5db"},{url:"resources/dia_et.txt",revision:"70aa0cb2ecbbe167a3e4a38aac6dbbdc"},{url:"resources/dia_eu.txt",revision:"1e5419dbdd0da6a6be4e9c48bd99220f"},{url:"resources/dia_fa.txt",revision:"13be854b8db535400e1cd1ec245e740e"},{url:"resources/dia_fi.txt",revision:"8947362d39bee93460c0d86713ee65b7"},{url:"resources/dia_fil.txt",revision:"74efdec615b1003983f77aa12834a75c"},{url:"resources/dia_fr.txt",revision:"8dd13eaca0fcd7e41072c571c201d661"},{url:"resources/dia_gl.txt",revision:"6e09dfae5d18a933d3bc11ba5de44f3c"},{url:"resources/dia_gu.txt",revision:"b9837957b0ca73e4414377b53b53a70b"},{url:"resources/dia_he.txt",revision:"7a8aef0306c6a94f6872896d219d1dc4"},{url:"resources/dia_hi.txt",revision:"3029801be7a36b67a29314a04d5d7d42"},{url:"resources/dia_hr.txt",revision:"57b724efdceb29d21ca8a64c59350b1a"},{url:"resources/dia_hu.txt",revision:"818262e6bcb84ed26563611045490649"},{url:"resources/dia_id.txt",revision:"71d0eb41a8336acdfff7a405c609e18f"},{url:"resources/dia_it.txt",revision:"c3574cb9042adcaea63a3944a09c518e"},{url:"resources/dia_ja.txt",revision:"1c3d11a6636c946d5a22ea52889a19e7"},{url:"resources/dia_kn.txt",revision:"457144ed2c2f51a5ec1d383cbfe9bbf7"},{url:"resources/dia_ko.txt",revision:"e20f9bd4bbf52bf9e3df6e92d7ee1722"},{url:"resources/dia_lt.txt",revision:"bd25b4eab36f6d663c66e4c957b8ef60"},{url:"resources/dia_lv.txt",revision:"e8d8899460a1c81632d7cac287f15354"},{url:"resources/dia_ml.txt",revision:"3b20dfcc809d4b13e3e705a1ae5fbc9f"},{url:"resources/dia_mr.txt",revision:"dd27583c966df6663526af940f7df5d6"},{url:"resources/dia_ms.txt",revision:"253bfb31cf6c8af7ff65527a9137bb9d"},{url:"resources/dia_my.txt",revision:"15f93018ad77289defe0d26df43c6846"},{url:"resources/dia_nl.txt",revision:"abc7305430780a7f3a611e95aa3d6d11"},{url:"resources/dia_no.txt",revision:"cc385ba00d44d6b025fc8b2cffc6721f"},{url:"resources/dia_pl.txt",revision:"485155d3dc8c3d20f42d2ce4689a225f"},{url:"resources/dia_pt-br.txt",revision:"d0bbfa8e826a73098fed085a83a72cdd"},{url:"resources/dia_pt.txt",revision:"18907cf9172320e86fa8aa2a91090ec7"},{url:"resources/dia_ro.txt",revision:"0581872bd0fe468143c7dba864257020"},{url:"resources/dia_ru.txt",revision:"c3789211d3006115131baeea8aab53f7"},{url:"resources/dia_si.txt",revision:"6905439a8ccb386864df2d708be0e8a2"},{url:"resources/dia_sk.txt",revision:"e05d29a790dab92f32a46d0228b5b696"},{url:"resources/dia_sl.txt",revision:"32608759b877e9e942ce209695e841f4"},{url:"resources/dia_sr.txt",revision:"4633d649f40d5b7cf610b6eeb7e6c840"},{url:"resources/dia_sv.txt",revision:"f81f1c1af4df00d757781e3d3b856e05"},{url:"resources/dia_sw.txt",revision:"4f7f39ab83d4ce75b980e1be971ee910"},{url:"resources/dia_ta.txt",revision:"83752a59dfa4f313b73da42e837d8519"},{url:"resources/dia_te.txt",revision:"476a89c596d24e1b1d80f90b76eea1b5"},{url:"resources/dia_th.txt",revision:"6c98c7c4d45c2c260be975ba4db965d3"},{url:"resources/dia_tr.txt",revision:"a4f04603060a5f900fefe32e7aa858a9"},{url:"resources/dia_uk.txt",revision:"2a9c088b5a04a843af42911a0e203fc9"},{url:"resources/dia_vi.txt",revision:"7ada081c11fd313ceee6f51bbc166e34"},{url:"resources/dia_zh-tw.txt",revision:"24281a99696e767ff085dfd6c49a3fe9"},{url:"resources/dia_zh.txt",revision:"3128f6e90a0db91c9d6adcdb94ca7522"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/bootstrap.js",revision:"3ae5cb7b92474238c9cd6c9667771e8f"},{url:"js/main.js",revision:"1234ae0a564b9c1064129d87f15e025b"},{url:"js/app.min.js",revision:"6abe95e07f7e88476fcbdaad918606dc"},{url:"js/extensions.min.js",revision:"1a62536b536113c0b6cadd93b9816b22"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"ad38046619064bc0f0790be6b5a7995f"},{url:"js/shapes-14-6-5.min.js",revision:"eb1d6a46e715a127ea72dd6460c2184b"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"9de11c65ec13b24c73ace7042bc529cc"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"715e1d208fef6f7ccaf34485f9a201ae"},{url:"styles/high-contrast.css",revision:"c8095fb62f147b591c84b8d290d6703b"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"8bed41c0cb552327b91aa2bacff54e59"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/viewerPanel2.html",revision:"0dd1ee1343a46b5c03aedbc587450b84"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"ce61a0e62031a160e057809fefe64aa2"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"6deea8e9b96ff96043cd5cfd2a242a9f"},{url:"plugins/cConf-1-4-8.js",revision:"e3bb1453579008ea5e42fbddd5f33c54"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"07bcf4e4c26f5674f48130448e77fcc0"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"78b87563d88943ab816a3463927b9b50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"ddb4d1f6d316a187e55bb3fd89fc6165"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"c4c110650228d22b021ebad4d6ef021e"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"b44638cfed6404ac07cb82d0ee7d0437"},{url:"resources/dia_am.txt",revision:"0b1eb26b186aacfd5b6d67f88d144d0b"},{url:"resources/dia_ar.txt",revision:"bed70fa15f59b312c168b9ef9528d578"},{url:"resources/dia_bg.txt",revision:"1c846465cb20bf155acc937ba8cbc446"},{url:"resources/dia_bn.txt",revision:"0a7cc401f17390b415417153d8b87b84"},{url:"resources/dia_bs.txt",revision:"b5908edbf7e697b23a2bf90adcbb49c7"},{url:"resources/dia_ca.txt",revision:"c745e8f057b24e85f3f0eecba7af19eb"},{url:"resources/dia_cs.txt",revision:"5e0cf43a649bfdcd56bbebfba6db00ca"},{url:"resources/dia_da.txt",revision:"4766eaa4150ecbe04b89f767835b9406"},{url:"resources/dia_de.txt",revision:"4f0596f7aedfbb808095762f0bd63306"},{url:"resources/dia_el.txt",revision:"a8fa799c3eda7ed001ef011a1e5806dd"},{url:"resources/dia_eo.txt",revision:"6bd806494299f0ac942d1ca21c065478"},{url:"resources/dia_es.txt",revision:"5ea8d76e6966383bcc92bbc4752db5db"},{url:"resources/dia_et.txt",revision:"70aa0cb2ecbbe167a3e4a38aac6dbbdc"},{url:"resources/dia_eu.txt",revision:"1e5419dbdd0da6a6be4e9c48bd99220f"},{url:"resources/dia_fa.txt",revision:"13be854b8db535400e1cd1ec245e740e"},{url:"resources/dia_fi.txt",revision:"8947362d39bee93460c0d86713ee65b7"},{url:"resources/dia_fil.txt",revision:"74efdec615b1003983f77aa12834a75c"},{url:"resources/dia_fr.txt",revision:"8dd13eaca0fcd7e41072c571c201d661"},{url:"resources/dia_gl.txt",revision:"6e09dfae5d18a933d3bc11ba5de44f3c"},{url:"resources/dia_gu.txt",revision:"b9837957b0ca73e4414377b53b53a70b"},{url:"resources/dia_he.txt",revision:"7a8aef0306c6a94f6872896d219d1dc4"},{url:"resources/dia_hi.txt",revision:"3029801be7a36b67a29314a04d5d7d42"},{url:"resources/dia_hr.txt",revision:"57b724efdceb29d21ca8a64c59350b1a"},{url:"resources/dia_hu.txt",revision:"818262e6bcb84ed26563611045490649"},{url:"resources/dia_id.txt",revision:"71d0eb41a8336acdfff7a405c609e18f"},{url:"resources/dia_it.txt",revision:"c3574cb9042adcaea63a3944a09c518e"},{url:"resources/dia_ja.txt",revision:"1c3d11a6636c946d5a22ea52889a19e7"},{url:"resources/dia_kn.txt",revision:"457144ed2c2f51a5ec1d383cbfe9bbf7"},{url:"resources/dia_ko.txt",revision:"e20f9bd4bbf52bf9e3df6e92d7ee1722"},{url:"resources/dia_lt.txt",revision:"bd25b4eab36f6d663c66e4c957b8ef60"},{url:"resources/dia_lv.txt",revision:"e8d8899460a1c81632d7cac287f15354"},{url:"resources/dia_ml.txt",revision:"3b20dfcc809d4b13e3e705a1ae5fbc9f"},{url:"resources/dia_mr.txt",revision:"dd27583c966df6663526af940f7df5d6"},{url:"resources/dia_ms.txt",revision:"253bfb31cf6c8af7ff65527a9137bb9d"},{url:"resources/dia_my.txt",revision:"15f93018ad77289defe0d26df43c6846"},{url:"resources/dia_nl.txt",revision:"abc7305430780a7f3a611e95aa3d6d11"},{url:"resources/dia_no.txt",revision:"cc385ba00d44d6b025fc8b2cffc6721f"},{url:"resources/dia_pl.txt",revision:"485155d3dc8c3d20f42d2ce4689a225f"},{url:"resources/dia_pt-br.txt",revision:"d0bbfa8e826a73098fed085a83a72cdd"},{url:"resources/dia_pt.txt",revision:"18907cf9172320e86fa8aa2a91090ec7"},{url:"resources/dia_ro.txt",revision:"0581872bd0fe468143c7dba864257020"},{url:"resources/dia_ru.txt",revision:"c3789211d3006115131baeea8aab53f7"},{url:"resources/dia_si.txt",revision:"6905439a8ccb386864df2d708be0e8a2"},{url:"resources/dia_sk.txt",revision:"e05d29a790dab92f32a46d0228b5b696"},{url:"resources/dia_sl.txt",revision:"32608759b877e9e942ce209695e841f4"},{url:"resources/dia_sr.txt",revision:"4633d649f40d5b7cf610b6eeb7e6c840"},{url:"resources/dia_sv.txt",revision:"f81f1c1af4df00d757781e3d3b856e05"},{url:"resources/dia_sw.txt",revision:"4f7f39ab83d4ce75b980e1be971ee910"},{url:"resources/dia_ta.txt",revision:"83752a59dfa4f313b73da42e837d8519"},{url:"resources/dia_te.txt",revision:"476a89c596d24e1b1d80f90b76eea1b5"},{url:"resources/dia_th.txt",revision:"6c98c7c4d45c2c260be975ba4db965d3"},{url:"resources/dia_tr.txt",revision:"a4f04603060a5f900fefe32e7aa858a9"},{url:"resources/dia_uk.txt",revision:"2a9c088b5a04a843af42911a0e203fc9"},{url:"resources/dia_vi.txt",revision:"7ada081c11fd313ceee6f51bbc166e34"},{url:"resources/dia_zh-tw.txt",revision:"24281a99696e767ff085dfd6c49a3fe9"},{url:"resources/dia_zh.txt",revision:"3128f6e90a0db91c9d6adcdb94ca7522"},{url:"favicon.ico",revision:"b2bf17349e4b50ce4ba311f079f8bf7d"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"81d1704d5ab9207e2e5c7fc84379dc1a"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 54c4720cb..cff5a68b6 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/4234f540e16ae456bef1afa10433dc61/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"5e2806a0e07ba1122576c915e3938066\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"eb1d6a46e715a127ea72dd6460c2184b\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"7f0094a1758e6c55ab5392910a13d13d\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"715e1d208fef6f7ccaf34485f9a201ae\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"c8095fb62f147b591c84b8d290d6703b\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"a14da21436f87c96057ac57c1881ad81\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"e3bb1453579008ea5e42fbddd5f33c54\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"07bcf4e4c26f5674f48130448e77fcc0\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ddb4d1f6d316a187e55bb3fd89fc6165\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b44638cfed6404ac07cb82d0ee7d0437\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"0b1eb26b186aacfd5b6d67f88d144d0b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"bed70fa15f59b312c168b9ef9528d578\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"1c846465cb20bf155acc937ba8cbc446\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"0a7cc401f17390b415417153d8b87b84\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"b5908edbf7e697b23a2bf90adcbb49c7\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"c745e8f057b24e85f3f0eecba7af19eb\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"5e0cf43a649bfdcd56bbebfba6db00ca\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"4766eaa4150ecbe04b89f767835b9406\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"4f0596f7aedfbb808095762f0bd63306\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"a8fa799c3eda7ed001ef011a1e5806dd\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6bd806494299f0ac942d1ca21c065478\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"5ea8d76e6966383bcc92bbc4752db5db\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"70aa0cb2ecbbe167a3e4a38aac6dbbdc\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"1e5419dbdd0da6a6be4e9c48bd99220f\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"13be854b8db535400e1cd1ec245e740e\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"8947362d39bee93460c0d86713ee65b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"74efdec615b1003983f77aa12834a75c\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8dd13eaca0fcd7e41072c571c201d661\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6e09dfae5d18a933d3bc11ba5de44f3c\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"b9837957b0ca73e4414377b53b53a70b\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"7a8aef0306c6a94f6872896d219d1dc4\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"3029801be7a36b67a29314a04d5d7d42\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"57b724efdceb29d21ca8a64c59350b1a\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"818262e6bcb84ed26563611045490649\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"71d0eb41a8336acdfff7a405c609e18f\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"c3574cb9042adcaea63a3944a09c518e\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"1c3d11a6636c946d5a22ea52889a19e7\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"457144ed2c2f51a5ec1d383cbfe9bbf7\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e20f9bd4bbf52bf9e3df6e92d7ee1722\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bd25b4eab36f6d663c66e4c957b8ef60\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"e8d8899460a1c81632d7cac287f15354\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"3b20dfcc809d4b13e3e705a1ae5fbc9f\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"dd27583c966df6663526af940f7df5d6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"253bfb31cf6c8af7ff65527a9137bb9d\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"15f93018ad77289defe0d26df43c6846\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"abc7305430780a7f3a611e95aa3d6d11\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"cc385ba00d44d6b025fc8b2cffc6721f\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"485155d3dc8c3d20f42d2ce4689a225f\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"d0bbfa8e826a73098fed085a83a72cdd\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"18907cf9172320e86fa8aa2a91090ec7\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"0581872bd0fe468143c7dba864257020\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"c3789211d3006115131baeea8aab53f7\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"6905439a8ccb386864df2d708be0e8a2\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"e05d29a790dab92f32a46d0228b5b696\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"32608759b877e9e942ce209695e841f4\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"4633d649f40d5b7cf610b6eeb7e6c840\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"f81f1c1af4df00d757781e3d3b856e05\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"4f7f39ab83d4ce75b980e1be971ee910\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"83752a59dfa4f313b73da42e837d8519\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"476a89c596d24e1b1d80f90b76eea1b5\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"6c98c7c4d45c2c260be975ba4db965d3\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"a4f04603060a5f900fefe32e7aa858a9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"2a9c088b5a04a843af42911a0e203fc9\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"7ada081c11fd313ceee6f51bbc166e34\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"24281a99696e767ff085dfd6c49a3fe9\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"3128f6e90a0db91c9d6adcdb94ca7522\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/f1528dc236b8c30061b084ed129d70fd/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/bootstrap.js\",\n \"revision\": \"3ae5cb7b92474238c9cd6c9667771e8f\"\n },\n {\n \"url\": \"js/main.js\",\n \"revision\": \"1234ae0a564b9c1064129d87f15e025b\"\n },\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"6abe95e07f7e88476fcbdaad918606dc\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"1a62536b536113c0b6cadd93b9816b22\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad38046619064bc0f0790be6b5a7995f\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"eb1d6a46e715a127ea72dd6460c2184b\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"9de11c65ec13b24c73ace7042bc529cc\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"715e1d208fef6f7ccaf34485f9a201ae\"\n },\n {\n \"url\": \"styles/high-contrast.css\",\n \"revision\": \"c8095fb62f147b591c84b8d290d6703b\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"8bed41c0cb552327b91aa2bacff54e59\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/viewerPanel2.html\",\n \"revision\": \"0dd1ee1343a46b5c03aedbc587450b84\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"ce61a0e62031a160e057809fefe64aa2\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"6deea8e9b96ff96043cd5cfd2a242a9f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"e3bb1453579008ea5e42fbddd5f33c54\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"07bcf4e4c26f5674f48130448e77fcc0\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"78b87563d88943ab816a3463927b9b50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"ddb4d1f6d316a187e55bb3fd89fc6165\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"c4c110650228d22b021ebad4d6ef021e\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"b44638cfed6404ac07cb82d0ee7d0437\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"0b1eb26b186aacfd5b6d67f88d144d0b\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"bed70fa15f59b312c168b9ef9528d578\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"1c846465cb20bf155acc937ba8cbc446\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"0a7cc401f17390b415417153d8b87b84\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"b5908edbf7e697b23a2bf90adcbb49c7\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"c745e8f057b24e85f3f0eecba7af19eb\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"5e0cf43a649bfdcd56bbebfba6db00ca\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"4766eaa4150ecbe04b89f767835b9406\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"4f0596f7aedfbb808095762f0bd63306\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"a8fa799c3eda7ed001ef011a1e5806dd\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6bd806494299f0ac942d1ca21c065478\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"5ea8d76e6966383bcc92bbc4752db5db\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"70aa0cb2ecbbe167a3e4a38aac6dbbdc\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"1e5419dbdd0da6a6be4e9c48bd99220f\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"13be854b8db535400e1cd1ec245e740e\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"8947362d39bee93460c0d86713ee65b7\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"74efdec615b1003983f77aa12834a75c\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"8dd13eaca0fcd7e41072c571c201d661\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"6e09dfae5d18a933d3bc11ba5de44f3c\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"b9837957b0ca73e4414377b53b53a70b\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"7a8aef0306c6a94f6872896d219d1dc4\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"3029801be7a36b67a29314a04d5d7d42\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"57b724efdceb29d21ca8a64c59350b1a\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"818262e6bcb84ed26563611045490649\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"71d0eb41a8336acdfff7a405c609e18f\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"c3574cb9042adcaea63a3944a09c518e\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"1c3d11a6636c946d5a22ea52889a19e7\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"457144ed2c2f51a5ec1d383cbfe9bbf7\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"e20f9bd4bbf52bf9e3df6e92d7ee1722\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bd25b4eab36f6d663c66e4c957b8ef60\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"e8d8899460a1c81632d7cac287f15354\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"3b20dfcc809d4b13e3e705a1ae5fbc9f\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"dd27583c966df6663526af940f7df5d6\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"253bfb31cf6c8af7ff65527a9137bb9d\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"15f93018ad77289defe0d26df43c6846\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"abc7305430780a7f3a611e95aa3d6d11\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"cc385ba00d44d6b025fc8b2cffc6721f\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"485155d3dc8c3d20f42d2ce4689a225f\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"d0bbfa8e826a73098fed085a83a72cdd\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"18907cf9172320e86fa8aa2a91090ec7\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"0581872bd0fe468143c7dba864257020\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"c3789211d3006115131baeea8aab53f7\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"6905439a8ccb386864df2d708be0e8a2\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"e05d29a790dab92f32a46d0228b5b696\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"32608759b877e9e942ce209695e841f4\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"4633d649f40d5b7cf610b6eeb7e6c840\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"f81f1c1af4df00d757781e3d3b856e05\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"4f7f39ab83d4ce75b980e1be971ee910\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"83752a59dfa4f313b73da42e837d8519\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"476a89c596d24e1b1d80f90b76eea1b5\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"6c98c7c4d45c2c260be975ba4db965d3\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"a4f04603060a5f900fefe32e7aa858a9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"2a9c088b5a04a843af42911a0e203fc9\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"7ada081c11fd313ceee6f51bbc166e34\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"24281a99696e767ff085dfd6c49a3fe9\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"3128f6e90a0db91c9d6adcdb94ca7522\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"b2bf17349e4b50ce4ba311f079f8bf7d\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"81d1704d5ab9207e2e5c7fc84379dc1a\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
diff --git a/src/main/webapp/teams.html b/src/main/webapp/teams.html
index 0e044d27c..5545ac7a7 100644
--- a/src/main/webapp/teams.html
+++ b/src/main/webapp/teams.html
@@ -22,344 +22,7 @@
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
<link rel="stylesheet" media="(forced-colors: active)" href="styles/high-contrast.css" id="high-contrast-stylesheet">
- <script id="geBootstrap" type="text/javascript">
- /**
- * URL Parameters and protocol description are here:
- *
- * https://www.drawio.com/doc/faq/supported-url-parameters
- *
- * Parameters for developers:
- *
- * - dev=1: For developers only
- * - test=1: For developers only
- * - export=URL for export: For developers only
- * - ignoremime=1: For developers only (see DriveClient.js). Use Cmd-S to override mime.
- * - createindex=1: For developers only (see etc/build/README)
- * - filesupport=0: For developers only (see Editor.js in core)
- * - savesidebar=1: For developers only (see Sidebar.js)
- * - pages=1: For developers only (see Pages.js)
- * - lic=email: For developers only (see LicenseServlet.java)
- * --
- * - networkshapes=1: For testing network shapes (temporary)
- */
- var urlParams = (function()
- {
- var result = new Object();
- var params = window.location.search.slice(1).split('&');
-
- for (var i = 0; i < params.length; i++)
- {
- var idx = params[i].indexOf('=');
-
- if (idx > 0)
- {
- result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
- }
- }
-
- return result;
- })();
-
- // Forces CDN caches by passing URL parameters via URL hash
- if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
- {
- try
- {
- urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));
-
- if (urlParams.hash != null)
- {
- window.location.hash = urlParams.hash;
- }
- }
- catch (e)
- {
- // ignore
- }
- }
-
- // Global variable for desktop
- var mxIsElectron = navigator.userAgent != null && navigator.userAgent.toLowerCase().indexOf(' electron/') > -1 &&
- navigator.userAgent.indexOf(' draw.io/') > -1;
-
- // Redirects page if required
- if (urlParams['dev'] != '1')
- {
- (function()
- {
- var proto = window.location.protocol;
-
- if (!mxIsElectron)
- {
- var host = window.location.host;
-
- // Redirects apex, drive and rt to www
- if (host === 'draw.io' || host === 'rt.draw.io' || host === 'drive.draw.io')
- {
- host = 'www.draw.io';
- }
-
- var href = proto + '//' + host + window.location.href.substring(
- window.location.protocol.length +
- window.location.host.length + 2);
-
- // Redirects if href changes
- if (href != window.location.href)
- {
- window.location.href = href;
- }
- }
- })();
- }
-
- /**
- * Adds meta tag to the page.
- */
- function mxmeta(name, content, httpEquiv)
- {
- try
- {
- var s = document.createElement('meta');
-
- if (name != null)
- {
- s.setAttribute('name', name);
- }
-
- s.setAttribute('content', content);
-
- if (httpEquiv != null)
- {
- s.setAttribute('http-equiv', httpEquiv);
- }
-
- var t = document.getElementsByTagName('meta')[0];
- t.parentNode.insertBefore(s, t);
- }
- catch (e)
- {
- // ignore
- }
- };
-
- /**
- * Synchronously adds scripts to the page.
- */
- function mxscript(src, onLoad, id, dataAppKey, noWrite, onError)
- {
- var defer = onLoad == null && !noWrite;
-
- if ((urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function") ||
- onLoad != null || noWrite)
- {
- var s = document.createElement('script');
- s.setAttribute('type', 'text/javascript');
- s.setAttribute('defer', 'true');
- s.setAttribute('src', src);
-
- if (id != null)
- {
- s.setAttribute('id', id);
- }
-
- if (dataAppKey != null)
- {
- s.setAttribute('data-app-key', dataAppKey);
- }
-
- if (onLoad != null)
- {
- var r = false;
-
- s.onload = s.onreadystatechange = function()
- {
- if (!r && (!this.readyState || this.readyState == 'complete'))
- {
- r = true;
- onLoad();
- }
- };
- }
-
- if (onError != null)
- {
- s.onerror = function(e)
- {
- onError('Failed to load ' + src, e);
- };
- }
-
- var t = document.getElementsByTagName('script')[0];
-
- if (t != null)
- {
- t.parentNode.insertBefore(s, t);
- }
- }
- else
- {
- document.write('<script src="' + src + '"' + ((id != null) ? ' id="' + id +'" ' : '') +
- ((dataAppKey != null) ? ' data-app-key="' + dataAppKey +'" ' : '') + '></scr' + 'ipt>');
- }
- };
-
- /**
- * Asynchronously adds scripts to the page.
- */
- function mxinclude(src)
- {
- var g = document.createElement('script');
- g.type = 'text/javascript';
- g.async = true;
- g.src = src;
-
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(g, s);
- };
-
- /**
- * Adds meta tags with application name (depends on offline URL parameter)
- */
- (function()
- {
- var name = 'diagrams.net';
- mxmeta('apple-mobile-web-app-title', name);
- mxmeta('application-name', name);
-
- if (mxIsElectron)
- {
- mxmeta(null, 'default-src \'self\'; script-src \'self\' \'sha256-6g514VrT/cZFZltSaKxIVNFF46+MFaTSDTPB8WfYK+c=\'; connect-src \'self\' https://*.draw.io https://*.diagrams.net https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; frame-src \'none\'; style-src \'self\' \'unsafe-inline\' https://fonts.googleapis.com; base-uri \'none\';child-src \'self\';object-src \'none\';', 'Content-Security-Policy');
- }
- })();
-
- // Checks for local storage
- var isLocalStorage = false;
-
- try
- {
- isLocalStorage = urlParams['local'] != '1' && typeof(localStorage) != 'undefined';
- }
- catch (e)
- {
- // ignored
- }
-
- var mxScriptsLoaded = false, mxWinLoaded = false;
-
- function checkAllLoaded()
- {
- if (mxScriptsLoaded && mxWinLoaded)
- {
- App.main();
- }
- };
-
- var t0 = new Date();
-
- // Changes paths for local development environment
- if (urlParams['dev'] == '1')
- {
- // Used to request grapheditor/mxgraph sources in dev mode
- var mxDevUrl = '';
-
- // Used to request draw.io sources in dev mode
- var drawDevUrl = '';
- var geBasePath = 'js/grapheditor';
- var mxBasePath = 'mxgraph/src';
-
- if (document.location.protocol == 'file:')
- {
- // Forces includes for dev environment in node.js
- mxForceIncludes = true;
- }
-
- mxForceIncludes = false;
-
- mxscript(drawDevUrl + 'js/PreConfig.js');
- mxscript(drawDevUrl + 'js/diagramly/Init.js');
- mxscript(geBasePath + '/Init.js');
- mxscript(mxBasePath + '/mxClient.js');
-
- // Adds all JS code that depends on mxClient. This indirection via Devel.js is
- // required in some browsers to make sure mxClient.js (and the files that it
- // loads asynchronously) are available when the code loaded in Devel.js runs.
- mxscript(drawDevUrl + 'js/diagramly/Devel.js');
-
- // Electron
- if (mxIsElectron)
- {
- mxscript('js/diagramly/DesktopLibrary.js');
- mxscript('js/diagramly/ElectronApp.js');
- }
-
- mxscript(drawDevUrl + 'js/PostConfig.js');
- }
- else
- {
- (function()
- {
- var hostName = window.location.hostname;
-
- // Supported domains are *.draw.io and the packaged version in Quip
- var supportedDomain = (hostName.substring(hostName.length - 8, hostName.length) === '.draw.io') ||
- (hostName.substring(hostName.length - 13, hostName.length) === '.diagrams.net');
-
- function loadAppJS()
- {
- mxscript('js/app.min.js', function()
- {
- mxScriptsLoaded = true;
- checkAllLoaded();
-
- // Electron
- if (mxIsElectron)
- {
- mxscript('js/diagramly/DesktopLibrary.js', function()
- {
- mxscript('js/diagramly/ElectronApp.js', function()
- {
- mxscript('js/extensions.min.js', function()
- {
- mxscript('js/stencils.min.js', function()
- {
- mxscript('js/shapes-14-6-5.min.js', function()
- {
- mxscript('js/PostConfig.js');
- });
- });
- });
- });
- });
- }
- else if (!supportedDomain || navigator.onLine)
- {
- mxscript('js/PostConfig.js');
- }
- });
- };
-
- if (!supportedDomain || mxIsElectron || navigator.onLine)
- {
- mxscript('js/PreConfig.js', loadAppJS);
- }
- else
- {
- loadAppJS();
- }
- })();
- }
-
- // Adds basic error handling
- window.onerror = function()
- {
- var status = document.getElementById('geStatus');
-
- if (status != null)
- {
- status.innerHTML = 'Page could not be loaded. Please try refreshing.';
- }
- };
- </script>
+ <script src="js/bootstrap.js"></script>
<style type="text/css">
.geBlock {
z-index:-3;
@@ -390,22 +53,6 @@
</p>
</div>
</div>
-<script id="geMain" type="text/javascript">
-/**
- * Main
- */
-if (urlParams['dev'] != '1' && typeof document.createElement('canvas').getContext === "function")
-{
- window.addEventListener('load', function()
- {
- mxWinLoaded = true;
- checkAllLoaded();
- });
-}
-else
-{
- App.main();
-}
-</script>
+<script src="js/main.js"></script>
</body>
</html>
diff --git a/src/main/webapp/workbox-72a83b64.js b/src/main/webapp/workbox-72a83b64.js
new file mode 100644
index 000000000..041626f23
--- /dev/null
+++ b/src/main/webapp/workbox-72a83b64.js
@@ -0,0 +1,2 @@
+define(["exports"],(function(t){"use strict";try{self["workbox:core:6.5.1"]&&_()}catch(t){}const e=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class s extends Error{constructor(t,s){super(e(t,s)),this.name=t,this.details=s}}try{self["workbox:routing:6.5.1"]&&_()}catch(t){}const n=t=>t&&"object"==typeof t?t:{handle:t};class i{constructor(t,e,s="GET"){this.handler=n(e),this.match=t,this.method=s}setCatchHandler(t){this.catchHandler=n(t)}}class r extends i{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class o{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let o=r&&r.handler;const a=t.method;if(!o&&this.i.has(a)&&(o=this.i.get(a)),!o)return;let c;try{c=o.handle({url:s,request:t,event:e,params:i})}catch(t){c=Promise.reject(t)}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const o=r.match({url:t,sameOrigin:e,request:s,event:n});if(o)return i=o,(Array.isArray(i)&&0===i.length||o.constructor===Object&&0===Object.keys(o).length||"boolean"==typeof o)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,n(t))}setCatchHandler(t){this.o=n(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new s("unregister-route-but-not-found-with-method",{method:t.method});const e=this.t.get(t.method).indexOf(t);if(!(e>-1))throw new s("unregister-route-route-not-registered");this.t.get(t.method).splice(e,1)}}let a;const c={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[c.prefix,t,c.suffix].filter((t=>t&&t.length>0)).join("-"),u=t=>t||h(c.precache),l=t=>t||h(c.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.5.1"]&&_()}catch(t){}function w(t){if(!t)throw new s("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:e,url:n}=t;if(!n)throw new s("add-to-cache-list-unexpected-type",{entry:t});if(!e){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",e),{cacheKey:i.href,url:r.href}}class d{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class p{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let y;async function g(t,e){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new s("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},o=e?e(r):r,a=function(){if(void 0===y){const t=new Response("");if("body"in t)try{new Response(t.body),y=!0}catch(t){y=!1}y=!1}return y}()?i.body:await i.blob();return new Response(a,o)}function R(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class m{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const v=new Set;try{self["workbox:strategies:6.5.1"]&&_()}catch(t){}function q(t){return"string"==typeof t?new Request(t):t}class U{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new m,this.g=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:e}=this;let n=q(t);if("navigate"===n.mode&&e instanceof FetchEvent&&e.preloadResponse){const t=await e.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:e})}catch(t){if(t instanceof Error)throw new s("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const s of this.iterateCallbacks("fetchDidSucceed"))t=await s({event:e,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:e,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=q(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),o=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,o);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,e){const n=q(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!e)throw new s("cache-put-with-no-response",{url:(o=r.url,new URL(String(o),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var o;const a=await this.v(e);if(!a)return!1;const{cacheName:c,matchOptions:h}=this.l,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=R(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),o=await t.keys(e,r);for(const e of o)if(i===R(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?a.clone():a)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of v)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=q(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async v(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class L extends class{constructor(t={}){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new U(this,{event:e,request:s,params:n}),r=this.q(i,s,e);return[r,this.U(r,i,s,e)]}async q(t,e,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:e});try{if(i=await this.L(e,t),!i||"error"===i.type)throw new s("no-response",{url:e.url})}catch(s){if(s instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:s,event:n,request:e}),i)break;if(!i)throw s}for(const s of t.iterateCallbacks("handlerWillRespond"))i=await s({event:n,request:e,response:i});return i}async U(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}{constructor(t={}){t.cacheName=u(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(L.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.C(t,e):await this.O(t,e))}async O(t,e){let n;const i=e.params||{};if(!this._)throw new s("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const s=i.integrity,r=t.integrity,o=!r||r===s;n=await e.fetch(new Request(t,{integrity:r||s})),s&&o&&(this.N(),await e.cachePut(t,n.clone()))}return n}async C(t,e){this.N();const n=await e.fetch(t);if(!await e.cachePut(t,n.clone()))throw new s("bad-precaching-response",{url:t.url,status:n.status});return n}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==L.copyRedirectedCacheableResponsesPlugin&&(n===L.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(L.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}L.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},L.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await g(t):t};class b{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.k=new Map,this.K=new Map,this.T=new Map,this.l=new L({cacheName:u(t),plugins:[...e,new p({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const e=[];for(const n of t){"string"==typeof n?e.push(n):n&&void 0===n.revision&&e.push(n.url);const{cacheKey:t,url:i}=w(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.k.has(i)&&this.k.get(i)!==t)throw new s("add-to-cache-list-conflicting-entries",{firstEntry:this.k.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new s("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.k.set(i,t),this.K.set(i,r),e.length>0){const t=`Workbox is precaching URLs without revision info: ${e.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return f(t,(async()=>{const e=new d;this.strategy.plugins.push(e);for(const[e,s]of this.k){const n=this.T.get(s),i=this.K.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return f(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.k.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.k}getCachedURLs(){return[...this.k.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.k.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const e=this.getCacheKeyForURL(t);if(!e)throw new s("non-precached-url",{url:t});return s=>(s.request=new Request(t),s.params=Object.assign({cacheKey:e},s.params),this.strategy.handle(s))}}let C;const E=()=>(C||(C=new b),C);class O extends i{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const o=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield o.href,s&&o.pathname.endsWith("/")){const t=new URL(o.href);t.pathname+=s,yield t.href}if(n){const t=new URL(o.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}function x(t){const e=E();!function(t,e,n){let c;if("string"==typeof t){const s=new URL(t,location.href);c=new i((({url:t})=>t.href===s.href),e,n)}else if(t instanceof RegExp)c=new r(t,e,n);else if("function"==typeof t)c=new i(t,e,n);else{if(!(t instanceof i))throw new s("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});c=t}(a||(a=new o,a.addFetchListener(),a.addCacheListener()),a).registerRoute(c)}(new O(e,t))}t.precacheAndRoute=function(t,e){!function(t){E().precache(t)}(t),x(e)}}));
+//# sourceMappingURL=workbox-72a83b64.js.map
diff --git a/src/main/webapp/workbox-72a83b64.js.map b/src/main/webapp/workbox-72a83b64.js.map
new file mode 100644
index 000000000..8a652dbbc
--- /dev/null
+++ b/src/main/webapp/workbox-72a83b64.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"workbox-72a83b64.js","sources":["../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_version.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/logger.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/models/messages/messageGenerator.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/WorkboxError.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/_version.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/constants.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/normalizeHandler.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/Route.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/RegExpRoute.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/Router.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/utils/getOrCreateDefaultRouter.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/cacheNames.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/waitUntil.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/_version.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/createCacheKey.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/PrecacheInstallReportPlugin.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/PrecacheCacheKeyPlugin.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/canConstructResponseFromBodyStream.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/copyResponse.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/cacheMatchIgnoreParams.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/Deferred.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/models/quotaErrorCallbacks.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-strategies/_version.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-strategies/StrategyHandler.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/timeout.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/getFriendlyURL.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-core/_private/executeQuotaErrorCallbacks.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheStrategy.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-strategies/Strategy.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheController.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/getOrCreatePrecacheController.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/PrecacheRoute.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/generateURLVariations.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/utils/removeIgnoredSearchParams.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/addRoute.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-routing/registerRoute.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.js","../../../../../../opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precache.js"],"sourcesContent":["\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:core:6.5.1'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst logger = (process.env.NODE_ENV === 'production'\n ? null\n : (() => {\n // Don't overwrite this value if it's already set.\n // See https://github.com/GoogleChrome/workbox/pull/2284#issuecomment-560470923\n if (!('__WB_DISABLE_DEV_LOGS' in self)) {\n self.__WB_DISABLE_DEV_LOGS = false;\n }\n let inGroup = false;\n const methodToColorMap = {\n debug: `#7f8c8d`,\n log: `#2ecc71`,\n warn: `#f39c12`,\n error: `#c0392b`,\n groupCollapsed: `#3498db`,\n groupEnd: null, // No colored prefix on groupEnd\n };\n const print = function (method, args) {\n if (self.__WB_DISABLE_DEV_LOGS) {\n return;\n }\n if (method === 'groupCollapsed') {\n // Safari doesn't print all console.groupCollapsed() arguments:\n // https://bugs.webkit.org/show_bug.cgi?id=182754\n if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n console[method](...args);\n return;\n }\n }\n const styles = [\n `background: ${methodToColorMap[method]}`,\n `border-radius: 0.5em`,\n `color: white`,\n `font-weight: bold`,\n `padding: 2px 0.5em`,\n ];\n // When in a group, the workbox prefix is not displayed.\n const logPrefix = inGroup ? [] : ['%cworkbox', styles.join(';')];\n console[method](...logPrefix, ...args);\n if (method === 'groupCollapsed') {\n inGroup = true;\n }\n if (method === 'groupEnd') {\n inGroup = false;\n }\n };\n // eslint-disable-next-line @typescript-eslint/ban-types\n const api = {};\n const loggerMethods = Object.keys(methodToColorMap);\n for (const key of loggerMethods) {\n const method = key;\n api[method] = (...args) => {\n print(method, args);\n };\n }\n return api;\n })());\nexport { logger };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messages } from './messages.js';\nimport '../../_version.js';\nconst fallback = (code, ...args) => {\n let msg = code;\n if (args.length > 0) {\n msg += ` :: ${JSON.stringify(args)}`;\n }\n return msg;\n};\nconst generatorFunction = (code, details = {}) => {\n const message = messages[code];\n if (!message) {\n throw new Error(`Unable to find message for code '${code}'.`);\n }\n return message(details);\n};\nexport const messageGenerator = process.env.NODE_ENV === 'production' ? fallback : generatorFunction;\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { messageGenerator } from '../models/messages/messageGenerator.js';\nimport '../_version.js';\n/**\n * Workbox errors should be thrown with this class.\n * This allows use to ensure the type easily in tests,\n * helps developers identify errors from workbox\n * easily and allows use to optimise error\n * messages correctly.\n *\n * @private\n */\nclass WorkboxError extends Error {\n /**\n *\n * @param {string} errorCode The error code that\n * identifies this particular error.\n * @param {Object=} details Any relevant arguments\n * that will help developers identify issues should\n * be added as a key on the context object.\n */\n constructor(errorCode, details) {\n const message = messageGenerator(errorCode, details);\n super(message);\n this.name = errorCode;\n this.details = details;\n }\n}\nexport { WorkboxError };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:routing:6.5.1'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The default HTTP method, 'GET', used when there's no specific method\n * configured for a route.\n *\n * @type {string}\n *\n * @private\n */\nexport const defaultMethod = 'GET';\n/**\n * The list of valid HTTP methods associated with requests that could be routed.\n *\n * @type {Array<string>}\n *\n * @private\n */\nexport const validMethods = [\n 'DELETE',\n 'GET',\n 'HEAD',\n 'PATCH',\n 'POST',\n 'PUT',\n];\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport '../_version.js';\n/**\n * @param {function()|Object} handler Either a function, or an object with a\n * 'handle' method.\n * @return {Object} An object with a handle method.\n *\n * @private\n */\nexport const normalizeHandler = (handler) => {\n if (handler && typeof handler === 'object') {\n if (process.env.NODE_ENV !== 'production') {\n assert.hasMethod(handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return handler;\n }\n else {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(handler, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'handler',\n });\n }\n return { handle: handler };\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { defaultMethod, validMethods } from './utils/constants.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport './_version.js';\n/**\n * A `Route` consists of a pair of callback functions, \"match\" and \"handler\".\n * The \"match\" callback determine if a route should be used to \"handle\" a\n * request by returning a non-falsy value if it can. The \"handler\" callback\n * is called when there is a match and should return a Promise that resolves\n * to a `Response`.\n *\n * @memberof workbox-routing\n */\nclass Route {\n /**\n * Constructor for Route class.\n *\n * @param {workbox-routing~matchCallback} match\n * A callback function that determines whether the route matches a given\n * `fetch` event by returning a non-falsy value.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(match, handler, method = defaultMethod) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(match, 'function', {\n moduleName: 'workbox-routing',\n className: 'Route',\n funcName: 'constructor',\n paramName: 'match',\n });\n if (method) {\n assert.isOneOf(method, validMethods, { paramName: 'method' });\n }\n }\n // These values are referenced directly by Router so cannot be\n // altered by minificaton.\n this.handler = normalizeHandler(handler);\n this.match = match;\n this.method = method;\n }\n /**\n *\n * @param {workbox-routing-handlerCallback} handler A callback\n * function that returns a Promise resolving to a Response\n */\n setCatchHandler(handler) {\n this.catchHandler = normalizeHandler(handler);\n }\n}\nexport { Route };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { Route } from './Route.js';\nimport './_version.js';\n/**\n * RegExpRoute makes it easy to create a regular expression based\n * {@link workbox-routing.Route}.\n *\n * For same-origin requests the RegExp only needs to match part of the URL. For\n * requests against third-party servers, you must define a RegExp that matches\n * the start of the URL.\n *\n * @memberof workbox-routing\n * @extends workbox-routing.Route\n */\nclass RegExpRoute extends Route {\n /**\n * If the regular expression contains\n * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},\n * the captured values will be passed to the\n * {@link workbox-routing~handlerCallback} `params`\n * argument.\n *\n * @param {RegExp} regExp The regular expression to match against URLs.\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n */\n constructor(regExp, handler, method) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(regExp, RegExp, {\n moduleName: 'workbox-routing',\n className: 'RegExpRoute',\n funcName: 'constructor',\n paramName: 'pattern',\n });\n }\n const match = ({ url }) => {\n const result = regExp.exec(url.href);\n // Return immediately if there's no match.\n if (!result) {\n return;\n }\n // Require that the match start at the first character in the URL string\n // if it's a cross-origin request.\n // See https://github.com/GoogleChrome/workbox/issues/281 for the context\n // behind this behavior.\n if (url.origin !== location.origin && result.index !== 0) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`The regular expression '${regExp.toString()}' only partially matched ` +\n `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +\n `handle cross-origin requests if they match the entire URL.`);\n }\n return;\n }\n // If the route matches, but there aren't any capture groups defined, then\n // this will return [], which is truthy and therefore sufficient to\n // indicate a match.\n // If there are capture groups, then it will return their values.\n return result.slice(1);\n };\n super(match, handler, method);\n }\n}\nexport { RegExpRoute };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { defaultMethod } from './utils/constants.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { normalizeHandler } from './utils/normalizeHandler.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\n/**\n * The Router can be used to process a `FetchEvent` using one or more\n * {@link workbox-routing.Route}, responding with a `Response` if\n * a matching route exists.\n *\n * If no route matches a given a request, the Router will use a \"default\"\n * handler if one is defined.\n *\n * Should the matching Route throw an error, the Router will use a \"catch\"\n * handler if one is defined to gracefully deal with issues and respond with a\n * Request.\n *\n * If a request matches multiple routes, the **earliest** registered route will\n * be used to respond to the request.\n *\n * @memberof workbox-routing\n */\nclass Router {\n /**\n * Initializes a new Router.\n */\n constructor() {\n this._routes = new Map();\n this._defaultHandlerMap = new Map();\n }\n /**\n * @return {Map<string, Array<workbox-routing.Route>>} routes A `Map` of HTTP\n * method name ('GET', etc.) to an array of all the corresponding `Route`\n * instances that are registered.\n */\n get routes() {\n return this._routes;\n }\n /**\n * Adds a fetch event listener to respond to events when a route matches\n * the event's request.\n */\n addFetchListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('fetch', ((event) => {\n const { request } = event;\n const responsePromise = this.handleRequest({ request, event });\n if (responsePromise) {\n event.respondWith(responsePromise);\n }\n }));\n }\n /**\n * Adds a message event listener for URLs to cache from the window.\n * This is useful to cache resources loaded on the page prior to when the\n * service worker started controlling it.\n *\n * The format of the message data sent from the window should be as follows.\n * Where the `urlsToCache` array may consist of URL strings or an array of\n * URL string + `requestInit` object (the same as you'd pass to `fetch()`).\n *\n * ```\n * {\n * type: 'CACHE_URLS',\n * payload: {\n * urlsToCache: [\n * './script1.js',\n * './script2.js',\n * ['./script3.js', {mode: 'no-cors'}],\n * ],\n * },\n * }\n * ```\n */\n addCacheListener() {\n // See https://github.com/Microsoft/TypeScript/issues/28357#issuecomment-436484705\n self.addEventListener('message', ((event) => {\n // event.data is type 'any'\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (event.data && event.data.type === 'CACHE_URLS') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const { payload } = event.data;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Caching URLs from the window`, payload.urlsToCache);\n }\n const requestPromises = Promise.all(payload.urlsToCache.map((entry) => {\n if (typeof entry === 'string') {\n entry = [entry];\n }\n const request = new Request(...entry);\n return this.handleRequest({ request, event });\n // TODO(philipwalton): TypeScript errors without this typecast for\n // some reason (probably a bug). The real type here should work but\n // doesn't: `Array<Promise<Response> | undefined>`.\n })); // TypeScript\n event.waitUntil(requestPromises);\n // If a MessageChannel was used, reply to the message on success.\n if (event.ports && event.ports[0]) {\n void requestPromises.then(() => event.ports[0].postMessage(true));\n }\n }\n }));\n }\n /**\n * Apply the routing rules to a FetchEvent object to get a Response from an\n * appropriate Route's handler.\n *\n * @param {Object} options\n * @param {Request} options.request The request to handle.\n * @param {ExtendableEvent} options.event The event that triggered the\n * request.\n * @return {Promise<Response>|undefined} A promise is returned if a\n * registered route can handle the request. If there is no matching\n * route and there's no `defaultHandler`, `undefined` is returned.\n */\n handleRequest({ request, event, }) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(request, Request, {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'handleRequest',\n paramName: 'options.request',\n });\n }\n const url = new URL(request.url, location.href);\n if (!url.protocol.startsWith('http')) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Workbox Router only supports URLs that start with 'http'.`);\n }\n return;\n }\n const sameOrigin = url.origin === location.origin;\n const { params, route } = this.findMatchingRoute({\n event,\n request,\n sameOrigin,\n url,\n });\n let handler = route && route.handler;\n const debugMessages = [];\n if (process.env.NODE_ENV !== 'production') {\n if (handler) {\n debugMessages.push([`Found a route to handle this request:`, route]);\n if (params) {\n debugMessages.push([\n `Passing the following params to the route's handler:`,\n params,\n ]);\n }\n }\n }\n // If we don't have a handler because there was no matching route, then\n // fall back to defaultHandler if that's defined.\n const method = request.method;\n if (!handler && this._defaultHandlerMap.has(method)) {\n if (process.env.NODE_ENV !== 'production') {\n debugMessages.push(`Failed to find a matching route. Falling ` +\n `back to the default handler for ${method}.`);\n }\n handler = this._defaultHandlerMap.get(method);\n }\n if (!handler) {\n if (process.env.NODE_ENV !== 'production') {\n // No handler so Workbox will do nothing. If logs is set of debug\n // i.e. verbose, we should print out this information.\n logger.debug(`No route found for: ${getFriendlyURL(url)}`);\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // We have a handler, meaning Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Router is responding to: ${getFriendlyURL(url)}`);\n debugMessages.forEach((msg) => {\n if (Array.isArray(msg)) {\n logger.log(...msg);\n }\n else {\n logger.log(msg);\n }\n });\n logger.groupEnd();\n }\n // Wrap in try and catch in case the handle method throws a synchronous\n // error. It should still callback to the catch handler.\n let responsePromise;\n try {\n responsePromise = handler.handle({ url, request, event, params });\n }\n catch (err) {\n responsePromise = Promise.reject(err);\n }\n // Get route's catch handler, if it exists\n const catchHandler = route && route.catchHandler;\n if (responsePromise instanceof Promise &&\n (this._catchHandler || catchHandler)) {\n responsePromise = responsePromise.catch(async (err) => {\n // If there's a route catch handler, process that first\n if (catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to route's Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n try {\n return await catchHandler.handle({ url, request, event, params });\n }\n catch (catchErr) {\n if (catchErr instanceof Error) {\n err = catchErr;\n }\n }\n }\n if (this._catchHandler) {\n if (process.env.NODE_ENV !== 'production') {\n // Still include URL here as it will be async from the console group\n // and may not make sense without the URL\n logger.groupCollapsed(`Error thrown when responding to: ` +\n ` ${getFriendlyURL(url)}. Falling back to global Catch Handler.`);\n logger.error(`Error thrown by:`, route);\n logger.error(err);\n logger.groupEnd();\n }\n return this._catchHandler.handle({ url, request, event });\n }\n throw err;\n });\n }\n return responsePromise;\n }\n /**\n * Checks a request and URL (and optionally an event) against the list of\n * registered routes, and if there's a match, returns the corresponding\n * route along with any params generated by the match.\n *\n * @param {Object} options\n * @param {URL} options.url\n * @param {boolean} options.sameOrigin The result of comparing `url.origin`\n * against the current origin.\n * @param {Request} options.request The request to match.\n * @param {Event} options.event The corresponding event.\n * @return {Object} An object with `route` and `params` properties.\n * They are populated if a matching route was found or `undefined`\n * otherwise.\n */\n findMatchingRoute({ url, sameOrigin, request, event, }) {\n const routes = this._routes.get(request.method) || [];\n for (const route of routes) {\n let params;\n // route.match returns type any, not possible to change right now.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const matchResult = route.match({ url, sameOrigin, request, event });\n if (matchResult) {\n if (process.env.NODE_ENV !== 'production') {\n // Warn developers that using an async matchCallback is almost always\n // not the right thing to do.\n if (matchResult instanceof Promise) {\n logger.warn(`While routing ${getFriendlyURL(url)}, an async ` +\n `matchCallback function was used. Please convert the ` +\n `following route to use a synchronous matchCallback function:`, route);\n }\n }\n // See https://github.com/GoogleChrome/workbox/issues/2079\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n params = matchResult;\n if (Array.isArray(params) && params.length === 0) {\n // Instead of passing an empty array in as params, use undefined.\n params = undefined;\n }\n else if (matchResult.constructor === Object && // eslint-disable-line\n Object.keys(matchResult).length === 0) {\n // Instead of passing an empty object in as params, use undefined.\n params = undefined;\n }\n else if (typeof matchResult === 'boolean') {\n // For the boolean value true (rather than just something truth-y),\n // don't set params.\n // See https://github.com/GoogleChrome/workbox/pull/2134#issuecomment-513924353\n params = undefined;\n }\n // Return early if have a match.\n return { route, params };\n }\n }\n // If no match was found above, return and empty object.\n return {};\n }\n /**\n * Define a default `handler` that's called when no routes explicitly\n * match the incoming request.\n *\n * Each HTTP method ('GET', 'POST', etc.) gets its own default handler.\n *\n * Without a default handler, unmatched requests will go against the\n * network as if there were no service worker present.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n * @param {string} [method='GET'] The HTTP method to associate with this\n * default handler. Each method has its own default.\n */\n setDefaultHandler(handler, method = defaultMethod) {\n this._defaultHandlerMap.set(method, normalizeHandler(handler));\n }\n /**\n * If a Route throws an error while handling a request, this `handler`\n * will be called and given a chance to provide a response.\n *\n * @param {workbox-routing~handlerCallback} handler A callback\n * function that returns a Promise resulting in a Response.\n */\n setCatchHandler(handler) {\n this._catchHandler = normalizeHandler(handler);\n }\n /**\n * Registers a route with the router.\n *\n * @param {workbox-routing.Route} route The route to register.\n */\n registerRoute(route) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isType(route, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route, 'match', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.isType(route.handler, 'object', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route',\n });\n assert.hasMethod(route.handler, 'handle', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.handler',\n });\n assert.isType(route.method, 'string', {\n moduleName: 'workbox-routing',\n className: 'Router',\n funcName: 'registerRoute',\n paramName: 'route.method',\n });\n }\n if (!this._routes.has(route.method)) {\n this._routes.set(route.method, []);\n }\n // Give precedence to all of the earlier routes by adding this additional\n // route to the end of the array.\n this._routes.get(route.method).push(route);\n }\n /**\n * Unregisters a route with the router.\n *\n * @param {workbox-routing.Route} route The route to unregister.\n */\n unregisterRoute(route) {\n if (!this._routes.has(route.method)) {\n throw new WorkboxError('unregister-route-but-not-found-with-method', {\n method: route.method,\n });\n }\n const routeIndex = this._routes.get(route.method).indexOf(route);\n if (routeIndex > -1) {\n this._routes.get(route.method).splice(routeIndex, 1);\n }\n else {\n throw new WorkboxError('unregister-route-route-not-registered');\n }\n }\n}\nexport { Router };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { Router } from '../Router.js';\nimport '../_version.js';\nlet defaultRouter;\n/**\n * Creates a new, singleton Router instance if one does not exist. If one\n * does already exist, that instance is returned.\n *\n * @private\n * @return {Router}\n */\nexport const getOrCreateDefaultRouter = () => {\n if (!defaultRouter) {\n defaultRouter = new Router();\n // The helpers that use the default Router assume these listeners exist.\n defaultRouter.addFetchListener();\n defaultRouter.addCacheListener();\n }\n return defaultRouter;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst _cacheNameDetails = {\n googleAnalytics: 'googleAnalytics',\n precache: 'precache-v2',\n prefix: 'workbox',\n runtime: 'runtime',\n suffix: typeof registration !== 'undefined' ? registration.scope : '',\n};\nconst _createCacheName = (cacheName) => {\n return [_cacheNameDetails.prefix, cacheName, _cacheNameDetails.suffix]\n .filter((value) => value && value.length > 0)\n .join('-');\n};\nconst eachCacheNameDetail = (fn) => {\n for (const key of Object.keys(_cacheNameDetails)) {\n fn(key);\n }\n};\nexport const cacheNames = {\n updateDetails: (details) => {\n eachCacheNameDetail((key) => {\n if (typeof details[key] === 'string') {\n _cacheNameDetails[key] = details[key];\n }\n });\n },\n getGoogleAnalyticsName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n },\n getPrecacheName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.precache);\n },\n getPrefix: () => {\n return _cacheNameDetails.prefix;\n },\n getRuntimeName: (userCacheName) => {\n return userCacheName || _createCacheName(_cacheNameDetails.runtime);\n },\n getSuffix: () => {\n return _cacheNameDetails.suffix;\n },\n};\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A utility method that makes it easier to use `event.waitUntil` with\n * async functions and return the result.\n *\n * @param {ExtendableEvent} event\n * @param {Function} asyncFn\n * @return {Function}\n * @private\n */\nfunction waitUntil(event, asyncFn) {\n const returnPromise = asyncFn();\n event.waitUntil(returnPromise);\n return returnPromise;\n}\nexport { waitUntil };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:precaching:6.5.1'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport '../_version.js';\n// Name of the search parameter used to store revision info.\nconst REVISION_SEARCH_PARAM = '__WB_REVISION__';\n/**\n * Converts a manifest entry into a versioned URL suitable for precaching.\n *\n * @param {Object|string} entry\n * @return {string} A URL with versioning info.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function createCacheKey(entry) {\n if (!entry) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If a precache manifest entry is a string, it's assumed to be a versioned\n // URL, like '/app.abcd1234.js'. Return as-is.\n if (typeof entry === 'string') {\n const urlObject = new URL(entry, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n const { revision, url } = entry;\n if (!url) {\n throw new WorkboxError('add-to-cache-list-unexpected-type', { entry });\n }\n // If there's just a URL and no revision, then it's also assumed to be a\n // versioned URL.\n if (!revision) {\n const urlObject = new URL(url, location.href);\n return {\n cacheKey: urlObject.href,\n url: urlObject.href,\n };\n }\n // Otherwise, construct a properly versioned URL using the custom Workbox\n // search parameter along with the revision info.\n const cacheKeyURL = new URL(url, location.href);\n const originalURL = new URL(url, location.href);\n cacheKeyURL.searchParams.set(REVISION_SEARCH_PARAM, revision);\n return {\n cacheKey: cacheKeyURL.href,\n url: originalURL.href,\n };\n}\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to determine the\n * of assets that were updated (or not updated) during the install event.\n *\n * @private\n */\nclass PrecacheInstallReportPlugin {\n constructor() {\n this.updatedURLs = [];\n this.notUpdatedURLs = [];\n this.handlerWillStart = async ({ request, state, }) => {\n // TODO: `state` should never be undefined...\n if (state) {\n state.originalRequest = request;\n }\n };\n this.cachedResponseWillBeUsed = async ({ event, state, cachedResponse, }) => {\n if (event.type === 'install') {\n if (state &&\n state.originalRequest &&\n state.originalRequest instanceof Request) {\n // TODO: `state` should never be undefined...\n const url = state.originalRequest.url;\n if (cachedResponse) {\n this.notUpdatedURLs.push(url);\n }\n else {\n this.updatedURLs.push(url);\n }\n }\n }\n return cachedResponse;\n };\n }\n}\nexport { PrecacheInstallReportPlugin };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * A plugin, designed to be used with PrecacheController, to translate URLs into\n * the corresponding cache key, based on the current revision info.\n *\n * @private\n */\nclass PrecacheCacheKeyPlugin {\n constructor({ precacheController }) {\n this.cacheKeyWillBeUsed = async ({ request, params, }) => {\n // Params is type any, can't change right now.\n /* eslint-disable */\n const cacheKey = (params === null || params === void 0 ? void 0 : params.cacheKey) ||\n this._precacheController.getCacheKeyForURL(request.url);\n /* eslint-enable */\n return cacheKey\n ? new Request(cacheKey, { headers: request.headers })\n : request;\n };\n this._precacheController = precacheController;\n }\n}\nexport { PrecacheCacheKeyPlugin };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nlet supportStatus;\n/**\n * A utility function that determines whether the current browser supports\n * constructing a new `Response` from a `response.body` stream.\n *\n * @return {boolean} `true`, if the current browser can successfully\n * construct a `Response` from a `response.body` stream, `false` otherwise.\n *\n * @private\n */\nfunction canConstructResponseFromBodyStream() {\n if (supportStatus === undefined) {\n const testResponse = new Response('');\n if ('body' in testResponse) {\n try {\n new Response(testResponse.body);\n supportStatus = true;\n }\n catch (error) {\n supportStatus = false;\n }\n }\n supportStatus = false;\n }\n return supportStatus;\n}\nexport { canConstructResponseFromBodyStream };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { canConstructResponseFromBodyStream } from './_private/canConstructResponseFromBodyStream.js';\nimport { WorkboxError } from './_private/WorkboxError.js';\nimport './_version.js';\n/**\n * Allows developers to copy a response and modify its `headers`, `status`,\n * or `statusText` values (the values settable via a\n * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}\n * object in the constructor).\n * To modify these values, pass a function as the second argument. That\n * function will be invoked with a single object with the response properties\n * `{headers, status, statusText}`. The return value of this function will\n * be used as the `ResponseInit` for the new `Response`. To change the values\n * either modify the passed parameter(s) and return it, or return a totally\n * new object.\n *\n * This method is intentionally limited to same-origin responses, regardless of\n * whether CORS was used or not.\n *\n * @param {Response} response\n * @param {Function} modifier\n * @memberof workbox-core\n */\nasync function copyResponse(response, modifier) {\n let origin = null;\n // If response.url isn't set, assume it's cross-origin and keep origin null.\n if (response.url) {\n const responseURL = new URL(response.url);\n origin = responseURL.origin;\n }\n if (origin !== self.location.origin) {\n throw new WorkboxError('cross-origin-copy-response', { origin });\n }\n const clonedResponse = response.clone();\n // Create a fresh `ResponseInit` object by cloning the headers.\n const responseInit = {\n headers: new Headers(clonedResponse.headers),\n status: clonedResponse.status,\n statusText: clonedResponse.statusText,\n };\n // Apply any user modifications.\n const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;\n // Create the new response from the body stream and `ResponseInit`\n // modifications. Note: not all browsers support the Response.body stream,\n // so fall back to reading the entire body into memory as a blob.\n const body = canConstructResponseFromBodyStream()\n ? clonedResponse.body\n : await clonedResponse.blob();\n return new Response(body, modifiedResponseInit);\n}\nexport { copyResponse };\n","/*\n Copyright 2020 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nfunction stripParams(fullURL, ignoreParams) {\n const strippedURL = new URL(fullURL);\n for (const param of ignoreParams) {\n strippedURL.searchParams.delete(param);\n }\n return strippedURL.href;\n}\n/**\n * Matches an item in the cache, ignoring specific URL params. This is similar\n * to the `ignoreSearch` option, but it allows you to ignore just specific\n * params (while continuing to match on the others).\n *\n * @private\n * @param {Cache} cache\n * @param {Request} request\n * @param {Object} matchOptions\n * @param {Array<string>} ignoreParams\n * @return {Promise<Response|undefined>}\n */\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n const strippedRequestURL = stripParams(request.url, ignoreParams);\n // If the request doesn't include any ignored params, match as normal.\n if (request.url === strippedRequestURL) {\n return cache.match(request, matchOptions);\n }\n // Otherwise, match by comparing keys\n const keysOptions = Object.assign(Object.assign({}, matchOptions), { ignoreSearch: true });\n const cacheKeys = await cache.keys(request, keysOptions);\n for (const cacheKey of cacheKeys) {\n const strippedCacheKeyURL = stripParams(cacheKey.url, ignoreParams);\n if (strippedRequestURL === strippedCacheKeyURL) {\n return cache.match(cacheKey, matchOptions);\n }\n }\n return;\n}\nexport { cacheMatchIgnoreParams };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * The Deferred class composes Promises in a way that allows for them to be\n * resolved or rejected from outside the constructor. In most cases promises\n * should be used directly, but Deferreds can be necessary when the logic to\n * resolve a promise must be separate.\n *\n * @private\n */\nclass Deferred {\n /**\n * Creates a promise and exposes its resolve and reject functions as methods.\n */\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n }\n}\nexport { Deferred };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n// Callbacks to be executed whenever there's a quota error.\n// Can't change Function type right now.\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst quotaErrorCallbacks = new Set();\nexport { quotaErrorCallbacks };\n","\"use strict\";\n// @ts-ignore\ntry {\n self['workbox:strategies:6.5.1'] && _();\n}\ncatch (e) { }\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheMatchIgnoreParams } from 'workbox-core/_private/cacheMatchIgnoreParams.js';\nimport { Deferred } from 'workbox-core/_private/Deferred.js';\nimport { executeQuotaErrorCallbacks } from 'workbox-core/_private/executeQuotaErrorCallbacks.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { timeout } from 'workbox-core/_private/timeout.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport './_version.js';\nfunction toRequest(input) {\n return typeof input === 'string' ? new Request(input) : input;\n}\n/**\n * A class created every time a Strategy instance instance calls\n * {@link workbox-strategies.Strategy~handle} or\n * {@link workbox-strategies.Strategy~handleAll} that wraps all fetch and\n * cache actions around plugin callbacks and keeps track of when the strategy\n * is \"done\" (i.e. all added `event.waitUntil()` promises have resolved).\n *\n * @memberof workbox-strategies\n */\nclass StrategyHandler {\n /**\n * Creates a new instance associated with the passed strategy and event\n * that's handling the request.\n *\n * The constructor also initializes the state that will be passed to each of\n * the plugins handling this request.\n *\n * @param {workbox-strategies.Strategy} strategy\n * @param {Object} options\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params] The return value from the\n * {@link workbox-routing~matchCallback} (if applicable).\n */\n constructor(strategy, options) {\n this._cacheKeys = {};\n /**\n * The request the strategy is performing (passed to the strategy's\n * `handle()` or `handleAll()` method).\n * @name request\n * @instance\n * @type {Request}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * The event associated with this request.\n * @name event\n * @instance\n * @type {ExtendableEvent}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `URL` instance of `request.url` (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `url` param will be present if the strategy was invoked\n * from a workbox `Route` object.\n * @name url\n * @instance\n * @type {URL|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n /**\n * A `param` value (if passed to the strategy's\n * `handle()` or `handleAll()` method).\n * Note: the `param` param will be present if the strategy was invoked\n * from a workbox `Route` object and the\n * {@link workbox-routing~matchCallback} returned\n * a truthy value (it will be that value).\n * @name params\n * @instance\n * @type {*|undefined}\n * @memberof workbox-strategies.StrategyHandler\n */\n if (process.env.NODE_ENV !== 'production') {\n assert.isInstance(options.event, ExtendableEvent, {\n moduleName: 'workbox-strategies',\n className: 'StrategyHandler',\n funcName: 'constructor',\n paramName: 'options.event',\n });\n }\n Object.assign(this, options);\n this.event = options.event;\n this._strategy = strategy;\n this._handlerDeferred = new Deferred();\n this._extendLifetimePromises = [];\n // Copy the plugins list (since it's mutable on the strategy),\n // so any mutations don't affect this handler instance.\n this._plugins = [...strategy.plugins];\n this._pluginStateMap = new Map();\n for (const plugin of this._plugins) {\n this._pluginStateMap.set(plugin, {});\n }\n this.event.waitUntil(this._handlerDeferred.promise);\n }\n /**\n * Fetches a given request (and invokes any applicable plugin callback\n * methods) using the `fetchOptions` (for non-navigation requests) and\n * `plugins` defined on the `Strategy` object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - `requestWillFetch()`\n * - `fetchDidSucceed()`\n * - `fetchDidFail()`\n *\n * @param {Request|string} input The URL or request to fetch.\n * @return {Promise<Response>}\n */\n async fetch(input) {\n const { event } = this;\n let request = toRequest(input);\n if (request.mode === 'navigate' &&\n event instanceof FetchEvent &&\n event.preloadResponse) {\n const possiblePreloadResponse = (await event.preloadResponse);\n if (possiblePreloadResponse) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Using a preloaded navigation response for ` +\n `'${getFriendlyURL(request.url)}'`);\n }\n return possiblePreloadResponse;\n }\n }\n // If there is a fetchDidFail plugin, we need to save a clone of the\n // original request before it's either modified by a requestWillFetch\n // plugin or before the original request's body is consumed via fetch().\n const originalRequest = this.hasCallback('fetchDidFail')\n ? request.clone()\n : null;\n try {\n for (const cb of this.iterateCallbacks('requestWillFetch')) {\n request = await cb({ request: request.clone(), event });\n }\n }\n catch (err) {\n if (err instanceof Error) {\n throw new WorkboxError('plugin-error-request-will-fetch', {\n thrownErrorMessage: err.message,\n });\n }\n }\n // The request can be altered by plugins with `requestWillFetch` making\n // the original request (most likely from a `fetch` event) different\n // from the Request we make. Pass both to `fetchDidFail` to aid debugging.\n const pluginFilteredRequest = request.clone();\n try {\n let fetchResponse;\n // See https://github.com/GoogleChrome/workbox/issues/1796\n fetchResponse = await fetch(request, request.mode === 'navigate' ? undefined : this._strategy.fetchOptions);\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Network request for ` +\n `'${getFriendlyURL(request.url)}' returned a response with ` +\n `status '${fetchResponse.status}'.`);\n }\n for (const callback of this.iterateCallbacks('fetchDidSucceed')) {\n fetchResponse = await callback({\n event,\n request: pluginFilteredRequest,\n response: fetchResponse,\n });\n }\n return fetchResponse;\n }\n catch (error) {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`Network request for ` +\n `'${getFriendlyURL(request.url)}' threw an error.`, error);\n }\n // `originalRequest` will only exist if a `fetchDidFail` callback\n // is being used (see above).\n if (originalRequest) {\n await this.runCallbacks('fetchDidFail', {\n error: error,\n event,\n originalRequest: originalRequest.clone(),\n request: pluginFilteredRequest.clone(),\n });\n }\n throw error;\n }\n }\n /**\n * Calls `this.fetch()` and (in the background) runs `this.cachePut()` on\n * the response generated by `this.fetch()`.\n *\n * The call to `this.cachePut()` automatically invokes `this.waitUntil()`,\n * so you do not have to manually call `waitUntil()` on the event.\n *\n * @param {Request|string} input The request or URL to fetch and cache.\n * @return {Promise<Response>}\n */\n async fetchAndCachePut(input) {\n const response = await this.fetch(input);\n const responseClone = response.clone();\n void this.waitUntil(this.cachePut(input, responseClone));\n return response;\n }\n /**\n * Matches a request from the cache (and invokes any applicable plugin\n * callback methods) using the `cacheName`, `matchOptions`, and `plugins`\n * defined on the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cachedResponseWillByUsed()\n *\n * @param {Request|string} key The Request or URL to use as the cache key.\n * @return {Promise<Response|undefined>} A matching response, if found.\n */\n async cacheMatch(key) {\n const request = toRequest(key);\n let cachedResponse;\n const { cacheName, matchOptions } = this._strategy;\n const effectiveRequest = await this.getCacheKey(request, 'read');\n const multiMatchOptions = Object.assign(Object.assign({}, matchOptions), { cacheName });\n cachedResponse = await caches.match(effectiveRequest, multiMatchOptions);\n if (process.env.NODE_ENV !== 'production') {\n if (cachedResponse) {\n logger.debug(`Found a cached response in '${cacheName}'.`);\n }\n else {\n logger.debug(`No cached response found in '${cacheName}'.`);\n }\n }\n for (const callback of this.iterateCallbacks('cachedResponseWillBeUsed')) {\n cachedResponse =\n (await callback({\n cacheName,\n matchOptions,\n cachedResponse,\n request: effectiveRequest,\n event: this.event,\n })) || undefined;\n }\n return cachedResponse;\n }\n /**\n * Puts a request/response pair in the cache (and invokes any applicable\n * plugin callback methods) using the `cacheName` and `plugins` defined on\n * the strategy object.\n *\n * The following plugin lifecycle methods are invoked when using this method:\n * - cacheKeyWillByUsed()\n * - cacheWillUpdate()\n * - cacheDidUpdate()\n *\n * @param {Request|string} key The request or URL to use as the cache key.\n * @param {Response} response The response to cache.\n * @return {Promise<boolean>} `false` if a cacheWillUpdate caused the response\n * not be cached, and `true` otherwise.\n */\n async cachePut(key, response) {\n const request = toRequest(key);\n // Run in the next task to avoid blocking other cache reads.\n // https://github.com/w3c/ServiceWorker/issues/1397\n await timeout(0);\n const effectiveRequest = await this.getCacheKey(request, 'write');\n if (process.env.NODE_ENV !== 'production') {\n if (effectiveRequest.method && effectiveRequest.method !== 'GET') {\n throw new WorkboxError('attempt-to-cache-non-get-request', {\n url: getFriendlyURL(effectiveRequest.url),\n method: effectiveRequest.method,\n });\n }\n // See https://github.com/GoogleChrome/workbox/issues/2818\n const vary = response.headers.get('Vary');\n if (vary) {\n logger.debug(`The response for ${getFriendlyURL(effectiveRequest.url)} ` +\n `has a 'Vary: ${vary}' header. ` +\n `Consider setting the {ignoreVary: true} option on your strategy ` +\n `to ensure cache matching and deletion works as expected.`);\n }\n }\n if (!response) {\n if (process.env.NODE_ENV !== 'production') {\n logger.error(`Cannot cache non-existent response for ` +\n `'${getFriendlyURL(effectiveRequest.url)}'.`);\n }\n throw new WorkboxError('cache-put-with-no-response', {\n url: getFriendlyURL(effectiveRequest.url),\n });\n }\n const responseToCache = await this._ensureResponseSafeToCache(response);\n if (!responseToCache) {\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Response '${getFriendlyURL(effectiveRequest.url)}' ` +\n `will not be cached.`, responseToCache);\n }\n return false;\n }\n const { cacheName, matchOptions } = this._strategy;\n const cache = await self.caches.open(cacheName);\n const hasCacheUpdateCallback = this.hasCallback('cacheDidUpdate');\n const oldResponse = hasCacheUpdateCallback\n ? await cacheMatchIgnoreParams(\n // TODO(philipwalton): the `__WB_REVISION__` param is a precaching\n // feature. Consider into ways to only add this behavior if using\n // precaching.\n cache, effectiveRequest.clone(), ['__WB_REVISION__'], matchOptions)\n : null;\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Updating the '${cacheName}' cache with a new Response ` +\n `for ${getFriendlyURL(effectiveRequest.url)}.`);\n }\n try {\n await cache.put(effectiveRequest, hasCacheUpdateCallback ? responseToCache.clone() : responseToCache);\n }\n catch (error) {\n if (error instanceof Error) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/DOMException#exception-QuotaExceededError\n if (error.name === 'QuotaExceededError') {\n await executeQuotaErrorCallbacks();\n }\n throw error;\n }\n }\n for (const callback of this.iterateCallbacks('cacheDidUpdate')) {\n await callback({\n cacheName,\n oldResponse,\n newResponse: responseToCache.clone(),\n request: effectiveRequest,\n event: this.event,\n });\n }\n return true;\n }\n /**\n * Checks the list of plugins for the `cacheKeyWillBeUsed` callback, and\n * executes any of those callbacks found in sequence. The final `Request`\n * object returned by the last plugin is treated as the cache key for cache\n * reads and/or writes. If no `cacheKeyWillBeUsed` plugin callbacks have\n * been registered, the passed request is returned unmodified\n *\n * @param {Request} request\n * @param {string} mode\n * @return {Promise<Request>}\n */\n async getCacheKey(request, mode) {\n const key = `${request.url} | ${mode}`;\n if (!this._cacheKeys[key]) {\n let effectiveRequest = request;\n for (const callback of this.iterateCallbacks('cacheKeyWillBeUsed')) {\n effectiveRequest = toRequest(await callback({\n mode,\n request: effectiveRequest,\n event: this.event,\n // params has a type any can't change right now.\n params: this.params, // eslint-disable-line\n }));\n }\n this._cacheKeys[key] = effectiveRequest;\n }\n return this._cacheKeys[key];\n }\n /**\n * Returns true if the strategy has at least one plugin with the given\n * callback.\n *\n * @param {string} name The name of the callback to check for.\n * @return {boolean}\n */\n hasCallback(name) {\n for (const plugin of this._strategy.plugins) {\n if (name in plugin) {\n return true;\n }\n }\n return false;\n }\n /**\n * Runs all plugin callbacks matching the given name, in order, passing the\n * given param object (merged ith the current plugin state) as the only\n * argument.\n *\n * Note: since this method runs all plugins, it's not suitable for cases\n * where the return value of a callback needs to be applied prior to calling\n * the next callback. See\n * {@link workbox-strategies.StrategyHandler#iterateCallbacks}\n * below for how to handle that case.\n *\n * @param {string} name The name of the callback to run within each plugin.\n * @param {Object} param The object to pass as the first (and only) param\n * when executing each callback. This object will be merged with the\n * current plugin state prior to callback execution.\n */\n async runCallbacks(name, param) {\n for (const callback of this.iterateCallbacks(name)) {\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n await callback(param);\n }\n }\n /**\n * Accepts a callback and returns an iterable of matching plugin callbacks,\n * where each callback is wrapped with the current handler state (i.e. when\n * you call each callback, whatever object parameter you pass it will\n * be merged with the plugin's current state).\n *\n * @param {string} name The name fo the callback to run\n * @return {Array<Function>}\n */\n *iterateCallbacks(name) {\n for (const plugin of this._strategy.plugins) {\n if (typeof plugin[name] === 'function') {\n const state = this._pluginStateMap.get(plugin);\n const statefulCallback = (param) => {\n const statefulParam = Object.assign(Object.assign({}, param), { state });\n // TODO(philipwalton): not sure why `any` is needed. It seems like\n // this should work with `as WorkboxPluginCallbackParam[C]`.\n return plugin[name](statefulParam);\n };\n yield statefulCallback;\n }\n }\n }\n /**\n * Adds a promise to the\n * [extend lifetime promises]{@link https://w3c.github.io/ServiceWorker/#extendableevent-extend-lifetime-promises}\n * of the event event associated with the request being handled (usually a\n * `FetchEvent`).\n *\n * Note: you can await\n * {@link workbox-strategies.StrategyHandler~doneWaiting}\n * to know when all added promises have settled.\n *\n * @param {Promise} promise A promise to add to the extend lifetime promises\n * of the event that triggered the request.\n */\n waitUntil(promise) {\n this._extendLifetimePromises.push(promise);\n return promise;\n }\n /**\n * Returns a promise that resolves once all promises passed to\n * {@link workbox-strategies.StrategyHandler~waitUntil}\n * have settled.\n *\n * Note: any work done after `doneWaiting()` settles should be manually\n * passed to an event's `waitUntil()` method (not this handler's\n * `waitUntil()` method), otherwise the service worker thread my be killed\n * prior to your work completing.\n */\n async doneWaiting() {\n let promise;\n while ((promise = this._extendLifetimePromises.shift())) {\n await promise;\n }\n }\n /**\n * Stops running the strategy and immediately resolves any pending\n * `waitUntil()` promises.\n */\n destroy() {\n this._handlerDeferred.resolve(null);\n }\n /**\n * This method will call cacheWillUpdate on the available plugins (or use\n * status === 200) to determine if the Response is safe and valid to cache.\n *\n * @param {Request} options.request\n * @param {Response} options.response\n * @return {Promise<Response|undefined>}\n *\n * @private\n */\n async _ensureResponseSafeToCache(response) {\n let responseToCache = response;\n let pluginsUsed = false;\n for (const callback of this.iterateCallbacks('cacheWillUpdate')) {\n responseToCache =\n (await callback({\n request: this.request,\n response: responseToCache,\n event: this.event,\n })) || undefined;\n pluginsUsed = true;\n if (!responseToCache) {\n break;\n }\n }\n if (!pluginsUsed) {\n if (responseToCache && responseToCache.status !== 200) {\n responseToCache = undefined;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (responseToCache) {\n if (responseToCache.status !== 200) {\n if (responseToCache.status === 0) {\n logger.warn(`The response for '${this.request.url}' ` +\n `is an opaque response. The caching strategy that you're ` +\n `using will not cache opaque responses by default.`);\n }\n else {\n logger.debug(`The response for '${this.request.url}' ` +\n `returned a status code of '${response.status}' and won't ` +\n `be cached as a result.`);\n }\n }\n }\n }\n }\n return responseToCache;\n }\n}\nexport { StrategyHandler };\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Returns a promise that resolves and the passed number of milliseconds.\n * This utility is an async/await-friendly version of `setTimeout`.\n *\n * @param {number} ms\n * @return {Promise}\n * @private\n */\nexport function timeout(ms) {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\nconst getFriendlyURL = (url) => {\n const urlObj = new URL(String(url), location.href);\n // See https://github.com/GoogleChrome/workbox/issues/2323\n // We want to include everything, except for the origin if it's same-origin.\n return urlObj.href.replace(new RegExp(`^${location.origin}`), '');\n};\nexport { getFriendlyURL };\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from '../_private/logger.js';\nimport { quotaErrorCallbacks } from '../models/quotaErrorCallbacks.js';\nimport '../_version.js';\n/**\n * Runs all of the callback functions, one at a time sequentially, in the order\n * in which they were registered.\n *\n * @memberof workbox-core\n * @private\n */\nasync function executeQuotaErrorCallbacks() {\n if (process.env.NODE_ENV !== 'production') {\n logger.log(`About to run ${quotaErrorCallbacks.size} ` +\n `callbacks to clean up caches.`);\n }\n for (const callback of quotaErrorCallbacks) {\n await callback();\n if (process.env.NODE_ENV !== 'production') {\n logger.log(callback, 'is complete.');\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.log('Finished running callbacks.');\n }\n}\nexport { executeQuotaErrorCallbacks };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { copyResponse } from 'workbox-core/copyResponse.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Strategy } from 'workbox-strategies/Strategy.js';\nimport './_version.js';\n/**\n * A {@link workbox-strategies.Strategy} implementation\n * specifically designed to work with\n * {@link workbox-precaching.PrecacheController}\n * to both cache and fetch precached assets.\n *\n * Note: an instance of this class is created automatically when creating a\n * `PrecacheController`; it's generally not necessary to create this yourself.\n *\n * @extends workbox-strategies.Strategy\n * @memberof workbox-precaching\n */\nclass PrecacheStrategy extends Strategy {\n /**\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array<Object>} [options.plugins] {@link https://developers.google.com/web/tools/workbox/guides/using-plugins|Plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters|init}\n * of all fetch() requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * {@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions|CacheQueryOptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor(options = {}) {\n options.cacheName = cacheNames.getPrecacheName(options.cacheName);\n super(options);\n this._fallbackToNetwork =\n options.fallbackToNetwork === false ? false : true;\n // Redirected responses cannot be used to satisfy a navigation request, so\n // any redirected response must be \"copied\" rather than cloned, so the new\n // response doesn't contain the `redirected` flag. See:\n // https://bugs.chromium.org/p/chromium/issues/detail?id=669363&desc=2#c1\n this.plugins.push(PrecacheStrategy.copyRedirectedCacheableResponsesPlugin);\n }\n /**\n * @private\n * @param {Request|string} request A request to run this strategy for.\n * @param {workbox-strategies.StrategyHandler} handler The event that\n * triggered the request.\n * @return {Promise<Response>}\n */\n async _handle(request, handler) {\n const response = await handler.cacheMatch(request);\n if (response) {\n return response;\n }\n // If this is an `install` event for an entry that isn't already cached,\n // then populate the cache.\n if (handler.event && handler.event.type === 'install') {\n return await this._handleInstall(request, handler);\n }\n // Getting here means something went wrong. An entry that should have been\n // precached wasn't found in the cache.\n return await this._handleFetch(request, handler);\n }\n async _handleFetch(request, handler) {\n let response;\n const params = (handler.params || {});\n // Fall back to the network if we're configured to do so.\n if (this._fallbackToNetwork) {\n if (process.env.NODE_ENV !== 'production') {\n logger.warn(`The precached response for ` +\n `${getFriendlyURL(request.url)} in ${this.cacheName} was not ` +\n `found. Falling back to the network.`);\n }\n const integrityInManifest = params.integrity;\n const integrityInRequest = request.integrity;\n const noIntegrityConflict = !integrityInRequest || integrityInRequest === integrityInManifest;\n response = await handler.fetch(new Request(request, {\n integrity: integrityInRequest || integrityInManifest,\n }));\n // It's only \"safe\" to repair the cache if we're using SRI to guarantee\n // that the response matches the precache manifest's expectations,\n // and there's either a) no integrity property in the incoming request\n // or b) there is an integrity, and it matches the precache manifest.\n // See https://github.com/GoogleChrome/workbox/issues/2858\n if (integrityInManifest && noIntegrityConflict) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const wasCached = await handler.cachePut(request, response.clone());\n if (process.env.NODE_ENV !== 'production') {\n if (wasCached) {\n logger.log(`A response for ${getFriendlyURL(request.url)} ` +\n `was used to \"repair\" the precache.`);\n }\n }\n }\n }\n else {\n // This shouldn't normally happen, but there are edge cases:\n // https://github.com/GoogleChrome/workbox/issues/1441\n throw new WorkboxError('missing-precache-entry', {\n cacheName: this.cacheName,\n url: request.url,\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n const cacheKey = params.cacheKey || (await handler.getCacheKey(request, 'read'));\n // Workbox is going to handle the route.\n // print the routing details to the console.\n logger.groupCollapsed(`Precaching is responding to: ` + getFriendlyURL(request.url));\n logger.log(`Serving the precached url: ${getFriendlyURL(cacheKey instanceof Request ? cacheKey.url : cacheKey)}`);\n logger.groupCollapsed(`View request details here.`);\n logger.log(request);\n logger.groupEnd();\n logger.groupCollapsed(`View response details here.`);\n logger.log(response);\n logger.groupEnd();\n logger.groupEnd();\n }\n return response;\n }\n async _handleInstall(request, handler) {\n this._useDefaultCacheabilityPluginIfNeeded();\n const response = await handler.fetch(request);\n // Make sure we defer cachePut() until after we know the response\n // should be cached; see https://github.com/GoogleChrome/workbox/issues/2737\n const wasCached = await handler.cachePut(request, response.clone());\n if (!wasCached) {\n // Throwing here will lead to the `install` handler failing, which\n // we want to do if *any* of the responses aren't safe to cache.\n throw new WorkboxError('bad-precaching-response', {\n url: request.url,\n status: response.status,\n });\n }\n return response;\n }\n /**\n * This method is complex, as there a number of things to account for:\n *\n * The `plugins` array can be set at construction, and/or it might be added to\n * to at any time before the strategy is used.\n *\n * At the time the strategy is used (i.e. during an `install` event), there\n * needs to be at least one plugin that implements `cacheWillUpdate` in the\n * array, other than `copyRedirectedCacheableResponsesPlugin`.\n *\n * - If this method is called and there are no suitable `cacheWillUpdate`\n * plugins, we need to add `defaultPrecacheCacheabilityPlugin`.\n *\n * - If this method is called and there is exactly one `cacheWillUpdate`, then\n * we don't have to do anything (this might be a previously added\n * `defaultPrecacheCacheabilityPlugin`, or it might be a custom plugin).\n *\n * - If this method is called and there is more than one `cacheWillUpdate`,\n * then we need to check if one is `defaultPrecacheCacheabilityPlugin`. If so,\n * we need to remove it. (This situation is unlikely, but it could happen if\n * the strategy is used multiple times, the first without a `cacheWillUpdate`,\n * and then later on after manually adding a custom `cacheWillUpdate`.)\n *\n * See https://github.com/GoogleChrome/workbox/issues/2737 for more context.\n *\n * @private\n */\n _useDefaultCacheabilityPluginIfNeeded() {\n let defaultPluginIndex = null;\n let cacheWillUpdatePluginCount = 0;\n for (const [index, plugin] of this.plugins.entries()) {\n // Ignore the copy redirected plugin when determining what to do.\n if (plugin === PrecacheStrategy.copyRedirectedCacheableResponsesPlugin) {\n continue;\n }\n // Save the default plugin's index, in case it needs to be removed.\n if (plugin === PrecacheStrategy.defaultPrecacheCacheabilityPlugin) {\n defaultPluginIndex = index;\n }\n if (plugin.cacheWillUpdate) {\n cacheWillUpdatePluginCount++;\n }\n }\n if (cacheWillUpdatePluginCount === 0) {\n this.plugins.push(PrecacheStrategy.defaultPrecacheCacheabilityPlugin);\n }\n else if (cacheWillUpdatePluginCount > 1 && defaultPluginIndex !== null) {\n // Only remove the default plugin; multiple custom plugins are allowed.\n this.plugins.splice(defaultPluginIndex, 1);\n }\n // Nothing needs to be done if cacheWillUpdatePluginCount is 1\n }\n}\nPrecacheStrategy.defaultPrecacheCacheabilityPlugin = {\n async cacheWillUpdate({ response }) {\n if (!response || response.status >= 400) {\n return null;\n }\n return response;\n },\n};\nPrecacheStrategy.copyRedirectedCacheableResponsesPlugin = {\n async cacheWillUpdate({ response }) {\n return response.redirected ? await copyResponse(response) : response;\n },\n};\nexport { PrecacheStrategy };\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { StrategyHandler } from './StrategyHandler.js';\nimport './_version.js';\n/**\n * An abstract base class that all other strategy classes must extend from:\n *\n * @memberof workbox-strategies\n */\nclass Strategy {\n /**\n * Creates a new instance of the strategy and sets all documented option\n * properties as public instance properties.\n *\n * Note: if a custom strategy class extends the base Strategy class and does\n * not need more than these properties, it does not need to define its own\n * constructor.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n * @param {Array<Object>} [options.plugins] [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * to use in conjunction with this caching strategy.\n * @param {Object} [options.fetchOptions] Values passed along to the\n * [`init`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters)\n * of [non-navigation](https://github.com/GoogleChrome/workbox/issues/1796)\n * `fetch()` requests made by this strategy.\n * @param {Object} [options.matchOptions] The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n */\n constructor(options = {}) {\n /**\n * Cache name to store and retrieve\n * requests. Defaults to the cache names provided by\n * {@link workbox-core.cacheNames}.\n *\n * @type {string}\n */\n this.cacheName = cacheNames.getRuntimeName(options.cacheName);\n /**\n * The list\n * [Plugins]{@link https://developers.google.com/web/tools/workbox/guides/using-plugins}\n * used by this strategy.\n *\n * @type {Array<Object>}\n */\n this.plugins = options.plugins || [];\n /**\n * Values passed along to the\n * [`init`]{@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters}\n * of all fetch() requests made by this strategy.\n *\n * @type {Object}\n */\n this.fetchOptions = options.fetchOptions;\n /**\n * The\n * [`CacheQueryOptions`]{@link https://w3c.github.io/ServiceWorker/#dictdef-cachequeryoptions}\n * for any `cache.match()` or `cache.put()` calls made by this strategy.\n *\n * @type {Object}\n */\n this.matchOptions = options.matchOptions;\n }\n /**\n * Perform a request strategy and returns a `Promise` that will resolve with\n * a `Response`, invoking all relevant plugin callbacks.\n *\n * When a strategy instance is registered with a Workbox\n * {@link workbox-routing.Route}, this method is automatically\n * called when the route matches.\n *\n * Alternatively, this method can be used in a standalone `FetchEvent`\n * listener by passing it to `event.respondWith()`.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n */\n handle(options) {\n const [responseDone] = this.handleAll(options);\n return responseDone;\n }\n /**\n * Similar to {@link workbox-strategies.Strategy~handle}, but\n * instead of just returning a `Promise` that resolves to a `Response` it\n * it will return an tuple of `[response, done]` promises, where the former\n * (`response`) is equivalent to what `handle()` returns, and the latter is a\n * Promise that will resolve once any promises that were added to\n * `event.waitUntil()` as part of performing the strategy have completed.\n *\n * You can await the `done` promise to ensure any extra work performed by\n * the strategy (usually caching responses) completes successfully.\n *\n * @param {FetchEvent|Object} options A `FetchEvent` or an object with the\n * properties listed below.\n * @param {Request|string} options.request A request to run this strategy for.\n * @param {ExtendableEvent} options.event The event associated with the\n * request.\n * @param {URL} [options.url]\n * @param {*} [options.params]\n * @return {Array<Promise>} A tuple of [response, done]\n * promises that can be used to determine when the response resolves as\n * well as when the handler has completed all its work.\n */\n handleAll(options) {\n // Allow for flexible options to be passed.\n if (options instanceof FetchEvent) {\n options = {\n event: options,\n request: options.request,\n };\n }\n const event = options.event;\n const request = typeof options.request === 'string'\n ? new Request(options.request)\n : options.request;\n const params = 'params' in options ? options.params : undefined;\n const handler = new StrategyHandler(this, { event, request, params });\n const responseDone = this._getResponse(handler, request, event);\n const handlerDone = this._awaitComplete(responseDone, handler, request, event);\n // Return an array of promises, suitable for use with Promise.all().\n return [responseDone, handlerDone];\n }\n async _getResponse(handler, request, event) {\n await handler.runCallbacks('handlerWillStart', { event, request });\n let response = undefined;\n try {\n response = await this._handle(request, handler);\n // The \"official\" Strategy subclasses all throw this error automatically,\n // but in case a third-party Strategy doesn't, ensure that we have a\n // consistent failure when there's no response or an error response.\n if (!response || response.type === 'error') {\n throw new WorkboxError('no-response', { url: request.url });\n }\n }\n catch (error) {\n if (error instanceof Error) {\n for (const callback of handler.iterateCallbacks('handlerDidError')) {\n response = await callback({ error, event, request });\n if (response) {\n break;\n }\n }\n }\n if (!response) {\n throw error;\n }\n else if (process.env.NODE_ENV !== 'production') {\n logger.log(`While responding to '${getFriendlyURL(request.url)}', ` +\n `an ${error instanceof Error ? error.toString() : ''} error occurred. Using a fallback response provided by ` +\n `a handlerDidError plugin.`);\n }\n }\n for (const callback of handler.iterateCallbacks('handlerWillRespond')) {\n response = await callback({ event, request, response });\n }\n return response;\n }\n async _awaitComplete(responseDone, handler, request, event) {\n let response;\n let error;\n try {\n response = await responseDone;\n }\n catch (error) {\n // Ignore errors, as response errors should be caught via the `response`\n // promise above. The `done` promise will only throw for errors in\n // promises passed to `handler.waitUntil()`.\n }\n try {\n await handler.runCallbacks('handlerDidRespond', {\n event,\n request,\n response,\n });\n await handler.doneWaiting();\n }\n catch (waitUntilError) {\n if (waitUntilError instanceof Error) {\n error = waitUntilError;\n }\n }\n await handler.runCallbacks('handlerDidComplete', {\n event,\n request,\n response,\n error: error,\n });\n handler.destroy();\n if (error) {\n throw error;\n }\n }\n}\nexport { Strategy };\n/**\n * Classes extending the `Strategy` based class should implement this method,\n * and leverage the {@link workbox-strategies.StrategyHandler}\n * arg to perform all fetching and cache logic, which will ensure all relevant\n * cache, cache options, fetch options and plugins are used (per the current\n * strategy instance).\n *\n * @name _handle\n * @instance\n * @abstract\n * @function\n * @param {Request} request\n * @param {workbox-strategies.StrategyHandler} handler\n * @return {Promise<Response>}\n *\n * @memberof workbox-strategies.Strategy\n */\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { assert } from 'workbox-core/_private/assert.js';\nimport { cacheNames } from 'workbox-core/_private/cacheNames.js';\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { waitUntil } from 'workbox-core/_private/waitUntil.js';\nimport { createCacheKey } from './utils/createCacheKey.js';\nimport { PrecacheInstallReportPlugin } from './utils/PrecacheInstallReportPlugin.js';\nimport { PrecacheCacheKeyPlugin } from './utils/PrecacheCacheKeyPlugin.js';\nimport { printCleanupDetails } from './utils/printCleanupDetails.js';\nimport { printInstallDetails } from './utils/printInstallDetails.js';\nimport { PrecacheStrategy } from './PrecacheStrategy.js';\nimport './_version.js';\n/**\n * Performs efficient precaching of assets.\n *\n * @memberof workbox-precaching\n */\nclass PrecacheController {\n /**\n * Create a new PrecacheController.\n *\n * @param {Object} [options]\n * @param {string} [options.cacheName] The cache to use for precaching.\n * @param {string} [options.plugins] Plugins to use when precaching as well\n * as responding to fetch events for precached assets.\n * @param {boolean} [options.fallbackToNetwork=true] Whether to attempt to\n * get the response from the network if there's a precache miss.\n */\n constructor({ cacheName, plugins = [], fallbackToNetwork = true, } = {}) {\n this._urlsToCacheKeys = new Map();\n this._urlsToCacheModes = new Map();\n this._cacheKeysToIntegrities = new Map();\n this._strategy = new PrecacheStrategy({\n cacheName: cacheNames.getPrecacheName(cacheName),\n plugins: [\n ...plugins,\n new PrecacheCacheKeyPlugin({ precacheController: this }),\n ],\n fallbackToNetwork,\n });\n // Bind the install and activate methods to the instance.\n this.install = this.install.bind(this);\n this.activate = this.activate.bind(this);\n }\n /**\n * @type {workbox-precaching.PrecacheStrategy} The strategy created by this controller and\n * used to cache assets and respond to fetch events.\n */\n get strategy() {\n return this._strategy;\n }\n /**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * @param {Array<Object|string>} [entries=[]] Array of entries to precache.\n */\n precache(entries) {\n this.addToCacheList(entries);\n if (!this._installAndActiveListenersAdded) {\n self.addEventListener('install', this.install);\n self.addEventListener('activate', this.activate);\n this._installAndActiveListenersAdded = true;\n }\n }\n /**\n * This method will add items to the precache list, removing duplicates\n * and ensuring the information is valid.\n *\n * @param {Array<workbox-precaching.PrecacheController.PrecacheEntry|string>} entries\n * Array of entries to precache.\n */\n addToCacheList(entries) {\n if (process.env.NODE_ENV !== 'production') {\n assert.isArray(entries, {\n moduleName: 'workbox-precaching',\n className: 'PrecacheController',\n funcName: 'addToCacheList',\n paramName: 'entries',\n });\n }\n const urlsToWarnAbout = [];\n for (const entry of entries) {\n // See https://github.com/GoogleChrome/workbox/issues/2259\n if (typeof entry === 'string') {\n urlsToWarnAbout.push(entry);\n }\n else if (entry && entry.revision === undefined) {\n urlsToWarnAbout.push(entry.url);\n }\n const { cacheKey, url } = createCacheKey(entry);\n const cacheMode = typeof entry !== 'string' && entry.revision ? 'reload' : 'default';\n if (this._urlsToCacheKeys.has(url) &&\n this._urlsToCacheKeys.get(url) !== cacheKey) {\n throw new WorkboxError('add-to-cache-list-conflicting-entries', {\n firstEntry: this._urlsToCacheKeys.get(url),\n secondEntry: cacheKey,\n });\n }\n if (typeof entry !== 'string' && entry.integrity) {\n if (this._cacheKeysToIntegrities.has(cacheKey) &&\n this._cacheKeysToIntegrities.get(cacheKey) !== entry.integrity) {\n throw new WorkboxError('add-to-cache-list-conflicting-integrities', {\n url,\n });\n }\n this._cacheKeysToIntegrities.set(cacheKey, entry.integrity);\n }\n this._urlsToCacheKeys.set(url, cacheKey);\n this._urlsToCacheModes.set(url, cacheMode);\n if (urlsToWarnAbout.length > 0) {\n const warningMessage = `Workbox is precaching URLs without revision ` +\n `info: ${urlsToWarnAbout.join(', ')}\\nThis is generally NOT safe. ` +\n `Learn more at https://bit.ly/wb-precache`;\n if (process.env.NODE_ENV === 'production') {\n // Use console directly to display this warning without bloating\n // bundle sizes by pulling in all of the logger codebase in prod.\n console.warn(warningMessage);\n }\n else {\n logger.warn(warningMessage);\n }\n }\n }\n }\n /**\n * Precaches new and updated assets. Call this method from the service worker\n * install event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise<workbox-precaching.InstallResult>}\n */\n install(event) {\n // waitUntil returns Promise<any>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const installReportPlugin = new PrecacheInstallReportPlugin();\n this.strategy.plugins.push(installReportPlugin);\n // Cache entries one at a time.\n // See https://github.com/GoogleChrome/workbox/issues/2528\n for (const [url, cacheKey] of this._urlsToCacheKeys) {\n const integrity = this._cacheKeysToIntegrities.get(cacheKey);\n const cacheMode = this._urlsToCacheModes.get(url);\n const request = new Request(url, {\n integrity,\n cache: cacheMode,\n credentials: 'same-origin',\n });\n await Promise.all(this.strategy.handleAll({\n params: { cacheKey },\n request,\n event,\n }));\n }\n const { updatedURLs, notUpdatedURLs } = installReportPlugin;\n if (process.env.NODE_ENV !== 'production') {\n printInstallDetails(updatedURLs, notUpdatedURLs);\n }\n return { updatedURLs, notUpdatedURLs };\n });\n }\n /**\n * Deletes assets that are no longer present in the current precache manifest.\n * Call this method from the service worker activate event.\n *\n * Note: this method calls `event.waitUntil()` for you, so you do not need\n * to call it yourself in your event handlers.\n *\n * @param {ExtendableEvent} event\n * @return {Promise<workbox-precaching.CleanupResult>}\n */\n activate(event) {\n // waitUntil returns Promise<any>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return waitUntil(event, async () => {\n const cache = await self.caches.open(this.strategy.cacheName);\n const currentlyCachedRequests = await cache.keys();\n const expectedCacheKeys = new Set(this._urlsToCacheKeys.values());\n const deletedURLs = [];\n for (const request of currentlyCachedRequests) {\n if (!expectedCacheKeys.has(request.url)) {\n await cache.delete(request);\n deletedURLs.push(request.url);\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n printCleanupDetails(deletedURLs);\n }\n return { deletedURLs };\n });\n }\n /**\n * Returns a mapping of a precached URL to the corresponding cache key, taking\n * into account the revision information for the URL.\n *\n * @return {Map<string, string>} A URL to cache key mapping.\n */\n getURLsToCacheKeys() {\n return this._urlsToCacheKeys;\n }\n /**\n * Returns a list of all the URLs that have been precached by the current\n * service worker.\n *\n * @return {Array<string>} The precached URLs.\n */\n getCachedURLs() {\n return [...this._urlsToCacheKeys.keys()];\n }\n /**\n * Returns the cache key used for storing a given URL. If that URL is\n * unversioned, like `/index.html', then the cache key will be the original\n * URL with a search parameter appended to it.\n *\n * @param {string} url A URL whose cache key you want to look up.\n * @return {string} The versioned URL that corresponds to a cache key\n * for the original URL, or undefined if that URL isn't precached.\n */\n getCacheKeyForURL(url) {\n const urlObject = new URL(url, location.href);\n return this._urlsToCacheKeys.get(urlObject.href);\n }\n /**\n * @param {string} url A cache key whose SRI you want to look up.\n * @return {string} The subresource integrity associated with the cache key,\n * or undefined if it's not set.\n */\n getIntegrityForCacheKey(cacheKey) {\n return this._cacheKeysToIntegrities.get(cacheKey);\n }\n /**\n * This acts as a drop-in replacement for\n * [`cache.match()`](https://developer.mozilla.org/en-US/docs/Web/API/Cache/match)\n * with the following differences:\n *\n * - It knows what the name of the precache is, and only checks in that cache.\n * - It allows you to pass in an \"original\" URL without versioning parameters,\n * and it will automatically look up the correct cache key for the currently\n * active revision of that URL.\n *\n * E.g., `matchPrecache('index.html')` will find the correct precached\n * response for the currently active service worker, even if the actual cache\n * key is `'/index.html?__WB_REVISION__=1234abcd'`.\n *\n * @param {string|Request} request The key (without revisioning parameters)\n * to look up in the precache.\n * @return {Promise<Response|undefined>}\n */\n async matchPrecache(request) {\n const url = request instanceof Request ? request.url : request;\n const cacheKey = this.getCacheKeyForURL(url);\n if (cacheKey) {\n const cache = await self.caches.open(this.strategy.cacheName);\n return cache.match(cacheKey);\n }\n return undefined;\n }\n /**\n * Returns a function that looks up `url` in the precache (taking into\n * account revision information), and returns the corresponding `Response`.\n *\n * @param {string} url The precached URL which will be used to lookup the\n * `Response`.\n * @return {workbox-routing~handlerCallback}\n */\n createHandlerBoundToURL(url) {\n const cacheKey = this.getCacheKeyForURL(url);\n if (!cacheKey) {\n throw new WorkboxError('non-precached-url', { url });\n }\n return (options) => {\n options.request = new Request(url);\n options.params = Object.assign({ cacheKey }, options.params);\n return this.strategy.handle(options);\n };\n }\n}\nexport { PrecacheController };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { PrecacheController } from '../PrecacheController.js';\nimport '../_version.js';\nlet precacheController;\n/**\n * @return {PrecacheController}\n * @private\n */\nexport const getOrCreatePrecacheController = () => {\n if (!precacheController) {\n precacheController = new PrecacheController();\n }\n return precacheController;\n};\n","/*\n Copyright 2020 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { getFriendlyURL } from 'workbox-core/_private/getFriendlyURL.js';\nimport { Route } from 'workbox-routing/Route.js';\nimport { generateURLVariations } from './utils/generateURLVariations.js';\nimport './_version.js';\n/**\n * A subclass of {@link workbox-routing.Route} that takes a\n * {@link workbox-precaching.PrecacheController}\n * instance and uses it to match incoming requests and handle fetching\n * responses from the precache.\n *\n * @memberof workbox-precaching\n * @extends workbox-routing.Route\n */\nclass PrecacheRoute extends Route {\n /**\n * @param {PrecacheController} precacheController A `PrecacheController`\n * instance used to both match requests and respond to fetch events.\n * @param {Object} [options] Options to control how requests are matched\n * against the list of precached URLs.\n * @param {string} [options.directoryIndex=index.html] The `directoryIndex` will\n * check cache entries for a URLs ending with '/' to see if there is a hit when\n * appending the `directoryIndex` value.\n * @param {Array<RegExp>} [options.ignoreURLParametersMatching=[/^utm_/, /^fbclid$/]] An\n * array of regex's to remove search params when looking for a cache match.\n * @param {boolean} [options.cleanURLs=true] The `cleanURLs` option will\n * check the cache for the URL with a `.html` added to the end of the end.\n * @param {workbox-precaching~urlManipulation} [options.urlManipulation]\n * This is a function that should take a URL and return an array of\n * alternative URLs that should be checked for precache matches.\n */\n constructor(precacheController, options) {\n const match = ({ request, }) => {\n const urlsToCacheKeys = precacheController.getURLsToCacheKeys();\n for (const possibleURL of generateURLVariations(request.url, options)) {\n const cacheKey = urlsToCacheKeys.get(possibleURL);\n if (cacheKey) {\n const integrity = precacheController.getIntegrityForCacheKey(cacheKey);\n return { cacheKey, integrity };\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n logger.debug(`Precaching did not find a match for ` + getFriendlyURL(request.url));\n }\n return;\n };\n super(match, precacheController.strategy);\n }\n}\nexport { PrecacheRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { removeIgnoredSearchParams } from './removeIgnoredSearchParams.js';\nimport '../_version.js';\n/**\n * Generator function that yields possible variations on the original URL to\n * check, one at a time.\n *\n * @param {string} url\n * @param {Object} options\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function* generateURLVariations(url, { ignoreURLParametersMatching = [/^utm_/, /^fbclid$/], directoryIndex = 'index.html', cleanURLs = true, urlManipulation, } = {}) {\n const urlObject = new URL(url, location.href);\n urlObject.hash = '';\n yield urlObject.href;\n const urlWithoutIgnoredParams = removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching);\n yield urlWithoutIgnoredParams.href;\n if (directoryIndex && urlWithoutIgnoredParams.pathname.endsWith('/')) {\n const directoryURL = new URL(urlWithoutIgnoredParams.href);\n directoryURL.pathname += directoryIndex;\n yield directoryURL.href;\n }\n if (cleanURLs) {\n const cleanURL = new URL(urlWithoutIgnoredParams.href);\n cleanURL.pathname += '.html';\n yield cleanURL.href;\n }\n if (urlManipulation) {\n const additionalURLs = urlManipulation({ url: urlObject });\n for (const urlToAttempt of additionalURLs) {\n yield urlToAttempt.href;\n }\n }\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport '../_version.js';\n/**\n * Removes any URL search parameters that should be ignored.\n *\n * @param {URL} urlObject The original URL.\n * @param {Array<RegExp>} ignoreURLParametersMatching RegExps to test against\n * each search parameter name. Matches mean that the search parameter should be\n * ignored.\n * @return {URL} The URL with any ignored search parameters removed.\n *\n * @private\n * @memberof workbox-precaching\n */\nexport function removeIgnoredSearchParams(urlObject, ignoreURLParametersMatching = []) {\n // Convert the iterable into an array at the start of the loop to make sure\n // deletion doesn't mess up iteration.\n for (const paramName of [...urlObject.searchParams.keys()]) {\n if (ignoreURLParametersMatching.some((regExp) => regExp.test(paramName))) {\n urlObject.searchParams.delete(paramName);\n }\n }\n return urlObject;\n}\n","/*\n Copyright 2019 Google LLC\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { registerRoute } from 'workbox-routing/registerRoute.js';\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport { PrecacheRoute } from './PrecacheRoute.js';\nimport './_version.js';\n/**\n * Add a `fetch` listener to the service worker that will\n * respond to\n * [network requests]{@link https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Custom_responses_to_requests}\n * with precached assets.\n *\n * Requests for assets that aren't precached, the `FetchEvent` will not be\n * responded to, allowing the event to fall through to other `fetch` event\n * listeners.\n *\n * @param {Object} [options] See the {@link workbox-precaching.PrecacheRoute}\n * options.\n *\n * @memberof workbox-precaching\n */\nfunction addRoute(options) {\n const precacheController = getOrCreatePrecacheController();\n const precacheRoute = new PrecacheRoute(precacheController, options);\n registerRoute(precacheRoute);\n}\nexport { addRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { logger } from 'workbox-core/_private/logger.js';\nimport { WorkboxError } from 'workbox-core/_private/WorkboxError.js';\nimport { Route } from './Route.js';\nimport { RegExpRoute } from './RegExpRoute.js';\nimport { getOrCreateDefaultRouter } from './utils/getOrCreateDefaultRouter.js';\nimport './_version.js';\n/**\n * Easily register a RegExp, string, or function with a caching\n * strategy to a singleton Router instance.\n *\n * This method will generate a Route for you if needed and\n * call {@link workbox-routing.Router#registerRoute}.\n *\n * @param {RegExp|string|workbox-routing.Route~matchCallback|workbox-routing.Route} capture\n * If the capture param is a `Route`, all other arguments will be ignored.\n * @param {workbox-routing~handlerCallback} [handler] A callback\n * function that returns a Promise resulting in a Response. This parameter\n * is required if `capture` is not a `Route` object.\n * @param {string} [method='GET'] The HTTP method to match the Route\n * against.\n * @return {workbox-routing.Route} The generated `Route`.\n *\n * @memberof workbox-routing\n */\nfunction registerRoute(capture, handler, method) {\n let route;\n if (typeof capture === 'string') {\n const captureUrl = new URL(capture, location.href);\n if (process.env.NODE_ENV !== 'production') {\n if (!(capture.startsWith('/') || capture.startsWith('http'))) {\n throw new WorkboxError('invalid-string', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n // We want to check if Express-style wildcards are in the pathname only.\n // TODO: Remove this log message in v4.\n const valueToCheck = capture.startsWith('http')\n ? captureUrl.pathname\n : capture;\n // See https://github.com/pillarjs/path-to-regexp#parameters\n const wildcards = '[*:?+]';\n if (new RegExp(`${wildcards}`).exec(valueToCheck)) {\n logger.debug(`The '$capture' parameter contains an Express-style wildcard ` +\n `character (${wildcards}). Strings are now always interpreted as ` +\n `exact matches; use a RegExp for partial or wildcard matches.`);\n }\n }\n const matchCallback = ({ url }) => {\n if (process.env.NODE_ENV !== 'production') {\n if (url.pathname === captureUrl.pathname &&\n url.origin !== captureUrl.origin) {\n logger.debug(`${capture} only partially matches the cross-origin URL ` +\n `${url.toString()}. This route will only handle cross-origin requests ` +\n `if they match the entire URL.`);\n }\n }\n return url.href === captureUrl.href;\n };\n // If `capture` is a string then `handler` and `method` must be present.\n route = new Route(matchCallback, handler, method);\n }\n else if (capture instanceof RegExp) {\n // If `capture` is a `RegExp` then `handler` and `method` must be present.\n route = new RegExpRoute(capture, handler, method);\n }\n else if (typeof capture === 'function') {\n // If `capture` is a function then `handler` and `method` must be present.\n route = new Route(capture, handler, method);\n }\n else if (capture instanceof Route) {\n route = capture;\n }\n else {\n throw new WorkboxError('unsupported-route-type', {\n moduleName: 'workbox-routing',\n funcName: 'registerRoute',\n paramName: 'capture',\n });\n }\n const defaultRouter = getOrCreateDefaultRouter();\n defaultRouter.registerRoute(route);\n return route;\n}\nexport { registerRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { addRoute } from './addRoute.js';\nimport { precache } from './precache.js';\nimport './_version.js';\n/**\n * This method will add entries to the precache list and add a route to\n * respond to fetch events.\n *\n * This is a convenience method that will call\n * {@link workbox-precaching.precache} and\n * {@link workbox-precaching.addRoute} in a single call.\n *\n * @param {Array<Object|string>} entries Array of entries to precache.\n * @param {Object} [options] See the\n * {@link workbox-precaching.PrecacheRoute} options.\n *\n * @memberof workbox-precaching\n */\nfunction precacheAndRoute(entries, options) {\n precache(entries);\n addRoute(options);\n}\nexport { precacheAndRoute };\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';\nimport './_version.js';\n/**\n * Adds items to the precache list, removing any duplicates and\n * stores the files in the\n * {@link workbox-core.cacheNames|\"precache cache\"} when the service\n * worker installs.\n *\n * This method can be called multiple times.\n *\n * Please note: This method **will not** serve any of the cached files for you.\n * It only precaches files. To respond to a network request you call\n * {@link workbox-precaching.addRoute}.\n *\n * If you have a single array of files to precache, you can just call\n * {@link workbox-precaching.precacheAndRoute}.\n *\n * @param {Array<Object|string>} [entries=[]] Array of entries to precache.\n *\n * @memberof workbox-precaching\n */\nfunction precache(entries) {\n const precacheController = getOrCreatePrecacheController();\n precacheController.precache(entries);\n}\nexport { precache };\n"],"names":["self","_","e","messageGenerator","code","args","msg","length","JSON","stringify","WorkboxError","Error","constructor","errorCode","details","super","name","normalizeHandler","handler","handle","Route","match","method","this","setCatchHandler","catchHandler","RegExpRoute","regExp","url","result","exec","href","origin","location","index","slice","Router","_routes","Map","_defaultHandlerMap","routes","addFetchListener","addEventListener","event","request","responsePromise","handleRequest","respondWith","addCacheListener","data","type","payload","requestPromises","Promise","all","urlsToCache","map","entry","Request","waitUntil","ports","then","postMessage","URL","protocol","startsWith","sameOrigin","params","route","findMatchingRoute","has","get","err","reject","_catchHandler","catch","async","catchErr","matchResult","Array","isArray","Object","keys","undefined","setDefaultHandler","set","registerRoute","push","unregisterRoute","routeIndex","indexOf","splice","defaultRouter","_cacheNameDetails","googleAnalytics","precache","prefix","runtime","suffix","registration","scope","_createCacheName","cacheName","filter","value","join","cacheNames","userCacheName","asyncFn","returnPromise","createCacheKey","urlObject","cacheKey","revision","cacheKeyURL","originalURL","searchParams","PrecacheInstallReportPlugin","updatedURLs","notUpdatedURLs","handlerWillStart","state","originalRequest","cachedResponseWillBeUsed","cachedResponse","PrecacheCacheKeyPlugin","precacheController","cacheKeyWillBeUsed","_precacheController","getCacheKeyForURL","headers","supportStatus","copyResponse","response","modifier","clonedResponse","clone","responseInit","Headers","status","statusText","modifiedResponseInit","body","testResponse","Response","error","canConstructResponseFromBodyStream","blob","stripParams","fullURL","ignoreParams","strippedURL","param","delete","Deferred","promise","resolve","quotaErrorCallbacks","Set","toRequest","input","StrategyHandler","strategy","options","_cacheKeys","assign","_strategy","_handlerDeferred","_extendLifetimePromises","_plugins","plugins","_pluginStateMap","plugin","fetch","mode","FetchEvent","preloadResponse","possiblePreloadResponse","hasCallback","cb","iterateCallbacks","thrownErrorMessage","message","pluginFilteredRequest","fetchResponse","fetchOptions","callback","runCallbacks","fetchAndCachePut","responseClone","cachePut","cacheMatch","key","matchOptions","effectiveRequest","getCacheKey","multiMatchOptions","caches","ms","setTimeout","String","replace","RegExp","responseToCache","_ensureResponseSafeToCache","cache","open","hasCacheUpdateCallback","oldResponse","strippedRequestURL","keysOptions","ignoreSearch","cacheKeys","cacheMatchIgnoreParams","put","executeQuotaErrorCallbacks","newResponse","statefulCallback","statefulParam","shift","destroy","pluginsUsed","PrecacheStrategy","responseDone","handleAll","_getResponse","_awaitComplete","_handle","doneWaiting","waitUntilError","_fallbackToNetwork","fallbackToNetwork","copyRedirectedCacheableResponsesPlugin","_handleInstall","_handleFetch","integrityInManifest","integrity","integrityInRequest","noIntegrityConflict","_useDefaultCacheabilityPluginIfNeeded","defaultPluginIndex","cacheWillUpdatePluginCount","entries","defaultPrecacheCacheabilityPlugin","cacheWillUpdate","redirected","PrecacheController","_urlsToCacheKeys","_urlsToCacheModes","_cacheKeysToIntegrities","install","bind","activate","addToCacheList","_installAndActiveListenersAdded","urlsToWarnAbout","cacheMode","firstEntry","secondEntry","warningMessage","console","warn","installReportPlugin","credentials","currentlyCachedRequests","expectedCacheKeys","values","deletedURLs","getURLsToCacheKeys","getCachedURLs","getIntegrityForCacheKey","matchPrecache","createHandlerBoundToURL","getOrCreatePrecacheController","PrecacheRoute","urlsToCacheKeys","possibleURL","ignoreURLParametersMatching","directoryIndex","cleanURLs","urlManipulation","hash","urlWithoutIgnoredParams","paramName","some","test","removeIgnoredSearchParams","pathname","endsWith","directoryURL","cleanURL","additionalURLs","urlToAttempt","generateURLVariations","addRoute","capture","captureUrl","moduleName","funcName"],"mappings":"6CAEA,IACIA,KAAK,uBAAyBC,IAElC,MAAOC,ICEP,MCgBaC,EAdI,CAACC,KAASC,KACnBC,IAAAA,EAAMF,EAIV,OAHIC,EAAKE,OAAS,IACdD,GAAQ,OAAME,KAAKC,UAAUJ,MAE1BC,GCIX,MAAMI,UAAqBC,MASvBC,YAAYC,EAAWC,GAEnBC,MADgBZ,EAAiBU,EAAWC,IAEvCE,KAAAA,KAAOH,EACPC,KAAAA,QAAUA,GC7BvB,IACId,KAAK,0BAA4BC,IAErC,MAAOC,ICWA,MCAMe,EAAoBC,GACzBA,GAA8B,iBAAZA,EASXA,EAWA,CAAEC,OAAQD,GCjBzB,MAAME,EAYFR,YAAYS,EAAOH,EAASI,EFhBH,OE8BrBC,KAAKL,QAAUD,EAAiBC,GAC3BG,KAAAA,MAAQA,EACRC,KAAAA,OAASA,EAOlBE,gBAAgBN,GACZK,KAAKE,aAAeR,EAAiBC,IClC7C,MAAMQ,UAAoBN,EActBR,YAAYe,EAAQT,EAASI,GAiCzBP,OAxBc,EAAGa,IAAAA,MACPC,MAAAA,EAASF,EAAOG,KAAKF,EAAIG,MAE3B,GAACF,IAODD,EAAII,SAAWC,SAASD,QAA2B,IAAjBH,EAAOK,OAY7C,OAAOL,EAAOM,MAAM,KAEXjB,EAASI,ICtC9B,MAAMc,EAIFxB,cACIW,KAAKc,EAAU,IAAIC,IACnBf,KAAKgB,EAAqB,IAAID,IAO9BE,aACA,OAAOjB,KAAKc,EAMhBI,mBAEIzC,KAAK0C,iBAAiB,SAAWC,IACvB,MAAAC,QAAEA,GAAYD,EACdE,EAAkBtB,KAAKuB,cAAc,CAAEF,QAAAA,EAASD,MAAAA,IAClDE,GACAF,EAAMI,YAAYF,MA0B9BG,mBAEIhD,KAAK0C,iBAAiB,WAAaC,IAG3BA,GAAAA,EAAMM,MAA4B,eAApBN,EAAMM,KAAKC,KAAuB,CAE1C,MAAAC,QAAEA,GAAYR,EAAMM,KAIpBG,EAAkBC,QAAQC,IAAIH,EAAQI,YAAYC,KAAKC,IACpC,iBAAVA,IACPA,EAAQ,CAACA,IAEb,MAAMb,EAAU,IAAIc,WAAWD,GACxB,OAAAlC,KAAKuB,cAAc,CAAEF,QAAAA,EAASD,MAAAA,QAKzCA,EAAMgB,UAAUP,GAEZT,EAAMiB,OAASjB,EAAMiB,MAAM,IACtBR,EAAgBS,MAAK,IAAMlB,EAAMiB,MAAM,GAAGE,aAAY,SAiB3EhB,eAAcF,QAAEA,EAAFD,MAAWA,IASrB,MAAMf,EAAM,IAAImC,IAAInB,EAAQhB,IAAKK,SAASF,MACtC,IAACH,EAAIoC,SAASC,WAAW,QAIzB,OAEEC,MAAAA,EAAatC,EAAII,SAAWC,SAASD,QACrCmC,OAAEA,EAAFC,MAAUA,GAAU7C,KAAK8C,kBAAkB,CAC7C1B,MAAAA,EACAC,QAAAA,EACAsB,WAAAA,EACAtC,IAAAA,IAEJ,IAAIV,EAAUkD,GAASA,EAAMlD,QAe7B,MAAMI,EAASsB,EAAQtB,OAQnB,IAPCJ,GAAWK,KAAKgB,EAAmB+B,IAAIhD,KAKxCJ,EAAUK,KAAKgB,EAAmBgC,IAAIjD,KAErCJ,EAMD,OAkBJ,IAAI2B,EACA,IACAA,EAAkB3B,EAAQC,OAAO,CAAES,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,EAAOwB,OAAAA,IAE5D,MAAOK,GACH3B,EAAkBQ,QAAQoB,OAAOD,GAGrC,MAAM/C,EAAe2C,GAASA,EAAM3C,aAuCpC,OAtCIoB,aAA2BQ,UAC1B9B,KAAKmD,GAAiBjD,KACvBoB,EAAkBA,EAAgB8B,OAAMC,MAAAA,IAEpC,GAAInD,EAUI,IACA,aAAaA,EAAaN,OAAO,CAAES,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,EAAOwB,OAAAA,IAE5D,MAAOU,GACCA,aAAoBlE,QACpB6D,EAAMK,GAId,GAAAtD,KAAKmD,EAUL,OAAOnD,KAAKmD,EAAcvD,OAAO,CAAES,IAAAA,EAAKgB,QAAAA,EAASD,MAAAA,IAErD,MAAM6B,MAGP3B,EAiBXwB,mBAAkBzC,IAAEA,EAAFsC,WAAOA,EAAPtB,QAAmBA,EAAnBD,MAA4BA,IACpCH,MAAAA,EAASjB,KAAKc,EAAQkC,IAAI3B,EAAQtB,SAAW,GACnD,IAAK,MAAM8C,KAAS5B,EAAQ,CACpB2B,IAAAA,EAGJ,MAAMW,EAAcV,EAAM/C,MAAM,CAAEO,IAAAA,EAAKsC,WAAAA,EAAYtB,QAAAA,EAASD,MAAAA,IAC5D,GAAImC,EA6BO,OAjBPX,EAASW,GACLC,MAAMC,QAAQb,IAA6B,IAAlBA,EAAO5D,QAI3BuE,EAAYlE,cAAgBqE,QACG,IAApCA,OAAOC,KAAKJ,GAAavE,QAIG,kBAAhBuE,KAPZX,OAASgB,GAcN,CAAEf,MAAAA,EAAOD,OAAAA,GAIxB,MAAO,GAgBXiB,kBAAkBlE,EAASI,EJ1SF,OI2ShBiB,KAAAA,EAAmB8C,IAAI/D,EAAQL,EAAiBC,IASzDM,gBAAgBN,GACZK,KAAKmD,EAAgBzD,EAAiBC,GAO1CoE,cAAclB,GAiCL7C,KAAKc,EAAQiC,IAAIF,EAAM9C,SACnBe,KAAAA,EAAQgD,IAAIjB,EAAM9C,OAAQ,IAI9Be,KAAAA,EAAQkC,IAAIH,EAAM9C,QAAQiE,KAAKnB,GAOxCoB,gBAAgBpB,GACR,IAAC7C,KAAKc,EAAQiC,IAAIF,EAAM9C,QACxB,MAAM,IAAIZ,EAAa,6CAA8C,CACjEY,OAAQ8C,EAAM9C,SAGtB,MAAMmE,EAAalE,KAAKc,EAAQkC,IAAIH,EAAM9C,QAAQoE,QAAQtB,GAC1D,KAAIqB,GAAc,GAId,MAAM,IAAI/E,EAAa,yCAHvBa,KAAKc,EAAQkC,IAAIH,EAAM9C,QAAQqE,OAAOF,EAAY,ICxX9D,IAAIG,ECDJ,MAAMC,EAAoB,CACtBC,gBAAiB,kBACjBC,SAAU,cACVC,OAAQ,UACRC,QAAS,UACTC,OAAgC,oBAAjBC,aAA+BA,aAAaC,MAAQ,IAEjEC,EAAoBC,GACf,CAACT,EAAkBG,OAAQM,EAAWT,EAAkBK,QAC1DK,QAAQC,GAAUA,GAASA,EAAMjG,OAAS,IAC1CkG,KAAK,KAODC,EAWSC,GACPA,GAAiBN,EAAiBR,EAAkBE,UAZtDW,EAiBQC,GACNA,GAAiBN,EAAiBR,EAAkBI,SC3BnE,SAAStC,EAAUhB,EAAOiE,GAChBC,MAAAA,EAAgBD,IAEtB,OADAjE,EAAMgB,UAAUkD,GACTA,ECjBX,IACI7G,KAAK,6BAA+BC,IAExC,MAAOC,ICeA,SAAS4G,EAAerD,GACvB,IAACA,EACD,MAAM,IAAI/C,EAAa,oCAAqC,CAAE+C,MAAAA,IAIlE,GAAqB,iBAAVA,EAAoB,CACrBsD,MAAAA,EAAY,IAAIhD,IAAIN,EAAOxB,SAASF,MACnC,MAAA,CACHiF,SAAUD,EAAUhF,KACpBH,IAAKmF,EAAUhF,MAGjB,MAAAkF,SAAEA,EAAFrF,IAAYA,GAAQ6B,EACtB,IAAC7B,EACD,MAAM,IAAIlB,EAAa,oCAAqC,CAAE+C,MAAAA,IAI9D,IAACwD,EAAU,CACLF,MAAAA,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACjC,MAAA,CACHiF,SAAUD,EAAUhF,KACpBH,IAAKmF,EAAUhF,MAKjBmF,MAAAA,EAAc,IAAInD,IAAInC,EAAKK,SAASF,MACpCoF,EAAc,IAAIpD,IAAInC,EAAKK,SAASF,MAEnC,OADPmF,EAAYE,aAAa/B,IAxCC,kBAwC0B4B,GAC7C,CACHD,SAAUE,EAAYnF,KACtBH,IAAKuF,EAAYpF,MCvCzB,MAAMsF,EACFzG,cACS0G,KAAAA,YAAc,GACdC,KAAAA,eAAiB,GACjBC,KAAAA,iBAAmB5C,OAAShC,QAAAA,EAAS6E,MAAAA,MAElCA,IACAA,EAAMC,gBAAkB9E,IAG3B+E,KAAAA,yBAA2B/C,OAASjC,MAAAA,EAAO8E,MAAAA,EAAOG,eAAAA,MACnD,GAAmB,YAAfjF,EAAMO,MACFuE,GACAA,EAAMC,iBACND,EAAMC,2BAA2BhE,QAAS,CAE1C,MAAM9B,EAAM6F,EAAMC,gBAAgB9F,IAC9BgG,EACArG,KAAKgG,eAAehC,KAAK3D,GAGzBL,KAAK+F,YAAY/B,KAAK3D,GAIlC,OAAOgG,ICzBnB,MAAMC,EACFjH,aAAYkH,mBAAEA,IACLC,KAAAA,mBAAqBnD,OAAShC,QAAAA,EAASuB,OAAAA,MAGlC6C,MAAAA,GAAY7C,MAAAA,OAAuC,EAASA,EAAO6C,WACrEzF,KAAKyG,EAAoBC,kBAAkBrF,EAAQhB,KAEvD,OAAOoF,EACD,IAAItD,QAAQsD,EAAU,CAAEkB,QAAStF,EAAQsF,UACzCtF,GAELoF,KAAAA,EAAsBF,GClBnC,IAAIK,ECqBJvD,eAAewD,EAAaC,EAAUC,GAClC,IAAItG,EAAS,KAETqG,GAAAA,EAASzG,IAAK,CAEdI,EADoB,IAAI+B,IAAIsE,EAASzG,KAChBI,OAEzB,GAAIA,IAAWhC,KAAKiC,SAASD,OACzB,MAAM,IAAItB,EAAa,6BAA8B,CAAEsB,OAAAA,IAE3D,MAAMuG,EAAiBF,EAASG,QAE1BC,EAAe,CACjBP,QAAS,IAAIQ,QAAQH,EAAeL,SACpCS,OAAQJ,EAAeI,OACvBC,WAAYL,EAAeK,YAGzBC,EAAuBP,EAAWA,EAASG,GAAgBA,EAI3DK,EDjCV,WACQX,QAAkBhD,IAAlBgD,EAA6B,CAC7B,MAAMY,EAAe,IAAIC,SAAS,IAC9B,GAAA,SAAUD,EACN,IACA,IAAIC,SAASD,EAAaD,MAC1BX,GAAgB,EAEpB,MAAOc,GACHd,GAAgB,EAGxBA,GAAgB,EAEpB,OAAOA,ECmBMe,GACPX,EAAeO,WACTP,EAAeY,OAC3B,OAAO,IAAIH,SAASF,EAAMD,GC/C9B,SAASO,EAAYC,EAASC,GAC1B,MAAMC,EAAc,IAAIxF,IAAIsF,GAC5B,IAAK,MAAMG,KAASF,EAChBC,EAAYnC,aAAaqC,OAAOD,GAE7BD,OAAAA,EAAYxH,KCIvB,MAAM2H,EAIF9I,cACS+I,KAAAA,QAAU,IAAItG,SAAQ,CAACuG,EAASnF,KAC5BmF,KAAAA,QAAUA,EACVnF,KAAAA,OAASA,MCZ1B,MAAMoF,EAAsB,IAAIC,ICThC,IACI9J,KAAK,6BAA+BC,IAExC,MAAOC,ICWP,SAAS6J,EAAUC,GACR,MAAiB,iBAAVA,EAAqB,IAAItG,QAAQsG,GAASA,EAW5D,MAAMC,EAiBFrJ,YAAYsJ,EAAUC,GACbC,KAAAA,EAAa,GA8ClBnF,OAAOoF,OAAO9I,KAAM4I,GACpB5I,KAAKoB,MAAQwH,EAAQxH,MAChB2H,KAAAA,EAAYJ,EACjB3I,KAAKgJ,EAAmB,IAAIb,EAC5BnI,KAAKiJ,EAA0B,GAG/BjJ,KAAKkJ,EAAW,IAAIP,EAASQ,SAC7BnJ,KAAKoJ,EAAkB,IAAIrI,IAC3B,IAAK,MAAMsI,KAAUrJ,KAAKkJ,EACtBlJ,KAAKoJ,EAAgBtF,IAAIuF,EAAQ,IAErCrJ,KAAKoB,MAAMgB,UAAUpC,KAAKgJ,EAAiBZ,SAezCkB,YAAMb,GACF,MAAArH,MAAEA,GAAUpB,KAClB,IAAIqB,EAAUmH,EAAUC,GACxB,GAAqB,aAAjBpH,EAAQkI,MACRnI,aAAiBoI,YACjBpI,EAAMqI,gBAAiB,CACvB,MAAMC,QAAiCtI,EAAMqI,gBAC7C,GAAIC,EAKA,OAAOA,EAMf,MAAMvD,EAAkBnG,KAAK2J,YAAY,gBACnCtI,EAAQ4F,QACR,KACF,IACK,IAAA,MAAM2C,KAAM5J,KAAK6J,iBAAiB,oBACnCxI,QAAgBuI,EAAG,CAAEvI,QAASA,EAAQ4F,QAAS7F,MAAAA,IAGvD,MAAO6B,GACCA,GAAAA,aAAe7D,MACf,MAAM,IAAID,EAAa,kCAAmC,CACtD2K,mBAAoB7G,EAAI8G,UAOpC,MAAMC,EAAwB3I,EAAQ4F,QAClC,IACIgD,IAAAA,EAEJA,QAAsBX,MAAMjI,EAA0B,aAAjBA,EAAQkI,UAAsB3F,EAAY5D,KAAK+I,EAAUmB,cAMzF,IAAA,MAAMC,KAAYnK,KAAK6J,iBAAiB,mBACzCI,QAAsBE,EAAS,CAC3B/I,MAAAA,EACAC,QAAS2I,EACTlD,SAAUmD,IAGlB,OAAOA,EAEX,MAAOvC,GAeH,MARIvB,SACMnG,KAAKoK,aAAa,eAAgB,CACpC1C,MAAOA,EACPtG,MAAAA,EACA+E,gBAAiBA,EAAgBc,QACjC5F,QAAS2I,EAAsB/C,UAGjCS,GAaR2C,uBAAiB5B,GACnB,MAAM3B,QAAiB9G,KAAKsJ,MAAMb,GAC5B6B,EAAgBxD,EAASG,QAE/B,OADKjH,KAAKoC,UAAUpC,KAAKuK,SAAS9B,EAAO6B,IAClCxD,EAcL0D,iBAAWC,GACb,MAAMpJ,EAAUmH,EAAUiC,GAC1B,IAAIpE,EACE,MAAAtB,UAAEA,EAAF2F,aAAaA,GAAiB1K,KAAK+I,EACnC4B,QAAyB3K,KAAK4K,YAAYvJ,EAAS,QACnDwJ,EAAoBnH,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAI4B,GAAe,CAAE3F,UAAAA,IAC3EsB,QAAuByE,OAAOhL,MAAM6K,EAAkBE,GASjD,IAAA,MAAMV,KAAYnK,KAAK6J,iBAAiB,4BACzCxD,QACW8D,EAAS,CACZpF,UAAAA,EACA2F,aAAAA,EACArE,eAAAA,EACAhF,QAASsJ,EACTvJ,MAAOpB,KAAKoB,cACTwC,EAEf,OAAOyC,EAiBGhD,eAACoH,EAAK3D,GAChB,MAAMzF,EAAUmH,EAAUiC,GCxP3B,IAAiBM,QAAAA,ED2PF,EC1PX,IAAIjJ,SAASuG,GAAY2C,WAAW3C,EAAS0C,MD2P1CJ,MAAAA,QAAyB3K,KAAK4K,YAAYvJ,EAAS,SAiBrD,IAACyF,EAKD,MAAM,IAAI3H,EAAa,6BAA8B,CACjDkB,KE1RQA,EF0RYsK,EAAiBtK,IEzRlC,IAAImC,IAAIyI,OAAO5K,GAAMK,SAASF,MAG/BA,KAAK0K,QAAQ,IAAIC,OAAQ,IAAGzK,SAASD,UAAW,OAJ1CJ,IAAAA,EF6RhB,MAAM+K,QAAwBpL,KAAKqL,EAA2BvE,GAC1D,IAACsE,EAKD,OAAO,EAEL,MAAArG,UAAEA,EAAF2F,aAAaA,GAAiB1K,KAAK+I,EACnCuC,QAAc7M,KAAKqM,OAAOS,KAAKxG,GAC/ByG,EAAyBxL,KAAK2J,YAAY,kBAC1C8B,EAAcD,QJtR5BnI,eAAsCiI,EAAOjK,EAAS0G,EAAc2C,GAC1DgB,MAAAA,EAAqB7D,EAAYxG,EAAQhB,IAAK0H,GAEpD,GAAI1G,EAAQhB,MAAQqL,EAChB,OAAOJ,EAAMxL,MAAMuB,EAASqJ,GAGhC,MAAMiB,EAAcjI,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAI4B,GAAe,CAAEkB,cAAc,IAC7EC,QAAkBP,EAAM3H,KAAKtC,EAASsK,GAC5C,IAAK,MAAMlG,KAAYoG,EAEfH,GAAAA,IADwB7D,EAAYpC,EAASpF,IAAK0H,GAElD,OAAOuD,EAAMxL,MAAM2F,EAAUiF,GI2QrBoB,CAIRR,EAAOX,EAAiB1D,QAAS,CAAC,mBAAoByD,GACpD,KAKF,UACMY,EAAMS,IAAIpB,EAAkBa,EAAyBJ,EAAgBnE,QAAUmE,GAEzF,MAAO1D,GACCA,GAAAA,aAAiBtI,MAKjB,KAHmB,uBAAfsI,EAAMjI,YGhT1B4D,iBAKI,IAAK,MAAM8G,KAAY7B,QACb6B,IH2SY6B,GAEJtE,EAGT,IAAA,MAAMyC,KAAYnK,KAAK6J,iBAAiB,wBACnCM,EAAS,CACXpF,UAAAA,EACA0G,YAAAA,EACAQ,YAAab,EAAgBnE,QAC7B5F,QAASsJ,EACTvJ,MAAOpB,KAAKoB,QAGpB,OAAO,EAaMiC,kBAAChC,EAASkI,GACjBkB,MAAAA,EAAO,GAAEpJ,EAAQhB,SAASkJ,IAChC,IAAKvJ,KAAK6I,EAAW4B,GAAM,CACnBE,IAAAA,EAAmBtJ,EAClB,IAAA,MAAM8I,KAAYnK,KAAK6J,iBAAiB,sBACzCc,EAAmBnC,QAAgB2B,EAAS,CACxCZ,KAAAA,EACAlI,QAASsJ,EACTvJ,MAAOpB,KAAKoB,MAEZwB,OAAQ5C,KAAK4C,UAGrB5C,KAAK6I,EAAW4B,GAAOE,EAE3B,OAAO3K,KAAK6I,EAAW4B,GAS3Bd,YAAYlK,GACR,IAAK,MAAM4J,KAAUrJ,KAAK+I,EAAUI,QAC5B1J,GAAAA,KAAQ4J,EACR,OAAO,EAGf,OAAO,EAkBOhG,mBAAC5D,EAAMwI,GAChB,IAAA,MAAMkC,KAAYnK,KAAK6J,iBAAiBpK,SAGnC0K,EAASlC,GAYtB4B,kBAAiBpK,GACd,IAAK,MAAM4J,KAAUrJ,KAAK+I,EAAUI,QAChC,GAA4B,mBAAjBE,EAAO5J,GAAsB,CAC9ByG,MAAAA,EAAQlG,KAAKoJ,EAAgBpG,IAAIqG,GACjC6C,EAAoBjE,IACtB,MAAMkE,EAAgBzI,OAAOoF,OAAOpF,OAAOoF,OAAO,GAAIb,GAAQ,CAAE/B,MAAAA,IAGhE,OAAOmD,EAAO5J,GAAM0M,UAElBD,GAiBlB9J,UAAUgG,GAEN,OADApI,KAAKiJ,EAAwBjF,KAAKoE,GAC3BA,EAYM/E,oBACb,IAAI+E,EACJ,KAAQA,EAAUpI,KAAKiJ,EAAwBmD,eACrChE,EAOdiE,UACIrM,KAAKgJ,EAAiBX,QAAQ,MAY5BgD,QAA2BvE,GACzBsE,IAAAA,EAAkBtE,EAClBwF,GAAc,EACb,IAAA,MAAMnC,KAAYnK,KAAK6J,iBAAiB,mBAQrC,GAPJuB,QACWjB,EAAS,CACZ9I,QAASrB,KAAKqB,QACdyF,SAAUsE,EACVhK,MAAOpB,KAAKoB,cACTwC,EACX0I,GAAc,GACTlB,EACD,MAwBR,OArBKkB,GACGlB,GAA8C,MAA3BA,EAAgBhE,SACnCgE,OAAkBxH,GAmBnBwH,GIvef,MAAMmB,UCRN,MAuBIlN,YAAYuJ,EAAU,IAQb7D,KAAAA,UAAYI,EAA0ByD,EAAQ7D,WAQnD/E,KAAKmJ,QAAUP,EAAQO,SAAW,GAQlCnJ,KAAKkK,aAAetB,EAAQsB,aAQ5BlK,KAAK0K,aAAe9B,EAAQ8B,aAqBhC9K,OAAOgJ,GACH,MAAO4D,GAAgBxM,KAAKyM,UAAU7D,GACtC,OAAO4D,EAwBXC,UAAU7D,GAEFA,aAAmBY,aACnBZ,EAAU,CACNxH,MAAOwH,EACPvH,QAASuH,EAAQvH,UAGzB,MAAMD,EAAQwH,EAAQxH,MAChBC,EAAqC,iBAApBuH,EAAQvH,QACzB,IAAIc,QAAQyG,EAAQvH,SACpBuH,EAAQvH,QACRuB,EAAS,WAAYgG,EAAUA,EAAQhG,YAASgB,EAChDjE,EAAU,IAAI+I,EAAgB1I,KAAM,CAAEoB,MAAAA,EAAOC,QAAAA,EAASuB,OAAAA,IACtD4J,EAAexM,KAAK0M,EAAa/M,EAAS0B,EAASD,GAGzD,MAAO,CAACoL,EAFYxM,KAAK2M,EAAeH,EAAc7M,EAAS0B,EAASD,IAI1DiC,QAAC1D,EAAS0B,EAASD,GAE7B0F,IAAAA,QADEnH,EAAQyK,aAAa,mBAAoB,CAAEhJ,MAAAA,EAAOC,QAAAA,IAEpD,IAKI,GAJJyF,QAAiB9G,KAAK4M,EAAQvL,EAAS1B,IAIlCmH,GAA8B,UAAlBA,EAASnF,KACtB,MAAM,IAAIxC,EAAa,cAAe,CAAEkB,IAAKgB,EAAQhB,MAG7D,MAAOqH,GACCA,GAAAA,aAAiBtI,MACZ,IAAA,MAAM+K,KAAYxK,EAAQkK,iBAAiB,mBAE5C,GADA/C,QAAiBqD,EAAS,CAAEzC,MAAAA,EAAOtG,MAAAA,EAAOC,QAAAA,IACtCyF,EACA,MAIR,IAACA,EACD,MAAMY,EAQT,IAAA,MAAMyC,KAAYxK,EAAQkK,iBAAiB,sBAC5C/C,QAAiBqD,EAAS,CAAE/I,MAAAA,EAAOC,QAAAA,EAASyF,SAAAA,IAEhD,OAAOA,EAEL6F,QAAeH,EAAc7M,EAAS0B,EAASD,GACjD,IAAI0F,EACAY,EACA,IACAZ,QAAiB0F,EAErB,MAAO9E,IAKH,UACM/H,EAAQyK,aAAa,oBAAqB,CAC5ChJ,MAAAA,EACAC,QAAAA,EACAyF,SAAAA,UAEEnH,EAAQkN,cAElB,MAAOC,GACCA,aAA0B1N,QAC1BsI,EAAQoF,GAUhB,SAPMnN,EAAQyK,aAAa,qBAAsB,CAC7ChJ,MAAAA,EACAC,QAAAA,EACAyF,SAAAA,EACAY,MAAOA,IAEX/H,EAAQ0M,UACJ3E,EACA,MAAMA,IDlKdrI,YAAYuJ,EAAU,IAClBA,EAAQ7D,UAAYI,EAA2ByD,EAAQ7D,WACvDvF,MAAMoJ,GACN5I,KAAK+M,GAC6B,IAA9BnE,EAAQoE,kBAKZhN,KAAKmJ,QAAQnF,KAAKuI,EAAiBU,wCAS1B5J,QAAChC,EAAS1B,GACbmH,MAAAA,QAAiBnH,EAAQ6K,WAAWnJ,GAC1C,OAAIyF,IAKAnH,EAAQyB,OAAgC,YAAvBzB,EAAQyB,MAAMO,WAClB3B,KAAKkN,EAAe7L,EAAS1B,SAIjCK,KAAKmN,EAAa9L,EAAS1B,IAE1B0D,QAAChC,EAAS1B,GACxB,IAAImH,EACElE,MAAAA,EAAUjD,EAAQiD,QAAU,GAE9B,IAAA5C,KAAK+M,EA+BL,MAAM,IAAI5N,EAAa,yBAA0B,CAC7C4F,UAAW/E,KAAK+E,UAChB1E,IAAKgB,EAAQhB,MAjCQ,CAMzB,MAAM+M,EAAsBxK,EAAOyK,UAC7BC,EAAqBjM,EAAQgM,UAC7BE,GAAuBD,GAAsBA,IAAuBF,EAC1EtG,QAAiBnH,EAAQ2J,MAAM,IAAInH,QAAQd,EAAS,CAChDgM,UAAWC,GAAsBF,KAOjCA,GAAuBG,IACvBvN,KAAKwN,UACmB7N,EAAQ4K,SAASlJ,EAASyF,EAASG,UA+BnE,OAAOH,EAESzD,QAAChC,EAAS1B,GAC1BK,KAAKwN,IACC1G,MAAAA,QAAiBnH,EAAQ2J,MAAMjI,GAIjC,UADoB1B,EAAQ4K,SAASlJ,EAASyF,EAASG,SAIvD,MAAM,IAAI9H,EAAa,0BAA2B,CAC9CkB,IAAKgB,EAAQhB,IACb+G,OAAQN,EAASM,SAGzB,OAAON,EA6BX0G,IACQC,IAAAA,EAAqB,KACrBC,EAA6B,EACjC,IAAK,MAAO/M,EAAO0I,KAAWrJ,KAAKmJ,QAAQwE,UAEnCtE,IAAWkD,EAAiBU,yCAI5B5D,IAAWkD,EAAiBqB,oCAC5BH,EAAqB9M,GAErB0I,EAAOwE,iBACPH,KAG2B,IAA/BA,EACA1N,KAAKmJ,QAAQnF,KAAKuI,EAAiBqB,mCAE9BF,EAA6B,GAA4B,OAAvBD,GAEvCzN,KAAKmJ,QAAQ/E,OAAOqJ,EAAoB,IAKpDlB,EAAiBqB,kCAAoC,CACjDvK,gBAAA,OAAsByD,SAAEA,MACfA,GAAYA,EAASM,QAAU,IACzB,KAEJN,GAGfyF,EAAiBU,uCAAyC,CACtD5J,gBAAA,OAAsByD,SAAEA,KACbA,EAASgH,iBAAmBjH,EAAaC,GAAYA,GE3LpE,MAAMiH,EAWF1O,aAAY0F,UAAEA,EAAFoE,QAAaA,EAAU,GAAvB6D,kBAA2BA,GAAoB,GAAU,IACjEhN,KAAKgO,EAAmB,IAAIjN,IAC5Bf,KAAKiO,EAAoB,IAAIlN,IAC7Bf,KAAKkO,EAA0B,IAAInN,IACnCf,KAAK+I,EAAY,IAAIwD,EAAiB,CAClCxH,UAAWI,EAA2BJ,GACtCoE,QAAS,IACFA,EACH,IAAI7C,EAAuB,CAAEC,mBAAoBvG,QAErDgN,kBAAAA,IAGCmB,KAAAA,QAAUnO,KAAKmO,QAAQC,KAAKpO,MAC5BqO,KAAAA,SAAWrO,KAAKqO,SAASD,KAAKpO,MAMnC2I,eACA,OAAO3I,KAAK+I,EAYhBvE,SAASmJ,GACAW,KAAAA,eAAeX,GACf3N,KAAKuO,IACN9P,KAAK0C,iBAAiB,UAAWnB,KAAKmO,SACtC1P,KAAK0C,iBAAiB,WAAYnB,KAAKqO,UAClCE,KAAAA,GAAkC,GAU/CD,eAAeX,GASLa,MAAAA,EAAkB,GACxB,IAAK,MAAMtM,KAASyL,EAAS,CAEJ,iBAAVzL,EACPsM,EAAgBxK,KAAK9B,GAEhBA,QAA4B0B,IAAnB1B,EAAMwD,UACpB8I,EAAgBxK,KAAK9B,EAAM7B,KAEzB,MAAAoF,SAAEA,EAAFpF,IAAYA,GAAQkF,EAAerD,GACnCuM,EAA6B,iBAAVvM,GAAsBA,EAAMwD,SAAW,SAAW,UAC3E,GAAI1F,KAAKgO,EAAiBjL,IAAI1C,IAC1BL,KAAKgO,EAAiBhL,IAAI3C,KAASoF,EACnC,MAAM,IAAItG,EAAa,wCAAyC,CAC5DuP,WAAY1O,KAAKgO,EAAiBhL,IAAI3C,GACtCsO,YAAalJ,IAGjB,GAAiB,iBAAVvD,GAAsBA,EAAMmL,UAAW,CAC9C,GAAIrN,KAAKkO,EAAwBnL,IAAI0C,IACjCzF,KAAKkO,EAAwBlL,IAAIyC,KAAcvD,EAAMmL,UACrD,MAAM,IAAIlO,EAAa,4CAA6C,CAChEkB,IAAAA,IAGH6N,KAAAA,EAAwBpK,IAAI2B,EAAUvD,EAAMmL,WAIrD,GAFArN,KAAKgO,EAAiBlK,IAAIzD,EAAKoF,GAC/BzF,KAAKiO,EAAkBnK,IAAIzD,EAAKoO,GAC5BD,EAAgBxP,OAAS,EAAG,CAC5B,MAAM4P,EACD,qDAAQJ,EAAgBtJ,KAAK,8EAK9B2J,QAAQC,KAAKF,KAkB7BT,QAAQ/M,GAGJ,OAAOgB,EAAUhB,GAAOiC,UACpB,MAAM0L,EAAsB,IAAIjJ,EAC3B6C,KAAAA,SAASQ,QAAQnF,KAAK+K,GAGtB,IAAA,MAAO1O,EAAKoF,KAAazF,KAAKgO,EAAkB,CAC3CX,MAAAA,EAAYrN,KAAKkO,EAAwBlL,IAAIyC,GAC7CgJ,EAAYzO,KAAKiO,EAAkBjL,IAAI3C,GACvCgB,EAAU,IAAIc,QAAQ9B,EAAK,CAC7BgN,UAAAA,EACA/B,MAAOmD,EACPO,YAAa,sBAEXlN,QAAQC,IAAI/B,KAAK2I,SAAS8D,UAAU,CACtC7J,OAAQ,CAAE6C,SAAAA,GACVpE,QAAAA,EACAD,MAAAA,KAGF,MAAA2E,YAAEA,EAAFC,eAAeA,GAAmB+I,EAIjC,MAAA,CAAEhJ,YAAAA,EAAaC,eAAAA,MAa9BqI,SAASjN,GAGL,OAAOgB,EAAUhB,GAAOiC,UACpB,MAAMiI,QAAc7M,KAAKqM,OAAOS,KAAKvL,KAAK2I,SAAS5D,WAC7CkK,QAAgC3D,EAAM3H,OACtCuL,EAAoB,IAAI3G,IAAIvI,KAAKgO,EAAiBmB,UAClDC,EAAc,GACpB,IAAK,MAAM/N,KAAW4N,EACbC,EAAkBnM,IAAI1B,EAAQhB,aACzBiL,EAAMpD,OAAO7G,GACnB+N,EAAYpL,KAAK3C,EAAQhB,MAM1B,MAAA,CAAE+O,YAAAA,MASjBC,qBACI,OAAOrP,KAAKgO,EAQhBsB,gBACI,MAAO,IAAItP,KAAKgO,EAAiBrK,QAWrC+C,kBAAkBrG,GACRmF,MAAAA,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACjC,OAAAR,KAAKgO,EAAiBhL,IAAIwC,EAAUhF,MAO/C+O,wBAAwB9J,GACpB,OAAOzF,KAAKkO,EAAwBlL,IAAIyC,GAoBtC+J,oBAAcnO,GACVhB,MAAAA,EAAMgB,aAAmBc,QAAUd,EAAQhB,IAAMgB,EACjDoE,EAAWzF,KAAK0G,kBAAkBrG,GACxC,GAAIoF,EAAU,CAEV,aADoBhH,KAAKqM,OAAOS,KAAKvL,KAAK2I,SAAS5D,YACtCjF,MAAM2F,IAY3BgK,wBAAwBpP,GACpB,MAAMoF,EAAWzF,KAAK0G,kBAAkBrG,GACpC,IAACoF,EACD,MAAM,IAAItG,EAAa,oBAAqB,CAAEkB,IAAAA,IAElD,OAAQuI,IACJA,EAAQvH,QAAU,IAAIc,QAAQ9B,GAC9BuI,EAAQhG,OAASc,OAAOoF,OAAO,CAAErD,SAAAA,GAAYmD,EAAQhG,QAC9C5C,KAAK2I,SAAS/I,OAAOgJ,KCtRxC,IAAIrC,EAKG,MAAMmJ,EAAgC,KACpCnJ,IACDA,EAAqB,IAAIwH,GAEtBxH,GCGX,MAAMoJ,UAAsB9P,EAiBxBR,YAAYkH,EAAoBqC,GAe5BpJ,OAdc,EAAG6B,QAAAA,MACb,MAAMuO,EAAkBrJ,EAAmB8I,qBACtC,IAAA,MAAMQ,KCtBhB,UAAgCxP,GAAKyP,4BAAEA,EAA8B,CAAC,QAAS,YAA1CC,eAAuDA,EAAiB,aAAxEC,UAAsFA,GAAY,EAAlGC,gBAAwGA,GAAqB,IAC/JzK,MAAAA,EAAY,IAAIhD,IAAInC,EAAKK,SAASF,MACxCgF,EAAU0K,KAAO,SACX1K,EAAUhF,KAChB,MAAM2P,ECHH,SAAmC3K,EAAWsK,EAA8B,IAG/E,IAAK,MAAMM,IAAa,IAAI5K,EAAUK,aAAalC,QAC3CmM,EAA4BO,MAAMjQ,GAAWA,EAAOkQ,KAAKF,MACzD5K,EAAUK,aAAaqC,OAAOkI,GAGtC,OAAO5K,EDLyB+K,CAA0B/K,EAAWsK,GAEjEC,SADEI,EAAwB3P,KAC1BuP,GAAkBI,EAAwBK,SAASC,SAAS,KAAM,CAC5DC,MAAAA,EAAe,IAAIlO,IAAI2N,EAAwB3P,MACrDkQ,EAAaF,UAAYT,QACnBW,EAAalQ,KAEvB,GAAIwP,EAAW,CACLW,MAAAA,EAAW,IAAInO,IAAI2N,EAAwB3P,MACjDmQ,EAASH,UAAY,cACfG,EAASnQ,KAEnB,GAAIyP,EAAiB,CACXW,MAAAA,EAAiBX,EAAgB,CAAE5P,IAAKmF,IAC9C,IAAK,MAAMqL,KAAgBD,QACjBC,EAAarQ,MDGOsQ,CAAsBzP,EAAQhB,IAAKuI,GAAU,CACnE,MAAMnD,EAAWmK,EAAgB5M,IAAI6M,GACrC,GAAIpK,EAAU,CAEH,MAAA,CAAEA,SAAAA,EAAU4H,UADD9G,EAAmBgJ,wBAAwB9J,QAS5Dc,EAAmBoC,WG5BxC,SAASoI,EAASnI,GACRrC,MAAAA,EAAqBmJ,KCK/B,SAAuBsB,EAASrR,EAASI,GACrC,IAAI8C,EACJ,GAAuB,iBAAZmO,EAAsB,CACvBC,MAAAA,EAAa,IAAIzO,IAAIwO,EAAStQ,SAASF,MAkC7CqC,EAAQ,IAAIhD,GAZU,EAAGQ,IAAAA,KASdA,EAAIG,OAASyQ,EAAWzQ,MAGFb,EAASI,QAEzC,GAAIiR,aAAmB7F,OAExBtI,EAAQ,IAAI1C,EAAY6Q,EAASrR,EAASI,QAEzC,GAAuB,mBAAZiR,EAEZnO,EAAQ,IAAIhD,EAAMmR,EAASrR,EAASI,OAEnC,CAAA,KAAIiR,aAAmBnR,GAIxB,MAAM,IAAIV,EAAa,yBAA0B,CAC7C+R,WAAY,kBACZC,SAAU,gBACVf,UAAW,YANfvN,EAAQmO,GzB7DP3M,IACDA,EAAgB,IAAIxD,EAEpBwD,EAAcnD,mBACdmD,EAAc5C,oBAEX4C,GyBiEON,cAAclB,GD7D5BkB,CADsB,IAAI4L,EAAcpJ,EAAoBqC,uBEHhE,SAA0B+E,EAAS/E,ICInC,SAAkB+E,GACa+B,IACRlL,SAASmJ,GDL5BnJ,CAASmJ,GACToD,EAASnI"}
\ No newline at end of file